/* Vintage años 70: papel envejecido, tinta marrón, naranja Dyane, mostaza y verde azulado.
   Tarjetas con borde de tinta y sombra desplazada, como un cartel impreso. */
:root {
  --bg: #f1e7d3;
  --surface: #fbf5e8;
  --surface-2: #e9dcc2;
  --ink: #2e2219;
  --ink-2: #5e4a38;
  --ink-3: #8b7660;
  --line: #d3c09d;
  --line-strong: #2e2219;
  --accent: #c8541f;
  --accent-ink: #fff8ec;
  --accent-soft: #f5d9c2;
  --mustard: #d99a1e;
  --teal: #2c7470;
  --good: #3f7a34;
  --good-soft: #dfead0;
  --bad: #b23a2a;
  --bad-soft: #f5d6cd;
  --warn: #b7791f;
  --dyane-body: #e8a33d;
  --dyane-glass: #bfe0dc;
  --radius: 10px;
  --shadow: 3px 3px 0 var(--line-strong);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1712; --surface: #261f18; --surface-2: #322920; --ink: #f2e6d0; --ink-2: #ccb995; --ink-3: #97836a;
    --line: #463a2c; --line-strong: #0d0a07; --accent: #ec7a3f; --accent-ink: #1c1712; --accent-soft: #4a2b1b;
    --mustard: #e9b445; --teal: #5aa8a2; --good: #8cc06b; --good-soft: #263420; --bad: #e57560; --bad-soft: #3d1f19;
    --dyane-glass: #8fc1bb; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1712; --surface: #261f18; --surface-2: #322920; --ink: #f2e6d0; --ink-2: #ccb995; --ink-3: #97836a;
  --line: #463a2c; --line-strong: #0d0a07; --accent: #ec7a3f; --accent-ink: #1c1712; --accent-soft: #4a2b1b;
  --mustard: #e9b445; --teal: #5aa8a2; --good: #8cc06b; --good-soft: #263420; --bad: #e57560; --bad-soft: #3d1f19;
  --dyane-glass: #8fc1bb; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  background-color: var(--bg);
  /* grano de papel */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  display: flex;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; font-variation-settings: "SOFT" 100, "WONK" 1; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.04rem; font-weight: 700; }
p { margin: 0; }

/* ---------- Layout ---------- */
.sidebar {
  width: 244px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 24px; padding: 24px 16px;
  border-right: 2px solid var(--line-strong); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; padding: 0 8px; font-variation-settings: "SOFT" 100, "WONK" 1; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 1.1rem; border: 2px solid var(--line-strong); box-shadow: 2px 2px 0 var(--line-strong);
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; border: 2px solid transparent;
  color: var(--ink-2); font-weight: 600; transition: background .15s, color .15s;
}
@media (hover: hover) { .nav a:hover { background: var(--surface-2); color: var(--ink); } }
.nav a.active { background: var(--mustard); color: var(--ink); border-color: var(--line-strong); box-shadow: 2px 2px 0 var(--line-strong); }
.ni { width: 22px; text-align: center; font-size: 1.1rem; }
.sidebar-foot { margin-top: auto; font-size: .74rem; color: var(--ink-3); padding: 0 8px; font-family: var(--font-mono); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 16px 32px;
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: 999px; padding: 0 16px;
  color: var(--ink-3);
}
.search input { border: 0; outline: 0; background: transparent; padding: 9px 0; width: 100%; color: var(--ink); }
.search:focus-within { box-shadow: 2px 2px 0 var(--line-strong); }
.xp-pill, .timer-pill {
  margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--line-strong); font-weight: 700; font-size: .88rem; white-space: nowrap;
  font-family: var(--font-mono);
}
.timer-pill { background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.timer-pill + .xp-pill { margin-left: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface);
  cursor: pointer; font-size: 1.1rem; flex-shrink: 0;
}
#view { padding: 8px 32px 64px; max-width: 1180px; width: 100%; outline: none; }

/* ---------- Components ---------- */
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.tiny { font-size: .76rem; color: var(--ink-3); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }

.card {
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
a.card, .card.click { transition: transform .12s, box-shadow .12s; cursor: pointer; display: block; }
a.card:hover, .card.click:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line-strong); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 8px; border: 2px solid var(--line-strong); background: var(--surface);
  font-weight: 700; cursor: pointer; transition: transform .1s, box-shadow .1s, background .15s; white-space: nowrap;
  box-shadow: 2px 2px 0 var(--line-strong);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.lg { padding: 12px 22px; font-size: 1.02rem; }
.btn.sm { padding: 5px 11px; font-size: .84rem; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border: 1.5px solid currentColor;
}
.subj-chip { color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }

