/* Khazana v5 — Apple-style materials on the floating chrome only (tab bar, Capture button, top bar, island, quick menu),
   plus the styles for every new screen. The v4 look stays: cool grey canvas, white cards, emerald for actions. */
:root {
  --glass: rgba(255, 255, 255, .7); --glass-2: rgba(255, 255, 255, .86); --glass-hi: rgba(255, 255, 255, .85); --glass-edge: rgba(16, 19, 24, .08);
  --glass-sh: 0 12px 32px rgba(16, 19, 24, .14), 0 2px 6px rgba(16, 19, 24, .06);
  --island: #050607; --island-ink: #f4f6f8; --island-dim: rgba(255, 255, 255, .62); --island-ok: #33b98a;
  --spring5: cubic-bezier(.3, 1.3, .55, 1); --press: scale(.97);
}
:root[data-font="system"] { --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
:root[data-theme="dark"] { --glass: rgba(30, 34, 41, .62); --glass-2: rgba(30, 34, 41, .84); --glass-hi: rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .08); --glass-sh: 0 14px 36px rgba(0, 0, 0, .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass: rgba(30, 34, 41, .62); --glass-2: rgba(30, 34, 41, .84); --glass-hi: rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .08); --glass-sh: 0 14px 36px rgba(0, 0, 0, .55); } }

/* ---------- type: size-specific tracking, large titles ---------- */
.phead h1 { font-size: 30px; font-weight: 760; letter-spacing: -.028em; line-height: 1.1; }
.greet h1 { letter-spacing: -.03em; }
@media (min-width: 960px) { .phead h1 { font-size: 34px; } }
.small, .sub { letter-spacing: .005em; }

/* ---------- touch: feedback on press, not on release ---------- */
.svc, .tl, .hub, .chip, .rd-card, .rd-mini, .pod-card, .fc-peek, .src5, .colc, .way { transition: transform .1s ease-out, background-color .15s, border-color .15s, box-shadow .15s; }
.svc:active, .tl:active, .hub:active, .chip:active, .rd-card:active, .rd-mini:active, .pod-card:active, .fc-peek:active, .src5:active, .colc:active, .way:active, .press5 { transform: var(--press); }
body.noscroll5 { overflow: hidden; }
.svc, .tl, .bcard, .hub { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ---------- phone chrome: glass tab bar that shrinks, a round Capture button, a top bar that fades in ---------- */
@media (max-width: 959px) {
  .main { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  .nav { left: 12px; right: auto; bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 100px); max-width: 420px; display: flex; gap: 2px; padding: 6px; border: 0; border-radius: 32px; background: none; transition: width .45s var(--spring5); }
  .nav::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border: 1px solid var(--glass-edge); box-shadow: var(--glass-sh), inset 0 1px 0 var(--glass-hi); }
  .nav a { flex: 1 1 0; min-width: 0; height: 54px; border-radius: 26px; font-size: 10.5px; font-weight: 650; letter-spacing: .01em; color: var(--ink-2); transition: background-color .2s, color .2s, opacity .2s, flex-basis .4s var(--spring5); overflow: hidden; white-space: nowrap; }
  .nav a[aria-current="page"] { color: var(--brand-text); background: color-mix(in srgb, var(--ink) 7%, transparent); }
  .nav .add-tab { position: fixed; z-index: 31; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); width: 66px; height: 66px; flex: none; border-radius: 50%; font-size: 0; gap: 0; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border: 1px solid var(--glass-edge); box-shadow: var(--glass-sh), inset 0 1px 0 var(--glass-hi); }
  .nav .add-tab .plus { width: 50px; height: 50px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
  .nav .add-tab .plus svg { width: 24px; height: 24px; }
  .nav .add-tab[aria-current="page"] { background: var(--glass); }
  .nav .add-tab[aria-current="page"] .plus { background: var(--ink); color: var(--surface); }
  .nav.min { width: 66px; }
  .nav.min a:not([aria-current="page"]):not(.add-tab) { flex: 0 0 0; opacity: 0; pointer-events: none; padding: 0; }
  .nav.min a[aria-current="page"] { font-size: 0; gap: 0; }
  .nav .badge { top: 6px; }
  .appbar { background: transparent !important; box-shadow: none !important; }
  .appbar::before { content: ""; position: absolute; inset: 0 0 -20px; z-index: -1; pointer-events: none; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); opacity: 0; transition: opacity .2s; }
  .appbar.edge::before { opacity: 1; }
  .appbar .ttl5 { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 30px); max-width: 48%; transform: translate(-50%, -38%); opacity: 0; pointer-events: none; font-size: 16.5px; font-weight: 680; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .18s, transform .25s var(--ease); }
  .appbar.titled .ttl5 { opacity: 1; transform: translate(-50%, -50%); }
  .appbar.titled .logo { opacity: 0; transition: opacity .18s; }
  .sheet .grab { width: 44px; height: 5px; margin-top: 9px; }
  .sheet .grab, .sheet .sh-top { touch-action: none; cursor: grab; }
}
@media (min-width: 960px) { .appbar .ttl5 { display: none; } }

