:root {
  color-scheme: dark;
  --bg: #17171a;
  --line: #2a282c;
  --text: #fbf7f3;
  --muted: #aaa5aa;
  --accent-ink: #ff7268;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 50% 42%, #323035 0%, var(--bg) 61%); }
h1, h2, h3, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, .surface:focus-visible { outline: 2px solid #ff9b90; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
button svg, .icon { width: 21px; height: 21px; flex: none; }
button svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 14px;
}
.device {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  width: min(100%, 414px, calc((100dvh - 28px) * 402 / 874));
  min-width: min(100%, 300px);
  aspect-ratio: 402 / 874;
  overflow: hidden;
  border: 6px solid #09090a;
  border-radius: clamp(32px, 5vh, 48px);
  outline: 1px solid #5a575b;
  background: #151416;
  box-shadow: 0 24px 80px #0009, 0 2px 12px #000c;
}
.statusbar {
  z-index: 5;
  position: absolute;
  inset: 0 0 auto;
  height: 44px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 750;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}
.island {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 28%;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #050506;
}
.device-status { display: flex; gap: 5px; align-items: center; }
.signal {
  width: 14px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 100%, 0 68%, 18% 68%, 18% 100%, 27% 100%, 27% 48%, 45% 48%, 45% 100%, 54% 100%, 54% 25%, 72% 25%, 72% 100%, 81% 100%, 81% 0, 100% 0, 100% 100%);
}
.wifi { width: 12px; height: 10px; border-top: 2px solid; border-radius: 55%; position: relative; }
.wifi::before, .wifi::after { content: ""; position: absolute; inset: 2px 2px auto; border-top: 2px solid; border-radius: 50%; }
.wifi::after { inset: 5px 4px auto; }
.battery { width: 18px; height: 9px; border: 1px solid #fff9; border-radius: 3px; position: relative; }
.battery::before { content: ""; position: absolute; inset: 1px 3px 1px 1px; border-radius: 1px; background: currentColor; }
.battery::after { content: ""; position: absolute; inset: 2px -3px 2px auto; width: 1px; background: #fff9; }
.home-indicator {
  z-index: 5;
  position: absolute;
  inset: auto 0 5px;
  margin: auto;
  width: 31%;
  height: 4px;
  border-radius: 99px;
  background: #fdf8f2;
  pointer-events: none;
}
.topbar {
  z-index: 3;
  position: absolute;
  inset: 0 0 auto;
  height: 92px;
  padding: 44px 17px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(#09090cbb, #09090c50 58%, transparent);
}
.topbar .top-title { font-size: 17px; font-weight: 750; }
.topbar .top-counter { margin-left: auto; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.topbar .icon-button { margin-left: -7px; }
.topbar:not(.over-media) { background: #171619; border-bottom: 1px solid #2a282b; }
.topbar:not(.over-media) + .surface { padding-top: 92px; }
.surface { min-height: 0; flex: 1; overflow: auto; scrollbar-width: thin; padding-bottom: 14px; }
.device[data-page="discover"] .surface { overflow: hidden; padding-bottom: 0; touch-action: none; }
.mobile-nav {
  z-index: 2;
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding-bottom: 9px;
  background: #100f12;
  border-top: 1px solid #29262a;
}
.mobile-nav button {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.mobile-nav button:hover { color: var(--text); }
.mobile-nav [aria-current] { color: #ff897f; }
.mobile-nav .icon { width: 18px; height: 18px; }

.feed { display: flex; position: relative; isolation: isolate; height: 100%; flex-direction: column; justify-content: flex-end; overflow: hidden; background: #1e161b; }
.feed-media, .feed-shade, .tap-zone { position: absolute; inset: 0; width: 100%; height: 100%; }
.feed-media { object-fit: cover; object-position: center; pointer-events: none; }
.feed-shade { pointer-events: none; background: linear-gradient(180deg, #0f0b0f19 15%, transparent 35%, #110d1133 56%, #110d11ec 88%, #110d11); }
.tap-zone { border: 0; padding: 0; background: transparent; }
.tap-zone:focus-visible { outline-offset: -4px; }
.paused-mark { pointer-events: none; position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #150e16ae; }
.paused-mark .icon { width: 28px; height: 28px; }
.feed-content { z-index: 1; padding: 0 16px 3px; pointer-events: none; }
.feed-content button { pointer-events: auto; }
.feed-info { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.story-meta { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #fff3ed; font-weight: 700; letter-spacing: .06em; text-shadow: 0 1px 5px #000; }
.story-meta::before { content: ""; width: 12px; height: 2px; background: #ff6960; }
.feed-copy h1 {
  margin-top: 8px;
  font-size: clamp(27px, 8.9cqw, 36px);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: .025em;
  text-shadow: 0 2px 14px #000d;
}
.feed-copy p { margin-top: 8px; font-size: 13px; line-height: 1.55; color: #fff3ed; text-shadow: 0 1px 5px #000; }
.player-actions { flex: none; display: grid; justify-items: center; gap: 8px; }
.player-action { min-width: 44px; display: grid; justify-items: center; gap: 3px; padding: 0; border: 0; background: transparent; font-size: 10px; color: #fff; text-shadow: 0 1px 4px #000; }
.action-icon, .icon-button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff47; background: #170f1475; }
.action-icon .icon { width: 19px; height: 19px; }
.icon-button { padding: 0; border-color: transparent; }
.icon-button:hover, .player-action:hover .action-icon { border-color: #ff8177; }
.feed-cta { margin-top: 12px; }
.primary {
  border: 1px solid #ff887d;
  border-radius: 11px;
  background: linear-gradient(105deg, #d9383a, #bf2e43);
  color: #fff;
  min-height: 46px;
  padding: 0 16px;
  font-weight: 760;
  font-size: 15px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary:hover:not(:disabled) { filter: brightness(1.1); }
.primary svg { width: 17px; height: 17px; }
.feed-footer { display: flex; align-items: center; gap: 7px; padding-left: 1px; }
.feed-footer .icon-button { min-width: 44px; height: 33px; background: transparent; }
.feed-footer .icon { width: 17px; height: 17px; }
progress { flex: 1; height: 3px; border: 0; border-radius: 9px; appearance: none; background: #ffffff35; color: #ff8b82; }
progress::-webkit-progress-bar { border-radius: 9px; background: #ffffff35; }
progress::-webkit-progress-value { border-radius: 9px; background: #ff8b82; }
progress::-moz-progress-bar { border-radius: 9px; background: #ff8b82; }
.choice-panel { margin-top: 12px; padding: 10px; border: 1px solid #ffffff35; border-radius: 11px; background: #161217e6; }
.choice-panel p { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.choice-panel div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.choice-panel button, .media-error button { min-height: 44px; padding: 5px 7px; border: 1px solid #ffffff49; border-radius: 8px; background: #2d2329; font-size: 12px; font-weight: 700; }
.choice-panel button:hover, .media-error button:hover { border-color: var(--accent-ink); }
.media-error { margin-top: 7px; color: #ffe5de; font-size: 12px; }
.media-error button { margin-left: 6px; padding-inline: 12px; }

.page { padding: 16px 18px 20px; }
.page h1 { font-size: 25px; margin-bottom: 9px; }
.page p { font-size: 14px; line-height: 1.65; color: #d1c8cc; }
.library-list, .option-list { display: grid; gap: 10px; margin: 16px 0; }
.library-card { width: 100%; min-height: 110px; text-align: left; display: grid; grid-template-columns: 67px 1fr auto; align-items: center; gap: 12px; padding: 9px; border-radius: 13px; background: #1c1a1e; border: 1px solid var(--line); }
.library-card:hover, .option:hover { border-color: var(--accent-ink); }
.library-card img { width: 67px; height: 90px; border-radius: 8px; object-fit: cover; }
.library-card strong, .option strong { display: block; font-size: 15px; }
.library-card small, .option small { display: block; color: var(--muted); line-height: 1.5; margin-top: 5px; }
.detail-hero { position: relative; isolation: isolate; min-height: 235px; height: 54%; display: grid; align-content: end; padding: 22px 18px; overflow: hidden; }
.detail-hero img, .detail-hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.detail-hero img { object-fit: cover; object-position: center 34%; }
.detail-hero::after { content: ""; background: linear-gradient(transparent 42%, #151416); }
.detail-hero h1 { font-size: 36px; margin-top: 7px; letter-spacing: .05em; }
.detail-copy { display: grid; gap: 15px; padding-top: 0; }
.secondary { width: 100%; min-height: 45px; border: 1px solid var(--line); border-radius: 10px; background: #201e21; font-size: 14px; }
.secondary:hover { border-color: var(--accent-ink); }
.entry-banner { position: relative; isolation: isolate; min-height: 137px; display: grid; align-content: end; padding: 16px; margin-bottom: 20px; border-radius: 12px; overflow: hidden; background: #252026; }
.entry-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 32%; z-index: -2; }
.entry-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, #121014ed); z-index: -1; }
.entry-banner span { font-size: 19px; font-weight: 800; }
.entry-banner small { color: #f2dddb; margin-top: 3px; }
.option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 68px; padding: 11px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #1c1a1e; }
.option[aria-pressed="true"] { border-color: #e2655b; background: #2a1b1e; }
.option-state { font-size: 11px; color: #ff9b92; }
.option-state:empty { display: none; }
.entry-footer { display: grid; gap: 9px; }

@media (max-width: 440px) {
  .shell { padding: 7px; }
  .device { width: min(100%, 414px, calc((100dvh - 14px) * 402 / 874)); border-width: 4px; }
}
