/* Parallel Day — styles */
@font-face { font-family: 'Syne'; font-weight: 700; font-style: normal; font-display: swap; src: url('assets/fonts/Syne-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 400; font-style: normal; font-display: swap; src: url('assets/fonts/Outfit-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 500; font-style: normal; font-display: swap; src: url('assets/fonts/Outfit-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 600; font-style: normal; font-display: swap; src: url('assets/fonts/Outfit-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 700; font-style: normal; font-display: swap; src: url('assets/fonts/Outfit-Bold.woff2') format('woff2'); }

:root {
  --ink: #171A22; --paper: #F5F3EE; --mist: #E7E5E1; --slate: #747985; --blue: #4B6FAD; --blue-soft: #5F82B8;
  --terracotta: #D27A61; --sage: #7F9B87; --amber: #D5A451; --violet: #8A7DA6; --rose: #B86F78; --card: #FFFFFF;
  --card-alt: #ECEAE6; --card-sel: #EEF2F8; --border: #D9D7D2; --divider: #E4E1DC; --text2: #626773; --muted: #94979F;
  --disabled: #B6B7BA; --on-dark: #F8F7F4; --cta-pressed: #3E5E95; --cta2-bg: #E9EDF3; --cta2-fg: #3D5E92;
  --display: 'Syne', 'Avenir Next', 'Helvetica Neue', sans-serif; --body: 'Outfit', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--ink); }
body { font-family: var(--body); color: var(--ink); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
b { font-weight: 700; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 700; }

#app { position: relative; height: 100%; height: 100dvh; max-width: 520px; margin: 0 auto; background: var(--paper); overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.layer { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--paper); transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease; will-change: transform; }
.layer.enter { transform: translateX(100%); }
.layer.leave { transform: translateX(100%); pointer-events: none; }
.layer.under { visibility: hidden; }
.layer.under.home, .layer.under.onboarding { visibility: hidden; }

/* app bar */
.appbar { flex: none; background: var(--ink); color: var(--on-dark); padding-top: var(--sat); }
.appbar-row { display: flex; align-items: center; min-height: 60px; padding: 0 8px 0 4px; }
.appbar-title { flex: 1; min-width: 0; padding: 8px 4px; }
.appbar-title.no-lead { padding-left: 16px; }
.appbar-heading { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.2px; line-height: 1.12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { display: flex; align-items: center; gap: 2px; }
.icon-btn { position: relative; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 24px; color: inherit; }
.icon-btn:active { background: rgba(255,255,255,.08); }
.icon-btn.small { width: 40px; height: 40px; color: var(--slate); }
.badge { position: absolute; top: 8px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--terracotta); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dual-rule { display: flex; flex-direction: column; }
.dual-rule .r1 { height: 2px; background: var(--blue); }
.dual-rule .r2 { height: 2px; background: var(--terracotta); }
.rule-short { width: 64px; margin: 16px auto; }
.rule-56 { width: 56px; margin: 40px 0 20px; }
.ic { display: inline-flex; flex: none; align-items: center; justify-content: center; vertical-align: middle; }
.ic svg { display: block; }

/* body */
.body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 24px 16px calc(32px + var(--sab)); overscroll-behavior: contain; }
.body.flush { padding: 0; display: flex; flex-direction: column; }
.body.center { display: flex; align-items: center; justify-content: center; padding: 0; }
.fab { position: absolute; right: 16px; bottom: calc(16px + var(--sab)); width: 56px; height: 56px; border-radius: 16px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(23,26,34,.22); z-index: 2; }
.fab:active { background: var(--cta-pressed); }
.home .fab { bottom: calc(72px + var(--sab)); }

/* home shell */
.panes { flex: 1; min-height: 0; position: relative; }
.pane { position: absolute; inset: 0; display: none; flex-direction: column; }
.pane.active { display: flex; }
.bottom-nav { flex: none; display: flex; background: var(--card); border-top: 1px solid var(--border); padding-bottom: var(--sab); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px; color: var(--slate); font-size: 12px; font-weight: 500; }
.nav-item.on { color: var(--blue); font-weight: 700; }

/* typography */
.display { font-family: var(--display); font-weight: 700; letter-spacing: -.2px; line-height: 1.12; color: var(--ink); }
.kicker { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.6px; line-height: 1.2; color: var(--slate); text-transform: uppercase; }
.kicker.k10 { font-size: 10px; }
.kicker-muted { color: var(--muted); }
.kicker.muted { color: var(--muted); }
.kicker.ink { color: var(--ink); }
.hero { font-size: 28px; line-height: 1.15; margin: 8px 0 24px; }
.hero.h24 { font-size: 24px; margin: 0; }
.sub { color: var(--text2); font-size: 15px; }
.sub.small, .small { font-size: 12.5px; }
.sub.small.muted { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; }
.row.align-start { align-items: flex-start; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gap8 { gap: 8px; }
.gap32 { height: 32px; }
.wrap8 { display: flex; flex-wrap: wrap; gap: 8px; }
.wrap16 { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.divider { height: 1px; background: var(--divider); }
.divider.inset { margin: 0 16px; }
.vdiv { width: 1px; background: var(--divider); align-self: stretch; }
.list { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clamp-1, .clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.missing { color: var(--rose); font-size: 13px; }

/* cards & sections */
.card { display: block; width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow: hidden; color: var(--ink); }
.card.tap { transition: background .15s; }
.card.tap:active { background: var(--card-sel); }
.card.row { display: flex; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sh-main { flex: 1; min-width: 0; }
.sh-title { font-size: 19px; margin-top: 4px; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 12px 20px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; font-size: 16px; transition: background .15s; }
.btn-primary:active { background: var(--cta-pressed); }
.btn-primary.off { background: var(--mist); color: var(--disabled); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.btn-secondary:active { filter: brightness(.94); }
.btn-text { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--cta2-fg); font-weight: 600; font-size: 15px; }
.btn-text:active { background: rgba(75,111,173,.08); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text2); border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cat-marker { display: inline-flex; align-items: center; gap: 6px; }
.cat-bar { width: 3px; height: 16px; border-radius: 2px; }
.cat-label { font-size: 12.5px; font-weight: 600; color: var(--text2); margin-left: -2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; border: 1px solid; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.empty { display: flex; flex-direction: column; align-items: center; padding: 32px; text-align: center; max-width: 420px; margin: 0 auto; }
.empty-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.empty-text { font-size: 16px; color: var(--text2); line-height: 1.5; margin-bottom: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); color: var(--text2); font-size: 13.5px; font-weight: 600; white-space: nowrap; margin: 4px 0; transition: background .18s, border-color .18s; }
.pill.on { color: #fff; }
.pill-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--mist); }
.seg.fill { display: flex; width: 100%; }
.seg.fill .seg-opt { flex: 1; }
.seg-opt { min-height: 42px; min-width: 64px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text2); display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; transition: background .18s; }
.seg-opt.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(23,26,34,.06); }

/* forms */
.form-section { margin-bottom: 24px; }
.fs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fs-bar { width: 10px; height: 3px; }
.fs-hint { font-size: 13px; color: var(--slate); margin: -6px 0 10px; }
.field-label { margin-bottom: 8px; }
.field { display: block; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px 12px; --focus: var(--blue); }
.field:focus-within { border-color: var(--focus); box-shadow: inset 0 0 0 .6px var(--focus); }
.field.err { border-color: var(--rose); }
.field-lbl { display: block; font-size: 12.5px; color: var(--text2); margin-bottom: 4px; }
.field:focus-within .field-lbl { color: var(--focus); font-weight: 600; }
.field input, .field textarea { display: block; width: 100%; border: 0; outline: 0; background: transparent; padding: 0; font-size: 15px; line-height: 1.45; resize: vertical; }
.field textarea { min-height: 2.9em; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field-foot { display: flex; justify-content: space-between; gap: 8px; padding: 4px 16px 0; font-size: 12.5px; color: var(--slate); }
.field-counter { margin-left: auto; }
.field-error { padding: 4px 16px 0; font-size: 12.5px; color: var(--rose); }
.field.select .select-row { display: flex; align-items: center; gap: 10px; }
.field.select select { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: transparent; padding: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field.select.disabled { opacity: .6; }
.date-field { position: relative; display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.df-lbl { font-size: 12.5px; color: var(--text2); }
.df-val { font-size: 16px; font-weight: 500; }
.date-overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); font-size: 15px; }
.range-row { display: flex; gap: 10px; }
.range-row label { flex: 1; font-size: 12.5px; color: var(--text2); display: flex; flex-direction: column; gap: 4px; }
.simultaneity { display: flex; align-items: center; gap: 4px; padding: 0 0 16px 4px; }
.sim-bar { display: inline-block; width: 2px; height: 22px; }
.sim-text { margin-left: 8px; font-size: 13px; color: var(--muted); font-style: italic; }
.check-tile { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin: -8px 0 24px; cursor: pointer; }
.check-tile input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--sage); flex: none; }
.example-chip { padding: 7px 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); font-size: 13px; color: var(--text2); }
.row-title { font-size: 15px; font-weight: 600; }

/* parallel day card */
.pd-card { display: flex; align-items: flex-start; gap: 12px; }
.date-block { width: 44px; flex: none; text-align: center; }
.db-day { font-size: 26px; line-height: 1; margin-bottom: 2px; }
.pd-main { flex: 1; min-width: 0; }
.pd-line { display: flex; gap: 10px; align-items: stretch; }
.rail { position: relative; width: 18px; flex: none; }
.rail-svg { position: absolute; inset: 0; height: 100%; }
.rail-dot { position: absolute; left: 0; top: 0; }
.pd-line-main { flex: 1; min-width: 0; }
.pd-text { font-size: 15px; font-weight: 500; line-height: 1.35; margin-top: 3px; }
.pd-connector { display: flex; align-items: center; gap: 10px; height: 18px; }
.pd-connector svg { display: block; }
.conn-link { stroke-dasharray: 9; stroke-dashoffset: 9; animation: draw .26s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pd-same { font-size: 11.5px; color: var(--muted); font-style: italic; }
.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.pd-thread { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pd-thread-title { font-size: 13px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.pd-thread-title.big { font-size: 15.5px; color: var(--ink); max-width: none; white-space: normal; }
.pd-note { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--paper); font-size: 13.5px; color: var(--text2); font-style: italic; }

/* thread & note cards */
.thread-card { display: flex; align-items: stretch; }
.tc-bar { width: 4px; flex: none; }
.tc-main { flex: 1; min-width: 0; padding: 14px 16px 14px 14px; }
.tc-title { font-size: 17.5px; margin-top: 10px; }
.tc-desc { font-size: 14px; color: var(--text2); margin-top: 6px; }
.meta-wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--slate); }
.note-card .note-text { font-size: 15.5px; line-height: 1.45; margin: 12px 0; }
.linked-entry { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--card-sel); font-size: 12.5px; font-weight: 500; color: var(--cta2-fg); }
.linked-entry .clamp-1 { -webkit-line-clamp: 1; }