.tabs, .seg { display: flex; gap: 0; background: var(--surface); border: 2px solid var(--line-strong); border-radius: 10px; width: fit-content; max-width: 100%; overflow-x: auto; box-shadow: 2px 2px 0 var(--line-strong); }
.tabs button, .seg button {
  border: 0; background: transparent; padding: 8px 16px; font-weight: 700; cursor: pointer; color: var(--ink-2); white-space: nowrap;
  border-right: 2px solid var(--line-strong);
}
.tabs button:last-child, .seg button:last-child { border-right: 0; }
.tabs button.on, .seg button.on { background: var(--mustard); color: var(--ink); }

input.field, select.field, textarea.field {
  width: 100%; padding: 11px 14px; border-radius: 8px; border: 2px solid var(--line-strong); background: var(--surface);
  outline: none;
}
.field:focus { box-shadow: 2px 2px 0 var(--line-strong); }
textarea.field { resize: vertical; min-height: 280px; line-height: 1.6; font-family: var(--font-mono); font-size: .9rem; }
label.lbl { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }

/* ---------- Home ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center;
  border: 2px solid var(--line-strong); border-radius: 14px; padding: 32px 32px 46px; position: relative; overflow: hidden;
  background: var(--surface); box-shadow: 5px 5px 0 var(--line-strong);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; pointer-events: none;
  background: linear-gradient(var(--accent) 0 33.3%, var(--mustard) 33.3% 66.6%, var(--teal) 66.6%);
  border-top: 2px solid var(--line-strong);
}
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); max-width: 16ch; }
.hero p { color: var(--ink-2); margin-top: 10px; max-width: 52ch; }
.hero-photo { transform: rotate(2.5deg); margin: 0; justify-self: center; max-width: 380px; width: 100%; }
.eyebrow { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h2.curso { font-size: 1.05rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); border-bottom: 2px solid var(--line-strong); padding-bottom: 6px; }

.polaroid {
  margin: 0; background: #fffdf6; padding: 10px 10px 8px; border: 1.5px solid #2e2219; box-shadow: 4px 4px 0 rgba(46, 34, 25, .35);
  display: flex; flex-direction: column; gap: 6px;
}
.polaroid img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; max-width: 100%;
  filter: sepia(.35) saturate(1.1) contrast(1.02);
}
.polaroid figcaption { font-family: var(--font-mono); font-size: .74rem; color: #5e4a38; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 6px 4px; }
.gallery .polaroid:nth-child(odd) { transform: rotate(-1.6deg); }
.gallery .polaroid:nth-child(even) { transform: rotate(1.4deg); }
.gallery .polaroid { transition: transform .2s; }
.gallery .polaroid:hover { transform: rotate(0) scale(1.03); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .84rem; font-weight: 600; }

.subj-tile { display: flex; flex-direction: column; gap: 14px; }
.subj-icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong);
  font-weight: 700; font-size: .95rem; color: #fff8ec; background: var(--c); font-family: var(--font-mono);
}
.subj-head {
  border-radius: 14px; padding: 28px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); border: 2px solid var(--line-strong); box-shadow: 4px 4px 0 var(--line-strong);
}
.subj-head .subj-icon { width: 68px; height: 68px; font-size: 1.3rem; }

.note-card { display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.note-card p { color: var(--ink-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

/* ---------- Note reader ---------- */
.reader { max-width: 780px; }
.md { font-size: 1.02rem; line-height: 1.75; overflow-wrap: anywhere; }
.md h1 { font-size: 1.9rem; margin: 0 0 16px; }
.md h2 { font-size: 1.3rem; margin: 28px 0 8px; color: var(--accent); }
.md h3 { margin: 20px 0 6px; }
.md p { margin: 10px 0; }
.md ul, .md ol { padding-left: 22px; margin: 8px 0; }
.md li { margin: 4px 0; }
.md strong { color: var(--ink); font-weight: 700; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--mustard) 45%, transparent) 60%); }
.md blockquote {
  margin: 16px 0; padding: 12px 16px; border: 2px dashed var(--teal); background: color-mix(in srgb, var(--teal) 10%, var(--surface)); border-radius: 8px;
}
.md code { font-family: var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: .88em; }
.md pre { background: #2e2219; color: #f2e6d0; padding: 16px; border-radius: 8px; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }

.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor .preview { min-height: 280px; overflow: auto; max-height: 70vh; }

/* ---------- Flashcards ---------- */
.study { max-width: 680px; margin: 0 auto; width: 100%; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1.5px solid var(--line-strong); }
.progress > i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--accent) 0 8px, var(--mustard) 8px 16px); transition: width .3s; }
.flip { perspective: 1400px; cursor: pointer; user-select: none; }
.flip-inner {
  position: relative; min-height: 320px; transition: transform .5s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d;
}
.flip.on .flip-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; padding: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px;
  background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 5px 5px 0 var(--line-strong);
  font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.65rem); font-weight: 700; overflow-wrap: anywhere;
}
.face.back { transform: rotateY(180deg); background: var(--accent-soft); }
.face .tiny { font-family: var(--font-mono); font-weight: 500; }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate button { flex-direction: column; gap: 2px; padding: 10px 6px; }
.rate small { font-weight: 500; color: var(--ink-3); font-size: .72rem; font-family: var(--font-mono); }
.r1 { color: var(--bad); } .r2 { color: var(--warn); } .r3 { color: var(--good); } .r4 { color: var(--teal); }

