:root {
  --page: #fafafa; --bg: #fff; --text: #000; --sub: #999; --muted: #777;
  --line: rgba(0,0,0,.08); --line-strong: rgba(0,0,0,.15);
  --hover: rgba(0,0,0,.035); --active: rgba(0,0,0,.055);
  --shadow: 0 12px 40px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.05); --overlay: rgba(0,0,0,.4);
  --refl: rgba(0,0,0,.16); --name: #14213d; --bar: #fff; --bar-fg: #8a8a8a; --bar-fg-on: #3a3a3a; --bar-line: rgba(0,0,0,.1); --bar-on: rgba(0,0,0,.06); --bar-edge: rgba(0,0,0,.14);
  --s: 48px; --cover: min(62vw, 300px);
  --accent: var(--text); --accent-fg: var(--bg);
  --ease: cubic-bezier(.22,1,.36,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a0a0a; --bg: #181818; --text: #f3f5f7; --sub: #777; --muted: #999;
    --line: rgba(255,255,255,.09); --line-strong: rgba(255,255,255,.18);
    --hover: rgba(255,255,255,.04); --active: rgba(255,255,255,.08);
    --shadow: 0 12px 40px rgba(0,0,0,.6); --overlay: rgba(0,0,0,.65); --refl: rgba(255,255,255,.14); --name: var(--text); --bar: #181818; --bar-fg: #8c8c8c; --bar-fg-on: #f3f5f7; --bar-line: rgba(255,255,255,.12); --bar-on: rgba(255,255,255,.08); --bar-edge: rgba(255,255,255,.2);
  }
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; overflow-x: clip; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; transition: background-color .35s var(--ease), color .35s var(--ease);
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
::selection { background: var(--text); color: var(--bg); }

.press { transition: transform .18s var(--spring), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease); }
.press:active { transform: scale(.96); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.main { max-width: 760px; margin: 0 auto; padding-top: max(24px, env(safe-area-inset-top)); }

.stage { position: relative; height: calc(var(--cover) * 1.5); perspective: 1000px; perspective-origin: 50% 40%; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; cursor: grab; }
.stage.drag { cursor: grabbing; }
.cover { position: absolute; left: 50%; top: 12%; width: var(--cover); height: var(--cover); margin-left: calc(var(--cover) / -2);
         border-radius: 22%; overflow: hidden; background: var(--active); box-shadow: var(--shadow);
         transform: translateX(var(--x, 0)) translateZ(var(--z, 0)) rotateY(var(--r, 0deg)); opacity: var(--o, 1);
         transition: transform .46s var(--ease), opacity .3s var(--ease); -webkit-box-reflect: below 3px linear-gradient(transparent 62%, var(--refl)); }
.stage.drag .cover { transition-duration: .2s; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.cover[aria-current="true"] { cursor: default; }

.details { display: grid; justify-items: center; margin-top: 8px; padding: 0 16px 48px; }
.app-item { display: none; flex-direction: column; align-items: center; width: 100%; }
.app-item.on { display: flex; animation: rise .45s var(--ease) both; }
.art { display: none; }
.who { font-size: 20px; font-weight: 700; color: var(--name); }
.row { display: flex; align-items: center; gap: 0; margin-top: 16px; padding: 4px; border-radius: 16px; background: var(--bar); color: var(--bar-fg); border: 1px solid var(--bar-edge); box-shadow: 0 10px 28px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06); }
.chip { position: relative; width: 60px; height: 52px; border-radius: 12px; display: grid; place-items: center; color: var(--bar-fg); flex: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.chip + .chip::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--bar-line); }
.chip:hover { background: var(--bar-on); color: var(--bar-fg-on); }
.chip.on { background: var(--bar-on); color: var(--bar-fg-on); }
.chip:hover::before, .chip.on::before, .chip:hover + .chip::before, .chip.on + .chip::before { opacity: 0; }
.chip::before { transition: opacity .2s var(--ease); }

