body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
body:has(.auth) { padding-bottom: 0; }
main, .top { width: min(100%, 760px); margin-inline: auto; }
main { padding: 22px clamp(16px, 4vw, 28px); }
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  min-height: 68px; padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: var(--bg); transition: background-color 200ms, border-radius 260ms var(--ease);
}
.top.scrolled { background: var(--card); border-radius: 0 0 24px 24px; }
.top.hero { background: var(--accent); color: var(--on-accent); min-height: 144px; border-radius: 0 0 38px 38px; }
.ttl { flex: 1; min-width: 0; }
.ttl h1 { margin: 0; font-size: 1.4rem; overflow-wrap: anywhere; }
.hero .ttl h1 { font-size: clamp(1.7rem, 5vw, 2.8rem); }
.ttl small { display: block; margin-bottom: 3px; }
.back, .logo, .av {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px;
  border-radius: 50%; background: var(--high); color: var(--ink); text-decoration: none;
  font-weight: 750; transition: scale 220ms var(--spring), border-radius 220ms var(--spring);
}
.back:active, .av:active { scale: .9; border-radius: 16px; }
.back svg, .go svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo, .tile { grid-template: 1fr 1fr / 1fr 1fr; gap: 4px; padding: 12px; }
.logo b, .tile b { width: 100%; height: 100%; border-radius: 3px; background: currentColor; }
.logo b:nth-child(2), .tile b:nth-child(2) { opacity: .45; }
.sec { color: var(--mut); font-size: 14px; font-weight: 650; margin: 4px 0 12px; }
.big, .row, .info, .card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  margin-bottom: 8px; border-radius: 24px; background: var(--card); color: var(--ink);
  text-decoration: none; animation: enter 360ms var(--ease) backwards;
  animation-delay: min(240ms, calc(var(--i, 0) * 35ms));
  transition: scale 220ms var(--spring), border-radius 240ms var(--spring), background-color 180ms;
}
.big:active, .row:active { scale: .98; border-radius: 16px; }
.big {
  min-height: 154px; align-items: flex-end; position: relative; padding: 18px;
  margin-bottom: 12px; border-radius: 36px 36px 20px 36px;
  background: var(--accent); color: var(--on-accent);
}
.hue1, .hue4 { background: light-dark(#d3e9df, #294c41); color: light-dark(#16352c, #d3e9df); }
.hue2, .hue5 { background: light-dark(#eaddf4, #4b3859); color: light-dark(#362047, #f4ddff); }
.hue3 { background: light-dark(#f6ded7, #5a3a32); color: light-dark(#4e2922, #ffddd3); }
.big .tile { position: absolute; top: 14px; left: 18px; display: grid; width: 42px; height: 42px; border-radius: 14px; background: color-mix(in srgb, currentColor 12%, transparent); }
.big .meta { display: grid; gap: 4px; flex: 1; min-width: 0; }
.big .meta span { font-size: clamp(1.3rem, 4vw, 1.9rem); line-height: 1.12; font-weight: 750; overflow-wrap: anywhere; }
.big .go, .row i { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); }
.big .go { transition: translate 240ms var(--spring); }
.big:active .go { translate: 4px 0; }
.row i { font-style: normal; background: var(--accent); color: var(--on-accent); }
.row span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.row b { color: var(--mut); }
.crumbs { overflow-wrap: anywhere; margin-bottom: 14px; color: var(--mut); font-size: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; padding: 8px 16px; background: var(--accent); color: var(--on-accent); border-radius: 100px; text-decoration: none; }
.tabs {
  position: fixed; z-index: 11; inset: auto 0 0; margin-inline: auto;
  width: min(100%, 760px); display: flex; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--card); border-radius: 28px 28px 0 0;
}
.tabs a { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 4px 0; text-decoration: none; color: var(--mut); font-size: 12px; font-weight: 650; }
.tabs .tab-icon { display: grid; place-items: center; width: 58px; height: 34px; border-radius: 100px; transition: scale 220ms var(--spring); }
.tabs a.on { color: var(--on-accent); }
.tabs a.on .tab-icon { background: var(--accent); animation: unfold 300ms var(--spring) both; }
.tabs a:active .tab-icon { scale: .86; }
.tabs svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs.dark { --card: #201f2aee; --mut: #c8c5d4; --accent: #dfe0ff; --on-accent: #181d48; }
.avatar { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 14px; border-radius: 32px; background: var(--accent); color: var(--on-accent); font-size: 40px; font-weight: 750; animation: unfold 360ms var(--spring) both; }
.pname, .psub { text-align: center; margin: 0 0 8px; overflow-wrap: anywhere; }
.psub { color: var(--mut); margin-bottom: 22px; }
.info, .card { display: block; margin-bottom: 14px; overflow-wrap: anywhere; }
.info div { padding: 10px 0; }
.info div + div { border-top: 1px solid var(--high); }
.info small { display: block; color: var(--mut); }
.card .btn, .btn.out { width: 100%; }
body:has(.viewer), body:has(.reel) { padding: 0; }
body:has(.viewer) .top { width: 100%; }
.viewer { display: block; border: 0; width: 100%; height: calc(100dvh - 68px - env(safe-area-inset-top)); }
.reel { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; background: #101016; color: #fff; }
.reel section { height: 100dvh; scroll-snap-align: start; position: relative; display: grid; place-items: center; }
.reel video { width: min(100%, 760px); max-height: calc(100dvh - 80px - env(safe-area-inset-bottom)); }
.reel .empty { color: #dedbe9; margin-top: 70px; }
.cap, .shtop { position: absolute; color: #fff; background: #201f2ae8; border-radius: 20px; padding: 8px 16px; }
.cap { display: grid; left: max(16px, calc((100% - 730px) / 2)); bottom: calc(100px + env(safe-area-inset-bottom)); pointer-events: none; animation: enter 320ms var(--ease) both; }
.shtop { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: max(16px, calc((100% - 730px) / 2)); font-weight: 700; }
@media (hover: hover) { .row:hover { background: var(--high); } .big:hover .go { translate: 4px 0; } }

.chip { gap: 8px; }
.chip .material-symbol, .row .material-symbol { font-size: 22px; }
.row.pdf i { background: var(--high); color: var(--ink); }
