@font-face { font-family: 'Newsreader'; src: url('assets/fonts/Newsreader-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('assets/fonts/Newsreader-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('assets/fonts/Newsreader-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('assets/fonts/Newsreader-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('assets/fonts/Karla-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('assets/fonts/Karla-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('assets/fonts/Karla-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('assets/fonts/Karla-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --indigo: #5B648A; --lavender: #B7B2D9; --sand: #EAE2D3;
  --bg: #F7F6F3; --bg2: #EFEDE8; --card: #FFFFFF; --muted: #F1EFF6;
  --text: #2E3140; --text2: #6F7386; --text3: #A6A9B8;
  --rose: #C9A1A8;
  --btn2: #E8E5F3; --on2: #4D5578; --sel: #DCD8EE; --inactive: #7A7E90; --input: #DDD9E6; --border: #ECE8F1;
  --shadow: 0 4px 16px rgba(46, 49, 64, 0.06);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg2); color: var(--text); font: 400 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
img { display: block; }
p, h1, h2, h3 { margin: 0; }
hr { margin: 0; }

#app { position: relative; height: 100%; max-width: 600px; margin: 0 auto; background: var(--bg); overflow: hidden; }
@media (min-width: 640px) { #app { box-shadow: 0 0 0 1px var(--border), 0 10px 40px rgba(46, 49, 64, 0.08); } }
#view { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.anim-push { animation: screenIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
.anim-pop { animation: fadeIn 0.2s ease-out; }
@keyframes screenIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fresh .fade, .fade-in { animation: fadeIn 0.2s ease-out both; }
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
#boot i { width: 24px; height: 24px; border: 2.5px solid var(--indigo); border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- typography */
.t-display-s { font: 500 34px/1.1 var(--serif); }
.t-headline-s { font: 500 24px/1.2 var(--serif); display: block; }
.t-title-l { font: 600 22px/1.2 var(--serif); display: block; }
.t-title-m { font: 700 16px/1.3 var(--sans); }
.t-title-s { font: 700 15px/1.3 var(--sans); display: block; }
.t-body-l { font: 400 16px/1.5 var(--sans); }
.t-body-m { font: 400 14px/1.45 var(--sans); display: block; }
.italic { font-style: italic; font-weight: 400; }
.c2 { color: var(--text2); }
.on2 { color: var(--on2); }
.c-indigo { color: var(--indigo); }
.c-inactive { color: var(--inactive); flex: none; }
.c-lav { color: var(--lavender); }
.fs19 { font-size: 19px; }
.sub { display: block; font-size: 13.5px; color: var(--text2); }
.sub13 { display: block; font-size: 13px; color: var(--text2); }
.sub14 { display: block; font-size: 14px; color: var(--text2); }
.meta { display: block; font-size: 14px; font-weight: 600; color: var(--on2); }
.meta2 { font-size: 13px; font-weight: 600; color: var(--text2); }
.caption { font-size: 12.5px; line-height: 1.4; color: var(--on2); margin-top: 2px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text2); letter-spacing: 0.2px; }
.quote { display: block; font: italic 400 15px/1.4 var(--serif); color: var(--text); }
.quote.big { font-size: 18px; line-height: 1.45; }
.muted-text { font-size: 14.5px; color: var(--text2); }
.small-on2 { font-size: 13px; color: var(--on2); }
.intro-text { font-size: 14.5px; line-height: 1.45; color: var(--on2); }
.foot-note { font-size: 12.5px; line-height: 1.4; color: var(--text2); text-align: center; }
.foot-note.left { text-align: left; }
.plain-err { font-size: 12.5px; }
.selectable { user-select: text; -webkit-user-select: text; }
.clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { -webkit-line-clamp: 2; }
.clamp3 { -webkit-line-clamp: 3; }
.ellipsis { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- layout utilities */
.row { display: flex; align-items: center; }
.row.top { align-items: flex-start; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap14 { gap: 14px; }
.mt2 { margin-top: 2px; } .mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; }
.mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.mt28 { margin-top: 28px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; } .mr8 { margin-right: 8px; }
.my12 { margin: 12px 0; }
.p16 { padding: 16px; } .p20 { padding: 20px; } .pad24 { padding: 24px; }
.px16 { padding-left: 16px; padding-right: 16px; } .px24 { padding-left: 24px; padding-right: 24px; }
.pb4 { padding-bottom: 4px; } .pb8 { padding-bottom: 8px; } .pb12 { padding-bottom: 12px; } .pt4 { padding-top: 4px; }
.pad-v12 { padding: 12px 0; }
.center { text-align: center; }
.right { display: flex; justify-content: flex-end; }
.list > * + * { margin-top: 12px; }
.list > .btn { margin-top: 12px; }

/* ---------- app bar & scroll areas */
.appbar {
  flex: none; display: flex; align-items: center; min-height: 56px; padding: calc(4px + var(--safe-t)) 4px 4px;
  background: var(--bg); position: relative; z-index: 2;
}
.appbar-title { flex: 1; min-width: 0; font: 500 24px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px 0 4px; }
.appbar-title.root { padding-left: 12px; }
.appbar-actions { display: flex; color: var(--text2); }
.tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pad { padding: 4px 16px calc(32px + var(--safe-b)); }
.pad.pt0 { padding-top: 0; } .pad.pt8 { padding-top: 8px; }
.list-pad { padding: 0 16px 96px; }
.list-pad > .card { margin-bottom: 12px; }
.gone { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; }
.intro { padding: 0 16px 8px; font-size: 14px; color: var(--on2); }
.hscroll { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: none; }

/* ---------- buttons */
.icon-btn { width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center; color: inherit; position: relative; flex: none; transition: background 0.15s; }
.appbar > .icon-btn:first-child { color: var(--text); }
.icon-btn:hover { background: rgba(91, 100, 138, 0.06); }
.icon-btn:active { background: rgba(91, 100, 138, 0.12); }
.icon-btn:disabled { opacity: 0.38; background: none; }
.ic { fill: currentColor; flex: none; }
.badge { position: absolute; top: 11px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--on2); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 20px;
  border-radius: 14px; font-weight: 700; font-size: 16px; text-align: center; transition: filter 0.15s, transform 0.15s, background 0.15s;
}
.btn.primary { background: var(--indigo); color: #fff; }
.btn.primary.danger { background: var(--rose); color: var(--text); }
.btn.secondary { background: var(--btn2); color: var(--on2); font-size: 15px; }
.btn.secondary.white { background: var(--card); }
.btn.sm { min-height: 48px; font-size: 15px; padding: 0 12px; }
.btn:hover:not(:disabled) { filter: brightness(0.97); }
.btn:active:not(:disabled) { filter: brightness(0.93); }
.btn.primary:disabled { background: rgba(91, 100, 138, 0.38); }
.btn.secondary:disabled { color: rgba(77, 85, 120, 0.38); }
.btn-text {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 12px;
  border-radius: 14px; color: var(--on2); font-weight: 700; font-size: 15px; flex: none;
}
.btn-text:hover { background: rgba(91, 100, 138, 0.06); }
.btn-text:active { background: rgba(91, 100, 138, 0.12); }
.btn-text:disabled { color: rgba(77, 85, 120, 0.38); background: none; }
.fab {
  position: absolute; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 18px; background: var(--indigo); color: #fff;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(46, 49, 64, 0.2), 0 1px 2px rgba(46, 49, 64, 0.1); z-index: 3;
}
.fab:active { transform: scale(0.96); }

/* ---------- segmented */
.seg { display: flex; width: 100%; border: 1px solid var(--input); border-radius: 22px; overflow: hidden; background: var(--card); }
.seg button { flex: 1; min-height: 44px; padding: 0 12px; font-weight: 700; font-size: 14px; color: var(--on2); text-align: center; transition: background 0.15s; }
.seg button + button { border-left: 1px solid var(--input); }
.seg button.sel { background: var(--sel); }
.seg.compact { width: auto; flex: none; }
.seg.compact button { min-height: 40px; padding: 0 14px; }

/* ---------- chips & pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--muted); color: var(--on2); font-weight: 600; font-size: 14px; transition: background 0.15s;
}
.chip.sel { background: var(--sel); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chip.action { background: var(--card); border: 1px solid var(--input); }
.chip:active { filter: brightness(0.96); }
.hscroll .chip { margin: 4px 0; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--muted); color: var(--on2); font-size: 12.5px; font-weight: 700; white-space: nowrap; flex: none; }
.mood { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; }
.mood i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tag { display: inline-flex; align-items: center; min-height: 24px; }
.tag span { padding: 5px 10px; border-radius: 999px; background: var(--muted); color: var(--on2); font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.tag.tap { min-height: 40px; }
.input-chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin: 6px 0; padding: 0 4px 0 12px; border-radius: 10px;
  background: var(--sel); color: var(--on2); font-weight: 600; font-size: 14px;
}
.input-chip.plain { background: var(--muted); }
.input-chip button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--on2); }
.input-chip button:hover { background: rgba(91, 100, 138, 0.1); }
.drop-chip {
  display: inline-flex; align-items: center; gap: 2px; min-height: 48px; padding: 0 10px 0 16px; border-radius: 999px;
  background: var(--muted); color: var(--on2); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.drop-chip.active { background: var(--sel); }

/* ---------- cards */
.card { display: block; width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; text-align: left; }
.card.flush { padding: 0; overflow: hidden; }
.card.tap { cursor: pointer; transition: transform 0.15s, background 0.15s; }
.card.tap:hover { background: #fdfdff; }
.card.tap:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) { .card.tap:active { transform: none; } }
.divider { border: 0; border-top: 1px solid var(--border); }
.divider.inset { margin: 0 16px; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title > div { flex: 1; min-width: 0; }
.section-title.end { align-items: flex-end; }
.soft-box { padding: 16px; border-radius: 16px; background: var(--bg2); font-size: 14.5px; color: var(--on2); }
.sand-box { background: var(--sand); border-radius: 16px; padding: 20px; }
.sand-box.p16 { padding: 16px; }
.info-box { padding: 12px; border-radius: 12px; background: var(--muted); font-size: 14px; color: var(--on2); }
.pic { object-fit: contain; flex: none; }

/* overview */
.today { font: italic 400 17px/1.4 var(--serif); color: var(--on2); }
.summary { border: 1px solid var(--border); border-radius: 16px; padding: 16px 16px 20px; background: linear-gradient(135deg, var(--card), var(--muted)); box-shadow: var(--shadow); }
.metrics { display: flex; align-items: stretch; }
.metric { flex: 1; min-width: 0; }
.metric-v { font: 500 34px/1.1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-l { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--on2); }
.vdiv { width: 1px; background: var(--input); margin: 0 12px; }
.in-progress { background: var(--sand); border-radius: 16px; padding: 16px 16px 12px; }
.ip-title { font: 500 20px/1.25 var(--serif); }
.no-last { text-align: center; padding: 20px; }
.no-last .ic { margin: 0 auto 12px; }
.no-last p { font: 400 17px/1.4 var(--serif); }
.last-card > span, .last-card .grow > span { display: block; }
.last-card > .row { display: flex; }
.last-card > span.mt8 .mood { display: inline-flex; }
.date-label { font-size: 13px; font-weight: 700; color: var(--text2); }
.art-circle { width: 68px; height: 68px; padding: 8px; border-radius: 50%; background: rgba(234, 226, 211, 0.6); margin-left: 12px; flex: none; }
.res-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; }
.res-row:active { background: rgba(91, 100, 138, 0.06); }
.res-row .grow > span { display: block; }
.res-date { width: 48px; display: flex; flex-direction: column; align-items: center; flex: none; }
.res-mon { font-size: 12px; font-weight: 700; color: var(--on2); }
.res-day { font: 400 24px/1.15 var(--serif); }
.stat-card { padding: 16px; }
.reasons-card { padding-bottom: 4px; }
.quick { display: flex; gap: 8px; }
.quick-chip {
  flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px;
  border-radius: 999px; background: var(--btn2); color: var(--on2); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.quick-chip span { overflow: hidden; text-overflow: ellipsis; }
.quick-chip:active { filter: brightness(0.95); }
.extra-tile { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; }
.extra-tile .grow > span { display: block; }
.extra-art { width: 72px; height: 72px; padding: 6px; border-radius: 14px; background: var(--muted); flex: none; }

/* bars */
.hb { padding: 7px 0; }
.hb-row { display: flex; align-items: flex-end; gap: 8px; }
.hb-l { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.hb-v { font: 500 17px/1.2 var(--serif); }
.muted { color: var(--text3); }
.hb-track { margin-top: 6px; background: var(--muted); overflow: hidden; }
.hb-fill { height: 100%; transform-origin: left; }
.fresh .hb-fill { animation: growX 0.3s ease-out both; }
.hb-cap { margin-top: 4px; font-size: 12.5px; color: var(--text2); }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.vb-area { position: relative; display: flex; padding-top: 22px; }
.vb-guide { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); }
.vb-col { flex: 1; display: flex; justify-content: center; position: relative; z-index: 1; }
.vb-track { position: relative; width: min(28px, 46%); height: 100%; background: var(--muted); border-radius: 11px; }
.vb-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 11px; transform-origin: bottom; }
.fresh .vb-fill { animation: growY 0.3s ease-out both; }
.vb-val { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; }
.fresh .vb-val { animation: fadeIn 0.15s 0.28s both; }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.vb-labels { display: flex; margin-top: 8px; }
.vb-labels span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 500; color: var(--text2); white-space: nowrap; overflow: hidden; }
.vb-labels span.hl { font-weight: 700; color: var(--on2); }
@media (prefers-reduced-motion: reduce) { .fresh .hb-fill, .fresh .vb-fill, .fresh .vb-val, .fresh .fade, .fade-in, .anim-push, .anim-pop { animation: none !important; } }

/* library */
.format-card { display: flex; align-items: flex-start; gap: 14px; }
.format-card .grow > span { display: block; }
.format-card .row.top { display: flex; gap: 8px; }
.art-box { width: 64px; height: 64px; padding: 8px; border-radius: 14px; background: rgba(234, 226, 211, 0.6); flex: none; }
.art-box.arch { background: var(--muted); }
.art-box.arch img { opacity: 0.55; }
.about { font-size: 13.5px; font-weight: 600; color: var(--on2); }
.entries { font-size: 13px; font-weight: 700; color: var(--text); }

/* sessions */
.session-card .grow > div { display: block; }
.reserved-box { margin: 8px 16px; background: var(--bg2); border-radius: 16px; }
.res-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px 12px 16px; color: var(--on2); font-weight: 700; font-size: 15px; border-radius: 16px; }
.res-item { display: flex; align-items: center; margin: 0 8px 8px; padding: 10px 4px 10px 12px; background: var(--card); border-radius: 12px; cursor: pointer; }
.res-item .grow > span { display: block; }
.res-item:active { background: #fafafe; }
.group-head { display: flex; align-items: flex-end; gap: 8px; padding: 16px 0 10px; }
.group-head.first { padding-top: 8px; }
.gh-title { flex: 1; font: 500 21px/1.2 var(--serif); }
.gh-meta { font-size: 13px; font-weight: 600; color: var(--on2); white-space: nowrap; }

/* notes */
.timeline { padding: 8px 16px 96px 12px; }
.month-head { padding: 16px 0 8px 4px; font: italic 400 21px/1.3 var(--serif); }
.month-head.first { padding-top: 0; }
.tl-row { display: flex; }
.tl-rail { width: 24px; position: relative; flex: none; margin-right: 8px; }
.tl-line { position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-row.last .tl-line { bottom: auto; height: 24px; }
.tl-dot { position: absolute; left: 6px; top: 18px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg); }
.note-card { padding: 14px 16px 12px; }
.note-text { font: 400 17px/1.4 var(--serif); }
.linked { color: var(--on2); font-size: 13px; font-weight: 600; }
.note-full { padding: 20px 20px 24px; font: 400 20px/1.55 var(--serif); white-space: pre-wrap; word-wrap: break-word; }
.linked-card { display: flex; align-items: center; gap: 12px; color: var(--on2); }
.linked-card .grow > span { display: block; color: var(--text); }
.linked-card .grow > .sub { color: var(--text2); }

/* ---------- text fields */
.tf-wrap { display: block; }
.tf { position: relative; display: flex; align-items: center; min-height: 52px; background: var(--card); border: 1px solid var(--input); border-radius: 12px; transition: border-color 0.15s; cursor: text; }
.tf:focus-within { border-color: var(--indigo); box-shadow: inset 0 0 0 0.5px var(--indigo); }
.tf.error, .pick.error { border-color: var(--rose); box-shadow: inset 0 0 0 0.5px var(--rose); }
.tf-label { position: absolute; left: 12px; top: -9px; padding: 0 4px; background: var(--card); font-size: 12px; line-height: 16px; color: var(--text2); pointer-events: none; border-radius: 4px; }
.tf input, .tf textarea, .tf select { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; padding: 14px 16px; font-size: 16px; line-height: 1.4; color: var(--text); }
.tf textarea { resize: vertical; min-height: 90px; }
.tf.multi { align-items: stretch; }
.tf ::placeholder { color: var(--text3); opacity: 1; }
.tf-prefix { padding-left: 16px; margin-right: -14px; color: var(--text2); font-size: 16px; }
.tf.select { cursor: pointer; }
.tf.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.tf.select .ic { position: absolute; right: 12px; pointer-events: none; color: var(--text2); }
.tf.search { padding-left: 4px; }
.tf.search .tf-icon { padding-left: 10px; color: var(--text2); display: grid; }
.tf.search input { padding-left: 10px; }
.tf.search input::-webkit-search-cancel-button { display: none; }
.tf-bottom { display: flex; gap: 12px; padding: 4px 16px 0; font-size: 12px; color: var(--text2); }
.tf-bottom > span:first-child { flex: 1; }
.tf-error { font-size: 12.5px; color: var(--text); }
.tf-helper { font-size: 12.5px; }
.note-input textarea { font: 400 18px/1.5 var(--serif); min-height: 220px; }
.note-input textarea::placeholder { font-style: italic; }
.err-text { display: flex; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--text); }
.err-text .ic { color: var(--rose); margin-top: 1px; }
.label-row { display: flex; align-items: flex-end; gap: 8px; }
.label-row .t-title-s { flex: 1; }
.helper { font-size: 13px; font-weight: 600; color: var(--on2); }
.pick { position: relative; display: flex; align-items: center; min-height: 52px; padding: 14px 12px 14px 16px; background: var(--card); border: 1px solid var(--input); border-radius: 12px; cursor: pointer; }
.pick-v { flex: 1; min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick .ic { color: var(--text2); margin-left: 8px; }
.pick-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }
.pick-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pick:focus-within { border-color: var(--indigo); }
.link-field { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 14px 16px; background: var(--card); border: 1px solid var(--input); border-radius: 12px; color: var(--text2); text-align: left; }
.link-field .grow { color: var(--text); font-size: 16px; }

/* ---------- detail screens */
.hero-grad { padding: 20px; border-radius: 16px; background: linear-gradient(180deg, var(--sel), var(--sand)); gap: 12px; }
.hero-date { font-size: 14px; font-weight: 700; color: var(--on2); }
.facts { display: flex; padding: 16px 8px; }
.fact { flex: 1; min-width: 0; text-align: center; }
.fact-v { font: 500 24px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact-l { margin-top: 2px; font-size: 12.5px; color: var(--text2); }

/* statistics */
.glance-box { padding: 16px 16px 20px; }
.glance { flex: 1; min-width: 0; padding-right: 8px; }
.glance-v { height: 36px; display: flex; align-items: flex-end; font: 500 28px/1.1 var(--serif); white-space: nowrap; }
.glance-l { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--on2); }
@media (max-width: 380px) { .glance-v { font-size: 22px; } .metric-v { font-size: 28px; } }

/* settings */
.app-icon { border-radius: 14px; }
.about-line { font: italic 400 18px/1.5 var(--serif); }

/* ---------- bottom nav */
.bottom-nav { flex: none; display: flex; background: var(--card); border-top: 1px solid var(--border); padding-bottom: var(--safe-b); position: relative; z-index: 4; }
.nav-item { flex: 1; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--inactive); }
.nav-ind { width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background 0.2s; }
.nav-item.sel .nav-ind { background: var(--sel); }
.nav-item.sel { color: var(--on2); }
.nav-label { font-size: 12.5px; font-weight: 500; color: var(--text2); }
.nav-item.sel .nav-label { font-weight: 700; color: var(--on2); }
.nav-item:hover:not(.sel) .nav-ind { background: rgba(91, 100, 138, 0.06); }

/* ---------- empty state */
.empty { display: flex; flex-direction: column; align-items: center; padding: 32px 24px; text-align: center; }
.empty .pic { width: 120px; height: 120px; margin-bottom: 16px; }
.empty-ic { color: var(--lavender); margin-bottom: 16px; }
.empty-ic.small { margin-bottom: 8px; }
.empty p { font: 400 19px/1.4 var(--serif); }
.empty .btn { width: 100%; }
.empty-msg { font: 400 19px/1.4 var(--serif); }
.center-col { display: flex; align-items: center; justify-content: center; }
.center-col .pic { margin: 0 auto; }

/* ---------- onboarding */
.onb { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
.onb-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 0 24px; min-height: 60px; }
.brand { font: italic 400 20px/1 var(--serif); color: var(--on2); }
.onb-pages { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.onb-pages::-webkit-scrollbar { display: none; }
.onb-page { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; display: flex; padding: 0 24px; }
.onb-inner { margin: auto 0; width: 100%; padding: 12px 0; }
.onb-art {
  --art: clamp(140px, calc((100dvh - 330px) * 0.42), 280px);
  width: calc(var(--art) + 40px); height: calc(var(--art) + 40px); margin: 0 auto 24px; border-radius: 50%;
  background: radial-gradient(circle closest-side, var(--sand) 60%, var(--bg) 100%); display: grid; place-items: center;
}
.onb-art img { width: var(--art); height: var(--art); object-fit: contain; }
.kicker { font-size: 14px; font-weight: 700; color: var(--on2); }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--lavender); transition: width 0.2s, background 0.2s; }
.dots i.on { width: 22px; background: var(--indigo); }
.onb-actions { padding: 24px 24px 16px; }
.onb-note { margin-top: 8px; text-align: center; font-size: 13px; color: var(--on2); }

/* ---------- reading */
.featured { padding: 0; overflow: hidden; }
.cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.featured-body { display: block; padding: 14px 16px 16px; }
.featured-body > span { display: block; }
.kicker13 { display: block; font-size: 13px; font-weight: 700; color: var(--on2); }
.kicker125 { display: block; font-size: 12.5px; font-weight: 700; color: var(--on2); }
.art-sub { font: italic 400 16px/1.4 var(--serif); color: var(--text2); }
.article-row { display: flex; align-items: center; gap: 14px; padding: 10px; }
.article-row .grow > span { display: block; }
.thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; }
.ar-title { font: 500 18px/1.2 var(--serif); }
.article { position: relative; }
.art-head { position: relative; height: calc(260px + var(--safe-t)); overflow: hidden; }
.art-head img { width: 100%; height: 100%; object-fit: cover; }
.art-fade { position: absolute; left: 0; right: 0; top: 0; height: calc(24px + var(--safe-t)); background: linear-gradient(rgba(247, 246, 243, 0.85), rgba(247, 246, 243, 0)); }
.float-back {
  position: absolute; top: calc(8px + var(--safe-t)); left: 8px; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.9); color: var(--text); transition: box-shadow 0.2s;
}
.float-back.solid { box-shadow: 0 2px 8px rgba(46, 49, 64, 0.15); }
.art-body { padding: 20px 20px calc(32px + var(--safe-b)); }
.art-subtitle { font: italic 400 19px/1.4 var(--serif); color: var(--on2); }
.art-text { font-size: 16.5px; line-height: 1.65; }
.keep-label { color: var(--on2); font-size: 13.5px; font-weight: 700; }
.keep-text { font: 400 19px/1.45 var(--serif); }
.next-essay { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border-radius: 16px; background: var(--btn2); color: var(--on2); text-align: left; }
.next-essay .grow > span { display: block; }
.next-essay .t-title-l { color: var(--text); }

