
:root {
  --bg: #0b1020;
  --panel: #141a2e;
  --panel-2: #1c2542;
  --text: #f4ecd9;
  --muted: #9aa3b8;
  --gold: #e0b35a;
  --line: rgba(244, 236, 217, 0.12);
  --safe-t: env(safe-area-inset-top);
  --safe-b: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: Georgia, "Times New Roman", serif; overflow: hidden; }
button, a, .muted, .kicker, .credit, .tabs, .toggle, .fine, .chips {
  font-family: system-ui, -apple-system, sans-serif;
}
.skip { position: absolute; left: -999px; }
.app { height: 100%; display: flex; flex-direction: column; }
.top {
  display: flex; justify-content: center;
  padding: calc(10px + var(--safe-t)) 16px 8px; z-index: 5;
}
.toggle {
  display: flex; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px;
}
.toggle button {
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 20px; border-radius: 999px; font-weight: 650; cursor: pointer;
}
.toggle button.on { background: #efe6d4; color: #1a1408; }
.feed {
  flex: 1; overflow-y: auto; scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.slide {
  min-height: 100%; height: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; position: relative; background: #000;
}
.slide img { width: 100%; height: 42vh; object-fit: cover; background: #111; cursor: pointer; }
.panel {
  flex: 1; background: linear-gradient(#151b30, #0b1020);
  padding: 18px; border-top: 1px solid var(--line); overflow: auto;
}
.kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
h1 { font-size: clamp(24px, 7vw, 32px); line-height: 1.12; margin: 0 0 12px; font-weight: 500; }
.extract { font-size: 17px; line-height: 1.45; color: #e8dfcc; margin: 0 0 14px; }
.credit { font-size: 12px; color: var(--muted); margin: 0 0 14px; line-height: 1.4; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button, .actions a, .ghost, .chips button {
  background: var(--panel-2); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px;
  cursor: pointer; font-size: 14px;
}
.actions .liked { color: #ff6b7a; border-color: #ff6b7a; }
.ghost { margin: 12px 0; }
body.watch .top { position: absolute; left: 0; right: 0; }
body.watch .slide img { height: 100%; position: absolute; inset: 0; }
body.watch .panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(5,8,16,.9));
  border: 0; opacity: 0; pointer-events: none; transition: opacity .2s;
  padding: 72px 18px calc(18px + var(--safe-b));
}
body.watch .slide.show-ui .panel { opacity: 1; pointer-events: auto; }
body.watch .extract { display: none; }
body.watch .tabs { background: transparent; border-color: transparent; }
.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #0e1426; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); z-index: 6;
}
.tabs button { background: none; border: 0; color: var(--muted); padding: 12px 0 10px; cursor: pointer; font-weight: 600; }
.tabs button.on { color: var(--gold); }
.screen { flex: 1; overflow: auto; padding: 22px 18px calc(24px + var(--safe-b)); }
.screen h2 { margin: 8px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 12px 0; }
.card h3 { margin: 14px 0 4px; font-size: 16px; font-family: system-ui, sans-serif; }
.card h3:first-child { margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.45; }
.brand-row { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips button.on { background: #efe6d4; color: #1a1408; }
.empty { color: var(--muted); padding: 20px 0; }
.overlay {
  position: fixed; inset: 0; background: var(--bg); z-index: 30;
  display: flex; flex-direction: column;
  padding: calc(28px + var(--safe-t)) 22px calc(20px + var(--safe-b));
}
.overlay[hidden] { display: none !important; }
.overlay h2 { font-size: 34px; margin: 10px 0 12px; }
.overlay p { color: #d7ceb9; font-size: 18px; line-height: 1.4; }
.overlay-foot { margin-top: auto; }
.primary {
  width: 100%; border: 0; background: #efe6d4; color: #1a1408;
  border-radius: 999px; padding: 16px; font-size: 17px; font-weight: 700; cursor: pointer;
}
.fine { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; }
.fine-left { text-align: left; }
.text-btn { background: none; border: 0; color: var(--muted); cursor: pointer; }
.skip-btn { align-self: flex-end; }
.brand { color: var(--gold); font-weight: 700; letter-spacing: .02em; font-family: system-ui, sans-serif; }
.point { display: grid; grid-template-columns: 36px 1fr; gap: 10px; margin: 12px 0; color: #d7ceb9; font-size: 16px; }
.point b { display: block; color: var(--text); }
.burst {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%,-50%) scale(.4);
  font-size: 84px; color: #ff6b7a; pointer-events: none; z-index: 40;
  animation: pop .55s ease-out;
}
.burst[hidden] { display: none; }
@keyframes pop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
  35% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%,-60%) scale(1.3); }
}
.saved-card { cursor: pointer; }

.img-ph{width:100%;height:42vh;background:linear-gradient(180deg,#1c2542,#0b1020);}
body.watch .img-ph{height:100%;position:absolute;inset:0;}

.tags { display:flex; flex-wrap:wrap; gap:6px; margin: 0 0 12px; }
.tags button, .tag {
  background: transparent; color: var(--gold); border: 1px solid rgba(224,179,90,.35);
  border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.why { font-size: 12px; color: var(--muted); margin: 0 0 10px; font-family: system-ui, sans-serif; }
