/* ============================================================
   dannyxs.com — portfolio in the style of a productivity app
   Layout: fixed left sidebar · snap-scrolled pages · right rail
   Edit colors/sizes here. Content lives in index.html.
   ============================================================ */

:root {
  --theme-progress: 0;
  --theme-progress-pct: 0%;
  --bg-top: #f5f5f5;
  --bg-bottom: #e0e0e0;
  --card: #f9f9f7;
  --white: #ffffff;
  --on-ink: #ffffff;
  --ink: #121217;
  --gray-1: #3d3d3d;
  --gray-2: #5d5d5d;
  --gray-3: #686870;
  --gray-4: #6e6e76;
  --gray-5: #8a8a92;
  --hair: rgba(0, 0, 0, 0.06);
  --press: rgba(0, 0, 0, 0.05);
  --sidebar-w: 240px;
  --rail-w: 280px;
  --sh-sm: 0px 1px 3px rgba(0, 0, 0, 0.08), 0px 0px 1px rgba(0, 0, 0, 0.06);
  --sh-card: 3px 3px 10px 0px rgba(18, 18, 23, 0.12);
  --sh-pop: 0px 8px 30px rgba(0, 0, 0, 0.14), 0px 0px 1px rgba(0, 0, 0, 0.06);
  --sh-hover: 0px 4px 12px rgba(0, 0, 0, 0.07), 0px 0px 1px rgba(0, 0, 0, 0.06);
  --window-frame: #f3eee6;
  --window-edge: rgba(18, 18, 23, 0.16);
  --window-sky-top: #8fd3ff;
  --window-sky-bottom: #e7f3fb;
  --window-cloud: rgba(255, 255, 255, 0.92);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", system-ui, Roboto, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-top: #111217;
  --bg-bottom: #1b1d26;
  --card: #171920;
  --white: #242731;
  --on-ink: #111217;
  --ink: #f1f2f5;
  --gray-1: #d8d9e0;
  --gray-2: #b6b8c2;
  --gray-3: #9da0ab;
  --gray-4: #858894;
  --gray-5: #686b78;
  --hair: rgba(255, 255, 255, 0.10);
  --press: rgba(255, 255, 255, 0.07);
  --sh-sm: 0px 1px 3px rgba(0, 0, 0, 0.34), 0px 0px 1px rgba(0, 0, 0, 0.28);
  --sh-card: 3px 3px 10px 0px rgba(0, 0, 0, 0.34);
  --sh-pop: 0px 8px 30px rgba(0, 0, 0, 0.42), 0px 0px 1px rgba(255, 255, 255, 0.06);
  --sh-hover: 0px 4px 12px rgba(0, 0, 0, 0.32), 0px 0px 1px rgba(255, 255, 255, 0.06);
  --window-frame: #343743;
  --window-edge: rgba(255, 255, 255, 0.16);
  --window-sky-top: #12172f;
  --window-sky-bottom: #303b70;
  --window-cloud: rgba(115, 129, 179, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (min-width: 1024px) {
  html { scroll-snap-type: y mandatory; }
}

body {
  color: var(--ink);
  background: var(--bg-top);
  min-height: 100vh;
  transition: background 180ms ease, color 180ms ease;
}

img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
a { color: inherit; text-decoration: none; }
input { font: inherit; border: 0; outline: 0; background: transparent; }

/* keyboard focus: one ring for everything, invisible for mouse users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgba(18, 18, 23, 0.55);
  outline-offset: 2px;
  border-radius: 8px;
}
.omni:focus-within { box-shadow: 0 0 0 2px rgba(18, 18, 23, 0.14); }

/* thin, quiet scrollbars for the inner scroll areas */
.rail .story, .letter, .stage-pitch, .chatlog, .sheet nav {
  scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0.14) transparent;
}
.rail .story::-webkit-scrollbar, .letter::-webkit-scrollbar, .stage-pitch::-webkit-scrollbar,
.chatlog::-webkit-scrollbar, .sheet nav::-webkit-scrollbar { width: 6px; }
.rail .story::-webkit-scrollbar-thumb, .letter::-webkit-scrollbar-thumb, .stage-pitch::-webkit-scrollbar-thumb,
.chatlog::-webkit-scrollbar-thumb, .sheet nav::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(0, 0, 0, 0.14); }

/* nicer rag on headings and body copy */
h1, h2, h3, .hello .sub, .p-tag, .p-sub { text-wrap: balance; }
p, .f-card .f-txt p, .p-stat i, .p-step i { text-wrap: pretty; }