/* ---------- activity island: one black capsule for work running in the background ---------- */
.island { position: fixed; z-index: 70; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -8px) scale(.86); opacity: 0; pointer-events: none; transition: opacity .2s, transform .45s var(--spring5); }
.island.on { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
/* on a phone the island takes the logo's place in the top bar while something runs */
@media (max-width: 959px) {
  .island { top: calc(env(safe-area-inset-top) + 9px); left: 12px; transform: translateY(-6px) scale(.92); transform-origin: left center; max-width: calc(100% - 156px); }
  .island.on { transform: none; }
  .island .isl-pill { max-width: 100%; }
  body.isl-on .appbar .logo, body.isl-on .appbar .ttl5 { opacity: 0 !important; transition: opacity .15s; }
}
.isl-pill { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 9px 0 7px; max-width: min(86vw, 360px); border: 0; border-radius: 999px; background: var(--island); color: var(--island-ink); font-size: 13.5px; font-weight: 620; letter-spacing: .005em; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.isl-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.isl-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: var(--island-ink); }
.isl-ic svg { width: 16px; height: 16px; }
.isl-ic.ok { background: var(--island-ok); color: #05140e; }
.isl-ring { width: 24px; height: 24px; flex: none; }
.isl-ring circle { fill: none; stroke-width: 4; stroke: rgba(255, 255, 255, .18); }
.isl-ring circle + circle { stroke: var(--island-ok); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dasharray .4s var(--ease); }
.isl-spin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .18); border-top-color: var(--island-ok); animation: spin5 .9s linear infinite; }
@keyframes spin5 { to { transform: rotate(360deg); } }
.isl-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255, 255, 255, .14); font-size: 11.5px; line-height: 20px; text-align: center; }
.isl-list { display: none; }
.island.open .isl-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 8px; min-width: min(86vw, 320px); border-radius: 24px; background: var(--island); color: var(--island-ink); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.isl-row { display: flex; align-items: center; gap: 10px; padding: 6px; }
.isl-row b { display: block; font-size: 13.5px; font-weight: 620; }
.isl-row small { display: block; color: var(--island-dim); font-size: 12px; }
.isl-b { margin-left: auto; height: 30px; padding: 0 12px; border-radius: 15px; border: 0; background: rgba(255, 255, 255, .14); color: var(--island-ink); font-size: 12.5px; font-weight: 650; }