/* list rows & tiles */
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; }
.list-row:active, .tile:active { background: var(--card-sel); }
.tile { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; }
.tile-lead { width: 32px; display: flex; justify-content: center; }
.tile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tile-title { font-size: 15.5px; }
.tile-sub { font-size: 12.5px; color: var(--slate); }
.filter-panel { margin: 8px 16px 0; padding: 12px 0 8px; border-radius: 10px; background: var(--card-alt); display: flex; flex-direction: column; gap: 4px; animation: fade-in .2s ease-out; }
.group-header { display: flex; justify-content: space-between; gap: 8px; padding: 16px 4px 8px; }
.legend { display: flex; gap: 16px; padding: 12px 20px 4px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text2); }
.legend-bar { width: 16px; height: 3px; }
.search-wrap { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 0 6px 0 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.search-wrap:focus-within { border-color: var(--violet); }
.search-input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; font-size: 15px; -webkit-appearance: none; }

/* overview */
.metric { flex: 1; min-width: 0; padding: 16px; }
.metric-row { display: flex; }
.metric-bar { width: 18px; height: 3px; margin-bottom: 12px; }
.metric-val { font-size: 34px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-val.small { font-size: 22px; }
.metric-lbl { font-size: 13px; color: var(--text2); margin-top: 4px; }
.dir-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-right: 12px; flex: none; }
.explore-tile { display: flex; flex-direction: column; aspect-ratio: 1.05; }
.explore-img { flex: 1; min-height: 0; display: flex; align-items: center; }
.explore-img img { height: 100%; max-height: 100px; width: auto; object-fit: contain; }
.explore-title { font-size: 16px; margin-top: 10px; }