.txtlink {
  cursor: pointer;
  color: #000;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.txtlink:hover { text-decoration-color: rgba(0, 0, 0, 0.7); }

/* ---------- fixed backdrop ---------- */
.bg-gradient {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(to bottom, #f5f5f5 0%, #f5f5f5 30%, #e0e0e0 75%, #e0e0e0 100%);
}
.bg-frost {
  position: fixed; inset: 0; z-index: 0;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
}
html[data-theme="dark"] .bg-gradient {
  background: linear-gradient(to bottom, #111217 0%, #111217 30%, #1b1d26 75%, #1b1d26 100%);
}
html[data-theme="dark"] .bg-frost { background: rgba(18, 20, 28, 0.26); }

/* ---------- left sidebar (desktop) ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; z-index: 40;
  display: flex; flex-direction: column;
  width: var(--sidebar-w); height: 100vh; height: 100dvh;
  padding: 8px;
}
.sidebar nav.tabs {
  display: flex; flex: 1; min-height: 0; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain; padding-bottom: 20px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 20px), transparent);
  mask-image: linear-gradient(to bottom, black calc(100% - 20px), transparent);
}
.sidebar nav.tabs::-webkit-scrollbar { display: none; }

.tab {
  display: flex; align-items: center; gap: 10px;
  width: 100%; flex-shrink: 0;
  height: 35px; padding: 7px 10px; margin-top: 4px;
  border-radius: 12px;
  font-size: 14px; color: #000; text-align: left;
  transition: background-color 0.15s;
}
.tab:hover { background: var(--press); }
.tab.active { background: var(--white); box-shadow: var(--sh-sm); }
.tab.active:hover { background: var(--white); }
.tab img { width: 18px; height: 18px; flex-shrink: 0; border-radius: 4px; }
.tab span {
  flex: 1; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, black calc(100% - 28px), transparent);
}
.tab.home-tab { margin-top: 0; margin-bottom: 12px; }

.ghead {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; flex-shrink: 0;
  padding: 5px 10px; margin-top: 12px;
  border-radius: 8px;
  font-size: 12px; font-weight: 500; color: var(--gray-4);
  transition: background-color 0.15s;
}
.ghead:hover { background: var(--press); }
.ghead svg { flex-shrink: 0; transition: transform 132ms cubic-bezier(0.32, 0.08, 0.24, 1); }
.ghead.closed svg { transform: rotate(-90deg); }
.group-items { display: contents; }
.group-items.hidden { display: none; }

.sidebar .me-wrap { position: relative; flex-shrink: 0; margin-top: auto; padding-top: 6px; }
.me-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px; border-radius: 14px;
  transition: background-color 0.15s;
}
.me-btn:hover { background: var(--press); }
.me-btn img { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; }
.me-btn .me-name { display: flex; min-width: 0; flex-direction: column; gap: 4px; line-height: 1; }
.me-btn .me-name b { font-size: 14px; font-weight: 500; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-btn .me-name i { font-style: normal; font-size: 12px; color: var(--gray-2); }

.me-menu {
  position: absolute; bottom: calc(100% + 12px); left: 0; z-index: 10;
  display: flex; flex-direction: column; width: 100%;
  padding: 6px; border-radius: 16px;
  background: var(--card); box-shadow: var(--sh-pop);
}
.me-menu[hidden] { display: none; }
.lang-row {
  display: flex; gap: 2px;
  margin-bottom: 6px; padding: 3px; border-radius: 10px;
  background: var(--press);
}
.lang-row button {
  flex: 1; padding: 5px 0; border-radius: 8px; text-align: center;
  font-size: 12px; font-weight: 500; color: var(--gray-3);
  transition: color 0.15s;
}
.lang-row button:hover { color: #000; }
.lang-row button.on { background: var(--white); color: #000; box-shadow: var(--sh-sm); }
.sheet .lang-row { margin: 0 4px 6px; }
.me-menu button, .me-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: 10px;
  font-size: 14px; color: #000;
  transition: background-color 0.15s;
}
.me-menu button:hover, .me-menu a:hover { background: var(--press); }
.me-menu svg { flex-shrink: 0; color: var(--gray-1); }

/* ---------- main column ---------- */
main {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; gap: 16px;
  padding: 8px 8px 8px 0;
  margin-left: var(--sidebar-w);
}

/* one full-viewport page */
.page {
  display: flex; gap: 24px;
  height: calc(100vh - 16px);
  scroll-snap-align: start;
  scroll-margin-top: 8px;
}

/* big center card */
.stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-width: 0; flex: 1;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--sh-card);
  overflow: clip;
}

@supports (background: color-mix(in srgb, white, black)) {
  body {
    background: linear-gradient(
      to bottom,
      color-mix(in srgb, #f5f5f5 calc(100% - var(--theme-progress-pct)), #111217 var(--theme-progress-pct)),
      color-mix(in srgb, #e0e0e0 calc(100% - var(--theme-progress-pct)), #1b1d26 var(--theme-progress-pct))
    );
  }
  @media (min-width: 1024px) {
    .stage {
      background: color-mix(in srgb, #f9f9f7 calc(100% - var(--theme-progress-pct)), #171920 var(--theme-progress-pct));
    }
  }
}
html.is-theme-dragging body,
html.is-theme-dragging .stage { transition: none; }

/* right rail */
.rail {
  display: flex; flex-shrink: 0; flex-direction: column; gap: 16px;
  width: var(--rail-w);
  padding: 0 8px 16px 0;
}
.rail .chip {
  display: flex; align-self: flex-start; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 16px;
  background: var(--press);
}
.rail .chip img { width: 24px; height: 24px; flex-shrink: 0; border-radius: 5px; }
.rail .chip .c-txt { display: flex; min-width: 0; flex-direction: column; }
.rail .chip .c-txt b { font-size: 13px; font-weight: 500; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .chip .c-txt i { font-style: normal; font-size: 12px; color: var(--gray-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .story {
  display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 14px;
  overflow-y: auto; overscroll-behavior: contain;
  font-size: 14px; line-height: 1.65; color: var(--gray-1);
}
.rail .story .note { color: #000; font-weight: 500; }
.rail .facts { display: flex; flex-direction: column; margin-top: auto; font-size: 13px; }
.rail .facts .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--hair);
}
.rail .facts .row:last-child { border-bottom: 0; }
.rail .facts .row .k { color: var(--gray-4); }
.rail .facts .row .v { color: #000; text-align: right; }
.rail .facts .row a.v { text-decoration: underline; text-decoration-color: rgba(0,0,0,.25); text-underline-offset: 3px; }
.rail .facts .row a.award-link { color: #8B4800; line-height: 1.4; }
.rail .facts .row a.v:hover { text-decoration-color: rgba(0,0,0,.7); }

/* rail reveal-on-scroll */
.rv {
  opacity: 0; transform: translateY(12px);
  transition: opacity 900ms ease-out, transform 900ms ease-out;
}
.page.seen .rv { opacity: 1; transform: none; }
.page.seen .rv.d1 { transition-delay: 90ms; }
.page.seen .rv.d2 { transition-delay: 180ms; }

/* store badges (Prism Pay) */
.stores { display: flex; gap: 8px; }
.store {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 12px;
  background: var(--ink); color: var(--on-ink);
  transition: opacity 0.15s;
}
.store:hover { opacity: 0.85; }
.store svg { width: 18px; height: 18px; flex-shrink: 0; }
.store .s-txt { display: flex; flex-direction: column; line-height: 1.15; }
.store .s-txt i { font-style: normal; font-size: 8.5px; letter-spacing: 0.02em; opacity: 0.8; }
.store .s-txt b { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ---------- home page ---------- */
.theme-window {
  position: absolute; top: 56px; left: 50%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 3px; border-radius: 28px;
  color: var(--gray-4); text-align: center;
  touch-action: none; user-select: none;
  transform: translateX(-50%);
  transition: color 180ms ease, transform 220ms var(--ease-out);
}
.theme-window:hover { color: var(--ink); transform: translate(-50%, -2px); }
.theme-window.is-dragging { cursor: grabbing; transform: translateX(-50%); }
.theme-window-frame {
  position: relative; display: block; width: 56px; height: 72px;
  padding: 7px; border: 1px solid var(--window-edge); border-radius: 50% / 44%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--window-frame) 48%, rgba(0, 0, 0, 0.12));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42), 0 6px 18px rgba(18, 18, 23, 0.12);
  overflow: hidden;
  transition: box-shadow 220ms ease, background 220ms ease;
}
.theme-window:hover .theme-window-frame {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.56), 0 8px 22px rgba(18, 18, 23, 0.16);
}
.theme-window-view {
  position: relative; display: block; width: 100%; height: 100%; overflow: hidden;
  border: 1px solid rgba(18, 18, 23, 0.16); border-radius: 50% / 44%;
  background:
    radial-gradient(ellipse at 50% 98%, var(--window-cloud) 0 22%, transparent 48%),
    linear-gradient(to bottom, var(--window-sky-top) 0%, var(--window-sky-bottom) 100%);
  box-shadow: inset 0 0 10px rgba(18, 18, 23, 0.14);
  transition: background 320ms ease, border-color 220ms ease;
}
.theme-window-view::before,
.theme-window-view::after {
  content: ""; position: absolute; pointer-events: none;
  transition: opacity 320ms ease, transform 320ms var(--ease-out);
}
.theme-window-view::before {
  left: -10%; right: -10%; bottom: -3%; height: 38%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.18));
  filter: blur(2px);
}
.theme-window-view::after {
  top: 17%; right: 20%; width: 11px; height: 11px; border-radius: 50%;
  background: #fff7d2; opacity: 0;
  box-shadow: -13px 7px 0 -4px rgba(255, 255, 255, 0.72), 8px -5px 0 -4px rgba(255, 255, 255, 0.62), -22px -8px 0 -4px rgba(255, 255, 255, 0.6);
  transform: translateY(8px) scale(0.7);
}
.theme-window-shade {
  position: absolute; top: 7px; right: 7px; left: 7px; z-index: 1;
  display: block; height: calc(100% - 14px);
  border-radius: 50% / 44%;
  background: linear-gradient(to bottom, rgba(71, 74, 84, 0.86), rgba(28, 30, 38, 0.96));
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.16), 0 1px 4px rgba(18, 18, 23, 0.22);
  opacity: 0.94;
  pointer-events: none;
  transform: scaleY(var(--theme-progress, 0));
  transform-origin: top;
  transition: transform 320ms var(--ease-out), opacity 220ms ease;
}
.theme-window-shade::after {
  content: ""; position: absolute; right: 50%; bottom: 5px; width: 16px; height: 2px;
  border-radius: 99px; background: rgba(255, 255, 255, 0.42); transform: translateX(50%);
}
.theme-window.is-dragging .theme-window-shade { transition: none; }
html[data-theme="dark"] .theme-window-frame {
  background: linear-gradient(145deg, #555968, var(--window-frame) 48%, #111217);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), 0 6px 18px rgba(0, 0, 0, 0.34);
}
html[data-theme="dark"] .theme-window-shade {
  background: linear-gradient(to bottom, rgba(81, 85, 99, 0.9), rgba(25, 27, 35, 0.98));
}
html[data-theme="dark"] .theme-window-view {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 72% 25%, #fff1b3 0 8%, transparent 9%),
    radial-gradient(circle at 22% 28%, rgba(255, 255, 255, 0.8) 0 1.5px, transparent 2px),
    radial-gradient(circle at 42% 14%, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 48%, rgba(255, 255, 255, 0.66) 0 1px, transparent 1.5px),
    linear-gradient(to bottom, var(--window-sky-top) 0%, var(--window-sky-bottom) 100%);
}
html[data-theme="dark"] .theme-window-view::before {
  background: linear-gradient(to bottom, var(--window-cloud), rgba(115, 129, 179, 0.05));
  transform: translateY(4px);
}
html[data-theme="dark"] .theme-window-view::after { opacity: 1; transform: none; }
.theme-window-label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.14em; line-height: 1;
  text-transform: uppercase;
}
.clockline {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  min-height: 20px; font-size: 13px; white-space: nowrap; color: var(--gray-4);
}
.home-inner {
  display: flex; width: 100%; max-width: 560px; flex-direction: column;
  align-items: center; gap: 32px; padding: 0 32px;
}
.hello { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.hello h1 {
  min-height: 37px; font-size: 32px; line-height: 1.15;
  font-weight: 600; letter-spacing: -0.02em;
}
.hello h1 img.mark {
  display: inline-block; width: 28px; height: 28px;
  margin-right: 10px; border-radius: 6px;
  transform: translateY(-2px); vertical-align: middle;
}
.hello h1 .caret {
  display: inline-block; width: 2px; height: 0.9em;
  margin-left: 2px; transform: translateY(2px);
  background: rgba(0, 0, 0, 0.7);
  animation: caret-blink 1s steps(1, end) infinite;
}
.hello h1 .caret.done { animation: none; opacity: 0; transition: opacity 600ms ease-out 1.2s; }
@keyframes caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hello .sub { font-size: 15px; line-height: 1.6; color: var(--gray-2); }

/* search / omnibox */
.omni-wrap { position: relative; width: 100%; }
.omni {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: 16px;
  background: var(--white); box-shadow: var(--sh-sm);
  cursor: text;
}
.omni svg.lens { flex-shrink: 0; color: var(--gray-5); }
.omni input { width: 100%; font-size: 14px; color: #000; }
.omni input::placeholder { color: var(--gray-5); transition: color 0.3s; }
.omni .kbd {
  pointer-events: none; flex-shrink: 0;
  padding: 2px 6px; border-radius: 6px;
  background: var(--press);
  font-size: 11px; font-weight: 500; white-space: nowrap; color: var(--gray-5);
}
.omni .clear {
  display: none; margin-right: -4px;
  width: 20px; height: 20px; flex-shrink: 0;
  align-items: center; justify-content: center; border-radius: 50%;
  color: var(--gray-5); transition: background-color .15s, color .15s;
}
.omni .clear:hover { background: var(--press); color: #000; }
.omni-wrap.filled .clear { display: flex; }
.omni-wrap.filled .kbd { display: none; }

.omni-drop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 10;
  display: flex; width: 100%; flex-direction: column;
  padding: 6px; border-radius: 16px; text-align: left;
  background: var(--white); box-shadow: var(--sh-pop);
}
.omni-drop[hidden] { display: none; }
.omni-list { display: flex; max-height: 300px; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.omni-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 14px; color: #000;
  transition: background-color 0.1s;
}
.omni-row.sel { background: var(--press); }
.omni-row img { width: 18px; height: 18px; flex-shrink: 0; border-radius: 4px; }
.omni-row .r-name { min-width: 0; flex: 1; text-align: left; line-height: 1.35; }
.omni-row .r-group { flex-shrink: 0; font-size: 12px; color: var(--gray-5); }
.omni-row svg { display: none; margin-left: auto; flex-shrink: 0; color: var(--gray-5); }
.omni-row.sel svg { display: block; }
.omni-empty { padding: 10px; font-size: 14px; color: var(--gray-5); }
.omni-hints {
  display: flex; align-items: center; gap: 14px;
  margin-top: 4px; padding: 8px 10px 4px;
  border-top: 1px solid var(--hair);
  font-size: 11px; color: var(--gray-5);
}

/* hire chat (in place of search) */
.chatlog {
  display: flex; width: 100%; flex-direction: column; gap: 10px;
  max-height: 44vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px; text-align: left;
}
.chatlog[hidden] { display: none; }
.msg {
  max-width: 80%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.5;
}
.msg.bot { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--white); color: var(--ink); box-shadow: var(--sh-sm); }
.msg.me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--ink); color: var(--on-ink); }
.msg.action { background: transparent; box-shadow: none; padding: 2px 0; }
.msg .dot {
  display: inline-block; width: 6px; height: 6px; margin: 0 2px;
  border-radius: 50%; background: var(--gray-5);
  animation: chat-dot 1.2s ease-in-out infinite;
}
.msg .dot:nth-child(2) { animation-delay: 0.15s; }
.msg .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.mailbtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 500;
  box-shadow: var(--sh-sm); transition: opacity 0.15s, transform 140ms var(--ease-out);
}
.mailbtn:hover { opacity: 0.85; }
.mailbtn:active { transform: scale(0.97); }
#welcome.chatting .featured { display: none; }
#welcome.chatting .hello .sub { display: none; }

