:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8f5ff;
  background: #13101d;
  font-synthesis: none;
  --muted: #aaa2bc;
  --purple: #ad85ff;
  --border: #393044;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; -webkit-tap-highlight-color: transparent; }
button, select { font: inherit; }
button { cursor: pointer; }
button, select, a { touch-action: manipulation; }
button:disabled, select:disabled { cursor: default; opacity: .48; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #cfb6ff; outline-offset: 4px; }
button { color: inherit; }
.page { max-width: 740px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(var(--footer-height, 176px) + 24px) max(16px, env(safe-area-inset-left)); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-size: 20px; font-weight: 750; letter-spacing: -.8px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; background: #8250d5; border: 1px solid #b18be6; border-radius: 10px; font-size: 23px; }
.draft-badge { font-size: 11px; font-weight: 600; color: #d6c4f4; background: #251b35; border: 1px solid #46305f; padding: 7px 9px; border-radius: 999px; white-space: nowrap; }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px; color: var(--purple); }
h1 { max-width: 510px; font-size: clamp(25px, 6.6vw, 34px); line-height: 1.1; margin: 0; font-weight: 750; letter-spacing: -.9px; }
.intro-copy { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 12px 0 16px; max-width: 420px; }
.isolation-note { display: flex; align-items: flex-start; gap: 8px; color: #c5b9d8; background: #211a2d; border-radius: 12px; padding: 11px 12px; font-size: 12px; line-height: 1.45; }
.isolation-note span { color: #b4dbbf; font-size: 15px; line-height: 1.2; }
.review-progress { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 23px 0 19px; color: var(--muted); font-size: 12px; }
#reviewed-count { color: #ded6eb; }
.progress-track { width: 100%; height: 4px; border-radius: 99px; background: #2c2438; overflow: hidden; }
#progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8555e2, #c4a2ff); transition: width .2s ease; }
.theme-panel { padding: 15px; border: 1px solid var(--border); border-radius: 19px; background: #1c1626; }
.theme-panel label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 650; color: var(--muted); margin-bottom: 8px; }
.theme-nav { display: flex; gap: 8px; align-items: center; }
.icon-button { flex: 0 0 42px; width: 42px; height: 44px; border-radius: 12px; background: #2b2139; border: 1px solid #42334f; font-size: 22px; }
select { appearance: auto; min-width: 0; flex: 1; width: 100%; min-height: 44px; color: #f8f5ff; background: #2b2139; border: 1px solid #51405f; border-radius: 12px; padding: 10px 8px; font-size: 16px; font-weight: 650; text-overflow: ellipsis; }
.saved-state { margin: 10px 0 0; min-height: 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.saved-state.is-dirty { color: #e5c385; }
.theme-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; font-size: 12px; }
.theme-counts span { padding: 6px 9px; border-radius: 8px; background: #2b2139; color: #cbc0db; }
#remaining-count { background: #24332b; color: #b7ddc4; }
.warning { color: #ecd298; background: #3a2b1f; margin: 12px 0 0; padding: 10px; border-radius: 10px; font-size: 12px; line-height: 1.5; }
.grid-toolbar { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin: 23px 0 14px; }
.view-tabs { display: flex; padding: 3px; border-radius: 11px; background: #231b2f; }
.view-tab { border: 0; background: transparent; padding: 9px 8px; border-radius: 8px; font-size: 12px; color: #afa3c0; white-space: nowrap; }
.view-tab[aria-pressed="true"] { background: #47325f; color: #f7f0ff; }
#excluded-tab-count { opacity: .7; font-size: 11px; margin-left: 2px; }
.tap-hint { margin: 0; color: #a79bb8; font-size: 10px; line-height: 1.45; text-align: right; }
.gift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; align-items: stretch; }
.gift-card { display: flex; flex-direction: column; position: relative; min-width: 0; text-align: left; border: 1px solid #393043; border-radius: 17px; overflow: hidden; background: #211b2c; padding: 0; transition: border-color .15s ease, background .15s ease; }
.gift-card[aria-pressed="true"] { border-color: #b788dc; background: #2b1c35; }
.gift-visual { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, #63507d 0%, #3b2d4f 58%, #2b203c 100%); }
.gift-visual::before { content: "✦"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #9a80b8; font-size: 34px; opacity: .5; }
.gift-image { display: block; width: 100%; height: 100%; object-fit: contain; position: relative; transition: opacity .15s ease, filter .15s ease; }
.gift-image.is-error { visibility: hidden; }
.image-failure { position: absolute; bottom: 12px; left: 8px; right: 8px; text-align: center; font-size: 11px; color: #e0d2ed; }
.gift-card[aria-pressed="true"] .gift-image { opacity: .38; filter: grayscale(.8); }
.selection-mark { display: grid; place-items: center; position: absolute; top: 9px; right: 9px; width: 27px; height: 27px; border-radius: 50%; border: 1px solid #ffffff50; background: #18121fa6; color: #fff; font-size: 17px; line-height: 1; }
.gift-card[aria-pressed="true"] .selection-mark { background: #c49aea; color: #291336; border-color: #e2c7f6; }
.excluded-label { position: absolute; left: 8px; right: 8px; bottom: 9px; border: 1px solid #aa79c98c; border-radius: 7px; background: #33183ce8; padding: 5px 4px; text-align: center; font-size: 10px; font-weight: 600; color: #f0dafa; }
.gift-copy { padding: 11px 11px 13px; display: flex; flex: 1; flex-direction: column; overflow-wrap: anywhere; }
.gift-collection { margin: 0 0 4px; font-size: 10px; line-height: 1.35; color: #b6a7c9; }
.gift-model { margin: 0; font-size: 15px; line-height: 1.25; font-weight: 700; letter-spacing: -.2px; }
.gift-hint { margin: 9px 0 0; padding-top: 8px; border-top: 1px solid #ffffff0d; font-size: 11px; line-height: 1.5; color: #bfb2ce; }
.gift-hint-label { display: block; margin-bottom: 3px; font-size: 9px; color: #9786aa; }
.gift-card[aria-pressed="true"] .gift-copy { opacity: .75; }
.empty-grid { color: var(--muted); text-align: center; padding: 36px 12px; font-size: 14px; line-height: 1.6; }
.more-wrap { text-align: center; margin: 24px 0 0; }
.secondary-button { background: #2c203c; border: 1px solid #5c4174; color: #e2cef7; border-radius: 13px; padding: 13px 22px; min-height: 46px; font-size: 14px; font-weight: 650; }
#shown-count { color: #a498b5; font-size: 11px; margin: 12px 0 0; }
.save-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; background: #17111fee; border-top: 1px solid #473252; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 12px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.save-inner { max-width: 708px; margin: 0 auto; }
.save-status { color: #c4b5d4; font-size: 11px; text-align: center; margin: 0 0 9px; line-height: 1.45; }
.primary-button { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; min-height: 54px; border: 1px solid #bd90ff; border-radius: 15px; background: linear-gradient(115deg, #9560ea, #7843d0); color: #fff; font-size: 14px; font-weight: 700; padding: 12px; box-shadow: 0 5px 22px #8b49d326; }
.primary-button span { font-size: 20px; font-weight: 400; }
.save-error { padding: 10px 12px; border-radius: 10px; background: #462731; color: #ffd3d7; margin-bottom: 10px; font-size: 12px; line-height: 1.4; }
.save-error p { margin: 0; }
.text-button { background: transparent; border: 0; padding: 8px 0 1px; color: #ecd6ff; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 10; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; border: 1px solid #667455; border-radius: 12px; padding: 12px 16px; color: #e8f2df; background: #273424; font-size: 13px; box-shadow: 0 8px 30px #0008; }
.entry { max-width: 420px; text-align: center; margin: 16vh auto 0; }
.entry-mark { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 25px; border-radius: 26px; background: #372249; color: #c69bff; border: 1px solid #60417c; font-size: 46px; }
.entry h1 { font-size: 29px; }
#entry-message { margin: 17px 0 24px; color: #c6b9d6; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.entry-note { margin: 27px 0; font-size: 12px; line-height: 1.7; color: #9b8fac; }
@media (min-width: 620px) { .gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; } .gift-model { font-size: 16px; } .gift-hint { font-size: 12px; } .draft-badge { font-size: 12px; } }
@media (max-width: 345px) { .page { padding-left: 12px; padding-right: 12px; } .theme-panel { padding: 11px; } .theme-nav { gap: 5px; } .icon-button { flex-basis: 35px; width: 35px; } .gift-grid { gap: 8px; } .gift-copy { padding: 9px; } .tap-hint { display: none; } .primary-button { font-size: 12px; } .draft-badge { padding: 6px 7px; font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