/* ---------- quick menu ---------- */
.ctx5 { position: fixed; z-index: 75; min-width: 230px; max-width: min(300px, calc(100vw - 16px)); padding: 6px; border-radius: 16px; background: var(--glass-2); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); border: 1px solid var(--glass-edge); box-shadow: var(--glass-sh); opacity: 0; transform: scale(.9); pointer-events: none; visibility: hidden; transition: opacity .14s, transform .22s var(--spring5), visibility 0s linear .22s; }
.ctx5.on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .14s, transform .22s var(--spring5); }
.ctx5 .ctx-h { padding: 6px 10px 8px; font-size: 12.5px; font-weight: 650; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx5 button { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 15px; font-weight: 520; text-align: left; }
.ctx5 button:hover, .ctx5 button:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
.ctx5 button[disabled] { opacity: .45; }
.ctx5 button svg { width: 18px; height: 18px; color: var(--muted); }

/* ---------- shared bits ---------- */
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 420px) { .kpis.three .kpi .v { font-size: 22px; } .kpis.three .kpi { padding: 12px 10px 10px; } }
.seg5 { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-top: 10px; border-radius: 12px; background: var(--surface-3); max-width: 100%; }
.seg5 button { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 620; }
.seg5 button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.step5 { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); }
.step5 button { width: 34px; height: 32px; border: 0; background: none; font-size: 18px; font-weight: 600; color: var(--ink); }
.step5 button[disabled] { opacity: .35; }
.step5 b { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.input.sm5 { height: 36px; width: auto; min-width: 0; max-width: 150px; padding: 0 10px; font-size: 14px; }
select.input.sm5 { padding-right: 26px; }
.bar5 { display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar5 i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.col5 { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.btn[aria-pressed="true"] { background: var(--brand-soft); border-color: transparent; color: var(--brand-text); }

/* ---------- Vault: hubs, task chips, filters understood, Board ---------- */
.hubs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 4px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.hubs::-webkit-scrollbar { display: none; }
.hub { flex: none; scroll-snap-align: start; display: grid; grid-template-columns: 36px auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-width: 148px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); text-decoration: none; color: inherit; }
.hub .hi { grid-row: span 2; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--cs); color: var(--ct); }
.hub .hi svg { width: 19px; height: 19px; }
.hub b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.hub small { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (min-width: 960px) { .hubs { margin: 0 0 16px; padding: 2px 0 4px; flex-wrap: wrap; overflow: visible; } }
.tasks5 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.tasks5 .chip { height: 32px; font-size: 13px; }
.nl5 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); font-size: 13px; font-weight: 620; }
.nl5 svg { width: 16px; height: 16px; }
.board5 { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 82vw); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 2px 16px 10px; }
@media (min-width: 960px) { .board5 { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; } }
.bcol { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border-radius: var(--r-l); background: var(--surface-2); border: 1px solid var(--line); transition: background-color .15s, box-shadow .15s; }
.bcol.over { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.bcol header { display: flex; align-items: center; justify-content: space-between; }
.bcol header b { font-size: 15px; }
.bl { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.bcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.bcard.drag { opacity: .5; }
.bcard[draggable="true"] { cursor: grab; }
.bc-main { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; min-width: 0; }
.bc-main b { display: block; font-size: 14px; }
.bc-main small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-mv { height: 30px; font-size: 12.5px; padding: 0 8px; color: var(--ink-2); }
.bc-empty { padding: 12px 4px; text-align: center; }
.smart5 { position: relative; }
.smart5 .pill { position: absolute; top: 12px; right: 12px; }
.sm-emo { font-size: 28px; line-height: 1; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); }

/* ---------- home: rediscover, listen, flashcards ---------- */
.rd-row { display: grid; gap: 10px; }
@media (min-width: 720px) and (max-width: 959px) { .rd-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.rd-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); text-align: left; color: inherit; }
.rd-card .cover { aspect-ratio: 4 / 5; }
.rd-t small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.rd-t b { display: block; font-size: 16px; font-weight: 720; letter-spacing: -.01em; margin: 2px 0 4px; }
.rd-t span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; color: var(--ink-2); }
.rd-side { display: flex; flex-direction: column; gap: 10px; }
.rd-mini { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); text-align: left; color: inherit; flex: 1; }
.rd-mini small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.rd-mini b { display: block; font-size: 14.5px; font-weight: 680; }
.gi { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.pod-card { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px; border: 0; border-radius: var(--r-xl); background: var(--hero); color: var(--hero-ink); text-align: left; box-shadow: var(--sh-2); }
.pod-card small { display: block; font-size: 12px; color: var(--hero-muted); font-weight: 600; }
.pod-card b { display: block; font-size: 18px; font-weight: 740; letter-spacing: -.015em; margin: 2px 0; }
.pod-card span span, .pod-card > span:nth-child(2) > span { font-size: 13.5px; color: var(--hero-muted); }
.pod-play { margin-left: auto; width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); }
.pod-wave { display: flex; align-items: center; gap: 3px; height: 40px; flex: none; }
.pod-wave i { display: block; width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--brand) 70%, #fff); }
.pod-wave i:nth-child(4n+1) { height: 30%; } .pod-wave i:nth-child(4n+2) { height: 70%; } .pod-wave i:nth-child(4n+3) { height: 100%; } .pod-wave i:nth-child(4n) { height: 50%; }
.pod-wave.big { height: 64px; gap: 4px; } .pod-wave.big i { width: 4px; }
.fc-peek { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); text-align: left; color: inherit; }
.fc-peek small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.fc-peek b { display: block; font-size: 15px; font-weight: 680; }
.fc-stack { position: relative; width: 44px; height: 52px; flex: none; }
.fc-stack i { position: absolute; inset: 0; border-radius: 10px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.fc-stack i + i { transform: translate(5px, -5px) rotate(6deg); background: var(--surface); }

/* ---------- Rediscover page ---------- */
.ser { display: grid; gap: 16px; padding: 16px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); }
@media (min-width: 720px) { .ser { grid-template-columns: 220px minmax(0, 1fr); align-items: center; } }
.ser-cv .cover { aspect-ratio: 4 / 5; max-width: 260px; }
.ser-b small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.ser-b h2 { font-size: 24px; font-weight: 760; letter-spacing: -.025em; margin: 4px 0 6px; }
.ser-b p { color: var(--ink-2); margin-bottom: 12px; }
.why5 { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--mark); color: var(--mark-ink); font-size: 14px; }
.why5 svg { width: 16px; height: 16px; margin-top: 2px; }
.hlq { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--mark); color: var(--mark-ink); border: 1px solid var(--mark-line); margin: 0 0 8px; }
blockquote.hlq { display: block; font-size: 17px; font-weight: 600; line-height: 1.45; }
blockquote.hlq cite { display: block; margin-top: 6px; font-size: 13px; font-style: normal; opacity: .8; }
.hlq b { font-family: var(--mono); font-size: 12px; padding-top: 2px; }
.hlq .ibtn { width: 30px; height: 30px; }