/* featured cards */
.featured { display: flex; width: 100%; flex-direction: column; gap: 10px; }
.featured .f-label { padding: 0 2px; font-size: 13px; font-weight: 500; color: var(--gray-4); }
.f-grid { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.f-card {
  position: relative; display: flex; flex-direction: column;
  align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: 16px; overflow: clip;
  background: var(--white); box-shadow: var(--sh-sm); text-align: left;
  transition: box-shadow 650ms var(--ease-out), transform 650ms var(--ease-out);
}
.f-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-hover);
  transition-duration: 200ms; transition-timing-function: ease-out;
}
.f-card .glow {
  pointer-events: none; position: absolute; inset: auto 0 0 0;
  height: 140%; transform: translateY(45%); opacity: 0;
  filter: blur(10px);
  transition: opacity 1300ms ease-out, transform 0s linear 1300ms;
}
.f-card:hover .glow {
  transform: translateY(6%); opacity: 0.85;
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.f-card img { position: relative; width: 28px; height: 28px; border-radius: 6px; }
.f-card .f-txt { position: relative; display: flex; flex: 1; flex-direction: column; gap: 2px; }
.f-card .f-txt b { font-size: 14px; font-weight: 500; color: #000; }
.f-card .f-txt p { font-size: 12px; line-height: 1.4; color: var(--gray-4); }
.f-card .f-txt i { margin-top: auto; padding-top: 8px; font-style: normal; font-size: 11px; color: var(--gray-4); }

/* home footer links */
.homelinks {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--gray-4);
}
.homelinks a, .homelinks button { color: inherit; transition: color 0.15s; }
.homelinks a:hover, .homelinks button:hover { color: #000; }
.copybtn { position: relative; }
.copybtn .lbl, .copybtn .ok { transition: opacity 0.2s; }
.copybtn .ok {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 4px; white-space: nowrap; opacity: 0;
}
.me-menu .copybtn .ok, .sheet .copybtn .ok { left: auto; right: 0; transform: translateY(-50%); }
.copybtn.copied { color: #000; }
.copybtn.copied .lbl { opacity: 0; }
.copybtn.copied .ok { opacity: 1; }

/* ---------- media stages ---------- */

/* video page */
.stage-video { }
.stage-video .vbg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform: scale(1.1);
  filter: blur(40px) brightness(0.65) saturate(1.5);
}
.stage-video .vmain {
  position: relative; z-index: 10;
  max-width: calc(100% - 64px); max-height: calc(100% - 64px);
  border-radius: 12px;
  box-shadow: 0px 16px 48px rgba(0, 0, 0, 0.3);
}
.vctrl {
  position: absolute; bottom: 28px; left: 50%; z-index: 20; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 3px 12px 3px 3px; border-radius: 10px;
  background: rgba(236, 236, 234, 0.5);
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 0px 1px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.vctrl .pp {
  display: flex; width: 26px; height: 26px; flex-shrink: 0;
  align-items: center; justify-content: center; border-radius: 8px;
  background: var(--white); color: var(--ink); box-shadow: var(--sh-sm);
  transition: background-color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.vctrl .pp:hover { background: #f4f4f2; }
.vctrl .pp:active { transform: scale(0.94); }
.vctrl .pp .i-pause { display: none; }
.vctrl.playing .pp .i-play { display: none; }
.vctrl.playing .pp .i-pause { display: block; }
.seek { display: flex; align-items: center; width: 140px; height: 20px; cursor: pointer; touch-action: none; }
.seek .track { position: relative; width: 100%; height: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.24); }
.seek .fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: var(--ink); width: 0%; }
.seek .knob {
  position: absolute; top: 50%; left: 0%;
  width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 1px rgba(0, 0, 0, 0.2);
}

/* image / flow pages */
.stage-media {
  flex-direction: column; gap: 20px;
  padding: 28px 24px;
}
.stage-media .canvasarea {
  position: relative; display: flex; min-height: 0; width: 100%; flex: 1;
  align-items: center; justify-content: center;
}
.shots { position: relative; transition: width 320ms var(--ease-out), height 320ms var(--ease-out); }
.shots .shot {
  position: absolute; inset: 0; opacity: 0; z-index: 0;
  transition: opacity 320ms var(--ease-out);
}
.shots .shot.on { opacity: 1; z-index: 1; }
.shots .shot img { width: 100%; height: 100%; object-fit: contain; }
.shots.framed { border-radius: 12px; overflow: hidden; box-shadow: 0px 8px 30px rgba(0,0,0,0.10), 0px 0px 1px rgba(0,0,0,0.06); cursor: pointer; }
.shots.phones { cursor: pointer; overflow: hidden; box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.10); }
.stage-media .ctlrow { display: flex; flex-shrink: 0; align-items: center; gap: 16px; }
.segbar {
  position: relative; display: flex; flex-shrink: 0; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 2px;
  padding: 3px; border-radius: 10px; background: var(--press);
}
.segbar button {
  padding: 4px 10px; border-radius: 8px;
  font-size: 12px; white-space: nowrap; color: var(--gray-3);
  transition: color 0.15s;
}
.segbar button:hover { color: #000; }
.segbar button.on {
  background: var(--white); color: #000; font-weight: 500; box-shadow: var(--sh-sm);
}
.segbar button .n { font-variant-numeric: tabular-nums; }
.segbar button .t { margin-left: 6px; }
.fswrap { display: flex; flex-shrink: 0; padding: 3px; border-radius: 10px; background: var(--press); }
.fsbtn {
  display: flex; width: 26px; height: 26px;
  align-items: center; justify-content: center; border-radius: 8px;
  background: var(--white); color: var(--ink); box-shadow: var(--sh-sm);
  transition: background-color 0.15s;
}
.fsbtn:hover { background: #f4f4f2; }

/* next-arrow for phone flows */
.nextbtn {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  display: flex; width: 36px; height: 36px;
  align-items: center; justify-content: center; border-radius: 50%;
  background: var(--press); color: var(--gray-3);
  transition: color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.nextbtn:hover { color: #000; }
.nextbtn:active { transform: translateY(-50%) scale(0.95); }
.nextbtn .halo {
  position: absolute; inset: 3px; border-radius: 50%;
  background: var(--white); opacity: 0; box-shadow: var(--sh-sm);
  transition: opacity 260ms var(--ease-out);
}
.nextbtn:hover .halo { opacity: 1; }
.nextbtn svg { position: relative; transform: translateX(0.75px); }

/* reflection under phone flows */
.reflect {
  pointer-events: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) scaleY(-1);
  opacity: 0.18; filter: blur(1px);
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 62%);
  mask-image: linear-gradient(to top, black 0%, transparent 62%);
}
.reflect img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.reflect img.on { opacity: 1; }

/* ---------- launchpad pitch ---------- */
.tab .raise-dot, .raise-dot {
  flex: 0 0 7px; width: 7px; height: 7px; margin-left: auto;
  border-radius: 50%; background: #FF7A1A;
  -webkit-mask-image: none; mask-image: none; overflow: visible;
  animation: raise-pulse 2s ease-in-out infinite;
}
@keyframes raise-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(255, 122, 26, 0); }
}
.stage-pitch { display: block; overflow-y: auto; overscroll-behavior-y: auto; }
.pitch {
  display: flex; flex-direction: column; gap: 40px;
  max-width: 620px; margin: 0 auto; padding: 56px 32px 64px;
}
.p-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.p-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: #FFF1E6; color: #C2570A;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.p-award {
  display: inline-flex; align-items: center; justify-content: center;
  max-width: 100%; padding: 7px 13px; border-radius: 999px;
  background: linear-gradient(100deg, #FFF7D6, #FFE7C7);
  color: #8B4800; box-shadow: inset 0 0 0 1px rgba(139, 72, 0, 0.08);
  font-size: 12px; font-weight: 600; line-height: 1.35; text-align: center;
  text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease;
}
.p-award:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(139, 72, 0, 0.16), 0 4px 12px rgba(139, 72, 0, 0.1); }
.p-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #FF7A1A;
  animation: raise-pulse 2s ease-in-out infinite;
}
.p-mark { width: 72px; height: 72px; margin-top: 8px; border-radius: 18px; box-shadow: var(--sh-pop); }
.p-hero h2 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.p-tag {
  font-size: 18px; font-weight: 600;
  background: linear-gradient(90deg, #FF7A1A, #FF3D77);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.p-sub { max-width: 480px; font-size: 15px; line-height: 1.65; color: var(--gray-2); }
.p-ctas { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.p-site { font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(0,0,0,.25); text-underline-offset: 3px; }
.p-site:hover { text-decoration-color: rgba(0,0,0,.7); }

.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.p-stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 14px; border-radius: 16px;
  background: var(--white); box-shadow: var(--sh-sm);
}
.p-stat b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.p-stat i { font-style: normal; font-size: 12px; line-height: 1.35; color: var(--gray-4); }

.p-block { display: flex; flex-direction: column; gap: 14px; }
.p-block h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-4); }
.p-block p { font-size: 15px; line-height: 1.7; color: var(--gray-1); }
.p-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p-step {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px; border-radius: 16px;
  background: var(--white); box-shadow: var(--sh-sm);
}
.p-step .n {
  display: flex; width: 22px; height: 22px; margin-bottom: 6px;
  align-items: center; justify-content: center; border-radius: 50%;
  background: #FFF1E6; color: #C2570A; font-size: 12px; font-weight: 700;
}
.p-step b { font-size: 14px; font-weight: 600; }
.p-step i { font-style: normal; font-size: 12.5px; line-height: 1.45; color: var(--gray-4); }