/* thread detail */
.thread-desc { font-size: 16px; color: var(--text2); line-height: 1.5; margin-top: -14px; }
.info-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; font-size: 14.5px; }
.info-val { font-weight: 600; }
.note-row-text { font-size: 15px; line-height: 1.45; margin-top: 4px; }

/* modals */
.overlay { position: absolute; inset: 0; z-index: 50; background: rgba(23,26,34,0); display: flex; align-items: center; justify-content: center; padding: 24px; transition: background .2s; }
.overlay.open { background: rgba(23,26,34,.45); }
.overlay.closing { background: rgba(23,26,34,0); pointer-events: none; }
.dialog { width: 100%; max-width: 360px; background: var(--card); border-radius: 14px; padding: 20px 24px 12px; transform: scale(.96); opacity: 0; transition: transform .2s, opacity .2s; }
.overlay.open .dialog { transform: none; opacity: 1; }
.overlay.closing .dialog { opacity: 0; }
.dialog-title { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.2px; margin-bottom: 12px; }
.dialog-body { font-size: 15px; color: var(--text2); line-height: 1.45; white-space: pre-line; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.overlay-sheet { align-items: flex-end; padding: 0; }
.sheet { width: 100%; max-height: 95%; background: var(--paper); border-radius: 20px 20px 0 0; padding: 8px 0 calc(16px + var(--sab)); overflow-y: auto; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
.overlay.open .sheet { transform: none; }
.overlay.closing .sheet { transform: translateY(100%); }
.drag-handle { width: 32px; height: 4px; border-radius: 2px; background: var(--border); margin: 8px auto 16px; flex: none; }
.sheet-list { display: flex; flex-direction: column; padding: 0 8px; }
.sheet-body { padding: 0 24px 16px; }
.detail-line { display: flex; gap: 14px; }
.dl-bar { width: 4px; border-radius: 2px; flex: none; }
.dl-text { font-size: 18px; font-weight: 500; line-height: 1.4; margin-top: 6px; }
.detail-note { font-size: 15.5px; color: var(--text2); line-height: 1.5; }
.linked-note { font-size: 14.5px; color: var(--text2); margin-bottom: 8px; }
#snack { position: absolute; left: 16px; right: 16px; bottom: calc(24px + var(--sab)); z-index: 60; background: var(--ink); color: var(--on-dark); padding: 14px 16px; border-radius: 10px; font-size: 14.5px; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
#snack.show { opacity: 1; transform: none; }

/* insights */
.chart svg { display: block; }
.bar { transform-origin: bottom; animation: grow .3s ease-out; }
@keyframes grow { from { transform: scaleY(0); } }
.ring { position: relative; width: 140px; height: 140px; flex: none; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-val { font-size: 28px; line-height: 1; }
.stack svg { display: block; border-radius: 9px; }
.img88 { width: 88px; height: 88px; object-fit: contain; flex: none; }
.stat { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1.6; }
.stat-val { font-size: 28px; line-height: 1; }
.sq { width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; flex: none; }
.sq.sharp { border-radius: 0; margin-right: 0; }
.dur-row { padding: 16px; }
.dur-track { height: 4px; background: var(--mist); margin: 8px 0 4px; }
.dur-fill { height: 4px; }
.progress { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; margin: 0 8px; }
.progress-fill { height: 100%; transition: width .3s; }

/* reading */
.cover-wrap { aspect-ratio: 16 / 10; overflow: hidden; }
.cover { width: 100%; height: 100%; object-fit: cover; }
.feature-title { font-size: 22px; margin-top: 8px; }
.thumb84 { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; flex: none; }
.thumb64 { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.art-title { font-size: 15.5px; margin: 4px 0; }
.article-bar .fade { transition: opacity .15s; }
.rule-progress { position: relative; }
.rule-shade { position: absolute; top: 0; right: 0; bottom: 0; background: rgba(23,26,34,.75); }
.hero-cover { height: 300px; background: var(--ink); overflow: hidden; }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-title { font-size: 30px; line-height: 1.12; margin: 12px 0; }
.article-sub { font-size: 17px; color: var(--text2); line-height: 1.5; }
.sec-num { font-size: 14px; color: var(--blue); margin-right: 10px; margin-top: 3px; }
.sec-title { font-size: 19px; }
.article-body { font-size: 16.5px; line-height: 1.65; color: #2B2F39; margin-top: 10px; }
.takeaway { display: flex; align-items: flex-start; gap: 3px; margin-top: 24px; padding: 20px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); }
.tk-bar { width: 3px; height: 56px; flex: none; }
.tk-text { font-size: 16px; font-weight: 500; line-height: 1.55; margin-top: 8px; }
.app-icon { width: 64px; height: 64px; border-radius: 16px; }

/* play corner */
.ink-box { background: var(--ink); color: var(--on-dark); border-radius: 10px; padding: 20px; }
.echo-val { font-size: 40px; line-height: 1; color: var(--on-dark); margin: 6px 0; }
.game-img { width: 92px; height: 92px; padding: 10px; border-radius: 10px; flex: none; }
.game-img img { width: 100%; height: 100%; object-fit: contain; }
.dice { width: 72px; height: 72px; flex: none; transition: transform .5s cubic-bezier(.175,.885,.32,1.275); }
.fade-in { animation: fade-in .25s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
.wheel-wrap { position: relative; width: 300px; height: 320px; margin: 24px auto 0; }
.wheel-svg { position: absolute; left: 5px; top: 18px; width: 290px; height: 290px; border-radius: 50%; }
.wheel-svg svg { display: block; }
.pointer { position: absolute; left: 135px; top: 0; }
.pointer svg { display: block; }
.spin-btn { position: absolute; left: 120px; top: 133px; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); border: 4px solid var(--paper); color: var(--on-dark); font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.6px; display: flex; align-items: center; justify-content: center; }
.dot12 { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.slot-box { background: var(--ink); border-radius: 16px; padding: 20px 16px 16px; margin-top: 24px; }
.lights { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.light { width: 8px; height: 8px; border-radius: 50%; }
.reels { display: flex; gap: 8px; margin-bottom: 16px; }
.reel-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.reel { width: 100%; aspect-ratio: .82; background: var(--paper); border-radius: 10px; border: 2px solid #3A3F4C; padding: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel.stopped { border-color: var(--amber); }
.reel img { width: 100%; height: 100%; object-fit: contain; }
.reel-anim { animation: reel-drop .06s ease-out; }
@keyframes reel-drop { from { opacity: 0; transform: translateY(-40%); } }
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mem-card { aspect-ratio: .86; border-radius: 10px; background: var(--ink); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: transform .22s; }
.mem-card.face { background: var(--card); border: 1.5px solid var(--border); padding: 18px; animation: pop .22s ease-out; }
.mem-card.matched { background: var(--card-sel); border-color: var(--sage); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
.mem-img { width: 100%; height: 100%; object-fit: contain; }
.mem-back { display: flex; gap: 5px; }
.mem-back .sim-bar { width: 4px; }

/* onboarding */
.onboarding { background: var(--ink); color: var(--on-dark); padding-top: var(--sat); }
.onboarding .display { color: var(--on-dark); }
.ob-top { display: flex; align-items: center; padding: 16px 8px 0 24px; flex: none; }
.ob-icon { width: 34px; height: 34px; border-radius: 8px; }
.ob-top .btn-text { color: var(--muted); }
.pager { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pager::-webkit-scrollbar { display: none; }
.page { flex: none; width: 100%; height: 100%; scroll-snap-align: start; overflow-y: auto; padding: 0 24px; }
.page-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 16px 0; }
.intro-circle { width: 260px; height: 260px; max-width: 70vw; max-height: 70vw; border-radius: 50%; background: var(--paper); padding: 40px; margin: 0 auto; }
.intro-circle img { width: 100%; height: 100%; object-fit: contain; }
.intro-title { font-size: 32px; line-height: 1.1; }
.intro-title.big { font-size: 34px; margin: 12px 0 20px; }
.intro-body { font-size: 17px; color: #C9CBD1; line-height: 1.55; margin-top: 16px; }
.intro-line { gap: 14px; margin-bottom: 14px; font-size: 15.5px; color: #C9CBD1; }
.btn-outline-dark { width: 100%; height: 54px; margin-top: 10px; border-radius: 12px; border: 1px solid #3A3F4C; color: var(--on-dark); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.btn-outline-dark:active { background: rgba(255,255,255,.06); }
.ob-bottom { flex: none; display: flex; align-items: center; padding: 8px 24px calc(24px + var(--sab)); min-height: 86px; }
.dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 4px; border-radius: 2px; background: #3A3F4C; transition: width .2s, background .2s; }
.dot.on { width: 28px; }

@media (min-width: 540px) { #app { box-shadow: 0 0 40px rgba(0,0,0,.4); } }
@media (max-width: 360px) { .hero { font-size: 25px; } .intro-title { font-size: 28px; } .wheel-wrap { transform: scale(.9); transform-origin: top center; } }
@media (prefers-reduced-motion: reduce) { .layer, .overlay, .dialog, .sheet, .dice, .wheel-svg { transition: none !important; } .bar, .conn-link, .fade-in, .mem-card.face { animation: none !important; } }