/* ---------- Listen ---------- */
.pod-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-xl); background: var(--hero); color: var(--hero-ink); }
@media (min-width: 560px) { .pod-top { grid-template-columns: 148px minmax(0, 1fr); gap: 20px; padding: 20px; } }
.pod-top .small.muted { color: var(--hero-muted); }
.pod-top .btn:not(.primary) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: var(--hero-ink); }
.pod-top .btn.ghost { background: none; border-color: transparent; }
.pod-top .input.sm5 { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: var(--hero-ink); }
.pod-art { height: 72px; border-radius: 18px; display: grid; place-items: center; overflow: hidden; background: rgba(255, 255, 255, .06); }
@media (min-width: 560px) { .pod-art { height: 148px; border-radius: 24px; } }
.pod-lines { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pod-lines li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 14px; transition: background-color .2s; }
.pod-lines li b { font-size: 13px; color: var(--muted); padding-top: 1px; }
.pod-lines li.now { background: var(--brand-soft); }
.pod-lines li.now b { color: var(--brand-text); }

/* ---------- Flashcards: a card that turns over ---------- */
.fc { position: relative; margin-top: 16px; min-height: 280px; perspective: 1400px; }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-2); -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: transform .5s var(--spring5); text-align: left; color: inherit; }
.fc-face small { color: var(--muted); font-weight: 650; font-size: 12.5px; }
.fc-face b { font-size: 22px; font-weight: 740; letter-spacing: -.02em; line-height: 1.3; }
.fc-face { transition: transform .5s var(--spring5), visibility 0s linear .2s; }
.fc-back { transform: rotateY(180deg); visibility: hidden; }
.fc.flip .fc-front { transform: rotateY(-180deg); visibility: hidden; }
.fc.flip .fc-back { transform: rotateY(0); visibility: visible; }
.fc-g { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .fc-face { transition: opacity .2s; transform: none !important; } .fc-back { opacity: 0; } .fc.flip .fc-front { opacity: 0; } .fc.flip .fc-back { opacity: 1; } }

