:root {
  --ink: #f5efe3;
  --ink-2: #c9c2b3;
  --ink-3: #a8a294; /* 6:1 on the panels: small gray labels must stay readable */
  --bg: #0d1f17;
  --panel: #13291f;
  --panel-2: #1a3428;
  --line: #2b4a3b;
  --gold: #e3b95b;
  --gold-2: #f3d58a;
  --red: #c7333d;
  --red-2: #e04a54;
  --radius: 14px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --side-w: 330px;
  --insp-w: 320px;
  --top-h: 60px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 14px/1.4 var(--sans); }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

#app { position: fixed; inset: 0; display: grid; grid-template-columns: var(--side-w) 1fr auto; grid-template-rows: calc(var(--top-h) + env(safe-area-inset-top, 0px)) 1fr; }

/* ---------- top bar ---------- */
#topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: env(safe-area-inset-top, 0px) 14px 0; background: linear-gradient(180deg, #0f2a1e, #0d2219); border-bottom: 1px solid var(--line); z-index: 5; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 20px var(--serif); letter-spacing: 0.2px; white-space: nowrap; color: var(--gold-2); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
#season-badge { font: 800 12px var(--sans); font-style: normal; letter-spacing: 0.4px; text-transform: uppercase; color: #1a1208; background: var(--gold); padding: 3px 8px; border-radius: 99px; }
#season-badge:empty { display: none; }
#countdown { font-size: 12px; font-weight: 800; color: var(--ink-2); background: #0c1c15; border: 1px solid var(--line); padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.cheer { display: flex; flex-direction: column; gap: 4px; min-width: 150px; max-width: 240px; flex: 1; }
.cheer-label { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; }
.cheer-label span { font-weight: 800; color: var(--gold-2); }
.cheer-bar { height: 8px; border-radius: 99px; background: #0a1711; border: 1px solid var(--line); overflow: hidden; }
.cheer-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: repeating-linear-gradient(-45deg, var(--red) 0 8px, #f5efe3 8px 16px); transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* when the window is too narrow for the whole bar, main.js adds these one at a time until it fits */
#topbar.fit-1 #countdown { display: none !important; }
#topbar.fit-2 #season-badge { display: none !important; }
#topbar.fit-3 .cheer-label { display: none; }
#topbar.fit-3 .cheer { min-width: 110px; }
#topbar.fit-4 .btn span { display: none; }
#topbar.fit-4 .btn { padding: 0 10px; }
#topbar.fit-5 #btn-help, #topbar.fit-5 #btn-redo { display: none !important; }
#topbar.fit-6 #detail-seg { display: none !important; }
#topbar.fit-7, #topbar.fit-7 .top-actions { gap: 5px; }
#topbar.fit-7 .cheer { min-width: 52px; }
#topbar.fit-8 .brand { display: none; }
#topbar.fit-9 #btn-account { display: none !important; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:hover { border-color: #3f6b55; background: #21402f; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red-2); color: #fff; }
.btn.primary:hover { background: var(--red-2); }
.btn.gold { background: var(--gold); border-color: var(--gold-2); color: #2a1d08; }
.btn.gold:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; }
.btn.big { height: 48px; font-size: 16px; padding: 0 20px; width: 100%; justify-content: center; border-radius: 12px; }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.danger { color: #ff9aa0; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 800; }
.icon-btn:hover { background: #21402f; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0c1c15; }
.seg button { white-space: nowrap; height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--ink-2); font-weight: 700; display: grid; place-items: center; }
.seg button.on { background: var(--panel-2); color: var(--gold-2); box-shadow: inset 0 -2px 0 var(--gold); }

/* ---------- panels ---------- */
.panel { background: var(--panel); border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; min-height: 0; z-index: 4; }
#inspector { border-right: 0; border-left: 1px solid var(--line); width: var(--insp-w); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); flex: none; }
.tabs button { height: 44px; border: 0; background: transparent; font-weight: 800; color: var(--ink-3); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--gold-2); border-bottom-color: var(--gold); }
.tab-body { overflow-y: auto; padding: 14px 16px 24px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
h2 { font: 700 18px var(--serif); margin: 4px 0 4px; color: var(--ink); }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-3); margin: 22px 0 10px; font-weight: 800; }
h3:first-child { margin-top: 4px; }
.muted { color: var(--ink-3); font-size: 13px; margin: 0 0 10px; }
.step { display: flex; align-items: center; gap: 8px; }
.step b { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #2a1d08; display: grid; place-items: center; font-size: 12px; flex: none; }

/* room template cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card { text-align: left; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.card:hover { border-color: #3f6b55; }
.card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.card strong { font-size: 13px; }
.card span { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; }
.theme-card { flex-direction: row; align-items: center; gap: 10px; min-height: 48px; }
.swatch { display: flex; flex: none; }
.swatch i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--panel-2); margin-left: -5px; box-shadow: 0 1px 2px #0006; }
.swatch i:first-child { margin-left: 0; }

/* festive slider */
.festive { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 12px; }
.festive button { height: 50px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--ink-3); gap: 2px; font-weight: 700; }
.festive button em { font-style: normal; font-size: 15px; letter-spacing: -2px; color: var(--gold); }
.festive button.on { border-color: var(--gold); color: var(--gold-2); background: #2a3b22; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; justify-content: center; }

/* catalog */
.search { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #0c1c15; padding: 0 12px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.chip.on { background: var(--gold); color: #2a1d08; border-color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.item { border-radius: 12px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 35%, #2a4a3a, #172e23); padding: 4px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform 0.12s, border-color 0.12s; touch-action: manipulation; }
.item:hover { border-color: var(--gold); transform: translateY(-2px); }
.item img, .item .ph { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.item .ph { display: grid; place-items: center; font-size: 26px; opacity: 0.4; }
.item span { font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; }

/* form fields */
.field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; margin: 10px 0; }
.field > label { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.field .val { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.field input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--gold); height: 22px; margin: 0; }
.field select, .field input[type=text] { grid-column: 1 / -1; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #0c1c15; padding: 0 10px; width: 100%; }
.field select:focus, .field input:focus, .search:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.colorrow { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.colorrow input[type=color] { width: 38px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: none; padding: 2px; cursor: pointer; }
.colorrow button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #0006; padding: 0; }
.colorrow button.on { outline: 2px solid var(--gold); outline-offset: 1px; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 99px; background: #0c1c15; border: 1px solid var(--line); transition: background 0.15s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-3); transition: transform 0.15s, background 0.15s; }
.switch.on { background: #5a7a3a; border-color: #7a9a4a; }
.switch.on::after { transform: translateX(18px); background: #fff; }
.group-title { margin: 20px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); font: 700 15px var(--serif); color: var(--gold-2); }
.group-title:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.adv-note { font-size: 12px; color: var(--ink-3); background: #0c1c15; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 16px; }

/* inspector */
.insp-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.insp-head h2 { margin: 0; flex: 1; font-size: 19px; }
.insp-actions { display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hangbox { background: #0c1c15; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.hangbox.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }

/* stage */
#stage { position: relative; min-width: 0; min-height: 0; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#views { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; background: #0d1f17d0; border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(6px); }
#views button { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; font-weight: 700; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
#views button:hover { background: var(--panel-2); color: var(--ink); }
#hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: #0d1f17e0; border: 1px solid var(--line); padding: 7px 14px; border-radius: 99px; font-size: 13px; color: var(--ink-2); pointer-events: none; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s; }
#hint:empty { opacity: 0; }
#hint b { color: var(--gold-2); }
#sel-bar { position: fixed; display: flex; gap: 2px; padding: 3px; background: #0d1f17ee; border: 1px solid var(--gold); border-radius: 12px; transform: translate(-50%, calc(-100% - 12px)); z-index: 3; box-shadow: 0 6px 20px #0008; }
#sel-bar button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 9px; font-size: 17px; }
#sel-bar button:hover { background: var(--panel-2); }
#sel-bar button.danger { color: #ff8a92; }
#sel-bar button.edit { width: auto; padding: 0 10px; display: flex; align-items: center; gap: 5px; color: var(--gold-2); font-weight: 800; font-size: 15px; }
#sel-bar button.edit span { font-size: 13px; }
@media (min-width: 821px) { #sel-bar button.edit { display: none; } }
/* bigger targets for fingers */
@media (pointer: coarse) { #sel-bar button { width: 44px; height: 44px; font-size: 19px; } #sel-bar button.edit { width: auto; padding: 0 14px; } }
#mobile-dock { display: none; }

/* modal + toast */
#modal { position: fixed; inset: 0; background: #050c08b0; display: grid; place-items: center; z-index: 20; padding: 16px; backdrop-filter: blur(3px); }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; box-shadow: 0 20px 60px #000a; }
.modal-card h1 { font: 700 28px var(--serif); margin: 0 0 6px; color: var(--gold-2); }
.modal-card p { color: var(--ink-2); margin: 0 0 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.welcome-opts { display: grid; gap: 10px; margin: 18px 0 4px; }
.welcome-opts button { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); }
.welcome-opts button:hover { border-color: var(--gold); }
.welcome-opts button i { font-style: normal; font-size: 28px; width: 40px; text-align: center; }
.welcome-opts strong { display: block; font-size: 15px; }
.welcome-opts span { color: var(--ink-3); font-size: 13px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.keys kbd { font: 700 12px var(--sans); background: #0c1c15; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.design { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); display: flex; flex-direction: column; }
.design img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #0c1c15; display: block; }
.design div { padding: 8px; display: flex; gap: 6px; align-items: center; }
.design strong { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sharebox { display: flex; gap: 8px; }
.sharebox input { flex: 1; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: #0c1c15; padding: 0 10px; min-width: 0; }
#toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--gold); color: #2a1d08; font-weight: 800; padding: 10px 18px; border-radius: 99px; z-index: 30; box-shadow: 0 8px 24px #0008; animation: pop 0.25s ease-out; max-width: calc(100% - 32px); text-align: center; }
@keyframes pop { from { transform: translate(-50%, 10px); opacity: 0; } }
#loading { position: fixed; inset: 0; background: var(--bg); display: flex; overflow-y: auto; z-index: 50; color: var(--ink-2); font-family: var(--serif); font-size: 18px; transition: opacity 0.5s; }
/* margin auto centers it while it fits and lets it scroll from the top once it does not */
.intro { margin: auto; padding: 28px 24px; width: 100%; max-width: 660px; box-sizing: border-box; display: grid; justify-items: center; gap: 14px; text-align: center; }
.intro h1 { margin: 0; font: 700 34px/1.1 var(--serif); color: var(--gold); }
.intro-tag { margin: 0 0 6px; max-width: 26em; font: 17px/1.5 var(--sans, system-ui, sans-serif); color: var(--ink-2); }
.boot-box { display: grid; justify-items: center; gap: 14px; }
.boot-status { margin: 0; }
.intro-more { display: none; margin-top: 10px; text-align: left; font: 16px/1.6 var(--sans, system-ui, sans-serif); color: var(--ink); }
#loading.failed .intro-more, #loading.slow .intro-more { display: block; }
.intro-more img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.intro-more h2 { margin: 22px 0 6px; font: 700 22px/1.2 var(--serif); color: var(--gold); }
.intro-more p { margin: 0 0 10px; }
.intro-more ul { margin: 0 0 10px; padding-left: 22px; }
.intro-more li { margin-bottom: 4px; }
.intro-more a { color: var(--gold); text-underline-offset: 3px; }
.intro-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
#loading.done { opacity: 0; pointer-events: none; }
.boot-msg { max-width: 30em; margin: 0; padding: 0 24px; text-align: center; font-family: var(--sans, system-ui, sans-serif); font-size: 17px; line-height: 1.5; color: var(--ink); }
.boot-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 0 24px; font-family: var(--sans, system-ui, sans-serif); font-size: 15px; }
.boot-actions .btn { height: 44px; padding: 0 18px; }
.design.kept { border-style: dashed; }
.design.kept strong { white-space: normal; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ad-slot { position: relative; flex: none; margin: 8px; padding-top: 16px; border-radius: 10px; background: #0c1c15; border: 1px solid var(--line); overflow: hidden; }
.ad-label { position: absolute; top: 2px; left: 8px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); pointer-events: none; }
#ad-sidebar { height: 116px; }
/* the strip sits under the room, never on top of it: the picture gives up the space */
#ad-banner { position: absolute; left: 50%; transform: translateX(-50%); bottom: 8px; width: min(728px, calc(100% - 24px)); height: 106px; margin: 0; }
#stage.with-ad #view { inset: 0 0 122px 0; height: calc(100% - 122px); }
#stage.with-ad #views { bottom: 136px; }

body.simple .adv { display: none !important; }

/* ---------- small screens ---------- */
/* room of the day */
#daily-pill { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; max-width: calc(100% - 24px); border-radius: 99px; border: 1px solid var(--line); background: #0d1f17e6; backdrop-filter: blur(6px); font-weight: 800; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 14px #0006; }
#daily-pill:hover { border-color: var(--gold); }
#daily-pill i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2a1d08; font-size: 13px; flex: none; }
#daily-pill em { font-style: normal; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
#daily-pill b { color: var(--gold-2); font-size: 12px; padding-left: 8px; border-left: 1px solid var(--line); }
#daily-pill.new { border-color: var(--gold); }
#daily-pill.done i { background: #2f6b4a; color: #fff; }
#house-pill { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; max-width: min(260px, 40%); border-radius: 99px; border: 1px solid var(--line); background: #0d1f17e6; backdrop-filter: blur(6px); font-weight: 800; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 14px #0006; }
#house-pill:hover { border-color: var(--gold); }
#house-pill i { font-style: normal; font-size: 16px; flex: none; }
#house-pill span { overflow: hidden; text-overflow: ellipsis; }
#house-pill b { color: var(--gold-2); font-size: 12px; padding-left: 8px; border-left: 1px solid var(--line); flex: none; }
.house-link { width: 100%; justify-content: center; margin-top: 8px; }
.room-name { display: flex; gap: 8px; margin-bottom: 10px; }
.room-name .search { margin: 0; flex: 1; min-width: 0; font-weight: 700; }
.rooms { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.room-card.here { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.room-pic { display: block; width: 100%; padding: 0; border: 0; background: #0c1c15; cursor: pointer; }
.room-pic span { display: grid; place-items: center; width: 100%; aspect-ratio: 16/10; font-size: 44px; opacity: 0.5; }
.room-card .room-top { min-height: 46px; }
.room-card .room-top strong { font-size: 15px; }
.room-card .room-top em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--gold-2); white-space: nowrap; }
.room-card .room-top .search { margin: 0; flex: 1; min-width: 0; height: 30px; }
.room-card .room-acts { padding-top: 0; flex-wrap: wrap; }
.modal-card h3 { margin: 18px 0 8px; }
.daily-card { border: 1px solid var(--gold); border-radius: 14px; background: linear-gradient(160deg, #23402f, #17301f); padding: 12px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.daily-card .daily-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-2); }
.daily-card .daily-top b { text-transform: none; letter-spacing: 0; background: #0c1c15; border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; }
.daily-card strong { font: 700 17px var(--serif); }
.daily-card p { margin: 0 0 4px; font-size: 13px; color: var(--ink-2); }
.daily-card .btn { justify-content: center; }
.goals { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.goals li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.goals li i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); display: grid; place-items: center; font-size: 13px; flex: none; }
.goals li.done i { background: var(--gold); border-color: var(--gold); color: #2a1d08; font-weight: 800; }
.goals li.done span { color: var(--ink-3); text-decoration: line-through; }
.goals small { color: var(--gold-2); font-size: 12.5px; }
.modal-card .goals { margin: 4px 0 16px; }
.modal-card .goals li { font-size: 16px; }
.modal-card p.daily-title { font: 700 20px var(--serif); color: var(--ink); margin-bottom: 4px; }
#confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 25; }
#confetti i { position: absolute; top: -20px; height: 14px; border-radius: 2px; opacity: 0.95; animation: confetti 2.6s cubic-bezier(0.3, 0.6, 0.6, 1) forwards; }
@keyframes confetti { to { transform: translateY(105vh) rotate(540deg); opacity: 0.9; } }
/* greeting card */
.modal-card.wide { width: min(860px, 100%); }
.card-maker { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 10px; }
.card-preview { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 8px 26px #0009; }
.card-side .muted { margin: 10px 0 0; font-size: 12.5px; }
.card-fields { display: flex; flex-direction: column; min-width: 0; }
.card-fields label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); margin: 10px 0 5px; }
.card-fields label:first-child { margin-top: 0; }
.card-fields .search { margin-bottom: 0; font-size: 16px; height: 42px; }
.card-fields textarea.search { height: auto; padding: 9px 12px; resize: vertical; min-height: 84px; font: inherit; font-size: 16px; color: inherit; line-height: 1.35; }
.card-fields .chips { margin: 8px 0 0; }
.card-fields .chips button { height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.card-fields .chips button:hover { border-color: var(--gold); color: var(--ink); }
.papers { display: flex; gap: 10px; }
.papers button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid; padding: 0; }
.papers button[aria-pressed="true"] { outline: 3px solid var(--gold-2); outline-offset: 2px; }
#print-card { display: none; }
@media print {
  @page { margin: 0.5in; }
  html, body { height: auto; overflow: visible; background: #fff; }
  body > *:not(#print-card) { display: none !important; }
  #print-card { display: block; width: 5in; height: 7in; margin: 0 auto; }
}
.page-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; font-size: 13px; }
.page-links a { color: var(--gold-2); }
#side-foot { flex: none; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 16px 10px; border-top: 1px solid var(--line); font-size: 12px; }
#side-foot a { color: var(--ink-3); text-decoration: none; }
#side-foot a:hover { color: var(--gold-2); text-decoration: underline; }
@media (max-width: 1100px) {
  #countdown, #season-badge { display: none !important; }
  .cheer-label { display: none; }
  :root { --side-w: 300px; --insp-w: 290px; }
  .btn span { display: none; }
  .btn { padding: 0 10px; }
  .cheer { min-width: 110px; }
}
@media (max-width: 820px) {
  :root { --top-h: 52px; }
  #app { grid-template-columns: 1fr; grid-template-rows: calc(var(--top-h) + env(safe-area-inset-top, 0px)) 1fr; }
  #topbar { gap: 8px; padding-inline: 10px; }
  .brand span, #season-badge, #countdown, #detail-seg, #btn-help, #btn-redo { display: none !important; }
  .cheer { min-width: 70px; max-width: 120px; }
  .cheer-label { display: none; }
  #time-seg button { padding: 0 7px; }
  #side, #inspector { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 48vh; border: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px #000a; z-index: 10; padding-bottom: env(safe-area-inset-bottom, 0px); }
  /* the sheet slides up behind the dock, which stays on top so the player can switch tabs or tap the lit one to close */
  #side { transform: translateY(110%); transition: transform 0.25s ease; max-height: 52vh; padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  #side.open ~ #mobile-dock { z-index: 10; }
  #side.open { transform: none; }
  #side .tabs { display: none; }
  #inspector { z-index: 11; }
  #mobile-dock { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 9; background: #0d1f17ee; border: 1px solid var(--line); border-radius: 16px; padding: 4px; backdrop-filter: blur(6px); }
  #mobile-dock button { flex: 1; height: 50px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 18px; color: var(--ink-2); border-radius: 12px; }
  #mobile-dock button span { font-size: 12px; font-weight: 700; }
  #mobile-dock button.on { background: var(--panel-2); color: var(--gold-2); }
  #views { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  #views button { padding: 0 8px; font-size: 12px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  #ad-banner { display: none !important; }
  .sheet-close { display: block !important; }
  #daily-pill { top: 8px; left: 8px; height: 36px; }
  #daily-pill em { display: none; }
  #daily-pill { max-width: calc(100% - 150px); overflow: hidden; }
  #house-pill { top: 8px; right: 8px; height: 36px; max-width: 128px; padding: 0 12px 0 8px; }
  #house-pill b { display: none; }
  #hint { top: 52px; }
  .card-maker { grid-template-columns: 1fr; gap: 12px; }
  .card-preview { width: min(210px, 62%); margin: 0 auto; }
  .card-side .muted { text-align: center; }
  #side-foot { display: none; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  #btn-photo { display: none; }
}
.sheet-close { display: none; position: sticky; top: 0; margin: -6px auto 6px; width: 44px; height: 5px; border-radius: 99px; background: var(--line); border: 0; padding: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.btn:disabled { opacity: 0.4; cursor: default; }

/* the looks on the Quick tab come in two groups */
.card-group { font-size: 12px; font-weight: 800; color: var(--ink-2, var(--ink-3)); margin: 12px 0 6px; letter-spacing: 0.4px; }
.card-group:first-of-type { margin-top: 0; }

/* ---- accounts (only seen when CONFIG.accounts is on) ---- */
#btn-account.in svg { stroke: var(--gold); }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: var(--gold-2); }
.form-row { margin: 14px 0 6px; }
.form-row .search { height: 48px; font-size: 18px; }
.form-row .code-input { font-size: 28px; font-weight: 800; letter-spacing: 6px; text-align: center; height: 60px; font-variant-numeric: tabular-nums; }
.form-msg { margin: 8px 0 0; padding: 9px 12px; border-radius: 10px; background: rgba(200, 50, 62, 0.16); border: 1px solid rgba(255, 154, 160, 0.4); color: #ffd3d6; font-size: 15px; }
.plus-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin: 14px 0; padding: 14px; border-radius: 12px; border: 1px solid var(--gold-2, var(--gold)); background: rgba(212, 175, 55, 0.08); }
.plus-box strong { font-size: 16px; color: var(--gold); }
.plus-box .btn { margin-top: 6px; text-decoration: none; display: inline-flex; align-items: center; }
.plus-box.member { border-style: dashed; }
.modal-actions + .muted { margin: 12px 0 0; font-size: 13px; }
#modal .cards + .muted { margin: 14px 0 0; }
.modal-actions.spread { justify-content: space-between; align-items: center; }
.modal-actions.spread .btn.danger { margin-right: auto; }
@media (max-width: 480px) {
  .modal-actions.spread { gap: 10px; }
  .modal-actions.spread .btn.danger { flex-basis: 100%; order: 3; margin: 0; }
}