/* ---------- play */
.toy { display: flex; align-items: center; gap: 14px; padding: 12px; }
.toy .grow > span { display: block; }
.toy-art { width: 88px; height: 88px; padding: 10px; border-radius: 14px; flex: none; }
.wheel-wrap { display: flex; justify-content: center; }
.wheel { display: block; }
.slot-machine { padding: 18px 14px; border-radius: 24px; background: linear-gradient(180deg, var(--indigo), var(--on2)); box-shadow: var(--shadow); }
.slot-caption { text-align: center; font: italic 400 17px/1.3 var(--serif); color: #fff; }
.reels { display: flex; gap: 10px; }
.reel { flex: 1; position: relative; height: 126px; border-radius: 14px; background: var(--bg); overflow: hidden; }
.reel img { position: absolute; left: 50%; top: 0; width: 55px; height: 55px; margin-left: -27.5px; margin-top: 14.5px; opacity: 0.45; will-change: transform; }
.reel img.mid { opacity: 1; }
.reel-fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--bg) 6%, rgba(247, 246, 243, 0) 30%, rgba(247, 246, 243, 0) 70%, var(--bg) 94%); }
.prompt-text { font: 400 22px/1.35 var(--serif); }
.flip-wrap { display: flex; justify-content: center; perspective: 830px; }
.flip { position: relative; width: 260px; height: 380px; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.42, 0, 0.58, 1); }
.flip.on { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .flip { transition: none; } }
.face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow); display: flex; }
.face.back { background: linear-gradient(135deg, var(--indigo), var(--on2)); align-items: center; justify-content: center; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; fill: rgba(183, 178, 217, 0.7); }
.card-frame { position: absolute; left: 15px; top: 15px; right: 15px; bottom: 15px; border: 1.5px solid rgba(183, 178, 217, 0.6); border-radius: 16px; }
.face.back img { position: relative; }
.face.front { background: var(--card); border: 1px solid var(--border); transform: rotateY(180deg); flex-direction: column; align-items: center; padding: 24px; }
.card-line { flex: 1; display: flex; align-items: center; text-align: center; font: 400 23px/1.35 var(--serif); }
.card-rule { width: 32px; height: 2px; background: var(--lavender); }
.mem-count { font: 400 20px/1.3 var(--serif); }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mem-card {
  aspect-ratio: 1; border-radius: 14px; background: var(--indigo); border: 1px solid var(--on2); color: var(--lavender);
  display: grid; place-items: center; transition: background 0.2s, border-color 0.2s; overflow: hidden;
}
.mem-card.up { background: var(--card); border-color: var(--border); }
.mem-card.matched { background: var(--sand); }
.mem-card img { width: 100%; height: 100%; padding: 10px; object-fit: contain; animation: fadeIn 0.2s; }
.pond-main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 16px calc(16px + var(--safe-b)); }
.pond-wrap { flex: 1; min-height: 200px; border-radius: 16px; overflow: hidden; position: relative; }
.pond { position: absolute; inset: 0; touch-action: none; cursor: pointer; }

