/* 云归家 · cream paper, sage leaves, and room for little wishes. */
:root {
  --paper: #f8f6ef;
  --card: #fffef9;
  --ink: #344b40;
  --muted: #6d796b;
  --green: #56705a;
  --green-dark: #3e5846;
  --sage: #eaf0e4;
  --line: #dfe3d7;
  --peach: #f5e6d9;
  --orange: #a87154;
  --serif: "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); scrollbar-gutter: stable; }
body { margin: 0; color: var(--ink); font: 15px/1.65 var(--sans); background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { color: inherit; min-height: 44px; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .6; cursor: wait; }
button, input, textarea, select, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #a87345; outline-offset: 4px; }
input, textarea, select { font-size: 16px; }
a { color: inherit; }
svg { display: block; flex-shrink: 0; }
button svg { pointer-events: none; }
[hidden] { display: none !important; }
.native-upgrade-required #appShell { display: none !important; }
.native-upgrade-card { width: min(420px,100%); padding: 38px 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); text-align: center; }
.native-upgrade-card h1 { margin: 0 0 22px; font: 500 32px/1.4 var(--serif); letter-spacing: .14em; }
.native-upgrade-message { margin: 0 0 10px; font-size: 17px; }
.native-upgrade-note { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.native-upgrade-download { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 24px; text-decoration: none; }

/* Shared shell and navigation */
.shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); max-width: 1600px; min-height: 100vh; margin: auto; }
.sidebar { display: flex; flex-direction: column; padding: 38px 24px 28px; border-right: 1px solid var(--line); background: #f0f2e9; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { display: grid; place-items: center; flex: none; width: 45px; height: 45px; border: 1px solid #a7b798; border-radius: 15px 15px 15px 4px; color: #64805c; background: #f7f8ef; }
.brand-name { font: 600 27px/1.25 var(--serif); letter-spacing: .14em; }
.brand-caption { font-size: 11px; color: var(--muted); margin-top: 7px; line-height: 1.7; }
.brand-heart { display: none; color: #b98769; font-size: 25px; }
.couple { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 24px 0 27px; margin-top: 27px; border-top: 1px solid #dce1d3; border-bottom: 1px solid #dce1d3; }
.avatars { display: flex; padding-right: 3px; }
.avatar { width: 36px; height: 36px; border: 3px solid #f0f2e9; border-radius: 50%; display: grid; place-items: center; background: #d9e2ce; color: #54704b; font: 14px var(--serif); }
.avatar + .avatar { margin-left: -8px; background: #eed9c7; color: #976d50; }
.couple-label { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.couple-label > span { color: #aa8060; padding: 0 2px; }
.couple-label small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 5px; }
.nav-heading { font-size: 12px; font-weight: 600; color: #6d7c66; margin: 30px 10px 13px; letter-spacing: .1em; }
.category-area { min-width: 0; }
.category-nav { display: flex; flex-direction: column; gap: 7px; }
.category-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #64725d; text-align: left; font-size: 14px; transition: background .18s, color .18s; }
.category-btn > svg { width: 18px; height: 18px; }
.category-btn > span:not(.nav-count) { min-width: 0; overflow-wrap: anywhere; }
.category-btn.active { background: #e0e8d7; border-color: #d7e0cc; color: #405b40; font-weight: 600; }
.manage-categories-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: 13px; padding: 9px 10px; border: 1px dashed #bdcdb4; border-radius: 9px; color: #536e49; background: #f7f8ef; font-size: 13px; white-space: nowrap; }
.nav-count { display: grid; place-items: center; min-width: 24px; height: 24px; margin-left: auto; padding: 0 5px; border-radius: 7px; color: #627359; font-size: 12px; font-weight: 400; }
.category-btn.active .nav-count { background: #f4f7ee; }
.sidebar-bottom { margin-top: auto; padding-top: 70px; }
.little-note { position: relative; padding: 24px 20px; border: 1px solid #dfddca; background: #faf8ed; box-shadow: 0 4px 10px #53604306; transform: rotate(-2deg); }
.little-note::before { content: ""; position: absolute; width: 50px; height: 18px; left: calc(50% - 25px); top: -10px; background: #dedfc2a6; transform: rotate(-4deg); }
.little-note > svg { margin-bottom: 11px; color: #9f815b; }
.little-note p { margin: 0; font: 17px/1.85 var(--serif); letter-spacing: .05em; }
.little-note small { display: block; color: #758068; font-size: 10px; letter-spacing: .09em; margin-top: 15px; }
.storage { display: flex; gap: 8px; margin-top: 28px; color: #6c7a62; font-size: 12px; overflow-wrap: anywhere; }
.storage-dot { flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: #8b9f76; }
.main { min-width: 0; padding: 26px 46px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px 18px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.session-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.member-role { border: 1px solid #d9e1cf; border-radius: 30px; padding: 4px 10px; color: #57704b; background: #f0f4e9; font-size: 12px; white-space: nowrap; }
.sync-status { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; }
.sync-status::before { content: ""; flex: none; width: 5px; height: 5px; background: #829d68; border-radius: 50%; }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 8px; padding: 8px 10px; background: transparent; color: #5f7057; font-size: 13px; white-space: nowrap; }
.text-button > svg { width: 16px; height: 16px; }

/* A little letter at the top of our list */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 235px; align-items: center; gap: 28px; padding: 44px 8px 39px 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #728064; font-size: 11px; letter-spacing: .18em; margin-bottom: 18px; }
.eyebrow > span { width: 23px; height: 1px; background: #acb79b; }
.hero h1 { margin: 0; font: 500 43px/1.32 var(--serif); letter-spacing: .065em; }
.hero-title-line { display: block; }
.heart { display: inline-block; color: #b68160; font: 30px/1 var(--sans); margin-left: 13px; vertical-align: 4px; }
.hero-copy > p { color: #67765e; font-size: 15px; margin: 20px 0 0; line-height: 1.9; }
.tiny-date { display: flex; align-items: center; gap: 8px; color: #748068; font-size: 12px; margin-top: 17px; }
.tiny-date > svg { color: #a88365; }
.postcard { position: relative; width: 218px; justify-self: end; padding: 12px 12px 17px; border: 1px solid #e3dfce; border-radius: 2px; background: #fffdf4; box-shadow: 3px 9px 22px #5662430c; transform: rotate(5deg); }
.postcard::before { content: ""; position: absolute; z-index: 1; width: 63px; height: 25px; left: calc(50% - 31px); top: -14px; background: #dcdcbca6; transform: rotate(-8deg); }
.postcard-kicker { color: #7f886f; font: italic 13px/1.6 Georgia, serif; padding: 2px 0 8px; letter-spacing: .06em; }
.postcard-art { width: 100%; height: 133px; background: #dce4cf; border-radius: 1px; }
.postcard-caption { font: 13px/1.6 var(--serif); color: #5f6e55; text-align: center; padding-top: 13px; }
.postcard-stamp { display: block; text-align: right; color: #a9876c; font: italic 11px/1.6 Georgia, serif; margin-top: 7px; padding-right: 2px; }

/* Counts stay tied to the real shared data */
.wish-overview { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 37px; background: #fffdf7; }
.wish-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.stat-item { padding: 18px 23px 16px; }
.stat-item + .stat-item { border-left: 1px solid #e9e9de; }
.stat-item dt { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: #6c7960; }
.stat-item dt > span { color: #9aab83; font-size: 20px; line-height: 1; }
.stat-item dd { display: flex; align-items: baseline; gap: 8px; margin: 7px 0 0; }
.stat-item strong { font: 400 31px/1.4 Georgia, var(--serif); color: #4b6248; font-variant-numeric: tabular-nums; }
.stat-item dd > span { color: #78836c; font-size: 12px; }
.stat-done { background: #f4f6ed; }
.stat-done dt > span { color: #b88b6c; }
.progress-panel { display: flex; align-items: center; gap: 15px; padding: 15px 22px 18px; border-top: 1px solid #e4e8d9; background: #edf2e7; }
.progress-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; color: #799062; }
.progress-copy { flex: 1; min-width: 0; }
.progress-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; align-items: center; margin-bottom: 9px; font-size: 12px; color: #627651; }
.progress-fraction { color: #6c7c60; font-variant-numeric: tabular-nums; }
.progress-track { height: 5px; overflow: hidden; border-radius: 20px; background: #dce4d0; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: #829b6b; transition: width .35s ease; }
.progress-percent { flex: none; font: 400 20px/1 Georgia, serif; color: #647d52; min-width: 42px; text-align: right; }
.viewer-notice { display: flex; align-items: center; gap: 12px; padding: 16px 18px; margin-bottom: 20px; background: #edf2e7; border: 1px solid #dce5d1; border-radius: 12px; color: #526b47; font-size: 14px; }
.viewer-notice > span:first-child { color: #b58463; font-size: 26px; }
.viewer-notice small { display: block; color: #69795e; font-size: 12px; line-height: 1.8; margin-top: 3px; }
.viewer-badge { margin-left: auto; flex: none; font-size: 12px; padding: 4px 9px; border: 1px solid #d3dfc5; border-radius: 30px; white-space: nowrap; }

/* The wishes themselves */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 21px; }
.section-heading { margin: 0; font: 500 25px/1.5 var(--serif); letter-spacing: .025em; }
.section-subtitle { color: #718067; font-size: 13px; margin-top: 5px; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; border-radius: 10px; padding: 10px 17px; font-size: 14px; white-space: nowrap; transition: background .18s, transform .18s; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: #fffef7; box-shadow: 0 3px 5px #3957350b; }
.primary-button > svg { width: 16px; height: 16px; }
.secondary-button { border: 1px solid #d4ddc9; background: #f9fbf3; color: #61764e; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #e2e5d8; border-radius: 12px; background: #efF1e8; }
.tab { display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 7px 14px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #65735b; font-size: 13px; white-space: nowrap; }
.tab.active { background: #fffef9; border-color: #dfe4d5; color: #49653e; box-shadow: 0 2px 4px #50614806; }
.tab-num { font-size: 12px; color: #6f7e64; font-variant-numeric: tabular-nums; }
.search-wrap { position: relative; width: 235px; flex: 1; min-width: 190px; max-width: 265px; }
.search-wrap > svg { position: absolute; left: 14px; top: 15px; width: 17px; height: 17px; color: #7a8870; pointer-events: none; }
.search { width: 100%; min-width: 0; height: 47px; padding: 10px 13px 10px 40px; border: 1px solid #dce2d2; border-radius: 11px; color: #415d3b; background: #fffef8; font-size: 16px; outline-offset: 2px; }
.search::placeholder { color: #7c8873; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.wish-card { min-width: 0; padding: 17px 20px 18px; border: 1px solid #dfe4d5; border-radius: 14px; background: var(--card); box-shadow: 0 2px 6px #4e634404; transition: border-color .18s, box-shadow .18s; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-bottom: 5px; }
.category-tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; font-size: 12px; line-height: 1.5; padding: 5px 9px; background: #ecf1e3; color: #5a764a; }
.category-tag > svg { width: 13px; height: 13px; }
.category-tag.food { background: #f5ebda; color: #956c40; }
.category-tag.daily { background: #ece8f0; color: #7d668b; }
.category-tag.moment { background: #f6e6dc; color: #9b6c52; }
.edit-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 11px; border: 0; border-radius: 50%; background: transparent; color: #788b6b; }
.edit-button > svg { width: 18px; height: 18px; }
.wish-title-row { display: flex; gap: 8px; align-items: flex-start; margin-left: -8px; }
.check { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; color: #fff; border: 0; border-radius: 50%; background: transparent; }
.check::before { content: ""; position: absolute; inset: 10px; border: 1.5px solid #c0cdb2; border-radius: 50%; background: #fffef8; }
.check > svg { width: 15px; height: 15px; position: relative; z-index: 1; }
.check[aria-pressed="true"]::before, .check.readonly-check[aria-label="已完成"]::before { background: #879f71; border-color: #879f71; }
.readonly-check { pointer-events: none; }
.wish-title { margin: 5px 0 0; font: 500 22px/1.55 var(--serif); letter-spacing: .015em; overflow-wrap: anywhere; }
.wish-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 7px 0 0 44px; color: #6d7d62; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.wish-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 9px; border-top: 1px solid #e9ecdf; margin-top: 22px; padding-top: 13px; color: #78856d; font-size: 12px; }
.mini-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #a2b78a; margin: 0 6px 2px 0; }
.wish-card.done { background: #f2f5eb; border-color: #dfe6d4; }
.done .wish-title { color: #758c64; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: #aaba98; }
.done .wish-description { color: #7b886f; }
.done-label { color: #637c50; }
.empty { grid-column: 1 / -1; min-height: 240px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 34px 24px; border: 1px dashed #cbd6be; border-radius: 14px; text-align: center; color: #6d845a; background: #f5f6ee; }
.empty > svg { color: #92a47f; }
.empty h3 { margin: 13px 0 7px; font: 500 25px/1.5 var(--serif); }
.empty p { margin: 0 0 20px; color: #718165; font-size: 14px; }
.result-count { margin-top: 17px; color: #718064; font-size: 12px; }
.footer { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 34px; padding: 23px 0 6px; border-top: 1px solid #e3e6d9; color: #758269; font-size: 12px; text-align: center; }
.footer > span { color: #b78c6a; font-size: 18px; }
.mobile-add-button { display: none; }
.icp-notice { margin: 6px 0 0; text-align: center; font-size: 12px; line-height: 1.8; color: #707070; }
.icp-notice a { color: inherit; text-decoration: none; text-underline-offset: 4px; overflow-wrap: anywhere; }
.icp-notice a:hover, .icp-notice a:focus-visible { text-decoration: underline; }

/* Sign-in and registration share the same home */
.auth-gate { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 44px 24px; background: radial-gradient(ellipse at 10% 5%, #e7eddb80, transparent 48%), radial-gradient(ellipse at 98% 95%, #f5e3d475, transparent 45%), var(--paper); }
.auth-card { display: grid; grid-template-columns: 43% 57%; width: min(920px, 100%); border: 1px solid #dce3d1; border-radius: 22px; overflow: hidden; background: var(--card); box-shadow: 0 18px 65px #4254350b; }
.auth-art { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px 23px 38px; background: #eaf0e1; color: #5c7452; text-align: center; }
.auth-art-label { font-size: 11px; letter-spacing: .18em; color: #6d825f; }
.auth-landscape { width: 100%; max-width: 310px; height: auto; margin: 8px auto 5px; }
.auth-art p { font: 22px/1.85 var(--serif); letter-spacing: .06em; margin: 0; }
.auth-content { align-self: center; padding: 48px 54px 35px; }
.auth-mark { display: grid; place-items: center; width: 49px; height: 49px; margin-bottom: 23px; border: 1px solid #adbf9c; border-radius: 16px 16px 16px 4px; color: #6e885b; background: #f1f5e9; }
.auth-eyebrow { color: #718363; font-size: 12px; letter-spacing: .15em; margin: 0 0 6px; }
.auth-content h1 { font: 600 39px/1.4 var(--serif); letter-spacing: .15em; margin: 0 0 15px; color: #405c3d; }
.auth-intro { margin: 0 0 29px; font-size: 14px; line-height: 1.9; color: #6d7c62; }
.login-submit { width: 100%; font-size: 15px; min-height: 50px; margin-top: 5px; }
.login-submit > span { font-size: 22px; font-weight: 400; margin-left: 3px; }
.auth-footnote { color: #78866d; font-size: 12px; line-height: 1.8; margin: 23px 0 0; text-align: center; }
.registration-switch { display: block; margin: 12px auto 0; padding: 8px 3px; border: 0; background: transparent; color: #5c784c; font-size: 13px; text-decoration: underline; text-underline-offset: 5px; }
.registration-intro, .registration-status { font-size: 13px; line-height: 1.8; color: #667b57; margin: 0 0 18px; }
.registration-status { background: #edf3e4; border-radius: 8px; padding: 12px; }
.registration-pending { text-align: center; margin: 16px 0 0; }
.setup-notice { padding: 16px; margin-bottom: 22px; border: 1px solid #d8e3ca; border-radius: 10px; background: #eef3e7; color: #60774e; font-size: 14px; }

/* Forms, editing and feedback */
.field { display: block; margin: 0 0 20px; }
.field > span { display: block; color: #607451; font-size: 14px; margin-bottom: 8px; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; min-height: 49px; padding: 11px 13px; border: 1px solid #d8e0cf; border-radius: 9px; color: #3f5d36; background: #fffef8; font-size: 16px; }
.field input::placeholder, .field textarea::placeholder { font-size: 13px; color: #7e8b72; }
.field textarea { resize: vertical; min-height: 126px; line-height: 1.85; }
.field small { display: block; font-size: 12px; line-height: 1.8; color: #748667; margin-top: 7px; }
.field input:disabled { background: #eef1e7; color: #738469; }
dialog { width: min(530px, calc(100vw - 32px)); max-height: calc(100svh - 36px); padding: 0; border: 1px solid #dbe3ce; border-radius: 18px; color: var(--ink); background: var(--card); box-shadow: 0 22px 90px #2f43222b; }
dialog::backdrop { background: #35483175; backdrop-filter: blur(4px); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 25px 28px 20px; border-bottom: 1px solid #e2e7d8; background: #f4f6ed; }
.dialog-header h2 { margin: 0; font: 500 26px/1.5 var(--serif); }
.dialog-header p { margin: 6px 0 0; font-size: 13px; color: #758469; }
.close-button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #e9efdf; color: #668050; }
.form-body { padding: 25px 28px 8px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 5px 28px 26px; }
.delete-button { border: 0; background: transparent; color: #9d6548; padding: 8px 2px; margin-right: auto; font-size: 13px; }
.form-actions .primary-button { margin-left: auto; }
.error-banner { margin: 0 0 19px; padding: 13px 16px; border: 1px solid #e9cdb9; border-radius: 10px; color: #934f35; background: #faede3; font-size: 14px; line-height: 1.8; }
.category-dialog { width: min(570px, calc(100vw - 32px)); overflow: hidden; }
.category-dialog form { display: flex; flex-direction: column; max-height: calc(100svh - 38px); }
.category-dialog .dialog-header, .category-form-actions { flex-shrink: 0; }
.category-form-body { min-height: 0; padding: 20px 28px 16px; overflow-y: auto; overscroll-behavior: contain; }
.category-help { margin: 0 0 18px; font-size: 13px; line-height: 1.85; color: #687b5d; }
.category-editor-list { display: flex; flex-direction: column; gap: 11px; }
.category-editor-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 48px; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dde5d4; border-radius: 11px; background: #f8faf2; }
.category-editor-icon { color: #718866; }
.category-editor-field { min-width: 0; }
.category-editor-field label { display: block; margin-bottom: 5px; font-size: 12px; color: #627756; }
.category-editor-field input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #d2ddc8; border-radius: 7px; font-size: 16px; color: #3f5d36; background: #fffef8; }
.category-editor-field input::placeholder { color: #7e8b72; font-size: 13px; }
.category-editor-field small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.7; color: #728269; }
.category-remove-button { align-self: center; min-width: 44px; padding: 8px 0; border: 0; border-radius: 7px; color: #956a50; background: transparent; font-size: 13px; }
.category-remove-button.is-undo { color: #4e7041; background: #e5eddc; }
.category-editor-row.is-removed { border-style: dashed; background: #f5f1e8; }
.category-editor-row.is-removed input { color: #847766; background: #f5f1e8; text-decoration: line-through; border-color: #e0d9cb; }
.category-add-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 9px 12px; border: 1px dashed #b7c8aa; border-radius: 9px; background: #f4f8eb; color: #57734a; font-size: 14px; }
.category-summary { margin: 14px 0 0; color: #5c7450; font-size: 13px; line-height: 1.8; }
.category-system-note, .category-empty-note { color: #758369; font-size: 12px; line-height: 1.8; margin: 8px 0 0; }
.category-empty-note { padding: 16px 0; text-align: center; font-size: 14px; }
.category-form-actions { padding-top: 16px; border-top: 1px solid #e2e7d8; background: #fffef9; }
.toast { position: fixed; z-index: 20; bottom: 28px; left: 50%; transform: translate(-50%, 14px); max-width: min(520px, calc(100vw - 32px)); padding: 13px 19px; border: 1px solid #506f44; border-radius: 12px; background: #49673f; color: #fffdf6; font-size: 14px; line-height: 1.7; text-align: center; box-shadow: 0 8px 25px #30452222; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (hover: hover) {
  .category-btn:hover, .text-button:hover { background: #e7eddd; color: #3f5d35; }
  .manage-categories-button:hover, .category-add-button:hover { background: #eaf0e0; border-color: #9fb78f; }
  .category-remove-button:hover { background: #eee6d9; }
  .primary-button:hover { background: var(--green-dark); border-color: var(--green-dark); }
  .secondary-button:hover { background: #eaf0e0; }
  .edit-button:hover { background: #edf2e4; color: #4b6e3b; }
  .check:hover::before { border-color: #789b61; }
  .wish-card:hover { border-color: #c7d5b9; box-shadow: 0 5px 14px #4e63440b; }
}
@media (min-width: 1450px) {
  .main { padding-left: 62px; padding-right: 62px; }
  .hero { grid-template-columns: minmax(0, 1fr) 270px; padding-top: 49px; padding-bottom: 44px; }
  .hero h1 { font-size: 48px; }
  .postcard { width: 238px; }
  .postcard-art { height: 147px; }
}
@media (max-width: 1150px) {
  .shell { grid-template-columns: 221px minmax(0, 1fr); }
  .sidebar { padding-left: 20px; padding-right: 20px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 25px; }
  .brand-caption { font-size: 10px; }
  .brand-icon { width: 40px; height: 43px; }
  .main { padding-left: 29px; padding-right: 29px; }
  .hero { grid-template-columns: minmax(0, 1fr) 185px; gap: 20px; }
  .hero h1 { font-size: 38px; }
  .postcard { width: 179px; padding: 10px 10px 13px; }
  .postcard-art { height: 110px; }
  .postcard-caption { font-size: 12px; }
  .topbar { gap: 9px; }
  .session-meta { width: 100%; }
  .top-actions { margin-left: auto; }
  .grid { gap: 15px; }
  .wish-card { padding-left: 16px; padding-right: 16px; }
  .wish-title { font-size: 21px; }
  .stat-item { padding-left: 19px; padding-right: 19px; }
}
@media (max-width: 850px) {
  html { scrollbar-gutter: auto; }
  .shell { display: block; }
  .sidebar { display: block; padding: 24px 25px 0; border-right: 0; border-bottom: 1px solid #e0e6d6; background: #f0f3e9; }
  .brand { padding-bottom: 20px; }
  .brand-name { font-size: 26px; letter-spacing: .16em; }
  .brand-caption { font-size: 11px; }
  .brand-icon { width: 43px; height: 44px; }
  .brand-heart { display: block; margin-left: auto; margin-right: 7px; }
  .couple, .nav-heading, .sidebar-bottom { display: none; }
  .category-area { display: flex; align-items: flex-start; gap: 9px; }
  .category-nav { flex: 1; min-width: 0; flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 1px 14px; scroll-padding: 16px; }
  .category-nav::-webkit-scrollbar { display: none; }
  .category-btn { flex: none; width: auto; min-height: 44px; padding: 9px 12px; font-size: 14px; gap: 8px; border-radius: 9px; white-space: nowrap; }
  .manage-categories-button { flex: none; width: auto; margin: 0; padding: 9px; }
  .category-btn > svg { width: 17px; height: 17px; }
  .nav-count { font-size: 12px; min-width: 21px; height: 22px; }
  .main { padding: 18px 25px 40px; }
  .topbar { padding-bottom: 15px; gap: 12px; }
  .session-meta { width: auto; }
  .top-actions { margin-left: auto; }
  .hero { padding: 37px 7px 35px 0; grid-template-columns: minmax(0, 1fr) 215px; gap: 24px; }
  .hero h1 { font-size: 40px; }
  .postcard { width: 204px; }
  .postcard-art { height: 125px; }
  .wish-overview { margin-bottom: 32px; }
  .auth-card { grid-template-columns: 41% 59%; }
  .auth-content { padding: 35px 33px 30px; }
  .auth-art { padding-left: 16px; padding-right: 16px; }
  .auth-art p { font-size: 19px; }
}
@media (max-width: 600px) {
  .sidebar { padding: 22px 18px 0; }
  .brand { gap: 11px; padding-bottom: 20px; }
  .brand-name { font-size: 26px; }
  .brand-caption { font-size: 11px; margin-top: 5px; }
  .category-nav { padding-right: 1px; padding-bottom: 14px; }
  .category-btn { padding-left: 11px; padding-right: 11px; }
  .nav-count { display: none; }
  .main { padding: 15px 18px 108px; }
  .topbar { display: block; padding-bottom: 16px; }
  .session-meta { display: flex; width: 100%; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
  .member-role { font-size: 12px; padding: 3px 9px; }
  .sync-status { font-size: 12px; }
  .top-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; width: 100%; padding: 4px; border: 1px solid #e1e6d7; border-radius: 11px; background: #f2f4eb; }
  .text-button { font-size: 13px; min-height: 44px; padding: 7px 5px; gap: 5px; }
  .top-actions > .text-button { position: relative; min-width: 0; min-height: 56px; padding: 6px 2px; flex-direction: column; gap: 3px; line-height: 1.4; }
  .top-actions > .text-button > svg { width: 18px; height: 18px; }
  .top-actions > .text-button > .activity-badge { position: absolute; top: 1px; right: max(1px, calc(50% - 32px)); min-width: 20px; height: 20px; padding: 0 4px; font-size: 10px; line-height: 20px; }
  .hero { grid-template-columns: minmax(0, 1fr) 114px; gap: 15px; padding: 32px 5px 28px 0; }
  .eyebrow { gap: 7px; font-size: 10px; letter-spacing: .11em; margin-bottom: 13px; white-space: nowrap; }
  .eyebrow > span { width: 15px; }
  .hero h1 { font-size: 31px; line-height: 1.42; letter-spacing: .055em; }
  .heart { font-size: 23px; margin-left: 8px; vertical-align: 3px; }
  .hero-copy > p { margin-top: 13px; max-width: 212px; font-size: 14px; line-height: 1.8; }
  .tiny-date { gap: 6px; font-size: 12px; margin-top: 13px; }
  .tiny-date > svg { width: 13px; height: 13px; }
  .postcard { width: 111px; padding: 7px 7px 10px; margin-top: 6px; transform: rotate(6deg); }
  .postcard::before { width: 35px; height: 18px; left: calc(50% - 17px); top: -10px; }
  .postcard-kicker { font-size: 10px; padding: 2px 0 6px; letter-spacing: .025em; }
  .postcard-art { height: 112px; }
  .postcard-caption { font-size: 11px; line-height: 1.7; padding-top: 9px; }
  .postcard-stamp { display: none; }
  .wish-overview { border-radius: 14px; margin-bottom: 30px; }
  .stat-item { padding: 15px 13px 14px; }
  .stat-item dt { font-size: 12px; gap: 3px; }
  .stat-item dt > span { font-size: 17px; }
  .stat-item strong { font-size: 28px; }
  .stat-item dd { margin-top: 7px; gap: 6px; }
  .progress-panel { padding: 14px 13px 16px; gap: 10px; }
  .progress-icon { width: 25px; }
  .progress-top { font-size: 11px; gap: 3px 7px; margin-bottom: 8px; }
  .progress-percent { font-size: 18px; min-width: 38px; }
  .section-head { margin-bottom: 17px; }
  .section-heading { font-size: 25px; }
  .section-subtitle { font-size: 13px; margin-top: 4px; }
  #addButton { display: none; }
  .toolbar { gap: 12px; margin-bottom: 18px; }
  .tabs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .tab { min-height: 44px; padding: 7px 8px; font-size: 14px; }
  .tab-num { font-size: 12px; }
  .search-wrap { width: 100%; max-width: none; flex-basis: 100%; }
  .search { height: 48px; }
  .search::placeholder { font-size: 14px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wish-card { padding: 15px 18px 18px; }
  .wish-title { font-size: 22px; }
  .wish-description { font-size: 14px; line-height: 1.9; }
  .wish-footer { font-size: 12px; margin-top: 18px; }
  .category-tag { font-size: 12px; }
  .viewer-notice { flex-wrap: wrap; padding: 14px; gap: 9px; font-size: 14px; }
  .viewer-notice > div { flex: 1; min-width: 220px; }
  .viewer-badge { margin-left: 28px; }
  .result-count { font-size: 12px; margin-top: 15px; }
  .footer { margin-top: 27px; padding-top: 21px; gap: 7px; font-size: 12px; }
  .mobile-add-button { position: fixed; z-index: 10; bottom: max(16px, env(safe-area-inset-bottom)); left: 18px; right: 18px; display: flex; justify-content: center; align-items: center; gap: 10px; height: 52px; border: 1px solid #4c6945; border-radius: 14px; background: #56734e; color: #fffef5; box-shadow: 0 8px 24px #38523224; font-size: 15px; }
  .mobile-add-button > span { position: absolute; right: 18px; font-size: 21px; color: #e0e8d4; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); font-size: 14px; width: max-content; }
  .auth-gate { padding: 18px 15px; }
  .auth-card { display: flex; flex-direction: column; max-width: 440px; border-radius: 18px; }
  .auth-art { position: relative; display: block; min-height: 158px; padding: 23px 24px; text-align: left; overflow: hidden; }
  .auth-art-label { font-size: 10px; letter-spacing: .14em; position: relative; z-index: 1; }
  .auth-art p { position: relative; z-index: 1; margin-top: 14px; font-size: 20px; line-height: 1.7; }
  .auth-landscape { position: absolute; width: 144px; right: 5px; bottom: -34px; margin: 0; opacity: .9; }
  .auth-content { align-self: stretch; padding: 25px 25px 23px; }
  .auth-mark { float: right; width: 43px; height: 43px; margin: 7px 0 0 12px; }
  .auth-content h1 { font-size: 32px; margin-bottom: 11px; }
  .auth-eyebrow { font-size: 12px; }
  .auth-intro { font-size: 14px; margin-bottom: 24px; }
  .auth-intro > br { display: none; }
  .auth-footnote { font-size: 12px; margin-top: 19px; }
  .registration-switch { font-size: 14px; }
  .registration-intro, .registration-status { font-size: 14px; }
  .field { margin-bottom: 18px; }
  .field > span { font-size: 14px; }
  .field input::placeholder, .field textarea::placeholder { font-size: 14px; }
  .login-submit { min-height: 50px; font-size: 16px; }
  .dialog-header { padding: 22px 20px 18px; }
  .dialog-header h2 { font-size: 25px; }
  .dialog-header p { font-size: 13px; }
  .form-body { padding: 21px 20px 5px; }
  .form-actions { padding: 5px 20px 23px; }
  .form-actions .primary-button, .form-actions .secondary-button { font-size: 14px; padding-left: 13px; padding-right: 13px; }
  .category-form-body { padding: 18px 16px 15px; }
  .category-help { font-size: 13px; }
  .category-editor-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 9px; padding: 11px; }
  .category-editor-icon { display: none; }
  .category-form-actions { padding-top: 16px; }
}
/* Keep touch tools in the same arrangement when a folding phone is opened. */
@media (min-width: 601px) and (max-width: 850px) {
  .topbar { display:block; }
  .session-meta { display:flex; width:100%; justify-content:space-between; gap:8px; margin-bottom:12px; }
  .top-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; width:100%; padding:4px; border:1px solid #e1e6d7; border-radius:11px; background:#f2f4eb; }
  .top-actions > .text-button { position:relative; min-width:0; min-height:56px; padding:6px 2px; flex-direction:column; gap:3px; line-height:1.4; font-size:13px; }
  .top-actions > .text-button > svg { width:18px; height:18px; }
  .top-actions > .text-button > .activity-badge { position:absolute; top:1px; right:max(1px,calc(50% - 32px)); min-width:20px; height:20px; padding:0 4px; font-size:10px; line-height:20px; }
}
@media (max-width: 370px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .sidebar { padding-left: 14px; }
  .hero { grid-template-columns: minmax(0, 1fr) 91px; gap: 12px; }
  .hero h1 { font-size: 29px; }
  .postcard { width: 89px; padding: 6px; }
  .postcard-art { height: 102px; }
  .postcard-caption { font-size: 10px; }
  .stat-item { padding-left: 11px; padding-right: 11px; }
  .stat-item dt > span { display: none; }
  .progress-icon { display: none; }
  .text-button { font-size: 12px; gap: 4px; }
  .auth-content { padding-left: 22px; padding-right: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.wish-description-block {margin-top:14px;padding:12px 14px;background:#fffef8;border:1px solid #e4e8db;border-radius:11px;min-height:44px;}
.wish-section-label {font-size:11px;letter-spacing:.08em;color:#87937d;}
.wish-description-block .wish-description {margin:5px 0 0;display:block;overflow:visible;}
.wish-review-loading {font-size:12px;color:#7b886f;margin:15px 0 0;}

/* Version notices stay in normal flow, clear of dialogs and the mobile nav. */
.wish-list-controls { display:flex; align-items:center; flex-wrap:wrap; gap:4px 16px; margin:-5px 0 20px; color:var(--muted); font-size:13px; }
.wish-list-controls label { display:inline-flex; align-items:center; gap:10px; }
.wish-list-controls select { min-height:44px; max-width:100%; padding:7px 28px 7px 12px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--ink); }
.wish-list-controls select:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.wish-list-controls .text-button { font-size:13px; }
.wish-list-controls p { flex:1 1 180px; min-width:0; margin:0; overflow-wrap:anywhere; }
@media(max-width:600px) { .wish-list-controls { gap:4px 12px; } .wish-list-controls p { flex-basis:100%; } }

.version-update-notice { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 16px; margin:0 0 20px; padding:10px 16px; border:1px solid #d9e2ce; border-radius:12px; background:#eef3e6; color:#506448; }
.version-update-message { flex:1 1 160px; margin:0; font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
.version-update-actions { display:flex; align-items:center; flex-wrap:wrap; gap:4px 12px; }
.version-update-actions button,.version-update-actions a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:6px 3px; border:0; background:none; font:inherit; font-size:14px; line-height:1.5; color:#506448; text-decoration:none; cursor:pointer; }
.version-update-actions .version-update-load,.version-update-actions .version-update-apk { font-weight:600; text-decoration:underline; text-underline-offset:4px; }
.version-update-actions .version-update-later { color:#7d8974; }
.version-update-actions :focus-visible { outline:2px solid #69835b; outline-offset:3px; border-radius:3px; }
.version-update-actions button:disabled { opacity:.6; cursor:wait; }
@media(max-width:600px) { .version-update-notice { padding:10px 12px; gap:2px 10px; } .version-update-message { flex-basis:100%; } }