/* ---------- Places ---------- */
.plan5 { margin-top: 14px; }
.plan-steps { list-style: none; margin: 12px 0 0; padding: 0 0 0 4px; display: flex; flex-direction: column; }
.plan-steps li { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; padding: 0 0 14px 18px; }
.plan-steps li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.plan-steps li::after { content: ""; position: absolute; left: 4px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.plan-steps li:last-child::after { display: none; }
.plan-steps b { font-size: 15px; } .plan-steps small { grid-column: 2; color: var(--muted); font-size: 13px; }
.when5 { grid-row: span 2; font-size: 12px; font-weight: 700; color: var(--brand-text); padding-top: 2px; }
.pl5 { cursor: default; align-items: flex-start; }
.tl.pl5 { grid-template-columns: auto minmax(0, 1fr); row-gap: 10px; }
.tl.pl5 .col5 { grid-column: 2; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
.pl5 .link { text-align: left; }
.pl5 .link.small { margin-top: 4px; font-size: 12.5px; }

/* ---------- Recipes and cook mode ---------- */
.rc5 .small.muted { line-height: 1.6; }
.gr5 li.done span { text-decoration: line-through; color: var(--muted); }
.cook5 { position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column; gap: 14px; padding: calc(12px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); background: var(--bg); overflow-y: auto; }
.cook5.on { display: flex; animation: cookin .28s var(--ease) both; }
@keyframes cookin { from { opacity: 0; transform: translateY(14px); } }
.ck-top { display: flex; align-items: center; gap: 10px; }
.ck-top b { display: block; font-size: 16px; font-weight: 720; }
.ck-top small { display: block; font-size: 12.5px; color: var(--muted); }
.ck-prog { display: flex; gap: 4px; }
.ck-prog i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.ck-prog i.on { background: var(--brand); }
.ck-ing { margin: 0; padding: 12px 16px 12px 34px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); columns: 2 160px; }
.ck-step { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.ck-step small { color: var(--brand-text); font-weight: 700; }
.ck-step p { font-size: clamp(24px, 6.4vw, 38px); font-weight: 680; line-height: 1.22; letter-spacing: -.022em; }
.ck-timer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ck-timer b { font-size: 44px; font-weight: 760; letter-spacing: -.02em; }
.ck-nav { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; max-width: 760px; width: 100%; margin: 0 auto; }

/* ---------- Price watch ---------- */
.pr5 { display: flex; flex-direction: column; gap: 12px; }
.pr-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pr-nums > div { padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.pr-nums small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.pr-nums b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.spark5 { display: block; width: 100%; max-width: 90px; height: 26px; margin-top: 4px; }
.spark5 polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Creators, duplicates ---------- */
.useful5 { font-size: 12px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.tl .end { gap: 6px; }
.dp5 .cover { aspect-ratio: 16 / 9; }

/* ---------- the save panel ---------- */
.do5 { height: 34px; font-size: 13px; text-decoration: none; }
a.do5 { color: var(--ink-2); }
.do5 .c { margin-left: 2px; }
.why5in { min-height: 64px; font-size: 14.5px; }
.tag5 { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 10px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-text); font-size: 13.5px; font-weight: 650; }
.tag5 button { width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: inherit; display: grid; place-items: center; }
.tag5 button svg { width: 14px; height: 14px; }
.tagf5 { gap: 6px; }
.sm5c { height: 30px; font-size: 12.5px; }
.aiout5 { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.aiout5 b { font-size: 13px; color: var(--muted); }
.aiout5 p { margin: 6px 0; font-size: 14.5px; }
.chap5 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chap5 li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.chap5 b { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.hl5able { cursor: pointer; border-radius: 8px; transition: background-color .15s; }
.hl5able:hover { background: var(--surface-3); }
.hl5able[aria-pressed="true"] { background: var(--mark); color: var(--mark-ink); box-shadow: inset 3px 0 0 var(--mark-line); }
.hl5able:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- mind map ---------- */
.mm5 { padding: 4px 0 8px; }
.mm-root { display: inline-block; padding: 10px 14px; border-radius: 14px; background: var(--hero); color: var(--hero-ink); font-weight: 720; font-size: 15px; }
.mm5 > ul, .mm5 ul ul { list-style: none; margin: 0; padding: 0 0 0 20px; }
.mm5 > ul { margin-left: 14px; border-left: 2px solid var(--line-2); padding-left: 18px; }
.mm5 li { position: relative; padding: 6px 0; font-size: 14px; }
.mm5 > ul > li::before { content: ""; position: absolute; left: -18px; top: 18px; width: 14px; height: 2px; background: var(--line-2); }
.mm-b { display: inline-block; padding: 5px 10px; border-radius: 10px; background: var(--cs); color: var(--ct); font-size: 13.5px; font-weight: 700; }
.mm5 ul ul { border-left: 1px dashed var(--line-2); margin: 6px 0 0 10px; padding-left: 14px; }
.mm5 ul ul li { padding: 3px 0; color: var(--ink-2); }

/* ---------- Wrapped ---------- */
.wr5 { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 28px; background: linear-gradient(160deg, var(--hero), #0c1a14); color: var(--hero-ink); max-width: 560px; box-shadow: var(--sh-3); }
.wr-hero small { color: var(--hero-muted); font-weight: 650; }
.wr-hero b { display: block; font-size: 84px; font-weight: 800; letter-spacing: -.05em; line-height: 1; margin: 6px 0 2px; color: #4ccb9c; }
.wr-hero span { font-size: 17px; color: var(--hero-muted); }
.wr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wr-grid div { padding: 12px 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); }
.wr-grid b { display: block; font-size: 26px; font-weight: 780; letter-spacing: -.03em; }
.wr-grid span { font-size: 12px; color: var(--hero-muted); }
@media (max-width: 420px) { .wr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wr-list { display: flex; flex-direction: column; gap: 6px; }
.wr-list small { color: var(--hero-muted); font-weight: 650; }
.wr-list button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .06); color: var(--hero-ink); text-align: left; }
.wr-list em { font-style: normal; font-weight: 800; color: #4ccb9c; width: 18px; }
.wr-list b { flex: 1; min-width: 0; }
.wr-list span:last-child { font-variant-numeric: tabular-nums; color: var(--hero-muted); }
.wr-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--hero-muted); }
.wr-foot b { color: var(--hero-ink); }

/* ---------- Roadmap ---------- */
.tl.wrap5 .nm { white-space: normal; overflow: visible; }
.tl.wrap5 .nm > span { white-space: normal; overflow: visible; text-overflow: clip; -webkit-line-clamp: unset; display: block; }
.tl.wrap5 { align-items: flex-start; }
.tl.wrap5 .u { white-space: normal; overflow: visible; text-overflow: clip; }
.w5links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; }
.w5links .link { text-align: left; }
.tl.wrap5 .end { flex-direction: column; align-items: flex-end; gap: 8px; }
.rm5 { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.rm-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.rm-s { font-size: 18px; line-height: 1.2; }
.rm-row b { display: block; font-size: 15px; font-weight: 680; }
.rm-row small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.rm-row .rm-w { color: var(--ink-2); }

/* ---------- Ask scope, import sources ---------- */
.scope5 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 8px; }
.scope5 .chip { height: 32px; font-size: 13px; }
.srcs5 { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.src5 { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 10px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); text-align: left; color: inherit; }
.src5 .gi { grid-row: span 2; }
.src5 b { font-size: 14px; }
.src5 small { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.src5.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.src5.on .gi { background: var(--brand-soft); color: var(--brand-text); }

/* ---------- app lock ---------- */
.lock5 { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 24px; background: color-mix(in srgb, var(--hero) 92%, transparent); -webkit-backdrop-filter: blur(30px) saturate(140%); backdrop-filter: blur(30px) saturate(140%); color: var(--hero-ink); }
.lock5.on { display: grid; }
.lk-box { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(320px, 100%); text-align: center; }
.lk-logo { width: 56px; height: 56px; border-radius: 16px; }
.lk-box h2 { font-size: 22px; font-weight: 740; }
.lk-box p { color: var(--hero-muted); }
.lk-dots { display: flex; gap: 14px; margin: 6px 0 10px; }
.lk-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--hero-ink); }
.lk-dots i.on { background: var(--hero-ink); }
.lk-dots.bad { animation: shake5 .4s; }
@keyframes shake5 { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lk-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.lk-pad button { width: 72px; height: 72px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: var(--hero-ink); font-size: 28px; font-weight: 450; }
.lk-pad button:active { background: rgba(255, 255, 255, .25); }

/* ---------- accessibility: less motion, less transparency, more contrast ---------- */
@media (prefers-reduced-motion: reduce) {
  .island, .ctx5, .nav, .nav a, .appbar .ttl5 { transition: opacity .15s !important; }
  .isl-spin { animation-duration: 2.4s; }
  .cook5.on { animation: none; }
  .svc:active, .tl:active, .hub:active, .chip:active, .press5 { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav::before, .nav .add-tab, .ctx5, .appbar::before { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--surface) !important; }
  .lock5 { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--hero); }
}
@media (prefers-contrast: more) {
  .nav::before, .nav .add-tab, .ctx5 { background: var(--surface); border-color: var(--ink); }
  .hub, .bcard, .rm-row, .src5 { border-color: var(--line-2); }
}
