/* Fill My Countdown — "Little Paper Surprises". Fixed light paper design; system fonts only.
   Class names used by build.mjs and app.js are kept; visual-only classes are added alongside. */
[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --bg: #FAF6ED; --paper: #FFFBF2; --ink: #302A26; --muted: #65554A; --border: #BDA68B; --line: #D7C5AC;
  --red: #A53D32; --green: #294D3D; --gold: #E9C77D; --focus: #275D86; --error: #912E27;
  --accent: #A53D32; --accent-ink: #FFFAF3;
  --theme: #294D3D; --theme-soft: #F2E7D2; --theme-ink: #294D3D; --theme-art: #E7E8D8;
  --display: Georgia, "Times New Roman", serif;
  --ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --radius: 8px; --radius-lg: 16px; --max: 1160px;
  --shadow: 0 2px 4px #5e402018, 0 8px 20px #5e402012;
  --texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}
.occ-christmas, [data-occasion=christmas], [data-theme=christmas] { --theme: #294D3D; --theme-soft: #F2E7D2; --theme-ink: #294D3D; --theme-art: #E7E8D8; --accent: #A53D32; }
.occ-newyear, [data-occasion=newyear], [data-theme=newyear] { --theme: #252B49; --theme-soft: #F3EEE4; --theme-ink: #252B49; --theme-art: #E7E6ED; --accent: #343D65; }
.occ-birthday, [data-occasion=birthday], [data-theme=birthday] { --theme: #9E3C2C; --theme-soft: #F6E0D9; --theme-ink: #8E3026; --theme-art: #F6E0D9; --accent: #A53D32; }
.occ-valentine, [data-occasion=valentine], [data-theme=valentine] { --theme: #94394F; --theme-soft: #FAE9E7; --theme-ink: #843348; --theme-art: #F3D8D6; --accent: #94394F; }
.occ-custom, [data-occasion=custom], [data-theme=custom] { --theme: #496A60; --theme-soft: #F5F0E4; --theme-ink: #31584B; --theme-art: #E3E7D8; --accent: #365E50; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #FAF6ED; color: #302A26; }
body { margin: 0; background: var(--texture), var(--bg); color: var(--ink); font: 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img, svg, canvas { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--theme-ink); text-underline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .door:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.02em; color: var(--ink); margin: 0 0 12px; }
h1 { font-size: clamp(36px, 4.05vw, 53px); font-weight: 700; }
h2 { font-size: clamp(25px, 2.6vw, 30px); }
h3 { font-size: 21px; margin-bottom: 6px; }
p { margin: 0 0 12px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
small { font-weight: 400; color: var(--muted); }
.wrap { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 50; background: var(--paper); color: var(--ink); padding: 12px; }
.skip:focus { top: 8px; }

/* ---------- header / footer ---------- */
.site-head { border-bottom: 1px solid #CDB99E; background: #FAF6EDF0; }
.head-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.site-head .brand img { width: 192px; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 40px); }
.nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 650; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.nav a:hover { text-decoration: underline; }
.nav .nav-code { border: 1px solid var(--red); color: var(--red); background: #FFFAF3AA; border-radius: var(--radius); padding: 0 15px; font-weight: 700; }
.nav .nav-code:hover { background: #F2E7D2; text-decoration: none; }
.site-foot { border-top: 1px solid #CDB99E; background: #F4ECDD; color: var(--muted); padding: 28px 0 max(24px, env(safe-area-inset-bottom)); margin-top: 40px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-foot .brand img { width: 155px; }
.foot-tag { font: italic 15px/1.5 var(--display); margin: 10px 0 0; max-width: 380px; }
.foot-grid strong { color: var(--ink); font-size: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 6px 0 0; }
.foot-grid li { margin: 0; }
.foot-grid a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-size: 13.5px; }
.foot-grid a:hover { text-decoration: underline; }
.foot-copy { margin-top: 18px; font-size: 13px; }

/* ---------- buttons / fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; background: transparent; transition: transform .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: #743127; box-shadow: inset 0 1px #ffffff24, 0 2px 0 #6a302324; }
.btn-primary:hover { filter: brightness(.93); }
.btn-ghost { border-color: var(--accent); color: var(--accent); background: #FFFAF3; }
.btn-ghost:hover { background: var(--theme-soft); }
.btn-small { min-height: 44px; padding: 7px 13px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.field > span { font-size: 14px; font-weight: 650; line-height: 1.3; }
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--border); background: #FFFCF6; color: var(--ink); border-radius: 7px; padding: 10px 12px; line-height: 1.3; }
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: #78695D; opacity: 1; }
.form-note { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.form-error { border-left: 3px solid var(--error); background: #F8E5DC; color: var(--error); padding: 9px 12px; border-radius: 4px; font-size: 14px; }
.link-btn, .tz-edit { border: 0; background: none; color: var(--theme-ink); text-decoration: underline; font-weight: 650; min-height: 44px; padding: 0 6px; font-size: 13px; }

/* ---------- hero + create form ---------- */
.hero { padding: 34px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.18fr); gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 10px; }
@media (min-width: 900px) { .hero-occasion h1 { font-size: clamp(34px, 3.2vw, 42px); } }
.lede { font-size: 16px; line-height: 1.5; color: var(--ink); max-width: 560px; margin: 0 0 16px; }
.hero .lede { font-size: 15px; max-width: 520px; }
.create-card { background: none; border: 0; padding: 0; }
.create-card > h2 { font-size: 22px; margin: 0 0 2px; }
.create-card form { display: grid; gap: 10px; }
.occ-pills { display: grid; grid-template-columns: 1.05fr 1fr 1fr 1.12fr .95fr; gap: 5px; }
.occ-pills label { position: relative; cursor: pointer; min-width: 0; }
.occ-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.occ-pills label > span { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 4px 5px; border: 1px solid var(--border); border-radius: 24px; background: #FFFCF6; color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.occ-pills img { width: 20px; height: 14px; object-fit: contain; flex: none; }
.occ-pills input:checked + span { background: var(--theme); border-color: var(--theme); color: #FFFFFF; }
.occ-pills input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.days-left { font-size: 13px; font-weight: 650; color: var(--theme-ink); margin: 0; }
.tz-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12.5px; margin: -2px 0; }
.tz-line b { font-weight: 650; }
#create-calendar-btn { width: 100%; min-height: 50px; font: 700 20px/1.1 var(--display); }
.create-card.success { background: var(--texture), var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.create-card.success > h2 { font-size: 26px; margin-bottom: 8px; }
.copy-row { display: flex; gap: 8px; margin: 6px 0 12px; }
.copy-row input { flex: 1; font-size: 14px; }
.copy-row button { flex: none; }
.code-big { text-align: center; font: 700 clamp(32px, 6vw, 46px)/1.2 var(--mono); letter-spacing: .14em; border: 1px dashed var(--border); background: var(--theme-soft); color: var(--ink); padding: 14px 8px; border-radius: var(--radius); margin: 8px 0 14px; }
.private { border: 1px solid var(--red); background: #FBEDE5; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.my-cals { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

/* ---------- example calendar (home + occasion heroes) ---------- */
.hero-art { min-width: 0; margin-top: 30px; }
.paper-board { position: relative; background: var(--texture), var(--theme-soft); border: 1px solid #C8AF87; border-radius: 14px 11px 13px 9px; box-shadow: var(--shadow), inset 0 0 0 5px #ffffff2b; padding: 40px 20px 18px; }
.board-art { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); width: 88%; max-height: 80px; object-fit: contain; pointer-events: none; }
.board-label { font: bold 22px/1.2 var(--display); text-align: center; margin: 0 auto 15px; padding: 7px 18px; background: #FFF5DF; color: var(--ink); box-shadow: 0 2px 3px #6d4a2220; width: fit-content; max-width: 100%; border: 1px solid #D4BD97; transform: rotate(-1deg); border-radius: 3px; }
.door-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.door-grid.cols-4, .live-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.door { position: relative; isolation: isolate; min-width: 0; aspect-ratio: 1 / 1.07; border: 1px solid #C4A87C; border-radius: 7px; background: var(--texture), #FCF3E1; color: #4C3428; box-shadow: 0 2px 3px #67472724, inset 0 0 0 3px #ffffff38; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 7px 3px; line-height: 1.15; font-style: normal; text-align: center; }
.door::before { content: ""; position: absolute; inset: 5px; border: 1px dashed #AE8450; border-radius: 3px; z-index: -1; pointer-events: none; }
.door-number { font: bold clamp(18px, 2vw, 28px)/1 var(--display); position: relative; z-index: 3; }
.small-art { position: absolute; bottom: 8px; left: 0; right: 0; font-size: 22px; line-height: 1; color: #8A6132; }
.state-locked { background: var(--texture), #DDCFB8; color: #65554A; box-shadow: none; }
.state-locked::before { border-color: #BDA98D; }
.state-filled.style-paper { background: var(--texture), #F3DFB9; }
.state-filled.style-ribbon { background: var(--texture), #F0D0B4; }
.state-filled.style-starry { background: var(--texture), var(--theme); color: #FFF2CB; border-color: #92773E; }
.state-filled.style-starry::before { border-color: #E9C77D; }
.state-today { border: 3px solid #B47717; box-shadow: 0 0 0 2px #F6D789; }
.state-today::before { border-color: #B47717; }
.state-today.state-empty { background: var(--texture), #FFF4D7; color: #49301E; }
.state-opened, .state-filled.state-opened { background: var(--texture), #A53D32; color: #FFF7DF; }
.state-opened::before { border-color: #EFD2A2; }
.state-opened .door-number { background: #A53D32ED; padding: 0 4px; border-radius: 3px; }
.envelope-flap { position: absolute; inset: 1px; background: linear-gradient(35deg, transparent 49%, #B89867 50%, transparent 51%) 0 0 / 50% 100% no-repeat, linear-gradient(-35deg, transparent 49%, #B89867 50%, transparent 51%) 100% 0 / 50% 100% no-repeat; opacity: .7; pointer-events: none; }
.wax { position: absolute; top: 52%; left: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: #A53D32; border: 2px solid #743127; color: #F1D4A1; font: bold 12px/22px var(--display); text-align: center; box-shadow: 0 2px 1px #633a2b4a, inset 0 0 0 2px #C76545; z-index: 2; }
.ribbon-cross { position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(50% - 4px), #A53D32 calc(50% - 4px), #A53D32 calc(50% + 4px), transparent calc(50% + 4px)), linear-gradient(0deg, transparent calc(45% - 4px), #A53D32 calc(45% - 4px), #A53D32 calc(45% + 4px), transparent calc(45% + 4px)); opacity: .85; pointer-events: none; }
.bow { position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%); z-index: 2; line-height: 0; }
.bow svg { width: 30px; height: 18px; }
.door-sparkle { position: absolute; bottom: 8px; left: 0; right: 0; font-size: 26px; line-height: 1; color: #E9C77D; }
.lock-icon { display: block; width: 15px; height: 12px; border-radius: 3px; background: #81705E; position: absolute; top: 58%; left: 50%; transform: translate(-50%, -50%); }
.lock-icon::before { content: ""; position: absolute; left: 2px; right: 2px; height: 8px; border: 2px solid #81705E; border-bottom: 0; border-radius: 6px 6px 0 0; top: -7px; }
.lock-icon::after { content: ""; position: absolute; width: 2px; height: 5px; background: #E7D9C4; border-radius: 2px; left: 6.5px; top: 4px; }
.open-flap { position: absolute; inset: 4px 54% 4px 4px; background: #E9C77D; border: 1px solid #9F7045; border-radius: 3px; transform: skewY(6deg); box-shadow: 2px 2px 2px #302a2640; z-index: 1; }
.note-peek { position: absolute; inset: 22% 8% 12% 44%; background: #FFFAF0; color: #A53D32; display: grid; place-items: center; font-size: 20px; transform: rotate(3deg); box-shadow: 0 2px 3px #49342255; z-index: 1; }
.preview-progress, .calendar-progress { margin: 16px 2px 12px; display: grid; gap: 7px; }
.preview-progress strong, .calendar-progress strong { font-family: var(--display); font-size: 18px; color: var(--ink); }
.bar { display: block; height: 10px; border-radius: 10px; background: #D8C6A8; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--theme); border-radius: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 18px; height: 18px; display: inline-block; border-radius: 3px; border: 1px solid #BBA07B; background: #FFF0D7; }
.legend .legend-empty { border-style: dashed; }
.legend .legend-sealed { background: #A53D32; border-color: #743127; }
.legend .legend-today { border: 2px solid #B47717; }
.legend .legend-opened { border-left: 6px solid #A53D32; background: #FFFBF2; }
.mc-note { margin-top: 12px; background: #FFFCF4; border: 1px solid #D4BD97; border-radius: 6px; padding: 9px 12px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.mc-ex { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #FFFAF3; background: var(--theme); border-radius: 3px; padding: 1px 6px; margin-right: 4px; }
.preview-caption { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* ---------- content sections ---------- */
.block { padding: 34px 0; border-top: 1px solid var(--line); }
.hero + .block, .hero + .wrap + .block { border-top: 1px solid var(--line); }
.block > .wrap:not(.narrow) > h2 { display: flex; align-items: center; justify-content: center; text-align: center; gap: 20px; }
.block > .wrap:not(.narrow) > h2::before, .block > .wrap:not(.narrow) > h2::after { content: ""; height: 1px; background: var(--border); flex: 1; max-width: 260px; }
.block > .wrap:not(.narrow) > p { max-width: 820px; margin-inline: auto; text-align: center; }
.block p, .block li { font-size: 15.5px; }
.card { background: var(--texture), var(--paper); border: 1px solid #C9B39A; border-radius: 12px; padding: 18px; box-shadow: 0 2px 2px #5e40200c; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li.card { display: flex; gap: 12px; align-items: center; margin: 0; background: none; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 2px 16px 2px 0; }
.steps li.card:last-child { border-right: 0; }
.steps img { width: 91px; flex: 0 0 91px; }
.steps h3 { display: flex; align-items: center; gap: 8px; }
.step-n { background: var(--red); color: #FFFAF0; border-radius: 50%; min-width: 24px; height: 24px; display: inline-grid; place-items: center; font: 700 14px var(--display); }
.steps p { font-size: 14px; line-height: 1.45; margin: 0; }
.occ-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.occ-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 14px 16px; color: var(--ink); text-decoration: none; }
a.occ-card:hover { border-color: var(--theme); transform: translateY(-2px); }
.occasion-art { display: block; background: var(--texture), var(--theme-art); width: calc(100% + 28px); margin: -12px -14px 6px; padding: 8px; }
.occasion-art img { height: 64px; width: 100%; object-fit: contain; }
.occ-card strong { font: 700 20px/1.2 var(--display); }
.occ-card span:not(.occasion-art) { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 9px; background: #FFFCF6; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.45; }
th, td { padding: 10px 11px; border-bottom: 1px solid #D6C3A7; text-align: left; vertical-align: top; color: var(--ink); }
thead th { background: #E8DBC5; font-weight: 700; }
tbody th { font-weight: 650; }
tr:last-child > * { border-bottom: 0; }
#note-ideas ul { list-style: none; background: var(--texture), #F6E0D9; border-radius: 10px; padding: 14px 18px; }
#note-ideas li { display: flex; gap: 10px; }
#note-ideas li::before { content: "♥"; color: var(--red); flex: none; }
#privacy-safety ul { list-style: none; padding: 0; display: grid; gap: 10px; }
#privacy-safety li { background: var(--texture), var(--paper); border: 1px solid #D9C6AA; border-left: 4px solid var(--theme); border-radius: 8px; padding: 10px 14px; margin: 0; }
.byline { font-size: 13px; color: var(--muted); margin-top: 16px; }
.toc { background: var(--texture), var(--paper); border: 1px solid #D9C6AA; border-radius: 10px; padding: 12px 16px; margin: 0 0 6px; }
.toc strong { font: 700 15px var(--display); }
.toc ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.toc li { margin: 0; }
.toc a { font-size: 14px; font-weight: 600; display: inline-flex; min-height: 44px; align-items: center; }
ol.ideas { padding-left: 24px; columns: 2; column-gap: 34px; }
ol.ideas li { break-inside: avoid; margin: 0 0 8px; }
.faq details { border: 1px solid var(--border); border-radius: 8px; background: #FFFCF6; margin: 0 0 8px; }
.faq summary { cursor: pointer; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-weight: 650; font-size: 15px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; font-weight: 500; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 14px 14px; color: var(--muted); margin: 0; }

/* ---------- simple pages (/code, about, privacy, terms, contact, 404) ---------- */
.page-simple, [data-page="404"] .block { padding: 40px 0 56px; border-top: 0; }
.page-simple h1, [data-page="404"] h1 { font-size: clamp(34px, 5vw, 46px); }
.prose h2 { margin: 26px 0 10px; font-size: 25px; }
.prose p, .prose li { font-size: 16px; line-height: 1.6; }
.paper-panel { background: var(--texture), var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin: 22px 0 28px; box-shadow: var(--shadow); }
.paper-panel form { display: grid; gap: 12px; }
.code-input { font: 700 30px/1.2 var(--mono); letter-spacing: .22em; text-transform: uppercase; text-align: center; padding-inline: 8px; }
.code-input::placeholder { text-transform: none; letter-spacing: .04em; font-size: 22px; }
#open-code-btn { width: 100%; min-height: 50px; font: 700 19px var(--display); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

/* ---------- calendar page (/c/{slug}) ---------- */
.calendar-page { max-width: 850px; padding: 18px 0 40px; }
.cal-head { text-align: center; margin: 10px auto 40px; }
.cal-head h1 { font-size: clamp(32px, 5vw, 48px); margin: 10px 0 8px; }
.kicker { display: inline-block; font: 700 14px var(--display); color: var(--theme-ink); background: #EFE4C8; border: 1px solid #D5C09A; border-radius: 3px; box-shadow: 1px 2px 0 #b99c7026; transform: rotate(-1deg); padding: 4px 11px; }
.cal-sub { color: var(--muted); max-width: 600px; margin: 0 auto; }
.banner { border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; }
.banner.owner { background: #E3EBDF; border: 1px solid #9DB39A; color: #22402F; }
.banner.warn { background: #FFF4D7; border: 1px solid #D8B56A; color: #49301E; margin-bottom: 44px; }
.stat-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 14px; }
.stat { background: var(--paper); border: 1px solid #D9C6AA; border-radius: 20px; padding: 4px 14px; font-size: 14px; color: var(--ink); }
.stat b { font-family: var(--display); }
.stat-row + .paper-board { margin-top: 44px; }
.live-board { padding: 40px 22px 20px; }
.live-board .board-art { width: 70%; }
.calendar-progress { margin: 4px 0 16px; }
.live-grid { gap: 12px; }
.live-grid .door { aspect-ratio: 1 / 1.16; min-height: 96px; padding-top: 8px; }
.live-grid .door-number { font-size: clamp(23px, 3vw, 34px); }
.door .date { position: relative; z-index: 3; font-size: 11px; font-weight: 600; opacity: .85; margin-top: 2px; }
.door-status { position: absolute; bottom: 6px; left: 3px; right: 3px; z-index: 4; font-size: 11px; line-height: 1.15; font-weight: 650; background: #FFF7E5E8; color: #4C3428; padding: 2px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-grid .small-art, .live-grid .door-sparkle { bottom: 27px; }
.live-grid .wax, .live-grid .bow { top: 56%; }
button.door { font: inherit; cursor: pointer; }
button.door:hover { transform: translateY(-2px); border-color: var(--theme); }
.can-fill .door-status { background: var(--theme); color: #FFFFFF; }
.openable { box-shadow: 0 0 0 2px #E9C77D, 0 2px 3px #67472724; }
.openable .door-status { background: #A53D32; color: #FFF7DF; }
.live-grid .state-today.openable, .live-grid .state-today.can-fill { animation: today-pulse 2.5s ease-in-out infinite; }
.flip { animation: door-flip .6s ease-in forwards; transform-origin: left center; }
.calendar-page > .form-note { text-align: center; margin-top: 16px; }
.myo-card { text-align: center; margin-top: 28px; }
.myo-card h2 { font-size: 24px; }
.myo-card .share-row { justify-content: center; }
.share-lead { margin: 16px 0 0; }
/* skeleton (before app.js renders) */
.skel-head { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.skel-line { display: block; height: 14px; border-radius: 4px; background: #E6DAC4; }
.skel-line.w30 { width: 30%; height: 24px; } .skel-line.w40 { width: 40%; height: 18px; } .skel-line.w60 { width: 60%; }
.skel-line.h1 { width: 70%; height: 46px; }
.skeleton { background: #E6DAC4; box-shadow: none; border-color: #D9C9AE; }
.skeleton::before { border: 0; }

/* ---------- sheet (#sheet) ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: #302A2670; display: grid; place-items: center; padding: 16px; }
.sheet { color: var(--ink); background: var(--texture), var(--paper); border: 1px solid var(--border); border-radius: 18px; padding: 18px 24px 24px; width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; box-shadow: 0 15px 60px #302A2633; animation: sheet-in .2s ease-out; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 -8px 6px 0; }
.sheet h2 { font-size: 28px; margin: 0; }
.sheet p { color: var(--muted); }
.sheet .x { min-width: 44px; min-height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--ink); border-radius: 8px; }
.sheet form { display: grid; gap: 12px; }
.sheet .btn-primary { width: 100%; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }
.stickers { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.stickers button { height: 44px; font-size: 22px; border: 1px solid var(--border); border-radius: 8px; background: #FFFAF0; padding: 0; }
.stickers button[aria-pressed="true"], .styles button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--theme-soft); }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.styles button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border: 1px solid var(--border); border-radius: 8px; background: #FFFAF0; font-size: 13.5px; font-weight: 650; }
.mini-door { display: inline-block; width: 22px; height: 26px; border-radius: 4px; border: 1px solid #B49872; background: #F3DFB9; position: relative; font-style: normal; flex: none; }
.mini-door.swatch-paper::after { content: ""; position: absolute; left: 6px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: #A53D32; }
.mini-door.swatch-ribbon { background: linear-gradient(90deg, transparent 8px, #A53D32 8px, #A53D32 13px, transparent 13px), #F0D0B4; }
.mini-door.swatch-starry { background: var(--theme); border-color: #92773E; }
.mini-door.swatch-starry::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: #E9C77D; font-size: 12px; }
.note-card { margin: 14px 0; background: var(--texture), #FFF3D8; border: 1px solid #D4B27C; min-height: 120px; border-radius: 7px; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: 16px; animation: note-open .32s ease-out; }
.note-card .stk { display: block; font-size: 36px; line-height: 1.1; margin-bottom: 10px; }
.note-from { font-size: 13px; font-weight: 650; color: var(--muted); margin-top: 16px; }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toast { position: fixed; z-index: 100; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: #FFFAF0; border-radius: 8px; padding: 13px 18px; max-width: calc(100% - 32px); width: max-content; font-size: 14px; box-shadow: var(--shadow); }

@keyframes sheet-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes note-open { from { transform: perspective(500px) rotateY(-35deg); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes today-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes door-flip { to { transform: perspective(600px) rotateY(-80deg); opacity: .5; } }

/* ---------- responsive ---------- */
@media (max-width: 1050px) {
  .wrap { width: calc(100% - 44px); }
  .hero-grid { gap: 30px; grid-template-columns: 1fr 1.06fr; }
  .occ-pills label > span { flex-direction: column; gap: 2px; min-height: 50px; font-size: 11px; }
  .door-grid { gap: 6px; }
  .paper-board { padding-inline: 14px; }
  .steps img { width: 67px; flex-basis: 67px; }
  .occ-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .wrap { width: calc(100% - 36px); }
  .head-inner { min-height: 62px; gap: 10px; }
  .site-head .brand img { width: 150px; }
  .nav .hide-sm { display: none; }
  .nav .nav-code { padding: 0 11px; font-size: 13.5px; }
  .hero { padding: 16px 0 26px; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 26px; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 40px); line-height: 1.06; letter-spacing: -.03em; margin-bottom: 8px; }
  .hero .lede { font-size: 14px; line-height: 1.4; margin-bottom: 10px; }
  .create-card > h2 { font-size: 19px; }
  .create-card .form-note { font-size: 12px; margin-bottom: 6px; }
  .create-card form { gap: 8px; }
  .field > span { font-size: 13px; }
  input, select, textarea { font-size: 16px; padding: 8px 10px; }
  .occ-pills { gap: 4px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .occ-pills label > span { font-size: 10.5px; min-height: 46px; border-radius: 9px; flex-direction: column; white-space: normal; line-height: 1.05; padding: 4px 2px; gap: 2px; }
  .tz-line { font-size: 11.5px; }
  #create-calendar-btn { font-size: 19px; min-height: 48px; }
  .hero-art { margin-top: 18px; }
  .paper-board { padding: 32px 12px 14px; }
  .board-art { top: -26px; max-height: 64px; }
  .board-label { font-size: 18px; margin-bottom: 12px; padding: 5px 14px; }
  .mini-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .door-number { font-size: 22px; }
  .block { padding: 26px 0; }
  .block > .wrap:not(.narrow) > h2 { gap: 10px; }
  .block > .wrap:not(.narrow) > h2::before, .block > .wrap:not(.narrow) > h2::after { min-width: 10px; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .steps li.card { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .steps li.card:last-child { border-bottom: 0; }
  .steps img { width: 70px; flex-basis: 70px; }
  .occ-grid { gap: 10px; }
  ol.ideas { columns: 1; }
  table { font-size: 13px; }
  th, td { padding: 8px 7px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .page-simple, [data-page="404"] .block { padding: 26px 0 40px; }
  .paper-panel { padding: 17px; }
  .calendar-page { padding: 10px 0 30px; }
  .cal-head { margin: 6px 0 34px; }
  .cal-head h1 { font-size: 34px; }
  .live-board { padding: 30px 10px 14px; }
  .live-grid, .live-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .live-grid .door { min-height: 79px; aspect-ratio: 1 / 1.2; padding-top: 6px; }
  .live-grid .door-number { font-size: 23px; }
  .door .date { font-size: 10px; }
  .door-status { font-size: 10px; }
  .live-grid .small-art, .live-grid .door-sparkle { font-size: 20px; bottom: 23px; }
  .skel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .sheet-bg { align-items: end; padding: 0; }
  .sheet { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; padding: 14px 18px max(20px, env(safe-area-inset-bottom)); }
  .sheet h2 { font-size: 24px; }
  .stickers { grid-template-columns: repeat(4, 1fr); }
  .styles { gap: 5px; }
  .styles button { font-size: 12.5px; gap: 4px; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 28px); }
  .hero h1 { font-size: 29px; }
  .occ-pills label > span { font-size: 9.5px; }
  .live-grid .door { min-height: 75px; }
  .door-status { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
.page-actions > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