.p-fee-table { display: flex; flex-direction: column; border-radius: 16px; background: var(--white); box-shadow: var(--sh-sm); padding: 4px 16px; }
.p-fee-row {
  display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--hair);
  font-size: 13px;
}
.p-fee-row:last-child { border-bottom: 0; }
.p-fee-row span { color: var(--gray-4); }
.p-fee-row b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.p-fee-row.p-fee-4 b { text-align: right; }
.p-fee-row b.soft { font-weight: 500; color: var(--gray-2); }
.p-fee-row.p-fee-4 { grid-template-columns: 1.1fr 1fr 1fr 1fr; }
.p-fee-row.p-fee-2 { grid-template-columns: 1.1fr 3fr; }
.p-fee-head b { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gray-4); }
.p-fee-note { font-size: 12.5px !important; color: var(--gray-4) !important; }
@media (max-width: 1023.98px) {
  .p-fee-row { grid-template-columns: 1fr 1fr 1fr; font-size: 12px; }
}

.p-road { display: flex; flex-direction: column; }
.p-row {
  display: flex; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14px; line-height: 1.6;
}
.p-row:last-child { border-bottom: 0; }
.p-row b { flex-shrink: 0; width: 150px; font-weight: 600; }
.p-row span { color: var(--gray-2); }