/* ---------- overlays */
#layer { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.ov { position: absolute; inset: 0; pointer-events: auto; display: flex; }
.ov-scrim { position: absolute; inset: 0; background: rgba(46, 49, 64, 0.32); animation: fadeIn 0.18s; }
.ov-panel { position: relative; background: var(--card); animation: fadeIn 0.18s; }
.ov.out { opacity: 0; transition: opacity 0.18s; pointer-events: none; }
.ov-sheet { align-items: flex-end; }
.ov-sheet .ov-panel {
  width: 100%; max-height: 85%; display: flex; flex-direction: column; border-radius: 20px 20px 0 0;
  padding-bottom: calc(16px + var(--safe-b)); animation: sheetUp 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.handle { width: 32px; height: 4px; border-radius: 2px; background: var(--input); margin: 22px auto 18px; flex: none; }
.sheet-title { font: 600 22px/1.2 var(--serif); padding: 0 24px 8px; }
.sheet-pad { padding: 0 24px; }
.ov-scroll { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.ov-scroll.list > * + * { margin-top: 0; }
.list-tile { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 24px; text-align: left; }
.list-tile:hover { background: rgba(91, 100, 138, 0.06); }
.list-tile .grow > span { display: block; }
.lt-title { font-size: 16px; }
.lt-sub { font-size: 14px; color: var(--text2); }
.sheet-actions { display: flex; gap: 8px; padding: 8px 16px 0; flex: none; }
.stepper { flex: 1; padding: 8px 0; border-radius: 12px; background: var(--muted); text-align: center; }
.st-label { font-size: 13px; color: var(--on2); }
.st-row { display: flex; align-items: center; justify-content: space-evenly; }
.st-val { font: 400 26px/1 var(--serif); min-width: 36px; }
.dur-total { font: 400 20px/1.3 var(--serif); }
.ov-dialog { align-items: center; justify-content: center; padding: 24px; }
.ov-dialog .ov-panel { width: 100%; max-width: 360px; border-radius: 20px; padding: 24px 24px 16px; animation: dialogIn 0.18s ease-out; }
@keyframes dialogIn { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg-title { font: 500 22px/1.25 var(--serif); }
.dlg-text { margin-top: 16px; font-size: 15px; line-height: 1.45; }
.dlg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 24px -8px 0 0; }
.dlg-actions .btn { width: auto; min-height: 48px; padding: 0 20px; font-size: 15px; }
.snack {
  position: absolute; left: 12px; right: 12px; bottom: calc(88px + var(--safe-b)); z-index: 30; pointer-events: auto;
  padding: 14px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14.5px;
  box-shadow: 0 4px 12px rgba(46, 49, 64, 0.2); animation: snackIn 0.2s ease-out; transition: opacity 0.25s;
}
.snack.out { opacity: 0; }
@keyframes snackIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