.media-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); width: min(100%, 560px); }
.media-wrap.open { grid-template-rows: 1fr; }
.media-wrap > div { overflow: hidden; }
.media { padding-top: 16px; opacity: 0; transform: translateY(6px); transition: opacity .25s var(--ease), transform .3s var(--ease); }
.media-wrap.open .media { opacity: 1; transform: none; }
.ph { aspect-ratio: 16 / 9; border-radius: 16px; background: var(--active); display: grid; place-items: center; color: var(--sub); }
.ph svg { width: 28px; height: 28px; }
.media img, .media video { display: block; width: 100%; border-radius: 16px; background: var(--active); }

@media (max-width: 700px) {
  .main { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 0; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .details { margin-top: 0; padding-bottom: 0; }
}
@media (max-width: 400px) { .chip { width: 54px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

.stage { transition: opacity .22s var(--ease); }
.stage.out { opacity: 0; }
.details.out .app-item.on { animation: none; opacity: 0; }

.back { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 16px; z-index: 5; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
        background: var(--bar); color: var(--bar-fg); border: 1px solid var(--bar-edge); box-shadow: 0 10px 28px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06); }
.back:hover { color: var(--bar-fg-on); background: var(--bar-on); }
.back:not([hidden]) { animation: rise .35s var(--ease) both; }

.about { max-width: 640px; margin: 0 auto; padding: 88px 0 64px; }
.tpost { display: flex; gap: 12px; padding: 0 24px; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.tav { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 44px; flex: none; padding-top: 16px; }
.tav img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; flex: none; }
.tline { flex: 1; width: 2px; min-height: 12px; border-radius: 2px; background: var(--line-strong); }
.tcol { flex: 1; min-width: 0; padding: 16px 0 24px; }
.tcol .who { font-size: 15px; font-weight: 600; color: var(--text); }
.tcol p { margin: 3px 0 0; line-height: 1.7; word-break: break-word; }
@media (max-width: 700px) { .about { padding-top: 76px; } .tpost { padding: 0 16px; } }

.overlay { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; padding: 16px; z-index: 10;
           opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s .25s; }
.overlay.open { opacity: 1; visibility: visible; transition: opacity .25s var(--ease); }
.modal { width: 100%; max-width: 360px; background: var(--bg); border-radius: 20px; box-shadow: var(--shadow); padding: 24px;
         transform: translateY(16px) scale(.97); opacity: 0; transition: transform .4s var(--spring), opacity .25s var(--ease); }
.overlay.open .modal { transform: none; opacity: 1; }
.dlg-text { margin: 0; font-weight: 600; text-align: center; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.btn { height: 36px; padding: 0 18px; border-radius: 12px; font-weight: 600; background: var(--text); color: var(--bg); display: inline-grid; place-items: center; }
.btn:hover { opacity: .85; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost:hover { opacity: 1; background: var(--hover); }
[hidden] { display: none !important; }

.chip.text { width: auto; min-width: 168px; padding: 0 28px; font-size: 15px; font-weight: 600; color: var(--bar-fg-on); }
body[data-mode="about"] .main { justify-content: flex-start; }

.chip[disabled]{opacity:.4;cursor:default;pointer-events:none}
.cover.off{cursor:default}
.chip.na { opacity: .45; cursor: not-allowed; pointer-events: none; }
.chip.na::after { content: ""; position: absolute; left: 14px; right: 14px; top: 50%; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-35deg); box-shadow: 0 0 0 1.5px var(--bar); }

.viewer { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; opacity: 0; transition: opacity .25s var(--ease); }
.viewer.open { opacity: 1; }
.viewer[hidden] { display: none; }
.vscroll { width: min(100%, 640px); height: 100%; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; padding: 64px 16px 32px; box-sizing: border-box; }
.vscroll img { display: block; width: 100%; margin: 0 auto; border-radius: 16px; background: #fff; user-select: none; -webkit-user-drag: none; max-width: none; }
.vclose { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #222; box-shadow: 0 4px 16px rgba(0,0,0,.3); z-index: 2; }
.vclose svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.vscroll { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; }
.vscroll::-webkit-scrollbar { width: 6px; height: 6px; }
.vscroll::-webkit-scrollbar-track { background: transparent; }
.vscroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 3px; }
.vscroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.5); }
.vscroll::-webkit-scrollbar-corner { background: transparent; }

.vframe { width: min(92vw, 960px); aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.vframe iframe { width: 100%; height: 100%; border: 0; display: block; }
