@media (min-width: 901px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; min-height: 100dvh; height: 100dvh; overflow-y: auto; }
  .main { width: calc(100% - 250px); margin: 0 0 0 250px; }
}

@media (max-width: 900px) {
  .sidebar.mobile-open {
    display: flex;
    position: fixed;
    z-index: 10;
    inset: 0 22% 0 0;
    box-shadow: 24px 0 50px #17372c44;
  }
  .main { width: 100%; margin-left: 0; }
}

.nav-link { text-decoration: none; }
.invite-link { text-decoration: none; display: inline-flex; align-items: center; }

.brand { align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 0; background: transparent; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.brand-title { display: grid; gap: 3px; color: #fff8f5; font: 600 17px/1.25 "Noto Sans SC", sans-serif; letter-spacing: .01em; }
.brand-title small { color: #ebdce0; font: 500 12px/1.3 "Noto Sans SC", sans-serif; letter-spacing: .1em; }

.account-log-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.account-log-card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.account-log-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.account-log-head .eyebrow { margin-bottom: 5px; }
.account-log-head h3 { margin: 0; font: 500 20px "Playfair Display", "Noto Sans SC", serif; }
.account-log-head small { color: var(--muted); font-size: 12px; }
.account-log-list { display: grid; }
.account-log-entry { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.account-log-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.account-log-entry time { color: var(--green); font: 12px/1.55 "DM Mono", "Noto Sans SC"; }
.account-log-entry b { display: block; color: var(--ink); font-size: 14px; }
.account-log-entry p, .account-log-empty { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.task-list { display: grid; gap: 14px; padding: 0; border: 0; background: transparent; overflow: visible; }
.task-group { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.task-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; background: #f4f7ef; color: var(--muted); font-size: 12px; }
.task-group-head > div { display: flex; align-items: center; gap: 9px; }
.task-group-name { color: var(--green); font-size: 14px; font-weight: 600; }
.task-group-head small { color: var(--muted); font-size: 12px; }
.task-group-rows .task-row:last-child { border-bottom: 0; }
.task-row { grid-template-columns: 24px minmax(190px, 1fr) 130px 140px 100px auto; }
.task-delete { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 13px "Noto Sans SC"; padding: 5px 0; }
.task-delete:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.task-main { cursor: pointer; }
.task-main:hover .task-title { color: var(--green); }
.task-note-preview { display: block; max-width: 48ch; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-priority-field { display: block; margin-top: 14px; font-size: 13px; }
.task-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.task-page-head h2 { position: relative; margin: 0; padding-bottom: 14px; font: 500 36px "Playfair Display", "Noto Sans SC", serif; letter-spacing: -.04em; }
.task-page-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 68px; height: 4px; border-radius: 99px; background: var(--green); }
.task-page-head p { margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.task-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 28px; }
.task-filter-bar select, .task-filter-bar input { min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: 14px "Noto Sans SC"; outline-color: var(--green); }
.task-filter-bar select { min-width: 142px; }
.task-filter-bar input[type="date"] { width: 150px; }
.task-filter-bar input[type="search"] { min-width: 220px; flex: 1 1 220px; }
.task-scope { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.task-scope button { min-height: 44px; padding: 0 19px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: 14px "Noto Sans SC"; cursor: pointer; }
.task-scope button:last-child { border-right: 0; }
.task-scope button.selected { background: var(--green); color: white; }
.task-date-separator { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .task-row { grid-template-columns: 24px minmax(0, 1fr) auto auto; }
  .task-filter-bar { align-items: stretch; }
}

.inspiration-grid { position: relative; display: grid; gap: 22px; padding-left: 42px; }
.inspiration-grid:before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 12px; width: 1px; background: var(--line); }
.inspiration-timeline-item { position: relative; }
.inspiration-timeline-node { position: absolute; top: 23px; left: -36px; z-index: 1; width: 14px; height: 14px; border: 3px solid var(--green); border-radius: 50%; background: var(--cream); }
.inspiration-timeline-content { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.inspiration-phase-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; background: #f4e7e5; color: var(--green); }
.inspiration-phase-head span { font-weight: 600; }
.inspiration-phase-head small { color: var(--muted); }
.inspiration-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 0; }
.inspiration-media-grid img, .inspiration-add-slot { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; display: block; }
.inspiration-add-slot { border: 1px dashed #c9a8ad; background: #fbf6f5; color: var(--muted); cursor: pointer; font: 13px "Noto Sans SC"; line-height: 1.7; }
.inspiration-add-slot:hover { border-color: var(--green); color: var(--green); }
.inspiration-add-slot small { font-size: 11px; }
.inspiration-guides { display: grid; gap: 10px; padding: 16px 18px 18px; }
.inspiration-guide { padding: 2px 0; }
.inspiration-guide strong { display: block; font: 500 20px "Playfair Display", "Noto Sans SC", serif; }
.inspiration-guide > p { margin: 7px 0 13px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.inspiration-shot { padding-left: 16px; border-left: 2px solid var(--red); }
.inspiration-shot span { color: var(--green); font-size: 12px; font-weight: 600; }
.inspiration-shot p { margin-top: 6px; }

@media (max-width: 900px) {
  .inspiration-grid { padding-left: 34px; }
  .inspiration-timeline-node { left: -29px; }
}

@media (max-width: 560px) {
  .inspiration-grid { padding-left: 28px; }
  .inspiration-grid:before { left: 8px; }
  .inspiration-timeline-node { left: -24px; }
  .inspiration-media-grid { padding: 12px 12px 0; gap: 7px; }
  .inspiration-guides { padding: 14px 14px 16px; }
}

.schedule-list { border-left: 0; margin-left: 0; padding-left: 0; gap: 16px; }
.schedule-day { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.schedule-day-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; background: #f4e7e5; color: var(--green); }
.schedule-day-head span { font-weight: 600; }
.schedule-day-head small { color: var(--muted); }
.schedule-day-list { border-left: 1px solid var(--line); margin: 16px 20px 20px; padding-left: 30px; display: grid; gap: 10px; }
.schedule-item { grid-template-columns: 88px minmax(0, 1fr) auto auto; gap: 14px; }
.schedule-actions { display: flex; align-items: center; gap: 10px; }
.schedule-delete { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 13px "Noto Sans SC"; padding: 3px 0; }
.schedule-delete:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .schedule-item { grid-template-columns: 80px minmax(0, 1fr) auto; }
  .schedule-actions { grid-column: 2 / -1; }
}

@media (max-width: 560px) {
  .schedule-day-list { margin: 14px 14px 16px; padding-left: 20px; }
  .schedule-item { grid-template-columns: 1fr; gap: 7px; }
  .schedule-item:before { left: -27px; }
  .schedule-actions { grid-column: auto; }
}

/* Reference-inspired editorial timeline treatment for the planning workspace. */
.reference-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.reference-page-head h2 { position: relative; margin: 0; padding-bottom: 16px; font: 500 36px "Playfair Display", "Noto Sans SC", serif; letter-spacing: -.04em; }
.reference-page-head h2::after { content: ""; position: absolute; bottom: 0; left: 0; width: 72px; height: 4px; border-radius: 99px; background: var(--green); }
.reference-page-head p { margin: 13px 0 0; color: var(--muted); font-size: 14px; }

.main { min-width: 0; overflow-x: hidden; }
.inspiration-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-left: 0; }
.inspiration-timeline-item { min-width: 0; }
.inspiration-grid::before { display: none; }
.inspiration-timeline-item { position: relative; }
.inspiration-phase-head, .schedule-day-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 0; background: transparent; color: var(--green); }
.inspiration-phase-head span, .schedule-day-head span { padding: 9px 26px; border-radius: 999px; background: var(--green); color: #fff8f6; font: 600 15px "Noto Sans SC"; white-space: nowrap; }
.inspiration-phase-head i, .schedule-day-head i { display: block; height: 1px; background: var(--line); }
.inspiration-phase-head small, .schedule-day-head small { color: #b09ea0; font-size: 12px; white-space: nowrap; }
.inspiration-phase-list { position: relative; display: grid; gap: 18px; margin: 24px 0 0 108px; padding-left: 38px; border-left: 2px solid #eadbdd; }
.inspiration-guide { position: relative; display: grid; grid-template-columns: minmax(240px, .9fr) minmax(300px, 1.1fr); gap: 22px; padding: 27px 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 30px #5e21320d; }
.inspiration-guide::before { content: ""; position: absolute; left: -47px; top: 29px; width: 12px; height: 12px; border: 4px solid var(--green); border-radius: 50%; background: var(--cream); }
.inspiration-guide-copy strong { display: block; font: 500 21px "Playfair Display", "Noto Sans SC", serif; color: var(--ink); }
.inspiration-guide-copy > p { margin: 10px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.inspiration-shot, .inspiration-meta { display: block; width: fit-content; margin-top: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: #8d5b64; background: #fffdfc; font-size: 12px; line-height: 1.4; }
.inspiration-meta { color: var(--muted); }
.inspiration-media-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px; padding: 0; }
.inspiration-media-grid img, .inspiration-media-grid a { width: min(180px, calc(50% - 6px)); aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; }
.inspiration-media-image { width: min(180px, calc(50% - 6px)); aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: #f6eeec; cursor: zoom-in; }
.inspiration-media-image img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; transition: transform .2s ease; }
.inspiration-media-image:hover img { transform: scale(1.04); }
.inspiration-lightbox-image { display: block; width: 100%; max-height: min(68vh, 680px); border-radius: 10px; object-fit: contain; background: #f5eeee; }
.inspiration-media-grid a { display: grid; place-items: center; border: 1px dashed #cdaeb4; color: var(--green); background: #fcf7f6; font-size: 13px; text-align: center; text-decoration: none; }
.inspiration-media-empty { color: #b19fa2; font-size: 13px; padding-top: 8px; }
.inspiration-add-slot { justify-self: start; margin-left: 108px; width: auto; aspect-ratio: auto; padding: 8px 2px; border: 0; border-radius: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--green); font-size: 13px; }

.schedule-list { gap: 50px; }
.schedule-day { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.schedule-day-list { margin: 26px 0 0 116px; padding-left: 40px; border-left: 2px solid #eadbdd; gap: 20px; }
.schedule-item { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 26px 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 30px #5e21320d; }
.schedule-item::before { left: -48px; top: 29px; width: 12px; height: 12px; border: 4px solid var(--green); background: var(--cream); }
.schedule-time { position: absolute; top: 30px; left: -158px; width: 100px; color: var(--green); font: 600 16px "Playfair Display", "Noto Sans SC", serif; text-align: right; }
.schedule-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.schedule-title-row b { font: 500 22px "Playfair Display", "Noto Sans SC", serif; }
.schedule-owner { padding: 6px 10px; border-radius: 999px; color: var(--green); background: #f4e7e9; font-size: 12px; }
.schedule-copy > p { margin: 11px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.schedule-copy .schedule-participants { color: var(--ink); }
.schedule-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.schedule-tags span { padding: 6px 9px; border: 1px solid #ecdccf; border-radius: 8px; color: #9b6d35; background: #fffaf2; font-size: 12px; }
.schedule-actions { align-self: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.45; }
.budget-list { gap: 22px; }
.budget-module { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.budget-module > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; background: #f7eeee; }
.budget-module > header div { display: flex; align-items: center; gap: 10px; }
.budget-module > header span { color: var(--green); font-weight: 700; }
.budget-module > header small { color: var(--muted); font-size: 12px; }
.budget-module > header strong { color: var(--green); font: 600 16px "DM Mono"; }
.budget-module-list { display: grid; }
.budget-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: transparent; }
.budget-row:last-child { border-bottom: 0; }
.budget-row .edit-budget { display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; padding: 16px 20px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.budget-row .edit-budget:hover { background: #fffafa; }
.budget-row .edit-budget span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #f4e7e9; color: var(--green); font: 12px "DM Mono"; }
.budget-row .edit-budget small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.budget-row .edit-budget strong { font: 500 16px "DM Mono"; }
.budget-delete { align-self: center; margin-right: 18px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 13px "Noto Sans SC"; }
.budget-delete:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
#modal { width: min(760px, calc(100% - 28px)); }

@media (max-width: 900px) {
  .reference-page-head { align-items: flex-start; margin-bottom: 28px; }
  .inspiration-phase-list { margin-left: 34px; }
  .inspiration-add-slot { margin-left: 34px; }
  .schedule-day-list { margin-left: 86px; }
  .schedule-time { left: -130px; width: 82px; }
  .inspiration-guide { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .task-page-head { display: grid; align-items: stretch; }
  .task-page-head .button { width: 100%; }
  .task-filter-bar { gap: 9px; }
  .task-scope, .task-filter-bar select, .task-filter-bar input[type="date"], .task-filter-bar input[type="search"] { width: 100%; }
  .task-scope button { flex: 1; }
  .task-date-separator { display: none; }
  .reference-page-head { display: grid; gap: 18px; }
  .reference-page-head h2 { font-size: 31px; }
  .reference-page-head .button { width: 100%; }
  .inspiration-phase-head, .schedule-day-head { grid-template-columns: auto 1fr; gap: 12px; }
  .inspiration-phase-head small, .schedule-day-head small { grid-column: 2; justify-self: end; }
  .inspiration-phase-list { margin-left: 18px; padding-left: 25px; }
  .inspiration-guide { padding: 20px; }
  .inspiration-guide::before { left: -35px; }
  .inspiration-media-grid img, .inspiration-media-grid a, .inspiration-media-image { width: 100%; }
  .inspiration-add-slot { margin-left: 18px; }
  .schedule-day-list { margin-left: 22px; padding-left: 25px; }
  .schedule-item { grid-template-columns: 1fr; padding: 20px; }
  .schedule-item::before { left: -35px; }
  .schedule-time { position: static; width: auto; text-align: left; }
  .schedule-actions { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .budget-row .edit-budget { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; padding: 14px; }
  .budget-delete { margin-right: 12px; }
}

/* H5 invitation editor: desktop form with a live, contained phone preview. */
.invite-editor-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.invite-editor-head h2 { position: relative; margin: 0; padding-bottom: 14px; font: 500 36px "Playfair Display", "Noto Sans SC", serif; letter-spacing: -.04em; }
.invite-editor-head h2::after { content: ""; position: absolute; bottom: 0; left: 0; width: 68px; height: 4px; border-radius: 99px; background: var(--green); }
.invite-editor-head p { margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.invite-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 30px; align-items: start; }
.invite-editor-form { display: grid; gap: 18px; }
.invite-setting-card { padding: 26px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 30px #5e21320d; }
.invite-setting-card h3 { margin: 0 0 20px; font: 500 21px "Playfair Display", "Noto Sans SC", serif; }
.invite-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.invite-card-title small { color: var(--muted); font-size: 12px; }
.invite-setting-card .field + .field { margin-top: 15px; }
.invite-setting-card .form-grid .field + .field { margin-top: 0; }
.invite-setting-card input, .invite-setting-card textarea { width: 100%; box-sizing: border-box; }
.invite-image-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.image-upload-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin-top: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: #fffafa; font-size: 13px; cursor: pointer; }
.image-upload-button:hover { border-color: var(--green); background: #f8edee; }
.invite-rsvp-toggle { display: flex; align-items: center; gap: 9px; margin: 2px 0 18px; color: var(--ink); font-size: 14px; }
.invite-rsvp-toggle input { width: auto; accent-color: var(--green); }
.invite-share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 9px; align-items: center; }
.invite-share-row input { min-width: 0; height: 42px; color: var(--muted); background: #fffdfb; }
.invite-share-hint { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.invite-phone { position: sticky; top: 24px; width: 100%; box-sizing: border-box; padding: 12px; border: 14px solid #2c1a20; border-radius: 38px; background: #2c1a20; box-shadow: 0 22px 42px #3d192330; }
.invite-phone::before { content: ""; display: block; width: 76px; height: 5px; margin: -4px auto 8px; border-radius: 99px; background: #4a3038; }
.invite-phone-screen { overflow: auto; max-height: calc(100vh - 105px); border-radius: 23px; background: #fffaf5; scrollbar-width: thin; }
.invite-preview-hero { display: block; width: 100%; height: 186px; object-fit: cover; background: #7b2538; }
.invite-preview-copy { padding: 24px 22px 28px; color: #3f2b30; }
.invite-preview-kicker { margin: 0 0 13px; color: #a17a7f; font-size: 11px; letter-spacing: .12em; text-align: center; }
.invite-preview-copy h3 { margin: 0; color: var(--green); font: 500 28px "Playfair Display", "Noto Sans SC", serif; text-align: center; line-height: 1.35; }
.invite-preview-divider { margin: 14px 0 18px; color: #bc9298; font-size: 11px; text-align: center; letter-spacing: .1em; }
.invite-preview-intro { margin: 0; white-space: pre-line; color: #735c60; font-size: 13px; line-height: 1.85; text-align: center; }
.invite-preview-date { margin: 22px 0 6px; color: var(--green); font: 600 16px "DM Mono", "Noto Sans SC"; text-align: center; letter-spacing: .08em; }
.invite-preview-meta { margin: 0 0 20px; color: #927a7f; font-size: 12px; line-height: 1.65; text-align: center; }
.invite-preview-story { display: block; width: 100%; height: 148px; border-radius: 12px; object-fit: cover; }
.invite-preview-map { display: grid; gap: 6px; margin-top: 18px; padding: 16px; border: 1px solid #ead9d4; border-radius: 12px; background: #fffdfb; }
.invite-preview-map span { color: #a17a7f; font-size: 11px; letter-spacing: .08em; }
.invite-preview-map b { color: #4b3036; font-size: 15px; }
.invite-preview-map small { color: #8d777b; font-size: 11px; line-height: 1.55; }
.invite-preview-map button { justify-self: start; margin-top: 5px; padding: 7px 10px; border: 0; border-radius: 7px; background: var(--green); color: #fff; font: 12px "Noto Sans SC"; }
.invite-preview-rsvp { display: grid; gap: 5px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #ead9d4; }
.invite-preview-rsvp b { color: #4b3036; font-size: 14px; }
.invite-preview-rsvp span { color: #9b8589; font-size: 11px; line-height: 1.6; }
.invite-preview-rsvp input, .invite-preview-rsvp select { width: 100%; height: 35px; box-sizing: border-box; padding: 0 9px; border: 1px solid #ead9d4; border-radius: 7px; color: #8d777b; background: #fff; font: 11px "Noto Sans SC"; }
.invite-preview-rsvp button { justify-self: start; padding: 7px 10px; border: 0; border-radius: 7px; background: var(--green); color: #fff; font: 12px "Noto Sans SC"; }

@media (max-width: 1060px) {
  .invite-editor-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; }
}

@media (max-width: 820px) {
  .invite-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .invite-phone { position: static; width: min(390px, 100%); justify-self: center; }
  .invite-phone-screen { max-height: none; }
}

@media (max-width: 620px) {
  .invite-editor-head { display: grid; align-items: stretch; }
  .invite-editor-head h2 { font-size: 31px; }
  .invite-editor-head .button { width: 100%; }
  .invite-setting-card { padding: 20px; }
  .invite-card-title { display: grid; gap: 6px; }
  .invite-image-controls { grid-template-columns: 1fr; }
  .invite-share-row { grid-template-columns: 1fr 1fr; }
  .invite-share-row input { grid-column: 1 / -1; }
  .invite-phone { border-width: 11px; border-radius: 30px; }
  .account-log-grid { grid-template-columns: 1fr; }
  .account-log-entry { grid-template-columns: 1fr; gap: 3px; }
}

/* Mobile-first refinements: keep planning actions comfortable on narrow touch screens. */
@media (max-width: 900px) {
  .sidebar.mobile-open { width: min(300px, 84vw); inset: 0 auto 0 0; padding: 24px 14px 16px; }
  .sidebar.mobile-open .brand { margin-bottom: 26px; }
  .sidebar.mobile-open .nav-item { min-height: 46px; font-size: 15px; }
  .topbar { position: sticky; top: 0; z-index: 4; margin: -26px -22px 24px; padding: 18px 22px 14px; background: color-mix(in srgb, var(--cream) 94%, transparent); backdrop-filter: blur(10px); }
  .topbar h1 { font-size: clamp(27px, 6vw, 35px); line-height: 1.18; }
  .topbar .eyebrow { max-width: calc(100vw - 124px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-menu { min-width: 48px; min-height: 42px; }
  .top-actions .button { min-height: 42px; }
  .view { min-width: 0; }
  .task-row, .budget-row, .schedule-item, .inspiration-guide { overflow-wrap: anywhere; }
  .guest-table-wrap { margin-right: -2px; }
  #modal { max-height: min(88dvh, 760px); overflow: auto; }
  #modalForm { padding: 24px 20px; }
  .close { min-width: 44px; min-height: 44px; }
  .form-actions { position: sticky; bottom: -24px; margin: 22px -20px -24px; padding: 12px 20px; background: var(--paper); border-top: 1px solid var(--line); }
  .form-actions .button { min-height: 44px; }
}

@media (max-width: 620px) {
  .main { padding: 18px 14px 38px; }
  .topbar { margin: -18px -14px 22px; padding: 15px 14px 12px; }
  .topbar .eyebrow { font-size: 10px; }
  .top-actions { margin-left: auto; }
  .top-actions .button { padding: 9px 11px; font-size: 13px; }
  .hero-grid, .two-col, .metric-grid, .account-log-grid { gap: 12px; }
  .metric-card { min-height: 108px; }
  .countdown-panel, .next-panel, .paper-card { border-radius: 12px; }
  .section-head > .top-actions { width: 100%; }
  .section-head > .top-actions .button { flex: 1; }
  .task-group-head { padding: 12px 14px; }
  .task-row { padding: 14px; }
  .task-delete, .schedule-delete { min-width: 44px; min-height: 40px; }
  .budget-module > header { padding: 13px 14px; }
  .budget-row .edit-budget { min-height: 62px; }
  .guest-toolbar input { max-width: none; min-height: 44px; }
  .legend { gap: 9px; }
  .inspiration-phase-head span, .schedule-day-head span { padding: 8px 13px; font-size: 13px; }
  .inspiration-phase-head small, .schedule-day-head small { font-size: 11px; }
  .inspiration-guide-copy strong { font-size: 19px; }
  .inspiration-media-image { min-height: 160px; }
  .invite-setting-card { border-radius: 14px; }
  .invite-preview-copy { padding: 20px 17px 24px; }
  .invite-preview-hero { height: 164px; }
  .account-log-card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Compact mobile hierarchy: navigation, title and page actions never compete for one row. */
@media (max-width: 900px) {
  .topbar { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 12px; }
  .topbar > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; min-width: 0; padding-top: 14px; }
  .topbar .top-actions { display: none; }
  .sidebar.mobile-open { width: min(286px, 82vw); box-shadow: 18px 0 42px #3b152755; }
  body:has(.sidebar.mobile-open) .main { opacity: .42; pointer-events: none; }
  .section-head, .reference-page-head, .task-page-head, .invite-editor-head { margin-bottom: 20px; }
  .section-head .button, .reference-page-head .button, .task-page-head .button { min-height: 44px; }
  .budget-summary { margin-bottom: 14px; }
  .budget-summary > div { padding: 17px 18px; }
  .budget-summary strong { margin: 4px 0; font-size: 27px; }
  .budget-module { border-radius: 13px; }
  .budget-module-list { overflow: hidden; }
  .schedule-list { gap: 30px; }
  .schedule-day-list { gap: 13px; }
  .inspiration-grid { gap: 34px; }
  .inspiration-phase-list { gap: 13px; }
}

@media (max-width: 620px) {
  .topbar > div:nth-child(2) { padding-top: 11px; }
  .topbar h1 { font-size: 29px; }
  .topbar .eyebrow { max-width: 100%; font-size: 9px; letter-spacing: .055em; }
  .mobile-menu { padding: 7px 10px; border-radius: 9px; }
  .sidebar.mobile-open { width: min(274px, 82vw); }
  .sidebar.mobile-open .brand { margin: 0 5px 20px; }
  .sidebar.mobile-open .sidebar-bottom { margin-top: 18px; }
  .section-head, .task-page-head, .reference-page-head, .invite-editor-head { gap: 14px; margin-bottom: 18px; }
  .section-head h2, .task-page-head h2, .reference-page-head h2, .invite-editor-head h2 { font-size: 28px; }
  .section-head > .top-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .section-head > .top-actions .button { width: 100%; padding-inline: 8px; }
  .budget-summary > div { min-height: 93px; padding: 15px 18px; }
  .budget-summary strong { font-size: 25px; }
  .budget-module > header { align-items: flex-start; }
  .budget-module > header div { display: grid; gap: 2px; }
  .budget-module > header strong { padding-top: 2px; }
  .budget-row .edit-budget { grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; padding: 13px 12px; }
  .budget-row .edit-budget span { width: 31px; height: 31px; }
  .budget-row .edit-budget strong { font-size: 14px; padding-top: 5px; }
  .budget-delete { min-width: 38px; margin: 0 5px 0 0; padding: 8px 0; }
  .task-filter-bar { margin-bottom: 18px; }
  .task-group { border-radius: 12px; }
  .task-row { gap: 10px; }
  .task-main .task-title { line-height: 1.45; }
  .guest-table-wrap { border-radius: 12px; }
  .schedule-day-list { margin: 18px 0 0 18px; padding-left: 22px; }
  .schedule-item { padding: 17px; border-radius: 14px; }
  .schedule-title-row b { font-size: 19px; }
  .schedule-copy > p { font-size: 13px; }
  .inspiration-phase-list { margin-left: 12px; padding-left: 20px; }
  .inspiration-guide { padding: 17px; border-radius: 14px; }
  .inspiration-guide::before { left: -30px; top: 24px; }
  .inspiration-add-slot { margin-left: 12px; min-height: 40px; }
  .gallery-intro { padding: 16px; }
  .photo-grid { gap: 9px; }
  .invite-editor-layout { gap: 18px; }
}