/* ---------- Quiz ---------- */
.options { display: grid; gap: 10px; }
.opt {
  text-align: left; padding: 14px 16px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--surface);
  font-weight: 600; cursor: pointer; display: flex; gap: 12px; align-items: center; transition: transform .1s, background .15s;
}
.opt:hover:not(:disabled) { background: var(--surface-2); }
.opt .k { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: .78rem; flex-shrink: 0; font-family: var(--font-mono); }
.opt.right { background: var(--good-soft); box-shadow: 3px 3px 0 var(--good); }
.opt.wrong { background: var(--bad-soft); box-shadow: 3px 3px 0 var(--bad); }
.opt:disabled { cursor: default; }
.explain { padding: 14px 16px; border-radius: 10px; background: var(--surface-2); font-size: .95rem; border: 2px solid var(--line-strong); }
.explain.react { display: flex; align-items: center; gap: 14px; }
.explain.react.ok { background: var(--good-soft); }
.explain.react.ko { background: var(--bad-soft); }
.explain.react > div { min-width: 0; }
.explain.react svg { flex-shrink: 0; }
.score-ring {
  width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong);
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0);
}
.score-ring > div { width: 116px; height: 116px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-display); font-size: 2rem; font-weight: 800; border: 2px solid var(--line-strong); }

/* ---------- Dyane ---------- */
.dyane { display: block; overflow: visible; }
.dyane.is-happy { animation: bounce .7s ease-in-out infinite alternate; }
.dyane.is-sad { animation: sag 1.6s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.dyane .tear { animation: tear 1.4s ease-in infinite; }
@keyframes bounce { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-6px) rotate(2deg); } }
@keyframes sag { from { transform: scaleY(1); } to { transform: scaleY(.95) translateY(2px); } }
@keyframes tear { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.dyane-pop {
  position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; pointer-events: none;
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: 14px; box-shadow: 4px 4px 0 var(--line-strong);
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  transform: translateY(140%); opacity: 0; transition: transform .25s cubic-bezier(.3,1.5,.5,1), opacity .2s;
}
.dyane-pop.show { transform: translateY(0); opacity: 1; }

/* ---------- Pomodoro ---------- */
.pomo { text-align: center; max-width: 520px; margin: 0 auto; }
.pomo-ring { width: min(320px, 80vw); aspect-ratio: 1; margin: 16px auto; position: relative; max-width: 100%; }
.pomo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pomo-ring .time {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: clamp(2.4rem, 8vw, 3.6rem); font-weight: 600; font-variant-numeric: tabular-nums;
}
.pomo-ring .time small { font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--ink-2); }

/* ---------- Charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { width: 100%; max-width: 42px; background: var(--accent); border: 2px solid var(--line-strong); border-radius: 6px 6px 0 0; min-height: 3px; }
.bars .b span { font-size: .72rem; color: var(--ink-3); font-weight: 600; font-family: var(--font-mono); }
.bars .b em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.exam { display: flex; align-items: center; gap: 16px; }
.exam .days {
  width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); border: 2px solid var(--line-strong);
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; line-height: 1;
}
.exam .days small { font-size: .62rem; font-weight: 700; margin-top: 2px; font-family: var(--font-mono); }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty b { display: block; font-size: 2.2rem; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-weight: 700; z-index: 100;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.fav { border: 0; background: none; cursor: pointer; font-size: 1.3rem; color: var(--ink-3); padding: 4px; }
.fav.on { color: var(--mustard); }

kbd { font-family: var(--font-mono); font-size: .72rem; padding: 1px 6px; border-radius: 4px; border: 1.5px solid var(--line-strong); background: var(--surface-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .seg button { padding: 8px 12px; }
  .hero-photo { max-width: 300px; }
}
@media (max-width: 760px) {
  body { flex-direction: column; }
  .sidebar {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; width: 100%; height: auto; z-index: 50;
    flex-direction: row; padding: 6px max(4px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
    border-right: 0; border-top: 2px solid var(--line-strong);
  }
  .brand, .sidebar-foot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 5px 2px; font-size: .64rem; flex: 1; text-align: center; box-shadow: none; }
  .nav a[data-route="examenes"] { display: none; }
  .topbar { padding: 12px 16px; }
  .xp-pill .lvl { display: none; }
  #view { padding: 4px 16px 100px; }
  .hero { padding: 22px 20px 40px; }
  .subj-head { padding: 20px; }
  .face { padding: 20px; }
  .rate { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: 84px; }
  .dyane-pop { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); right: 12px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .seg button, .hero .seg button { white-space: normal; padding: 8px 6px; font-size: .82rem; line-height: 1.2; }
}