.p-final {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 28px; border-radius: 16px; text-align: center;
  background: linear-gradient(135deg, #FFF3E8, #FFE9F0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.p-final p { font-size: 15px; font-weight: 500; color: var(--ink); }

@media (max-width: 1023.98px) {
  .stage-pitch { background: transparent; }
  .pitch { padding: 8px 8px 24px; gap: 28px; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .p-steps { grid-template-columns: 1fr; }
  .p-row { flex-direction: column; gap: 4px; }
  .p-row b { width: auto; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 260ms ease-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: calc(100vw - 96px); max-height: calc(100vh - 140px);
  border-radius: 12px; box-shadow: var(--sh-pop), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.roundclose {
  display: flex; width: 40px; height: 40px;
  align-items: center; justify-content: center; border-radius: 50%;
  background: var(--ink); color: var(--on-ink);
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16);
  transition: background-color 0.2s, color 0.2s;
}
.roundclose:hover { background: rgba(18, 18, 23, 0.85); color: #fff; }
.roundclose svg { transition: transform 260ms var(--ease-out); }
.roundclose:hover svg { transform: rotate(90deg); }

/* ---------- about dialog (desktop) ---------- */
.about-dlg {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.about-dlg .scrim {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 260ms ease-out;
}
.about-dlg.open { pointer-events: auto; }
.about-dlg.open .scrim { opacity: 1; }
.about-core {
  position: relative; display: flex; flex-direction: column; align-items: center;
  margin-bottom: -56px;
  transform: scale(0); opacity: 0;
  transition: opacity 260ms ease-out, transform 260ms ease-out;
}
.about-dlg.open .about-core { transform: scale(1); opacity: 1; }
.letter {
  position: relative; width: 464px; max-height: min(720px, calc(100vh - 140px));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 32px; border-radius: 16px; text-align: left;
  background: var(--white); box-shadow: var(--sh-pop);
}
.letter .dear { font-size: 15px; font-weight: 500; color: #000; }
.letter .body { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; font-size: 14px; line-height: 1.65; color: var(--gray-2); }
.about-core > .roundclose { margin-top: 16px; }

/* polaroids */
.pola {
  position: absolute; border-radius: 4px; perspective: 900px;
  opacity: 0; transition: opacity 500ms ease-out, translate 500ms ease-out;
}
.about-dlg.open .pola { opacity: 1; }
.pola .flip {
  position: relative; display: block; width: 100%; border-radius: 4px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.16);
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.4, 0.15, 0.2, 1);
}
.pola.flipped .flip { transform: rotateY(180deg); }
.pola img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 4px; object-fit: cover;
  backface-visibility: hidden;
}
.pola .back {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 4px;
  background: #f6f4ee;
  box-shadow: inset 0 0 0 1px rgba(18, 18, 23, 0.07);
  backface-visibility: hidden;
  transform: rotateY(180deg);
}
.pola .back span {
  transform: rotate(-2deg); text-align: center;
  font-size: 18px; line-height: 1.35; color: #2f3545;
  font-family: "Bradley Hand", "Snell Roundhand", "Segoe Script", cursive;
}
.pola.p-left { width: 295px; left: -251px; top: calc(50% - 54px); translate: 85% -50%; rotate: -2deg; }
.pola.p-right { width: 235px; right: -200px; top: calc(50% + 74px); translate: -85% -50%; rotate: 1deg; }
.about-dlg.open .pola.p-left { translate: 0 -50%; }
.about-dlg.open .pola.p-right { translate: 0 -50%; }

/* ---------- mobile ---------- */
.mob-only { display: none; }

.mob-pill {
  position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; z-index: 40;
  display: none; width: max-content; max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  align-items: center; gap: 10px;
  padding: 12px 16px 12px 14px; border-radius: 999px;
  background: var(--card);
  box-shadow: var(--sh-pop);
}
.mob-pill img { width: 20px; height: 20px; border-radius: 4px; }
.mob-pill b { font-size: 14px; font-weight: 500; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mob-pill svg { color: var(--gray-4); }

.sheet-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 260ms;
}
.sheet {
  position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 41;
  display: flex; flex-direction: column;
  border-radius: 20px; background: var(--card);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: var(--sh-pop);
  transform: translateY(24px); opacity: 0; pointer-events: none;
  transition: transform 260ms var(--ease-out), opacity 260ms var(--ease-out);
}
.sheet-open .sheet { transform: none; opacity: 1; pointer-events: auto; }
.sheet-open .sheet-scrim { opacity: 1; pointer-events: auto; }
.sheet nav { display: flex; max-height: calc(100svh - 96px); flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.sheet .s-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 44px; padding: 11px 10px; border-radius: 10px;
  font-size: 14px; color: #000;
}
.sheet .s-row:active { background: var(--press); }
.sheet .s-row img { width: 18px; height: 18px; border-radius: 4px; }
.sheet .s-row svg { color: var(--gray-4); }
.sheet .s-row.cur { background: var(--white); font-weight: 500; box-shadow: var(--sh-sm); }
.sheet .s-ghead { padding: 14px 10px 6px; font-size: 12px; font-weight: 500; color: var(--gray-4); }
.sheet .s-extra { display: flex; flex-direction: column; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hair); }

@keyframes mobile-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1023.98px) {
  .sidebar, .rail .chip, .clockline { }
  .sidebar { display: none; }
  .mob-only { display: flex; }
  .mob-pill { display: flex; }

  main { margin-left: 0; padding: 8px 8px 72px; }

  /* mobile home */
  .mob-home {
    position: relative; display: flex; min-height: calc(100svh - 16px); flex-direction: column;
    padding: 24px 8px 0;
  }
  .theme-window-mobile { top: 56px; left: 50%; }
  .theme-window-mobile .theme-window-frame { width: 48px; height: 62px; }
  .mob-home .clockline { position: static; transform: none; text-align: center; }
  .mob-home .hello { margin-top: 56px; padding: 0 10px; }
  .mob-home .hello h1 { min-height: 30px; font-size: 26px; }
  .mob-home .hello h1 img.mark { width: 24px; height: 24px; margin-right: 9px; }
  .mob-list { display: flex; flex-direction: column; padding-top: 32px; }
  .mob-list .m-ghead { padding: 20px 10px 6px; font-size: 12px; font-weight: 500; color: var(--gray-4); }
  .mob-list .m-row { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
  .mob-list .m-row:active { background: var(--press); }
  @media (hover: hover) { .mob-list .m-row:hover, .sheet .s-row:hover { background: var(--press); } }
  .mob-list .m-row img { width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; }
  .mob-list .m-row .m-txt { display: flex; min-width: 0; flex-direction: column; }
  .mob-list .m-row .m-txt b { font-size: 14px; font-weight: 500; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mob-list .m-row .m-txt i { font-style: normal; font-size: 12px; color: var(--gray-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mob-home .homelinks {
    position: static; transform: none; margin-top: auto;
    justify-content: center; padding: 48px 0 8px;
  }

  /* pages become tap-to-open mobile pages */
  .page { height: auto; flex-direction: column; gap: 16px; }
  .page.proj, .mob-about { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .page.proj { display: none; }
  .page.proj.mob-open { display: flex; animation: mobile-page-in 320ms var(--ease-out); }
  .page#welcome { display: none; }
  main.mob-in-proj .mob-home { display: none; }

  .backbtn {
    display: flex; width: 40px; height: 40px; margin: 0 8px;
    align-items: center; justify-content: center; border-radius: 50%;
    background: var(--press); color: var(--gray-3);
  }
  .backbtn:active { background: rgba(0, 0, 0, 0.1); color: var(--ink); }

  .stage { margin: 0 8px; flex: none; border-radius: 6px; background: transparent; box-shadow: none; }
  .stage-video { background: var(--card); border-radius: 12px; aspect-ratio: 16 / 10; }
  .stage-video .vbg { display: none; }
  .stage-video .vmain { max-width: 100%; max-height: 100%; }
  .stage-media { padding: 0; gap: 12px; height: var(--mobh, auto); }
  .stage-media .ctlrow { max-width: 100%; }
  .segbar {
    flex-wrap: nowrap; max-width: 100%; overflow-x: auto; justify-content: flex-start;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .segbar::-webkit-scrollbar { display: none; }
  .rail { width: auto; padding: 0 8px; }
  .rail .chip { display: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  .nextbtn { right: -8px; background: transparent; }
  .about-dlg, .lightbox { display: none; }

  /* mobile about page */
  .mob-about { display: none; flex-direction: column; gap: 16px; }
  .mob-about.mob-open { display: flex; animation: mobile-page-in 320ms var(--ease-out); }
  .mob-about .photo {
    position: relative; margin: 0 8px; aspect-ratio: 3 / 2;
    border-radius: 6px; overflow: clip; background: var(--card);
  }
  .mob-about .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .mob-about .photo .cap {
    pointer-events: none; position: absolute; right: 12px; bottom: 12px;
    padding: 4px 8px; border-radius: 8px;
    background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.95);
    font-size: 11px; backdrop-filter: blur(2px);
  }
  .mob-about .letter-flat { padding: 0 8px 8px; }
  .mob-about .letter-flat .dear { font-size: 15px; font-weight: 500; color: #000; }
  .mob-about .letter-flat .body { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; font-size: 14px; line-height: 1.65; color: var(--gray-2); }
}

@media (min-width: 600px) and (max-width: 1023.98px) {
  .mob-home, .mob-about, .page.proj { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
  .sheet { left: 50%; right: auto; width: min(480px, calc(100vw - 16px)); transform: translate(-50%, 24px); }
  .sheet-open .sheet { transform: translate(-50%, 0); }
}

@media (min-width: 1024px) {
  .mob-home, .mob-about, .mob-pill, .sheet, .sheet-scrim, .backbtn { display: none !important; }

  /* enlarged airplane window: sized to sit in the upper-center Home area */
  .theme-window { gap: 9px; }
  .theme-window-frame { width: 132px; height: 166px; padding: 12px; }
  .theme-window-view { box-shadow: inset 0 0 18px rgba(18, 18, 23, 0.14); }
  .theme-window-view::before { filter: blur(4px); }
  .theme-window-view::after {
    width: 18px; height: 18px;
    box-shadow: -22px 12px 0 -6px rgba(255, 255, 255, 0.72), 14px -8px 0 -6px rgba(255, 255, 255, 0.62), -34px -14px 0 -6px rgba(255, 255, 255, 0.6);
  }
  .theme-window-shade { top: 12px; right: 12px; left: 12px; height: calc(100% - 24px); }
  .theme-window-shade::after { bottom: 8px; width: 28px; height: 3px; }
  .theme-window-label { font-size: 11px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .f-card, .f-card .glow, .about-core, .pola, .pola .flip,
  .sheet, .sheet-scrim, .shots .shot, .lightbox { transition: none !important; }
  .hello h1 .caret { animation: none; }
  .page.proj.mob-open, .mob-about.mob-open { animation: none; }
}

/* ---------- dark theme surface overrides ---------- */
html[data-theme="dark"] body,
html[data-theme="dark"] .stage,
html[data-theme="dark"] .rail,
html[data-theme="dark"] .mob-home,
html[data-theme="dark"] .mob-about { transition: background-color 260ms ease, color 260ms ease; }
html[data-theme="dark"] :focus-visible { outline-color: rgba(241, 242, 245, 0.72); }
html[data-theme="dark"] .txtlink,
html[data-theme="dark"] .tab,
html[data-theme="dark"] .me-btn .me-name b,
html[data-theme="dark"] .me-menu button,
html[data-theme="dark"] .me-menu a,
html[data-theme="dark"] .rail .chip .c-txt b,
html[data-theme="dark"] .rail .story .note,
html[data-theme="dark"] .rail .facts .row .v,
html[data-theme="dark"] .omni input,
html[data-theme="dark"] .omni .clear:hover,
html[data-theme="dark"] .omni-row,
html[data-theme="dark"] .f-card .f-txt b,
html[data-theme="dark"] .homelinks a:hover,
html[data-theme="dark"] .homelinks button:hover,
html[data-theme="dark"] .copybtn.copied,
html[data-theme="dark"] .segbar button:hover,
html[data-theme="dark"] .segbar button.on,
html[data-theme="dark"] .nextbtn:hover,
html[data-theme="dark"] .letter .dear,
html[data-theme="dark"] .mob-pill b,
html[data-theme="dark"] .sheet .s-row,
html[data-theme="dark"] .mob-list .m-row .m-txt b,
html[data-theme="dark"] .mob-about .letter-flat .dear { color: var(--ink); }
html[data-theme="dark"] .txtlink { text-decoration-color: rgba(241, 242, 245, 0.28); }
html[data-theme="dark"] .txtlink:hover { text-decoration-color: rgba(241, 242, 245, 0.76); }
html[data-theme="dark"] .rail .facts .row a.v { text-decoration-color: rgba(241, 242, 245, 0.28); }
html[data-theme="dark"] .rail .facts .row a.v:hover { text-decoration-color: rgba(241, 242, 245, 0.76); }
html[data-theme="dark"] .rail .facts .row a.award-link { color: #f2c36e; }
html[data-theme="dark"] .lang-row button:hover,
html[data-theme="dark"] .lang-row button.on { color: var(--ink); }
html[data-theme="dark"] .hello h1 .caret { background: var(--ink); }
html[data-theme="dark"] .lightbox { background: rgba(9, 10, 15, 0.78); }
html[data-theme="dark"] .about-dlg .scrim,
html[data-theme="dark"] .sheet-scrim { background: rgba(9, 10, 15, 0.64); }
html[data-theme="dark"] .roundclose:hover { background: rgba(241, 242, 245, 0.88); color: var(--on-ink); }
html[data-theme="dark"] .pola .back { background: #252832; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .pola .back span { color: #e7e9f1; }
html[data-theme="dark"] .mob-about .photo .cap { background: rgba(9, 10, 15, 0.64); }
