:root {
  color-scheme: light;
  --ink: #3d3833;
  --green: #6e5a48;
  --muted: #7a716a;
  --paper: #fbf8f3;
  --line: #ece5dc;
  --sage: #f6efe9;
  --gold: #b8916a;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #d8b4b0; outline-offset: 2px; }
a { color: var(--green); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .serif { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.08; letter-spacing: -.05em; }
h2 { font-size: 1.9rem; letter-spacing: -.035em; }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .19em; font-weight: 700; color: var(--muted); }
.small { font-size: .8rem; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--green); text-decoration: none; }
.brand-mark { width: 37px; height: 37px; border: 1px solid #e3d6c8; border-radius: 50% 50% 12% 12%; display: grid; place-items: center; font-size: 1.1rem; }
.brand strong { display: block; font-family: Georgia, serif; font-weight: 400; font-size: 1.15rem; }
.brand small { font-size: .6rem; letter-spacing: .18em; color: var(--muted); }
.topbar { border-bottom: 1px solid var(--line); background: #ffffffbd; }
.topbar-inner { max-width: 1320px; padding: 19px 40px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.btn { border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 7px; padding: 10px 17px; font-size: .8rem; font-weight: 600; }
.btn:hover { background: var(--sage); border-color: #dccbbb; }
.btn.primary { background: var(--green); color: white; border-color: var(--green); }
.btn.primary:hover { background: #5a4838; }
.btn.subtle { border-color: transparent; background: transparent; color: var(--muted); }
.btn.compact { padding: 7px 10px; font-size: .75rem; }
.avatar { width: 33px; height: 33px; border-radius: 50%; display: inline-grid; place-items: center; background: #f3ebe4; color: var(--green); font-size: .72rem; font-weight: 700; border: 2px solid var(--paper); flex: 0 0 auto; }
.avatar.alt { background: #f6e7e3; color: #a0716b; }
.avatar-stack { display: flex; padding-left: 6px; }
.avatar-stack .avatar { margin-left: -6px; }
.sync { color: var(--muted); font-size: .7rem; display: flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c9a27e; }
.sync.error { color: #a03e32; }
.sync.error::before { background: #b65c4c; }
.layout { max-width: 1320px; margin: auto; display: grid; grid-template-columns: 215px minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--line); padding: 35px 22px 24px 40px; min-height: calc(100vh - 80px); }
.sidebar .eyebrow { margin: 0 0 20px 10px; }
.nav-button { display: flex; width: 100%; gap: 11px; align-items: center; border: none; color: var(--muted); background: transparent; padding: 12px 13px; border-radius: 6px; font-size: .82rem; text-align: left; margin-bottom: 7px; }
.nav-button.active { color: var(--green); background: #f5ece6; font-weight: 600; }
.nav-icon { font-size: 1.1rem; width: 19px; text-align: center; }
.nav-count { margin-left: auto; font-size: .67rem; background: #efe4da; padding: 2px 6px; border-radius: 5px; }
.sidebar-note { margin-top: 55px; border-top: 1px solid var(--line); padding: 23px 10px 0; font-size: .73rem; color: var(--muted); line-height: 1.65; }
.sidebar-note strong { display: block; color: var(--ink); font-weight: 600; margin: 8px 0; }
.main { padding: 37px 40px 60px; min-width: 0; }
.hero { position: relative; display: flex; justify-content: space-between; align-items: center; margin-bottom: 27px; gap: 24px; }
.hero h1 { margin-bottom: 13px; max-width: 680px; overflow-wrap: anywhere; }
.hero .eyebrow { margin-bottom: 15px; color: var(--gold); }
.hero p { font-size: .84rem; margin: 0; }
.hero-art { position: relative; width: 130px; height: 152px; flex-shrink: 0; border: 1px solid #eadfd3; border-radius: 70px 70px 6px 6px; background: linear-gradient(150deg, #fdfaf6, #f4ebe2); overflow: hidden; display: grid; place-items: center; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; height: 120px; width: 68px; border: 1px solid #dcc7b4; border-radius: 90% 5% 90% 5%; transform: rotate(-32deg); bottom: -25px; left: 7px; }
.hero-art::after { transform: rotate(25deg); left: 62px; bottom: -36px; }
.hero-art span { font-family: Georgia, serif; font-size: 3.5rem; font-style: italic; color: #b8916a; margin-bottom: 27px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 31px; }
.stat { background: white; border: 1px solid var(--line); padding: 17px 18px; border-radius: 8px; }
.stat .eyebrow { font-size: .59rem; letter-spacing: .1em; }
.stat-value { font: 1.85rem Georgia, serif; margin: 9px 0 6px; }
.stat small { color: var(--muted); font-size: .7rem; }
.section-head { margin-bottom: 19px; }
.section-head h2 { margin-bottom: 5px; }
.section-head p { font-size: .79rem; color: var(--muted); margin: 0; }
.category-tabs { display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.category-tab { white-space: nowrap; background: none; border: none; border-bottom: 2px solid transparent; padding: 12px 14px; font-size: .78rem; color: var(--muted); }
.category-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.toolbar { margin-bottom: 19px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.toolbar input { width: 240px; }
.toolbar select { width: 160px; }
.hint { font-size: .72rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.choice-card { background: white; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; min-width: 0; }
.choice-card.selected { border-color: #d4b28f; box-shadow: 0 0 0 1px #d4b28f; }
.card-scene { height: 102px; position: relative; overflow: hidden; background: linear-gradient(130deg, #f4ece4, #fdf9f4); display: flex; align-items: center; justify-content: center; }
.card-scene.scene-1 { background: linear-gradient(130deg, #eee6dc, #f5f0e7); }
.card-scene.scene-2 { background: linear-gradient(130deg, #f3e6e4, #fcf6f4); }
.scene-symbol { font: italic 4.5rem Georgia, serif; color: #c9a27e; opacity: .5; line-height: 1; }
.scene-1 .scene-symbol { color: #b59973; }
.scene-2 .scene-symbol { color: #c49a96; }
.card-scene::before { content: ""; position: absolute; width: 130px; height: 130px; border: 1px solid #ffffff80; border-radius: 50%; right: -25px; top: -30px; }
.badge { background: white; border: 1px solid var(--line); border-radius: 5px; font-size: .62rem; padding: 5px 8px; font-weight: 600; display: inline-block; }
.card-scene .badge { position: absolute; left: 13px; top: 12px; }
.badge.confirmed { color: #8a6a45; background: #f8efe4; border-color: #e6d2b8; }
.card-body { padding: 20px; }
.card-body h3 { margin-bottom: 6px; overflow-wrap: anywhere; }
.card-location { font-size: .74rem; color: var(--muted); margin: 0 0 16px; }
.cost-line { display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid #f1ebe4; margin-bottom: 14px; font-size: .75rem; }
.cost-line strong { font-weight: 600; }
.card-notes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .76rem; color: var(--muted); margin-bottom: 12px; line-height: 1.65; }
.card-link { font-size: .75rem; text-decoration: none; display: inline-block; margin-bottom: 17px; }
.signals { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fbf7f2; border-radius: 6px; padding: 10px 12px; margin-bottom: 13px; }
.signals span { font-size: .72rem; }
.star { border: 0; background: none; padding: 2px; color: #e2d6ca; font-size: 1.1rem; }
.star.on { color: var(--gold); }
.rating-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 15px; }
.rating-row small { color: var(--muted); font-size: .68rem; }
.vote-button { color: var(--green); }
.vote-button.on { background: #f8ece8; border-color: #e3c3bd; }
.card-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.edit-btn { border: 0; background: none; color: var(--muted); font-size: .7rem; padding: 4px; }
.card-meta { font-size: .63rem; color: var(--muted); margin: 14px 0 0; }
.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 23px; }
.panel h3 { margin-bottom: 13px; }
.activity { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f3eee8; align-items: flex-start; }
.activity:last-child { border: none; }
.activity p { font-size: .75rem; margin: 1px 0 4px; line-height: 1.5; overflow-wrap: anywhere; }
.activity small { color: var(--muted); font-size: .65rem; }
.progress { height: 5px; background: #f1ebe4; border-radius: 10px; overflow: hidden; margin: 14px 0; }
.progress-fill { height: 100%; background: #c9a27e; }
progress.progress { display: block; width: 100%; border: none; appearance: none; }
progress::-webkit-progress-bar { background: #f1ebe4; }
progress::-webkit-progress-value { background: #c9a27e; }
progress::-moz-progress-bar { background: #c9a27e; }
.rank-row { background: white; border: 1px solid var(--line); border-radius: 7px; display: flex; gap: 13px; padding: 15px; align-items: center; margin-bottom: 9px; }
.rank-number { font: 1.6rem Georgia, serif; color: var(--gold); width: 27px; text-align: center; }
.rank-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rank-name strong { font-size: .85rem; }
.rank-name small { display: block; color: var(--muted); font-size: .72rem; margin-top: 5px; }
.empty { border: 1px dashed #e3d6c8; background: #fcf9f5; padding: 36px 24px; text-align: center; border-radius: 8px; }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: .83rem; }
.plan-list { display: grid; gap: 12px; margin-bottom: 24px; }
.decision { background: white; border: 1px solid var(--line); padding: 19px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.decision h3 { margin: 6px 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.decision p { margin: 0; font-size: .75rem; color: var(--muted); }
.warning { color: #925031; background: #faf0e5; border: 1px solid #ebd4b7; padding: 12px 15px; border-radius: 7px; font-size: .78rem; line-height: 1.6; margin-bottom: 18px; }
.task-row { display: flex; gap: 13px; align-items: center; border-bottom: 1px solid var(--line); padding: 15px 0; }
.task-row:last-child { border: none; }
.task-row input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--green); flex-shrink: 0; }
.task-info { flex: 1; min-width: 0; }
.task-info strong { display: block; font-size: .83rem; overflow-wrap: anywhere; }
.task-info small { font-size: .72rem; color: var(--muted); display: block; margin-top: 5px; }
.task-row.done strong { text-decoration: line-through; color: var(--muted); }
.overdue { color: #a3523b !important; }
.member-card { display: flex; align-items: center; gap: 14px; padding: 19px; border: 1px solid var(--line); background: white; border-radius: 8px; }
.member-card p { margin: 0; font-size: .83rem; overflow-wrap: anywhere; }
.member-card small { font-size: .72rem; color: var(--muted); }
label { display: block; font-size: .76rem; font-weight: 600; margin-bottom: 7px; }
input:not([type=checkbox]), select, textarea { width: 100%; border: 1px solid #e6ddd2; background: white; border-radius: 6px; padding: 10px 12px; color: var(--ink); font-size: .83rem; }
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.full { grid-column: 1 / -1; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 28px; width: min(570px, calc(100% - 24px)); color: var(--ink); max-height: 90vh; }
dialog::backdrop { background: #3d383340; backdrop-filter: blur(4px); }
dialog h2 { margin-bottom: 20px; }
.dialog-head { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.dialog-head button { padding: 6px 9px; }
.form-error { color: #a03e32; font-size: .8rem; line-height: 1.5; margin-bottom: 14px; }
.notice { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--green); color: white; padding: 14px 20px; border-radius: 8px; box-shadow: 0 5px 25px #3d383326; z-index: 10; max-width: min(650px, 92vw); font-size: .83rem; }
.notice.error { background: #913f33; }
.landing { max-width: 1150px; padding: 75px 40px; margin: auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.landing h1 { font-size: clamp(2.8rem, 6vw, 4.9rem); margin: 22px 0; }
.landing-copy p { color: var(--muted); max-width: 470px; font-size: .98rem; }
.landing-card { background: white; border: 1px solid var(--line); padding: 30px; border-radius: 12px; box-shadow: 0 12px 55px #6e5a4808; }
.landing-card h2 { font-size: 1.8rem; }
.landing-card .btn.primary { width: 100%; }
.feature-list { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 30px; }
.feature-list span { border: 1px solid #ece0d3; border-radius: 30px; padding: 8px 13px; color: var(--green); font-size: .74rem; }
.local-note { max-width: 1050px; margin: 0 auto 40px; padding: 0 40px; font-size: .72rem; color: var(--muted); line-height: 1.6; }
.checkbox-label { display: flex; align-items: start; gap: 9px; font-weight: 400; line-height: 1.5; }
.checkbox-label input { margin-top: 3px; accent-color: var(--green); }
.connection-banner { padding: 11px 18px; background: #faf0e5; color: #925031; font-size: .78rem; text-align: center; }
.summary-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.summary-table th, .summary-table td { text-align: left; padding: 13px 8px; border-bottom: 1px solid var(--line); }
.summary-table th { font-size: .68rem; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
/* Aero bridal layer */
body { background: radial-gradient(1200px 600px at 10% -10%, #fff 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #f8ece8 0%, transparent 55%), linear-gradient(180deg, #fdfbf8, #f7f1ea); background-attachment: fixed; }
.topbar { background: rgba(255,255,255,.7); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid rgba(255,255,255,.9); box-shadow: 0 1px 0 #ece5dc, 0 6px 24px #b8916a0f; }
.panel, .choice-card, .stat, .landing-card, .rank-row, .decision, .member-card, dialog { background: rgba(255,255,255,.74); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 0 0 1px #ece5dcb0, 0 10px 30px #b8916a14; border-radius: 16px; }
.btn { border-radius: 999px; font-weight: 500; background: linear-gradient(180deg, #fff, #faf6f1); box-shadow: inset 0 1px 0 #fff, 0 1px 2px #3d38330d; }
.btn:hover { border-color: #dccbbb; }
.btn.primary { background: linear-gradient(180deg, #ffffff 0%, #fbf6f0 55%, #f3ebe2 100%); color: var(--ink); border: 1px solid #e3d0bb; box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #ead9c6, 0 4px 14px #b8916a22; }
.btn.primary:hover { background: linear-gradient(180deg, #fff, #f6ede3); border-color: #d4b28f; color: var(--ink); }
.eyebrow, .badge, label, .avatar, .nav-button.active, .category-tab.active, .sidebar-note strong, .cost-line strong, .summary-table th { font-weight: 500; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -.02em; }
.landing h1 { font-size: clamp(2rem, 4vw, 3rem); }
.brand-name { display: block; font-family: Georgia, serif; font-weight: 400; font-size: 1.15rem; letter-spacing: .01em; color: var(--ink); }
.brand small { letter-spacing: .08em; font-size: .68rem; font-style: italic; font-family: Georgia, serif; }
.notice { background: rgba(61,56,51,.86); backdrop-filter: blur(10px); border-radius: 999px; }
.couple { display: flex; flex-direction: column; align-items: center; gap: 9px; flex-shrink: 0; }
.couple-photo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 0 0 1px #e3d6c8, 0 12px 30px #b8916a33; background: radial-gradient(circle at 35% 30%, #fff, #f4ebe2); display: grid; place-items: center; }
.couple-photo.placeholder span { font-family: Georgia, serif; font-style: italic; font-size: 3rem; color: #b8916a; }
.couple-actions { display: flex; gap: 6px; }
.couple-actions .btn { padding: 5px 11px; font-size: .68rem; }
.couple-actions { flex-wrap: wrap; justify-content: center; }
.photo-frame { position: relative; overflow: hidden; }
.photo-frame img { position: absolute; max-width: none; width: 100%; height: 100%; left: 0; top: 0; }
.photo-preview { width: min(300px, 100%); aspect-ratio: 1; border-radius: 50%; margin: 0 auto 18px; background: #f4ebe2; }
#photo-form input[type=range] { padding: 0; accent-color: var(--green); }
#photo-zoom-value { display: block; margin: -10px 0 17px; font-size: .8rem; color: var(--muted); }
@media (min-width: 1500px) { .main { padding-right: 0; } }
@media (max-width: 1000px) {
  .layout { grid-template-columns: 170px minmax(0, 1fr); }
  .sidebar { padding-left: 18px; padding-right: 14px; }
  .main { padding: 30px 24px; }
  .topbar-inner { padding: 17px 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .couple-photo { width: 104px; height: 104px; }
  .landing { gap: 35px; }
}
@media (max-width: 700px) {
  .topbar-inner { padding: 15px 18px; }
  .topbar .identity-name, .topbar .sync { display: none; }
  .layout { display: block; }
  .sidebar { padding: 12px 16px 0; border: 0; min-height: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; overflow-x: auto; gap: 5px; }
  .sidebar .eyebrow, .sidebar-note { display: none; }
  .nav-button { width: auto; white-space: nowrap; padding: 10px 12px; font-size: .76rem; }
  .nav-count { display: none; }
  .main { padding: 27px 18px 45px; }
  .hero { align-items: flex-start; }
  .couple-photo { width: 84px; height: 84px; }
  .couple-photo.placeholder span { font-size: 2rem; }
  .hero h1 { font-size: 2.5rem; }
  .cards, .lower-grid { grid-template-columns: 1fr; }
  .section-head { align-items: start; }
  .section-head h2 { font-size: 1.65rem; }
  .section-head .btn { white-space: nowrap; padding: 10px 12px; }
  .toolbar input { width: min(100%, 220px); }
  .toolbar select { width: 135px; }
  .landing { display: block; padding: 38px 20px; }
  .landing h1 { font-size: 3.1rem; }
  .landing-card { margin-top: 30px; padding: 24px; }
  .local-note { padding: 0 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .decision { align-items: start; }

  /* Phone ergonomics: comfortable tap targets, no iOS zoom-on-focus, tidy scrollers */
  html { -webkit-text-size-adjust: 100%; }
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .main { padding-bottom: calc(45px + env(safe-area-inset-bottom)); }
  input:not([type=checkbox]), select, textarea { font-size: 16px; min-height: 44px; }
  textarea { min-height: 88px; }
  input[type=checkbox], .task-row input[type=checkbox] { width: 24px; height: 24px; }
  .btn { min-height: 44px; }
  .btn.compact { min-height: 40px; padding: 8px 12px; }
  .nav-button, .category-tab { min-height: 42px; }
  .sidebar nav, .category-tabs { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .sidebar nav::-webkit-scrollbar, .category-tabs::-webkit-scrollbar { display: none; }
  .star { padding: 8px 5px; font-size: 1.25rem; }
  .edit-btn { min-width: 40px; min-height: 40px; }
  .card-link { display: inline-flex; align-items: center; min-height: 40px; }
  .hero { flex-direction: column-reverse; align-items: center; text-align: center; gap: 16px; }
  .hero h1 { font-size: clamp(1.9rem, 9vw, 2.4rem); overflow-wrap: break-word; }
  .couple-actions .btn { min-height: 40px; padding: 8px 14px; font-size: .74rem; }
  .stats { gap: 9px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 1.5rem; }
  .toolbar input, .toolbar select { width: 100%; }
  .topbar-inner { gap: 10px; }
  .brand { min-width: 0; gap: 10px; }
  .brand-mark { flex-shrink: 0; }
  .brand > span:last-child { min-width: 0; overflow: hidden; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem; }
  .brand small { display: none; }
  .topbar .row { flex-shrink: 0; gap: 8px; }
  .topbar .avatar-stack .avatar:nth-child(n+2) { display: none; }
  .topbar .btn { white-space: nowrap; flex-shrink: 0; }
  dialog { width: calc(100% - 16px); max-height: 92dvh; padding: 20px 18px; }
  .dialog-head button { min-width: 44px; min-height: 44px; }
}
@media (max-width: 400px) {
  .brand-mark { width: 34px; height: 34px; }
  .topbar .btn { padding: 0 12px; }
  .topbar .avatar-stack { display: none; }
}
@media print {
  .topbar, .sidebar, .couple-actions, .btn, .notice, .connection-banner { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  .panel, .decision, .stat { break-inside: avoid; }
  body { background: white; color: black; }
}

.place-results { display: grid; gap: 12px; margin: 16px 0 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.place-results .option-card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.place-results h4 { margin: 0 0 4px; }
.place-results a { margin-right: 10px; }
.vendor-checklist { background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 0 0 18px; box-shadow: 0 8px 24px rgba(120,110,140,.08); backdrop-filter: blur(10px); }
.vendor-checklist summary { cursor: pointer; font-weight: 700; }
.vendor-checklist[open] { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.vendor-checklist[open] summary { grid-column: 1 / -1; margin-bottom: 4px; }
.checklist-group h3 { font-size: 1rem; margin: 6px 0; }
.checklist-group ul { margin: 0; padding-left: 18px; font-size: .92rem; line-height: 1.45; }
@media (max-width: 640px) { .vendor-checklist { padding: 12px 14px; } }
/* Budget & imports */
.totals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.total-card { background: rgba(255,255,255,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.total-card span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.total-card strong { font-size: 1.25rem; color: var(--ink); }
.total-card.over { background: #fbeeee; border-color: #e7c4c4; }
.total-card.over strong { color: #a33a3a; }
.dashboard-targets, .dashboard-comparison { margin-top: 18px; }
.dashboard-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dashboard-table .target-over { background: #fbeeee; }
.dashboard-table .target-over td:last-child { color: #a33a3a; }
@media (max-width: 640px) {
  #dashboard-form .form-grid { grid-template-columns: 1fr; }
}
.cat-bar { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; align-items: center; gap: 12px; margin: 10px 0; font-size: .85rem; }
.cat-name { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { display: block; height: 10px; border-radius: 999px; background: var(--sage); border: 1px solid var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #f3d9d3, #d9a99c); transition: width .4s ease; }
.cat-total { font-variant-numeric: tabular-nums; color: var(--muted); }
.expense-table td { vertical-align: top; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.edit-btn.danger { color: #a33a3a; }
.overdue { color: #a33a3a; font-weight: 600; }
.import-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.file-btn { cursor: pointer; }
.sheet-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 6px 0 4px; }
.sheet-form > label, .sheet-form > .field { flex: 1 1 280px; }
.sheet-form .form-error:empty { display: none; }
.import-preview { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.import-preview h4 { margin: 0 0 6px; }
.warning ul { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 640px) {
  .totals-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .total-card { padding: 10px 12px; }
  .total-card strong { font-size: 1.05rem; }
  .cat-bar { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .cat-bar .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .import-actions .btn, .sheet-form .btn { flex: 1 1 100%; }
}
