:root {
  --bg: #0b0b10;
  --fg: #f5f5f7;
  --muted: #a1a1aa;
  --panel: #16161d;
  --line: #2a2a33;
  --pink: #ff2d6f;
  --yellow: #ffd60a;
  --hud-h: 52px;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; }
body { font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- HUD ---------- */
.hud {
  position: fixed; z-index: 20; top: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 480px); height: calc(var(--hud-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0 16px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-bottom: 1px solid #ffffff12; pointer-events: none;
  transform: translateX(-50%) translateZ(0); contain: layout paint;
}
.hud > * { pointer-events: auto; }
.brand { font-weight: 900; letter-spacing: -.02em; font-size: 19px; }
.brand b { color: var(--pink); }
.xp { display: flex; align-items: center; gap: 6px; margin-left: auto; background: #ffffff14; border-radius: 99px; padding: 4px 10px 4px 8px; }
.lv { font-weight: 900; font-size: 12px; color: var(--yellow); min-width: 28px; }
.xpbar { width: 64px; height: 6px; background: #fff3; border-radius: 9px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--pink)); border-radius: 9px; transition: width .5s cubic-bezier(.2,1.4,.4,1); }
.xp.bump { animation: bump .5s; }
.combo { font-weight: 900; background: #ff2d6f; border-radius: 99px; padding: 3px 9px; font-size: 13px; box-shadow: 0 0 16px #ff2d6faa; }
.combo.bump { animation: bump .45s; }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #ffffff14; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- feed ---------- */
#feed {
  height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none;
}
#feed::-webkit-scrollbar { display: none; }
.short {
  --t-bg: #111; --t-fg: #fff; --t-ac: #ff2d6f;
  position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  width: min(100%, 480px); margin: 0 auto; overflow: hidden;
  background: var(--t-bg); color: var(--t-fg);
  display: flex; flex-direction: column;
  padding: calc(var(--hud-h) + env(safe-area-inset-top) + 8px) 16px calc(16px + env(safe-area-inset-bottom));
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y;
}
.short::before {
  content: ""; position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 30% at 20% 20%, color-mix(in srgb, var(--t-ac) 30%, transparent), transparent 70%),
    radial-gradient(35% 30% at 85% 75%, color-mix(in srgb, var(--t-ac) 22%, transparent), transparent 70%);
}
[data-level="0"] .short::before { animation: none; opacity: .5; }
@keyframes drift { to { transform: translate(6%, -5%) rotate(8deg); } }
.short > * { position: relative; z-index: 1; }

.bars { display: flex; gap: 3px; margin-bottom: 10px; }
.bars span { flex: 1; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--t-fg) 22%, transparent); overflow: hidden; }
.bars i { display: block; height: 100%; width: 0; background: var(--t-fg); }

.meta { display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: .8; margin-bottom: 6px; }
.chip { background: color-mix(in srgb, var(--t-fg) 14%, transparent); padding: 3px 9px; border-radius: 99px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.hook { flex: none; font-size: 16px; font-weight: 900; line-height: 1.4; margin: 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.hook .em { margin-right: 6px; display: inline-block; }

@keyframes wob { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-12deg) scale(1.15); } }

.stage {
  position: relative; width: min(100%, 40dvh); aspect-ratio: 1; align-self: center; flex: none;
  border-radius: 20px; overflow: hidden; background: color-mix(in srgb, var(--t-fg) 8%, transparent);
  box-shadow: 0 18px 50px -18px #000c, 0 0 0 1px color-mix(in srgb, var(--t-fg) 12%, transparent);
}
.stage .count { position: absolute; z-index: 4; top: 10px; right: 12px; font-size: 11px; font-weight: 900; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--t-bg) 70%, transparent); color: var(--t-fg); font-variant-numeric: tabular-nums; }

/* ---------- cut templates ---------- */
.cut { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; }
.cut .emo { font-size: 64px; line-height: 1; }
.cut .emo.xl { font-size: min(150px, 34dvh); filter: drop-shadow(0 10px 18px #0005); animation: emoIn .5s cubic-bezier(.2,1.8,.4,1) both, floaty 1.6s ease-in-out .5s infinite alternate; }
@keyframes emoIn { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }
@keyframes floaty { to { transform: translateY(-8px) rotate(4deg) scale(1.04); } }
.rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--t-ac) 30%, transparent) 0 10deg, transparent 10deg 20deg); animation: spinr 8s linear infinite; mask: radial-gradient(circle, #000 10%, transparent 60%); -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%); }
@keyframes spinr { to { transform: rotate(360deg); } }
[data-level="0"] .rays { animation: none; }
.c-punch .badge { position: absolute; top: 16px; left: 16px; background: var(--t-ac); color: #fff; font-weight: 900; padding: 4px 12px; border-radius: 8px; transform: rotate(-6deg); animation: emoIn .4s cubic-bezier(.2,1.8,.4,1) .15s both; }

.c-num { flex-direction: column; gap: 4px; }
.c-num .num { font-weight: 900; color: var(--t-ac); line-height: 1; text-align: center; animation: emoIn .45s cubic-bezier(.2,1.8,.4,1) both; }
.c-num .num b { font-size: min(110px, 22dvh); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.c-num .num small { font-size: min(44px, 9dvh); margin-left: 4px; color: var(--t-fg); }
.c-num .num small.pre { margin: 0 4px 0 0; }
.c-num .num b.word { font-size: min(52px, 10dvh); letter-spacing: 0; }

.node { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; animation: popIn .4s cubic-bezier(.2,1.7,.4,1) both; animation-delay: calc(var(--d) * 110ms); }
@keyframes popIn { from { opacity: 0; transform: scale(.3) translateY(20px); } to { opacity: 1; transform: none; } }
.node .ne { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; font-size: 52px; background: color-mix(in srgb, var(--t-fg) 10%, transparent); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--t-fg) 18%, transparent); }
.node .nl { font-weight: 900; font-size: 17px; text-align: center; line-height: 1.25; max-width: 130px; word-break: keep-all; overflow-wrap: anywhere; }

.c-vs .node .ne, .c-change .node .ne { width: 116px; height: 116px; font-size: 66px; }
.c-vs .vs { font-weight: 900; font-size: 34px; color: #fff; background: var(--t-ac); border-radius: 50%; width: 64px; height: 64px; display: grid; place-items: center; flex: none; transform: rotate(-10deg); animation: slam .45s cubic-bezier(.2,1.8,.4,1) .2s both; box-shadow: 0 6px 18px #0006; }
@keyframes slam { from { transform: scale(3) rotate(-30deg); opacity: 0; } to { transform: rotate(-10deg); opacity: 1; } }
.c-change .node:first-child { filter: grayscale(1); opacity: .6; }
.c-change .node:first-child .nl { text-decoration: line-through 3px var(--t-ac); }
.c-change .node:last-child .ne { background: color-mix(in srgb, var(--t-ac) 25%, transparent); box-shadow: 0 0 0 3px var(--t-ac), 0 0 30px color-mix(in srgb, var(--t-ac) 60%, transparent); }
.arrow { flex: none; color: var(--t-ac); font-weight: 900; animation: popIn .3s both; animation-delay: calc(var(--d, 1) * 110ms); }
.arrow.big { font-size: 48px; animation: popIn .3s .15s both, nudge .6s ease-in-out .5s infinite alternate; }
@keyframes nudge { to { transform: translateX(8px); } }

.c-flow { gap: 4px; flex-wrap: nowrap; }
.c-flow .arrow { position: relative; width: 26px; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--t-ac) 50%, transparent); margin-bottom: 26px; }
.c-flow .arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 7px solid transparent; border-left: 9px solid var(--t-ac); border-right: 0; }
.c-flow .arrow i { position: absolute; top: -3px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--t-ac); box-shadow: 0 0 10px var(--t-ac); animation: dot .8s linear infinite; animation-delay: calc(var(--d) * 110ms); }
@keyframes dot { from { left: -4px; } to { left: 24px; } }
.c-flow.n4 .node .ne { width: 64px; height: 64px; font-size: 36px; border-radius: 18px; }
.c-flow.n4 .node .nl { font-size: 13px; max-width: 74px; }
.c-flow.n3 .node .ne { width: 78px; height: 78px; font-size: 44px; }
.c-flow.n3 .node .nl { font-size: 15px; max-width: 96px; }
.c-flow.n4 .arrow { width: 16px; }
@keyframes dot4 { from { left: -4px; } to { left: 14px; } }
.c-flow.n4 .arrow i { animation-name: dot4; }

.c-list { flex-direction: column; align-items: stretch; gap: 12px; }
.c-list .row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: color-mix(in srgb, var(--t-fg) 9%, transparent); animation: slideIn .4s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(var(--d) * 260ms); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
.c-list .ne { font-size: 36px; }
.c-list .nl { flex: 1; font-weight: 900; font-size: 21px; }
.c-list .ck { width: 32px; height: 32px; border-radius: 50%; background: var(--t-ac); color: #fff; display: grid; place-items: center; font-weight: 900; animation: emoIn .35s cubic-bezier(.2,1.8,.4,1) both; animation-delay: calc(var(--d) * 260ms + 220ms); }

.c-bars { flex-direction: column; align-items: stretch; gap: 14px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; animation: slideIn .35s both; animation-delay: calc(var(--d) * 150ms); }
.bar .bl { font-weight: 900; font-size: 16px; }
.bar .bt { grid-column: 1 / -1; height: 22px; border-radius: 8px; background: color-mix(in srgb, var(--t-fg) 10%, transparent); overflow: hidden; }
.bar .bt i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, color-mix(in srgb, var(--t-ac) 60%, transparent), var(--t-ac)); border-radius: 8px; animation: growW .7s cubic-bezier(.2,1,.3,1) both; animation-delay: calc(var(--d) * 150ms + 100ms); }
@keyframes growW { from { width: 0; } }
.bar .bv { grid-row: 1; grid-column: 2; font-weight: 900; font-size: 18px; color: var(--t-ac); font-variant-numeric: tabular-nums; }

.stage.shake { animation: shake .4s; }
.stage.flick-r { animation: flickR .3s cubic-bezier(.2,1.4,.4,1); }
.stage.flick-l { animation: flickL .3s cubic-bezier(.2,1.4,.4,1); }
@keyframes flickR { 0% { transform: translateX(18px) rotate(1.5deg); } 100% { transform: none; } }
@keyframes flickL { 0% { transform: translateX(-18px) rotate(-1.5deg); } 100% { transform: none; } }
.stage .flash { position: absolute; inset: 0; background: #fff; z-index: 3; opacity: 0; pointer-events: none; }
.stage .flash.go { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .75; } 100% { opacity: 0; } }
@keyframes shake { 0%,100% { transform: translate(0); } 20% { transform: translate(-6px, 2px) rotate(-1deg); } 40% { transform: translate(5px,-3px) rotate(1deg); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } }

.tr-fade { animation: trFade .35s both; }
.tr-pop { animation: trPop .5s cubic-bezier(.2,1.6,.4,1) both; }
.tr-slide { animation: trSlide .45s cubic-bezier(.2,1.2,.3,1) both; }
.tr-zoom { animation: trZoom .5s cubic-bezier(.2,1,.3,1) both; }
.tr-spin { animation: trSpin .55s cubic-bezier(.2,1.3,.4,1) both; }
.tr-glitch { animation: trGlitch .45s steps(2) both; }
@keyframes trFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes trPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes trSlide { from { opacity: 0; transform: translateX(40%) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes trZoom { from { opacity: 0; transform: scale(1.6); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes trSpin { from { opacity: 0; transform: rotate(-25deg) scale(.5); } to { opacity: 1; transform: none; } }
@keyframes trGlitch {
  0% { opacity: 1; clip-path: inset(10% 0 60% 0); transform: translate(-8px); filter: hue-rotate(90deg); }
  33% { clip-path: inset(50% 0 10% 0); transform: translate(8px); }
  66% { clip-path: inset(0 0 40% 0); transform: translate(-4px); filter: hue-rotate(-60deg); }
  100% { opacity: 1; clip-path: inset(0); transform: none; filter: none; }
}

.caption {
  flex: none; margin-top: 16px; min-height: 2.8em; padding-right: 60px; font-size: clamp(24px, 7vw, 30px); font-weight: 900; line-height: 1.35;
  letter-spacing: -.01em; text-wrap: balance;
}
.caption .c { display: inline-block; white-space: pre; }
.caption.anim .c { animation: charIn .32s cubic-bezier(.2,1.7,.4,1) both; animation-delay: calc(var(--i) * 16ms); }
@keyframes charIn { from { opacity: 0; transform: translateY(.5em) scale(.4); } to { opacity: 1; transform: none; } }
.caption mark {
  color: inherit; background: linear-gradient(transparent 55%, var(--t-ac) 55%) no-repeat;
  background-size: 0% 100%; padding: 0 .1em; border-radius: 2px;
}
.caption.anim mark { animation: marker .45s ease-out both; animation-delay: var(--md); }
.caption:not(.anim) mark { background-size: 100% 100%; }
@keyframes marker { to { background-size: 100% 100%; } }
[data-level="0"] .caption.anim .c { animation: trFade .3s both; animation-delay: 0s; }

.info { margin-top: auto; padding-right: 64px; }
.info .title { font-size: 13px; opacity: .85; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.info a { color: inherit; font-weight: 800; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; background: color-mix(in srgb, var(--t-fg) 14%, transparent); padding: 6px 12px; border-radius: 99px; }
.tags { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.tags span { font-size: 11px; font-weight: 800; color: var(--t-ac); }

.rail { position: absolute; right: 10px; bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; z-index: 4; }
.rail button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--t-fg) 14%, transparent); backdrop-filter: blur(6px); font-size: 22px; transition: transform .15s; }
.rail button:active { transform: scale(.88); }
.rail button.on { background: var(--t-ac); }
.rail button.on.pulse { animation: bump .45s; }
.rail svg { width: 24px; height: 24px; }

.paused-ind { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .15s; }
.paused-ind span { width: 76px; height: 76px; border-radius: 50%; background: #0009; display: grid; place-items: center; font-size: 30px; color: #fff; }
.short.paused .paused-ind { opacity: 1; }

/* end card */
.end {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--t-bg) 86%, transparent); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.short.ended .end { opacity: 1; pointer-events: auto; }
.end-in { text-align: center; max-width: 360px; }
.stamp {
  display: inline-block; border: 5px solid var(--t-ac); color: var(--t-ac); font-weight: 900; font-size: 30px;
  padding: 6px 18px; border-radius: 12px; transform: rotate(-8deg); letter-spacing: .06em;
}
.short.ended .stamp { animation: stamp .5s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes stamp { from { transform: rotate(-8deg) scale(3); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.takeaway { font-size: 22px; font-weight: 900; line-height: 1.45; margin: 22px 0 8px; text-wrap: balance; }
.plusxp { font-weight: 900; color: var(--yellow); font-size: 18px; text-shadow: 0 2px 8px #0008; }
.short.ended .plusxp { animation: floatUp 1.2s ease-out both .3s; }
@keyframes floatUp { from { opacity: 0; transform: translateY(16px); } 30% { opacity: 1; } to { opacity: 1; transform: translateY(-6px); } }
.end-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.end-actions a, .end-actions button { background: color-mix(in srgb, var(--t-fg) 14%, transparent); padding: 10px 16px; border-radius: 99px; font-weight: 800; font-size: 14px; color: inherit; text-decoration: none; }
.end-actions .primary { background: var(--t-ac); color: #fff; }
.nextbar { height: 3px; background: var(--t-ac); width: 0; margin: 18px auto 0; border-radius: 3px; max-width: 160px; }
.short.ended.autonext .nextbar { animation: grow 2.4s linear both; }
@keyframes grow { to { width: 100%; } }

.heart { position: absolute; z-index: 7; font-size: 90px; pointer-events: none; animation: heart .8s ease-out forwards; transform: translate(-50%, -50%); }
@keyframes heart { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3) rotate(-15deg); } 25% { opacity: 1; transform: translate(-50%,-50%) scale(1.2) rotate(8deg); } 100% { opacity: 0; transform: translate(-50%,-120%) scale(1); } }

.levelup { position: fixed; z-index: 30; left: 50%; top: 38%; transform: translate(-50%,-50%); font-size: 44px; font-weight: 900; color: var(--yellow); text-shadow: 0 0 24px #ff2d6f, 0 4px 0 #b3003c; pointer-events: none; animation: lvl 1.6s cubic-bezier(.2,1.6,.4,1) forwards; white-space: nowrap; }
@keyframes lvl { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2); } 25% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); } 80% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-80%) scale(1); } }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 25; }

/* full-power extras */


@keyframes fire { from { box-shadow: 0 0 10px #ff2d6f; } to { box-shadow: 0 0 26px #ffae00; } }

/* ---------- empty ---------- */
.empty { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; z-index: 10; }
.empty-in { text-align: center; max-width: 340px; }
.empty h2 { font-size: 22px; margin: 20px 0 8px; }
.empty p { color: var(--muted); line-height: 1.6; font-size: 14px; }
.spinner { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; border: 6px solid #fff2; border-top-color: var(--pink); border-right-color: var(--yellow); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { background: var(--pink); color: #fff; font-weight: 800; padding: 11px 18px; border-radius: 12px; }
.btn:disabled { opacity: .5; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #fff; color: #111; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 12px; box-shadow: 0 10px 30px #0008; max-width: calc(100% - 32px); }

/* ---------- sheet ---------- */
.sheet-bg { position: fixed; inset: 0; background: #0009; z-index: 35; }
.sheet {
  position: fixed; z-index: 36; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 480px); max-height: 82dvh; overflow-y: auto;
  background: var(--panel); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  animation: up .28s cubic-bezier(.2,1,.3,1);
}
@keyframes up { from { transform: translate(-50%, 100%); } }
.grab { width: 40px; height: 5px; border-radius: 9px; background: #fff3; margin: 4px auto 10px; }
.tabs { display: flex; gap: 6px; background: #0006; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tabs button { flex: 1; padding: 9px 0; border-radius: 9px; font-weight: 800; font-size: 14px; color: var(--muted); }
.tabs button.on { background: #fff; color: #111; }
.add { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; background: #0006; border: 1px solid var(--line); color: var(--fg); border-radius: 12px; padding: 11px 12px; font-size: 16px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 8px 2px 14px; }
.askai { margin: -6px 2px 14px; font-size: 12px; }
.askai summary { color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.askai[open] summary { margin-bottom: 4px; }
.askai .hint { margin: 4px 0 8px; }
.askai pre { white-space: pre-wrap; word-break: break-word; font: inherit; line-height: 1.6; color: var(--fg); background: #0006; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; user-select: text; -webkit-user-select: text; }
.askai .btn.ghost { background: none; color: var(--fg); border: 1px solid var(--line); padding: 8px 14px; font-size: 13px; }
.feeds, .saved { list-style: none; padding: 0; margin: 0; }
.feeds li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); }
.feeds .fi { flex: 1; min-width: 0; }
.feeds .ft { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feeds .fs { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feeds .fs .err { color: #ff6b6b; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #3a3a44; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.2,1.4,.4,1); }
.switch input:checked + i { background: var(--pink); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--yellow); outline-offset: 2px; }
.saved li { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.saved .thumb { width: 64px; height: 64px; border-radius: 10px; flex: none; background: #0006; display: grid; place-items: center; font-size: 34px; }
.saved .st { font-weight: 800; font-size: 14px; line-height: 1.4; }
.saved .sf { font-size: 12px; color: var(--muted); margin-top: 2px; }
.levels { display: grid; gap: 8px; margin-bottom: 16px; }
.levels button { text-align: left; padding: 14px; border-radius: 14px; background: #0006; border: 2px solid transparent; }
.levels button b { display: block; font-size: 16px; }
.levels button span { font-size: 12px; color: var(--muted); }
.levels button.on { border-color: var(--pink); background: #ff2d6f1f; }
.row { display: flex; gap: 10px; align-items: center; padding: 10px 2px; font-size: 14px; }
.row input { width: 20px; height: 20px; accent-color: var(--pink); }
.row select { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: transparent; color: inherit; font: inherit; }
.row select option { color: #111; }
.none { color: var(--muted); font-size: 14px; padding: 18px 2px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .short::before, .caption.anim .c, .tr-pop, .tr-slide, .tr-zoom, .tr-spin, .tr-glitch { animation-duration: .01s !important; }
}
@media (min-width: 520px) {
  body { background: radial-gradient(circle at 50% 0, #1c1c28, #07070b); }
}

/* ---------- quiz ---------- */
.c-quiz { flex-direction: column; justify-content: center; gap: 14px; padding: 18px; }
.qhead { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 15px; opacity: .9; animation: popIn .35s both; }
.qmark { width: 30px; height: 30px; border-radius: 9px; background: var(--t-ac); color: #fff; display: grid; place-items: center; font-size: 18px; }
.choices { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.choices.nudge { animation: wiggle .4s; }
@keyframes wiggle { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border-radius: 16px; text-align: left;
  background: color-mix(in srgb, var(--t-fg) 10%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--t-fg) 22%, transparent);
  font-weight: 900; font-size: 20px; color: var(--t-fg);
  animation: slideIn .35s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(var(--d) * 120ms + 150ms);
  transition: transform .15s, background .2s, opacity .2s;
}
.choice:active { transform: scale(.96); }
.choice .ne { font-size: 32px; }
.choice.right { background: #16a34a; color: #fff; box-shadow: 0 0 0 3px #4ade80, 0 0 28px #22c55e99; animation: bump .45s; }
.choice.wrong { background: #dc2626; color: #fff; box-shadow: none; }
.choice.dim { opacity: .35; }
.c-quiz.answered .choice { pointer-events: none; }
.qtimer { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--t-fg) 14%, transparent); overflow: hidden; width: 100%; }
.qtimer i { display: block; height: 100%; width: 100%; background: var(--t-ac); border-radius: 6px; }
.c-quiz.answered .qtimer { visibility: hidden; }
.verdict { position: absolute; top: 14px; left: 50%; transform: translateX(-50%) scale(0); font-weight: 900; font-size: 22px; padding: 6px 16px; border-radius: 99px; background: #fff; color: #111; box-shadow: 0 8px 22px #0006; white-space: nowrap; }
.verdict.show { animation: verdictIn .45s cubic-bezier(.2,1.8,.4,1) forwards; }
.verdict.ok { color: #15803d; }
.verdict.ng { color: #b91c1c; }
@keyframes verdictIn { to { transform: translateX(-50%) scale(1); } }

/* ---------- key (discovery) cut ---------- */
.stage.key { box-shadow: 0 0 0 3px var(--t-ac), 0 0 40px color-mix(in srgb, var(--t-ac) 55%, transparent), 0 18px 50px -18px #000c; transition: box-shadow .3s; }
[data-level="0"] .stage.key { box-shadow: 0 0 0 2px var(--t-ac); }
.keybadge { position: absolute; top: 12px; left: 12px; z-index: 3; background: var(--t-ac); color: #fff; font-weight: 900; font-size: 13px; padding: 5px 11px; border-radius: 99px; animation: emoIn .45s cubic-bezier(.2,1.8,.4,1) .1s both; box-shadow: 0 4px 14px #0005; }

/* ---------- end card Q/A ---------- */
.qa { text-align: left; margin: 20px 0 6px; display: grid; gap: 10px; }
.qa > div { display: flex; gap: 10px; align-items: flex-start; font-weight: 900; line-height: 1.45; }
.qa b { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; }
.qa .q { font-size: 16px; opacity: .8; }
.qa .q b { background: color-mix(in srgb, var(--t-fg) 18%, transparent); }
.qa .a { font-size: 21px; }
.qa .a b { background: var(--t-ac); color: #fff; }
.short.ended .qa .a { animation: popIn .45s cubic-bezier(.2,1.6,.4,1) .35s both; }
.tip { font-size: 13px; font-weight: 700; opacity: .85; margin-top: 10px; line-height: 1.5; }

.end .plusxp { display: block; margin-top: 14px; }

.info a small { font-weight: 700; opacity: .7; font-size: 11px; }
.end-actions .primary { display: inline-flex; flex-direction: column; align-items: center; padding: 12px 22px; font-size: 16px; box-shadow: 0 8px 24px -6px var(--t-ac); }
.end-actions .primary small { font-size: 11px; font-weight: 700; opacity: .85; margin-top: 2px; }
.publink { display: block; margin: 18px 2px 4px; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- captions: main line + supporting line ---------- */
.captions { flex: none; margin-top: 14px; padding-right: 58px; }
.captions .caption { margin-top: 0; min-height: 0; padding-right: 0; font-size: clamp(20px, 5.6vw, 24px); line-height: 1.4; }
.captions .sub { margin: 8px 0 0; font-size: 15px; line-height: 1.65; font-weight: 500; opacity: .88; min-height: 3.3em; text-wrap: pretty; }
.captions .sub.anim { animation: subIn .35s ease-out both; animation-delay: var(--sd, 300ms); }
@keyframes subIn { from { opacity: 0; transform: translateY(6px); } to { opacity: .88; transform: none; } }
.setlabel { font-weight: 800; font-size: 14px; margin: 4px 2px 8px; }
.tempo { display: flex; gap: 6px; margin-bottom: 12px; }
.tempo button { flex: 1; padding: 10px 0; border-radius: 10px; background: #0006; font-weight: 800; font-size: 14px; border: 2px solid transparent; }
.tempo button.on { border-color: var(--pink); background: #ff2d6f1f; }

.node .nl { word-break: normal; overflow-wrap: normal; line-break: strict; }
.node .nl.long { font-size: 13px; }
.c-flow .node .nl.long { font-size: 12px; }
.c-quiz.answered .qhead { visibility: hidden; }

/* keep the bottom compact so longer captions fit; break Japanese at phrase boundaries */
.info .tags { display: none; }
.info .title { -webkit-line-clamp: 1; font-size: 12px; }
.info a { margin-top: 4px; padding: 5px 11px; }
.captions .caption, .captions .sub, .hook, .qa, .tip { word-break: auto-phrase; }
.c-list .nl { font-size: 18px; line-height: 1.3; word-break: auto-phrase; }
.c-list .nl.long { font-size: 15px; }
.caption .w { display: inline-block; white-space: nowrap; }
.caption mark { display: inline-block; }

/* ---------- summary index ---------- */
.chapter { position: absolute; top: 10px; left: 12px; z-index: 3; font-size: 12px; font-weight: 900; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--t-bg) 75%, transparent); color: var(--t-fg); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--t-fg) 30%, transparent); }
.chapter.hot { background: var(--t-ac); color: #fff; box-shadow: 0 4px 14px #0005; animation: emoIn .45s cubic-bezier(.2,1.8,.4,1) .1s both; }
.c-index { flex-direction: column; align-items: stretch; justify-content: center; gap: 9px; padding: 44px 18px 18px; }
.c-index .ihead { font-size: 13px; font-weight: 900; opacity: .7; margin-bottom: 2px; }
.c-index .irow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--t-fg) 9%, transparent); animation: slideIn .4s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(var(--d) * 220ms); }
.c-index .irow b { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--t-ac); color: #fff; display: grid; place-items: center; font-size: 15px; }
.c-index .irow span { font-weight: 900; font-size: 17px; line-height: 1.3; word-break: auto-phrase; }
.idx { text-align: left; margin: 18px 0 6px; }
.idx-c { font-weight: 900; font-size: 19px; line-height: 1.45; word-break: auto-phrase; }
.idx-c span { display: inline-block; font-size: 12px; background: var(--t-ac); color: #fff; border-radius: 6px; padding: 2px 8px; margin-right: 8px; vertical-align: 3px; }
.idx ol { margin: 12px 0 0; padding-left: 1.4em; display: grid; gap: 4px; font-weight: 700; font-size: 15px; }
.short.ended .idx ol li { animation: slideIn .35s both; }
.short.ended .idx ol li:nth-child(2) { animation-delay: .1s; }
.short.ended .idx ol li:nth-child(3) { animation-delay: .2s; }
.short.ended .idx ol li:nth-child(4) { animation-delay: .3s; }

.c-index { gap: 7px; padding: 44px 14px 14px; justify-content: flex-start; }
.c-index .irow { padding: 8px 10px; gap: 10px; }
.c-index .irow span { font-size: 16px; }
.c-index.n4 .irow { padding: 6px 10px; }
.c-index.n4 .irow span { font-size: 14px; }
.c-index.n4 .irow b { width: 24px; height: 24px; font-size: 13px; }

/* ---------- RSVP ---------- */
.captions .rsvp { display: none; }
.captions.rsvp-on .rsvp { display: flex; align-items: center; justify-content: center; min-height: 3.4em; margin-right: 0; padding: 0 4px; }
.captions.rsvp-on:not(.review) .caption, .captions.rsvp-on:not(.review) .sub { display: none; }
.captions.rsvp-on.review .rsvp { display: none; }
.captions.rsvp-on.review .caption, .captions.rsvp-on.review .sub { animation: trFade .3s both; }
.captions.rsvp-on.review .caption .c { animation: none; }
.rw { display: inline-block; font-size: clamp(30px, 8.6vw, 38px); font-weight: 900; line-height: 1.25; letter-spacing: -.01em; text-align: center; white-space: nowrap; }
.rw.is-sub { font-weight: 600; font-size: clamp(26px, 7.4vw, 32px); opacity: .9; }
.rw.mark { color: #fff; background: var(--t-ac); padding: 0 .25em; border-radius: 6px; }
@keyframes rwIn { from { opacity: .35; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ======================= dopa effects v2 ======================= */
/* RSVP phrase entrances */
.rw.fx-pop { animation: rwPop .28s cubic-bezier(.2,1.9,.4,1) both; }
.rw.fx-drop { animation: rwDrop .3s cubic-bezier(.2,1.7,.4,1) both; }
.rw.fx-slideL { animation: rwSlideL .24s cubic-bezier(.2,1.4,.4,1) both; }
.rw.fx-slideR { animation: rwSlideR .24s cubic-bezier(.2,1.4,.4,1) both; }
.rw.fx-zoom { animation: rwZoom .3s cubic-bezier(.2,1.2,.3,1) both; }
.rw.fx-flip { animation: rwFlip .3s cubic-bezier(.2,1.5,.4,1) both; }
.rw.fx-stretch { animation: rwStretch .3s cubic-bezier(.2,1.6,.4,1) both; }
.rw.fx-rise { animation: rwRise .28s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes rwPop { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } to { transform: none; } }
@keyframes rwDrop { from { transform: translateY(-70%) scale(1.1); opacity: 0; } 70% { transform: translateY(6%); opacity: 1; } to { transform: none; } }
@keyframes rwSlideL { from { transform: translateX(40%) skewX(-14deg); opacity: 0; filter: blur(4px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes rwSlideR { from { transform: translateX(-40%) skewX(14deg); opacity: 0; filter: blur(4px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes rwZoom { from { transform: scale(2.4); opacity: 0; filter: blur(8px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes rwFlip { from { transform: perspective(400px) rotateX(85deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rwStretch { from { transform: scaleX(1.8) scaleY(.4); opacity: 0; } 60% { transform: scaleX(.92) scaleY(1.12); opacity: 1; } to { transform: none; } }
@keyframes rwRise { from { transform: translateY(70%) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* phrase kinds */
.rw.alt { color: var(--t-ac); }
.rw.num { color: var(--t-ac); font-size: clamp(36px, 10.5vw, 46px); text-shadow: 0 0 18px color-mix(in srgb, var(--t-ac) 60%, transparent); }
.rw.mark { font-size: clamp(34px, 10vw, 44px); padding: .05em .35em; border-radius: 10px; color: #fff; background: linear-gradient(110deg, var(--t-ac) 0 40%, color-mix(in srgb, var(--t-ac) 55%, #fff) 50%, var(--t-ac) 60% 100%); background-size: 250% 100%; box-shadow: 0 6px 22px color-mix(in srgb, var(--t-ac) 55%, transparent); }
[data-level="1"] .rw.mark, [data-level="2"] .rw.mark { animation: rwPop .3s cubic-bezier(.2,1.9,.4,1) both, shine .7s ease-out .15s both; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.rw.eos { position: relative; }
[data-level="1"] .rw.eos::after, [data-level="2"] .rw.eos::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 4px; border-radius: 4px; background: var(--t-ac); transform-origin: left; animation: underline .35s ease-out .1s both; }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* beat: the panel behind the phrase pulses on every phrase */
.captions.rsvp-on .rsvp { position: relative; border-radius: 18px; }
.captions.rsvp-on .rsvp::before { content: ""; position: absolute; inset: -4px 0; border-radius: 18px; background: radial-gradient(60% 80% at 50% 50%, color-mix(in srgb, var(--t-ac) 26%, transparent), transparent 70%); opacity: 0; pointer-events: none; }
.captions.rsvp-on .rsvp.beat::before { animation: beatGlow .45s ease-out; }
@keyframes beatGlow { 0% { opacity: 1; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.12); } }
.captions.jolt { animation: jolt .35s; }
@keyframes jolt { 0%,100% { transform: none; } 20% { transform: translate(-5px, 2px) rotate(-1deg); } 45% { transform: translate(5px,-2px) rotate(1deg); } 70% { transform: translate(-2px, 1px); } }
.stage.bump { animation: stageBump .25s ease-out; }
@keyframes stageBump { 0% { transform: scale(1); } 35% { transform: scale(1.018); } 100% { transform: scale(1); } }
.stage.bump.shake { animation: shake .4s; }

/* review: the full text wipes in */
.captions.rsvp-on.review .caption { animation: wipe .45s cubic-bezier(.3,.8,.3,1) both; }
.captions.rsvp-on.review .caption mark { background-size: 100% 100%; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* chapter banner + shockwave on cut change */
.chbanner { position: absolute; z-index: 4; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: center; pointer-events: none; }
.chbanner span { font-weight: 900; font-size: 34px; color: #fff; background: color-mix(in srgb, var(--t-bg) 30%, #000); padding: 6px 22px; border-radius: 12px; letter-spacing: .04em; box-shadow: 0 10px 30px #0007; animation: banner .85s cubic-bezier(.2,1,.3,1) both; }
.chbanner.hot span { background: var(--t-ac); font-size: 44px; }
@keyframes banner { 0% { transform: translateX(-120%) skewX(-18deg); opacity: 0; } 22% { transform: translateX(4%) skewX(-6deg); opacity: 1; } 32% { transform: none; } 70% { transform: none; opacity: 1; } 100% { transform: translateX(120%) skewX(-18deg); opacity: 0; } }
[data-level="1"] .chbanner span { font-size: 26px; animation-duration: .7s; }
.ring { position: absolute; z-index: 3; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 4px solid var(--t-ac); pointer-events: none; animation: ring .7s ease-out forwards; }
.ring.big { border-width: 7px; animation-duration: .85s; }
@keyframes ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(9); opacity: 0; } }

/* stronger cut transitions (full power) */
.tr-whip { animation: trWhip .38s cubic-bezier(.2,1,.3,1) both; }
.tr-zoomblur { animation: trZoomBlur .45s cubic-bezier(.2,1,.3,1) both; }
.tr-slam { animation: trSlam .45s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes trWhip { from { transform: translateX(-110%) skewX(20deg); filter: blur(10px); opacity: 0; } to { transform: none; filter: none; opacity: 1; } }
@keyframes trZoomBlur { from { transform: scale(.2) rotate(-20deg); filter: blur(12px) saturate(3); opacity: 0; } to { transform: none; filter: none; opacity: 1; } }
@keyframes trSlam { from { transform: translateY(-60%) scale(1.5); opacity: 0; } 60% { transform: translateY(3%) scale(.97); opacity: 1; } to { transform: none; } }

/* speed control */
.rail .speed { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; line-height: 1; font-size: 15px; white-space: nowrap; overflow: hidden; }
.rail .speed b { display: block; font-size: 15px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rail .speed small { display: block; font-size: 8px; font-weight: 800; opacity: .8; letter-spacing: .02em; }
.speedpanel { position: absolute; z-index: 8; right: 66px; bottom: calc(80px + env(safe-area-inset-bottom)); width: min(280px, calc(100% - 90px)); padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--t-bg) 86%, #000); color: var(--t-fg); box-shadow: 0 14px 40px #000a, inset 0 0 0 1px color-mix(in srgb, var(--t-fg) 18%, transparent); animation: popIn .25s cubic-bezier(.2,1.6,.4,1) both; }
.sp-head { font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.sp-head b { font-size: 22px; color: var(--t-ac); margin: 0 2px; }
.sp-row { display: flex; align-items: center; gap: 8px; }
.sp-row button { width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--t-fg) 14%, transparent); font-size: 20px; font-weight: 900; flex: none; }
.sp-range, .speedrange { flex: 1; width: 100%; accent-color: var(--t-ac, #ff2d6f); height: 28px; }
.sp-presets { display: flex; gap: 6px; margin-top: 10px; }
.sp-presets button { flex: 1; padding: 6px 0; border-radius: 8px; background: color-mix(in srgb, var(--t-fg) 10%, transparent); font-size: 12px; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .rw, .chbanner span, .ring, .tr-whip, .tr-zoomblur, .tr-slam, .stage.bump, .captions.jolt { animation-duration: .01s !important; }
}

/* ======================= informative diagrams ======================= */
/* progressive reveal in step with the caption */
.rv { transition: opacity .25s, transform .3s cubic-bezier(.2,1.5,.4,1), filter .25s, box-shadow .25s; }
.rv:not(.on) { animation: none !important; opacity: .12; transform: scale(.94); filter: grayscale(.8); }
.rv.on { opacity: 1; filter: none; animation: rvIn .4s cubic-bezier(.2,1.7,.4,1) both !important; }
@keyframes rvIn { from { transform: scale(.7) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.rv.cur { box-shadow: 0 0 0 2.5px var(--t-ac), 0 8px 22px -6px color-mix(in srgb, var(--t-ac) 60%, transparent); }
.rv.hit { animation: hit .55s ease-out both !important; }
@keyframes hit { 0% { transform: scale(1); } 30% { transform: scale(1.08); box-shadow: 0 0 0 4px var(--t-ac), 0 0 26px var(--t-ac); } 100% { transform: none; } }
[data-level="0"] .rv { animation: none !important; transition: none; }
.node.rv { border-radius: 26px; padding: 4px; }
.node .nn { font-size: 12px; font-weight: 800; color: var(--t-ac); text-align: center; line-height: 1.25; max-width: 130px; }
.c-list .nl small { display: block; font-size: 12px; font-weight: 700; opacity: .75; margin-top: 2px; }
.c-list .row.rv.on .ck { animation: emoIn .35s cubic-bezier(.2,1.8,.4,1) .15s both; }

/* facts card: 誰が / 何を / 結果 */
.c-facts { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 46px 14px 14px; }
.frow { display: grid; grid-template-columns: 34px 58px 1fr; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, var(--t-fg) 8%, transparent); }
.frow .fe { font-size: 24px; text-align: center; }
.frow .fl { font-size: 12px; font-weight: 800; opacity: .7; }
.frow .fn { font-size: 17px; font-weight: 900; line-height: 1.3; word-break: auto-phrase; }

/* claim + reasons */
.c-claim { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 44px 16px 14px; }
.claimbox { display: flex; align-items: center; gap: 10px; padding: 14px 14px; border-radius: 16px; background: var(--t-ac); color: #fff; font-size: 19px; font-weight: 900; line-height: 1.3; word-break: auto-phrase; }
.claimbox .ce { font-size: 30px; }
.because { font-size: 11px; font-weight: 900; opacity: .6; text-align: center; letter-spacing: .1em; }
.reason { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--t-fg) 9%, transparent); font-weight: 800; font-size: 15px; }
.reason span { font-size: 22px; }

/* 2-column table */
.c-table { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 44px 12px 14px; }
.trow { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 12px; background: color-mix(in srgb, var(--t-fg) 7%, transparent); text-align: center; }
.trow.th { background: none; padding: 0 8px; font-size: 12px; }
.trow.th b { font-weight: 900; opacity: .75; }
.trow.th b.hl { color: var(--t-ac); opacity: 1; }
.trow .tl { font-size: 12px; font-weight: 800; opacity: .75; text-align: left; }
.trow .ta { font-size: 16px; font-weight: 800; opacity: .65; }
.trow .tb { font-size: 18px; font-weight: 900; color: var(--t-ac); }

/* stats */
.c-stats { gap: 10px; padding: 44px 12px 14px; flex-wrap: wrap; align-content: center; }
.stat { flex: 1 1 40%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: color-mix(in srgb, var(--t-fg) 8%, transparent); min-width: 0; }
.stat .se { font-size: 26px; }
.stat .sv { font-size: 32px; font-weight: 900; color: var(--t-ac); letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .sl { font-size: 12px; font-weight: 800; opacity: .75; text-align: center; line-height: 1.3; }
.c-stats.n3 .stat { flex-basis: 28%; }
.c-stats.n3 .sv { font-size: 26px; }

/* term card */
.c-term { flex-direction: column; align-items: stretch; justify-content: center; gap: 10px; padding: 44px 16px 14px; }
.c-term .tw { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 900; padding: 10px 14px; border-radius: 14px; background: var(--t-ac); color: #fff; word-break: break-word; }
.c-term .tw span { font-size: 30px; }
.c-term .tm, .c-term .tx { display: flex; gap: 10px; align-items: baseline; font-size: 16px; font-weight: 800; line-height: 1.4; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--t-fg) 8%, transparent); word-break: auto-phrase; }
.c-term .tm b, .c-term .tx b { flex: none; color: var(--t-ac); font-size: 14px; }

/* cause -> result */
.c-cause { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 44px 16px 14px; }
.causes { display: flex; flex-direction: column; gap: 6px; }
.cz { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--t-fg) 9%, transparent); font-weight: 800; font-size: 15px; }
.cz span { font-size: 22px; }
.carrow { text-align: center; color: var(--t-ac); font-size: 20px; line-height: 1; }
.result { padding: 13px 14px; border-radius: 14px; background: var(--t-ac); color: #fff; text-align: center; font-size: 19px; font-weight: 900; }

/* checklist */
.c-check { flex-direction: column; align-items: stretch; justify-content: center; gap: 9px; padding: 44px 14px 14px; }
.cki { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: color-mix(in srgb, var(--t-fg) 9%, transparent); }
.cki .box { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: transparent; box-shadow: inset 0 0 0 2.5px color-mix(in srgb, var(--t-fg) 45%, transparent); font-weight: 900; }
.cki.on .box { background: var(--t-ac); color: #fff; box-shadow: none; animation: emoIn .35s cubic-bezier(.2,1.8,.4,1) .2s both; }
.cki .ce { font-size: 22px; }
.cki .ct { font-weight: 900; font-size: 16px; line-height: 1.3; word-break: auto-phrase; }

/* number with context */
.c-num .nctx { font-size: 13px; font-weight: 800; opacity: .8; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--t-fg) 9%, transparent); }
.c-num .nctx b { color: var(--t-ac); }
.c-flow .node { flex: 1 1 0; min-width: 0; }
/* the node shrinks below the fixed icon size on narrow cards; keep the icon inside it so the .cur ring wraps it */
.c-flow .node .ne { max-width: 100%; height: auto; aspect-ratio: 1; }
.c-flow .node .nl, .c-flow.n3 .node .nl, .c-flow.n4 .node .nl { max-width: none; width: 100%; }
.c-flow.n3 .node .nl { font-size: 13px; }
.c-flow.n4 .node .nl { font-size: 11px; }
.frow { grid-template-columns: 30px 46px minmax(0, 1fr); }
.frow .fn, .c-list .nl, .c-list .nl small, .reason, .cz, .cki .ct, .claimbox, .result, .stat .sl, .trow span { overflow-wrap: anywhere; min-width: 0; }
.c-list .row { min-width: 0; }
.c-list .nl { min-width: 0; flex: 1 1 auto; }

.feedbar { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin: 4px 2px 6px; }
.feedbar button { font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.feeds li.off .fi { opacity: .45; }
.fdel { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 13px; flex: none; }
.fdel:hover { background: #ffffff14; color: var(--fg); }

/* ======================= variety ======================= */
/* -- text modes: karaoke / stack -- */
.kline { display: none; }
.short[data-mode="karaoke"] .captions.rsvp-on .rw, .short[data-mode="stack"] .captions.rsvp-on .rw { display: none; }
.short[data-mode="karaoke"] .captions.rsvp-on .kline, .short[data-mode="stack"] .captions.rsvp-on .kline {
  display: block; width: 100%; min-height: 4.6em; font-size: clamp(22px, 6.2vw, 27px); font-weight: 900; line-height: 1.55; text-align: left;
}
.captions.rsvp-on .rsvp:has(.kline:not(:empty)) { justify-content: flex-start; }
.kline.is-sub { font-size: clamp(19px, 5.4vw, 23px) !important; font-weight: 700 !important; }
.kp { display: inline-block; padding: 0 .08em; margin: 0 .02em; border-radius: 6px; transition: opacity .15s, color .15s, background-color .15s; }
.short[data-mode="karaoke"] .kp { opacity: .28; }
.short[data-mode="karaoke"] .kp.done { opacity: 1; }
.short[data-mode="karaoke"] .kp.now { opacity: 1; background: var(--t-ac); color: #fff; transform: scale(1.06); }
.short[data-mode="karaoke"] .kp.mark.done { color: var(--t-ac); }
.short[data-mode="stack"] .kp:not(.done):not(.now) { display: none; }
.short[data-mode="stack"] .kp.now { color: var(--t-ac); }
.short[data-mode="stack"] .kp.mark { background: var(--t-ac); color: #fff; }
.kp.fx-pop { animation: rwPop .28s cubic-bezier(.2,1.9,.4,1) both; }
.kp.fx-drop { animation: rwDrop .3s cubic-bezier(.2,1.7,.4,1) both; }
.kp.fx-slideL { animation: rwSlideL .24s cubic-bezier(.2,1.4,.4,1) both; }
.kp.fx-slideR { animation: rwSlideR .24s cubic-bezier(.2,1.4,.4,1) both; }
.kp.fx-zoom { animation: rwZoom .3s cubic-bezier(.2,1.2,.3,1) both; }
.kp.fx-flip { animation: rwFlip .3s cubic-bezier(.2,1.5,.4,1) both; }
.kp.fx-stretch { animation: rwStretch .3s cubic-bezier(.2,1.6,.4,1) both; }
.kp.fx-rise { animation: rwRise .28s cubic-bezier(.2,1.6,.4,1) both; }
.modes { flex-wrap: wrap; }
.modes button { flex: 1 1 30%; }

/* -- surprise events -- */
.evchip { background: var(--t-ac); color: #fff; padding: 1px 8px; border-radius: 99px; font-weight: 900; }
.evbanner { position: absolute; z-index: 9; inset: 0; display: grid; place-items: center; pointer-events: none; }
.evbanner span { font-size: clamp(30px, 9vw, 42px); font-weight: 900; color: #fff; padding: 10px 24px; border-radius: 16px; background: var(--t-ac); box-shadow: 0 16px 50px #000a; transform: rotate(-6deg); animation: evIn 1.6s cubic-bezier(.2,1.7,.4,1) both; white-space: nowrap; }
@keyframes evIn { 0% { transform: rotate(-6deg) scale(3); opacity: 0; } 15% { transform: rotate(-6deg) scale(.92); opacity: 1; } 22% { transform: rotate(-6deg) scale(1); } 80% { transform: rotate(-6deg) scale(1); opacity: 1; } 100% { transform: rotate(-6deg) scale(.6) translateY(-40%); opacity: 0; } }
.evbanner.ev-gold span { background: linear-gradient(110deg, #b8860b, #ffd54f 40%, #fff8e1 50%, #ffd54f 60%, #b8860b); color: #3e2700; background-size: 250% 100%; animation: evIn 1.6s cubic-bezier(.2,1.7,.4,1) both, shine 1.2s linear .2s infinite; }
.evbanner.ev-fever span { background: linear-gradient(90deg, #ff5252, #ffd740, #69f0ae, #40c4ff, #e040fb); color: #111; text-shadow: 0 1px 0 #fff8; }
.evbanner.ev-speed span { background: #111; color: #ffd740; font-style: italic; }
.short.ev-fever .stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 3px; z-index: 5; pointer-events: none;
  background: conic-gradient(#ff5252, #ffd740, #69f0ae, #40c4ff, #e040fb, #ff5252);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: hueSpin 2s linear infinite; }
@keyframes hueSpin { to { filter: hue-rotate(360deg); } }
/* fever: text stays in the normal color (readable); the rainbow is a band under the phrase being read; app.js moves it there with --fv-* */
.short.ev-fever .captions.rsvp-on .rsvp::after { content: ""; position: absolute; left: var(--fv-x, 0); top: var(--fv-y, 0); width: var(--fv-w, 0); opacity: var(--fv-o, 0); transition: left .18s ease-out, top .18s ease-out, width .18s ease-out; height: 5px; border-radius: 5px; background: linear-gradient(90deg, #ff5252, #ffd740, #69f0ae, #40c4ff, #e040fb); animation: hueSpin 2s linear infinite; pointer-events: none; }
.short.ev-gold .stage { box-shadow: 0 0 0 3px #ffb300, 0 0 40px #ffb30088, 0 18px 50px -18px #000c; }
.short.ev-gold .stage::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: linear-gradient(110deg, transparent 40%, #fff8 50%, transparent 60%); background-size: 250% 100%; animation: shine 2.4s linear infinite; }
/* gold: text stays in the normal color; gold lives in the frame and a soft glow behind it */
.short.ev-gold .captions.rsvp-on .rsvp::after { content: ""; position: absolute; inset: 10% 6%; border-radius: 14px; background: radial-gradient(60% 70% at 50% 50%, #ffb30033, transparent 70%); pointer-events: none; z-index: -1; }
.short.ev-speed .bars i { background: #ffd740 !important; }

/* -- style skins: font, texture and how text and emphasis look -- */
.short { --font: inherit; }
.short .rw, .short .kline, .short .caption, .short .hook, .short .chbanner span, .short .cut { font-family: var(--font); }

/* 赤ペン先生: notebook paper, hand lettering, red circles */
.short[data-style="akapen"] { --font: "Yomogi", "Zen Maru Gothic", sans-serif; background: repeating-linear-gradient(transparent 0 31px, #c9d6e6 31px 32px), var(--t-bg); }
.short[data-style="akapen"] .rw.mark, .short[data-style="akapen"] .kp.mark { background: none; color: #e53935; box-shadow: none; border: 3px solid #e53935; border-radius: 52% 46% 55% 48%; transform: rotate(-2deg); }
.short[data-style="akapen"] .rw.eos::after { background: #e53935; height: 3px; border-radius: 0; transform: rotate(-1deg); }
.short[data-style="akapen"] .stage { border: 2px solid #2b2b2b22; }

/* 製図: blueprint grid, dashed parts */
.short[data-style="blueprint"] { --font: "Zen Kaku Gothic New", sans-serif;
  background: linear-gradient(#ffffff14 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, #ffffff14 1px, transparent 1px) 0 0 / 24px 24px, var(--t-bg); }
.short[data-style="blueprint"] .cut [class*="row"], .short[data-style="blueprint"] .reason, .short[data-style="blueprint"] .cz, .short[data-style="blueprint"] .cki, .short[data-style="blueprint"] .stat, .short[data-style="blueprint"] .node .ne { outline: 1.5px dashed #ffffff88; outline-offset: -3px; }
.short[data-style="blueprint"] .rw.mark, .short[data-style="blueprint"] .kp.mark { background: transparent; color: #ffd54f; box-shadow: none; outline: 2px dashed #ffd54f; outline-offset: 2px; }
.short[data-style="blueprint"] .rw { letter-spacing: .04em; }

/* 雑誌: big serif, black blocks */
.short[data-style="magazine"] { --font: "Shippori Mincho B1", serif; }
.short[data-style="magazine"] .rw { font-size: clamp(34px, 10vw, 44px); letter-spacing: -.02em; }
.short[data-style="magazine"] .rw.mark, .short[data-style="magazine"] .kp.mark { background: #fff; color: #111; border-radius: 0; box-shadow: 6px 6px 0 var(--t-ac); }
.short[data-style="magazine"] .chbanner span { border-radius: 0; font-style: italic; background: #fff; color: #111; box-shadow: 8px 8px 0 var(--t-ac); }

/* マンガ: halftone, speech bubbles, star bursts */
.short[data-style="manga"] { --font: "Mochiy Pop One", sans-serif; background: radial-gradient(circle, #0000001c 1.3px, transparent 1.6px) 0 0 / 9px 9px, var(--t-bg); }
.short[data-style="manga"] .rw { background: #fff; color: #111; border: 3px solid #111; border-radius: 999px; padding: .12em .7em; box-shadow: 4px 4px 0 #111; }
.short[data-style="manga"] .rw.mark, .short[data-style="manga"] .kp.mark { background: #ffeb3b; color: #111; border: 3px solid #111; border-radius: 6px; box-shadow: 5px 5px 0 #111; transform: rotate(-3deg); }
.short[data-style="manga"] .captions.rsvp-on .rsvp::before { background: repeating-conic-gradient(from 0deg, #0000 0 7deg, #00000014 7deg 9deg); opacity: .9; }
.short[data-style="manga"] .chbanner span { background: #111; transform: skewX(-12deg); }

/* スイス: strict grid, red bar, left aligned */
.short[data-style="swiss"] { --font: "Zen Kaku Gothic New", sans-serif; }
.short[data-style="swiss"] .captions.rsvp-on .rsvp { justify-content: flex-start; border-left: 8px solid var(--t-ac); padding-left: 14px; border-radius: 0; }
.short[data-style="swiss"] .rw { letter-spacing: -.03em; }
.short[data-style="swiss"] .rw[class*="fx-"] { animation: swissIn .22s cubic-bezier(.7,0,.3,1) both; }
@keyframes swissIn { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.short[data-style="swiss"] .rw.mark, .short[data-style="swiss"] .kp.mark { border-radius: 0; box-shadow: none; }
.short[data-style="swiss"] .stage { border-radius: 0; }

/* 取扱説明書: caution tape emphasis, boxed lines */
.short[data-style="manual"] { --font: "Zen Kaku Gothic New", sans-serif; }
.short[data-style="manual"] .rw { border: 2px solid currentColor; padding: .05em .5em; border-radius: 4px; }
.short[data-style="manual"] .rw::before { content: "▶ "; font-size: .6em; vertical-align: .25em; color: var(--t-ac); }
.short[data-style="manual"] .rw.mark, .short[data-style="manual"] .kp.mark { background: repeating-linear-gradient(-45deg, #ffd600 0 10px, #ffeb3b 10px 20px); color: #111; box-shadow: none; border: 2px solid #111; border-radius: 4px; }

/* 8bit: dot font, scanlines, typed-in text */
.short[data-style="pixel"] { --font: "DotGothic16", monospace; }
.short[data-style="pixel"] .stage::before { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: repeating-linear-gradient(#0000002e 0 1px, transparent 1px 3px); }
.short[data-style="pixel"] .rw[class*="fx-"], .short[data-style="pixel"] .kp[class*="fx-"] { animation: pxType .28s steps(6) both !important; }
@keyframes pxType { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.short[data-style="pixel"] .rw::after { content: "▌"; margin-left: .1em; animation: blink .5s steps(1) infinite; color: var(--t-ac); }
@keyframes blink { 50% { opacity: 0; } }
.short[data-style="pixel"] .rw.mark, .short[data-style="pixel"] .kp.mark { border-radius: 0; box-shadow: 4px 4px 0 #000; }
.short[data-style="pixel"] .stage, .short[data-style="pixel"] .chbanner span { border-radius: 0; }

/* 動物園マップ: round letters, bouncy */
.short[data-style="zoo"] { --font: "Zen Maru Gothic", sans-serif; background: radial-gradient(circle at 20% 80%, #ffffff55 0 40px, transparent 41px), radial-gradient(circle at 80% 20%, #ffffff44 0 60px, transparent 61px), var(--t-bg); }
.short[data-style="zoo"] .rw[class*="fx-"] { animation: zooBounce .45s cubic-bezier(.2,2.2,.4,1) both; }
@keyframes zooBounce { from { transform: translateY(-40%) scale(.6); opacity: 0; } 60% { transform: translateY(6%) scale(1.05); opacity: 1; } to { transform: none; } }
.short[data-style="zoo"] .rw.mark, .short[data-style="zoo"] .kp.mark { border-radius: 999px; padding: .05em .6em; }
.short[data-style="zoo"] .rw.eos::after { left: 35%; right: 35%; height: 6px; border-radius: 6px; }

/* ネオン: glow, flicker-on */
.short[data-style="neon"] { --font: "RocknRoll One", sans-serif; background: radial-gradient(120% 60% at 50% 100%, color-mix(in srgb, var(--t-ac) 18%, transparent), transparent 70%), var(--t-bg); }
.short[data-style="neon"] .rw { text-shadow: 0 0 6px var(--t-ac), 0 0 18px var(--t-ac), 0 0 34px color-mix(in srgb, var(--t-ac) 60%, transparent); }
.short[data-style="neon"] .rw[class*="fx-"], .short[data-style="neon"] .kp[class*="fx-"] { animation: neonOn .5s linear both; }
@keyframes neonOn { 0% { opacity: 0; } 10% { opacity: 1; } 16% { opacity: .15; } 26% { opacity: 1; } 32% { opacity: .35; } 42%, 100% { opacity: 1; } }
.short[data-style="neon"] .rw.mark, .short[data-style="neon"] .kp.mark { background: transparent; color: #fff; box-shadow: 0 0 0 2px var(--t-ac), 0 0 22px var(--t-ac), inset 0 0 16px var(--t-ac); }
.short[data-style="neon"] .stage { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--t-ac) 70%, transparent), 0 0 30px color-mix(in srgb, var(--t-ac) 30%, transparent); }

/* 黒板: chalk letters on slate */
.short[data-style="chalk"] { --font: "Yomogi", sans-serif; background: radial-gradient(circle at 30% 20%, #ffffff0d, transparent 50%), radial-gradient(circle at 70% 80%, #ffffff0a, transparent 45%), var(--t-bg); }
.short[data-style="chalk"] .rw, .short[data-style="chalk"] .kline { text-shadow: 0 0 1px #fff, 0 0 3px #ffffff66; letter-spacing: .03em; }
.short[data-style="chalk"] .rw[class*="fx-"] { animation: chalkWrite .4s steps(8) both; }
@keyframes chalkWrite { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.short[data-style="chalk"] .rw.mark, .short[data-style="chalk"] .kp.mark { background: none; color: #ffe066; box-shadow: none; text-decoration: underline wavy #ffe066 2px; text-underline-offset: 6px; }

.meta { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.meta > span { flex: none; }
.meta .chip { flex: 0 1 auto; }

.rail .snd { font-size: 20px; }
.rail .snd.on { background: color-mix(in srgb, var(--t-ac) 35%, transparent); }

/* ---------- icons (Lucide) ---------- */
.ic { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; }
.pic { color: var(--t-ac); }
.numpic { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: .35em; background: var(--t-ac); color: #fff; font-size: .8em; font-weight: 900; line-height: 1; }
.rail button .ic { width: 24px; height: 24px; }
.rail .like.on .ic { fill: currentColor; }
.rail .save.on .ic { fill: currentColor; }
.rail .snd .ic { width: 22px; height: 22px; }
.paused-ind .ic { width: 34px; height: 34px; fill: currentColor; }
.heart .ic { width: 90px; height: 90px; color: #ff2d6f; fill: #ff2d6f; filter: drop-shadow(0 6px 16px #0006); }
.evchip .ic, .evbanner .ic, .keybadge .ic, .verdict .ic, .tip .ic { margin-right: .3em; }
.evchip { display: inline-flex; align-items: center; }
.combo { display: inline-flex; align-items: center; gap: 2px; }
.fdel .ic { width: 16px; height: 16px; }
.cki .box .ic { width: 16px; height: 16px; }
.c-list .ck .ic { width: 18px; height: 18px; }
.arrow.big .ic { width: 44px; height: 44px; }
/* pictograms inside diagrams take the size their emoji had */
.cut .emo .ic { width: 1em; height: 1em; stroke-width: 1.6; }
.cut .emo.xl .ic { filter: drop-shadow(0 10px 18px #0004); }
.node .ne .ic { width: .82em; height: .82em; }
.c-list .ne .ic, .frow .fe .ic, .reason > span .ic, .cz > span .ic, .cki .ce .ic, .stat .se .ic, .claimbox .ce .ic, .c-term .tw > span .ic, .choice .ne .ic { width: .9em; height: .9em; }
.claimbox .ce, .c-term .tw > span { color: #fff; }
.claimbox .ce .pic, .c-term .tw .pic { color: #fff; }
.hook .em .ic { width: 1.05em; height: 1.05em; margin-right: 2px; }
.saved .thumb .ic { width: 30px; height: 30px; }

/* ---------- title card (first cut) ---------- */
.c-title { flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding: 22px 20px; text-align: left;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--t-ac) 28%, transparent), transparent 60%); }
.c-title .tsrc { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--t-fg) 10%, transparent); max-width: 100%; }
.c-title .tsrc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-title .tsrc .ic { width: 14px; height: 14px; color: var(--t-ac); }
.c-title .tpic .ic { width: 64px; height: 64px; stroke-width: 1.6; color: var(--t-ac); animation: emoIn .5s cubic-bezier(.2,1.8,.4,1) .1s both; }
.c-title .tpic .numpic { font-size: 40px; }
.c-title .thook { font-size: clamp(26px, 7.4vw, 32px); font-weight: 900; line-height: 1.3; letter-spacing: -.01em; word-break: auto-phrase;
  animation: rwPop .45s cubic-bezier(.2,1.7,.4,1) .15s both; }
.c-title .ttags { display: flex; flex-wrap: wrap; gap: 6px; }
.c-title .ttags span { font-size: 12px; font-weight: 800; color: var(--t-ac); }
.captions.is-title .caption { font-size: clamp(17px, 4.8vw, 20px); line-height: 1.5; }
.captions.is-title .sub { min-height: 0; font-weight: 800; color: var(--t-ac); opacity: 1; }
.c-title .tsrc { max-width: calc(100% - 52px); }
.short.holding { touch-action: none; }

/* ---------- first-visit tour ---------- */
.tour { position: fixed; inset: 0; z-index: 50; animation: tourIn .3s ease-out both; pointer-events: none; }
.tour-block, .tour-card { pointer-events: auto; }
.tour.leaving { animation: tourOut .25s ease-in both; pointer-events: none; }
@keyframes tourIn { from { opacity: 0; } }
@keyframes tourOut { to { opacity: 0; } }
.tour-block { position: absolute; inset: 0; background: #07070cdd; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tour.spotlit .tour-block { background: #07070cc4; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tour-spot { position: absolute; pointer-events: none; box-shadow: 0 0 0 3px var(--yellow), 0 0 0 8px #ffd60a44; animation: spotPulse 1.4s ease-in-out infinite; transition: all .3s cubic-bezier(.2,1,.3,1); }
@keyframes spotPulse { 50% { box-shadow: 0 0 0 3px var(--yellow), 0 0 0 14px #ffd60a00; } }
.tour-card {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 32px), 380px); padding: 20px 20px 16px; border-radius: 22px;
  background: var(--panel); border: 1px solid #ffffff1a; box-shadow: 0 24px 60px #000a;
  text-align: center; animation: cardIn .4s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(.96); } }
.tour-card.center { top: 50%; transform: translate(-50%, -50%); }
@keyframes cardInC { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }
.tour-card.center { animation-name: cardInC; }
.tour-card.top-right { top: calc(var(--hud-h) + env(safe-area-inset-top) + 18px); }
.tour-card.float-top { top: 30%; }
.tour-card h2 { margin: 6px 0 8px; font-size: 22px; line-height: 1.35; font-weight: 900; letter-spacing: -.01em; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tour-card h2 .ic { width: 22px; height: 22px; color: var(--pink); }
.tour-card p { margin: 0 0 10px; color: #d4d4d8; font-size: 14px; line-height: 1.7; }
.tour-card kbd { font: inherit; font-size: 12px; background: #ffffff1a; border: 1px solid #ffffff2a; border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; }
.tour-card .k { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #ffffff14; vertical-align: middle; margin: 0 2px; }
.tour-card .k .ic { width: 17px; height: 17px; }
.tour-logo { font-weight: 900; font-size: 30px; letter-spacing: -.03em; margin: 4px 0 2px; }
.tour-logo b { color: var(--pink); }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 9px; background: #ffffff2a; transition: all .3s; }
.tour-dots i.past { background: #ffffff70; }
.tour-dots i.on { width: 20px; background: var(--pink); }
.tour-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tour-acts .btn { flex: 1; max-width: 200px; margin-left: auto; padding: 12px 18px; font-size: 15px; }
.tour-skip { color: var(--muted); font-size: 14px; font-weight: 700; padding: 10px 6px; }
.tour-foot { font-size: 11px !important; color: var(--muted) !important; margin: 12px 0 0 !important; }

/* swipe demo: a small phone whose cards slide up under a finger */
.tour-phone { position: relative; width: 112px; height: 178px; margin: 6px auto 10px; border-radius: 22px; border: 3px solid #ffffff38; overflow: hidden; background: #000; }
.tp-track { position: absolute; inset: 0; animation: tpTrack 2.6s cubic-bezier(.6,0,.2,1) infinite; }
.tp-card { position: absolute; left: 0; right: 0; height: 100%; padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.tp-card.a { top: 0; background: linear-gradient(160deg, #ff2d6f, #7b2dff); }
.tp-card.b { top: 100%; background: linear-gradient(160deg, #00b4d8, #2dffb0); }
.tp-card i { width: 34px; height: 34px; border-radius: 50%; background: #fff8; margin: 0 auto 4px; }
.tp-card b { height: 8px; border-radius: 9px; background: #fffd; }
.tp-card b.s { width: 60%; margin: 0 auto; background: #fff8; }
@keyframes tpTrack { 0%, 30% { transform: translateY(0); } 62%, 100% { transform: translateY(-100%); } }
.tp-hand { position: absolute; left: 50%; top: 64%; width: 38px; height: 38px; margin-left: -10px; color: #fff; filter: drop-shadow(0 3px 6px #000c); animation: tpHand 2.6s cubic-bezier(.6,0,.2,1) infinite; }
.tp-hand .ic { width: 100%; height: 100%; fill: #ffffff30; }
@keyframes tpHand { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 30% { transform: translateY(0) scale(.92); } 62% { transform: translateY(-62px) scale(.92); opacity: 1; } 78%, 100% { transform: translateY(-62px); opacity: 0; } }
.tour-try { display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--yellow) !important; font-weight: 800; font-size: 13px !important; animation: tryBob 1.2s ease-in-out infinite; }
.tour-try .ic { width: 18px; height: 18px; }
@keyframes tryBob { 50% { transform: translateY(-4px); } }
.tour-ok { display: none; align-items: center; justify-content: center; gap: 6px; color: #7cff6b !important; font-weight: 900; font-size: 18px !important; animation: okPop .4s cubic-bezier(.2,1.6,.4,1); }
.tour-ok .ic { width: 22px; height: 22px; }
.tour-card.did .tour-try { display: none; }
.tour-card.did .tour-ok { display: flex; }
@keyframes okPop { from { transform: scale(.4); opacity: 0; } }

/* home screen demo: the app icon pops into a grid of icons */
.tour-home { display: grid; grid-template-columns: repeat(4, 40px); gap: 12px; justify-content: center; padding: 14px; margin: 4px auto 8px; width: max-content; border-radius: 20px; background: linear-gradient(160deg, #2a2a40, #15151f); }
.tour-home span { width: 40px; height: 40px; border-radius: 11px; background: #ffffff1c; }
.tour-home .me { background: var(--pink); display: grid; place-items: center; animation: homePop 2.4s cubic-bezier(.2,1.5,.4,1) infinite; box-shadow: 0 0 0 0 #ff2d6f88; }
.tour-home .me svg { width: 40px; height: 40px; }
@keyframes homePop { 0%, 15% { transform: scale(0); } 35% { transform: scale(1); box-shadow: 0 0 0 0 #ff2d6f88; } 60% { box-shadow: 0 0 0 12px #ff2d6f00; } 100% { transform: scale(1); } }
.tour-how { list-style: none; counter-reset: how; padding: 0; margin: 4px 0 6px; text-align: left; display: grid; gap: 8px; }
.tour-how li { counter-increment: how; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; background: #0006; border-radius: 14px; padding: 10px 12px 10px 40px; position: relative; font-size: 14px; line-height: 1.5; }
.tour-how li::before { content: counter(how); position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 900; font-size: 12px; display: grid; place-items: center; }
.tour-how small { flex-basis: 100%; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.tour-how small .ic { width: 14px; height: 14px; }
.tour-install { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; }
.tour-install .ic { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .tp-track, .tp-hand, .tour-home .me, .tour-try, .tour-spot { animation: none !important; } }

/* ---------- AI disclosure & report ---------- */
.meta .aichip { border: 1px solid color-mix(in srgb, var(--t-fg) 40%, transparent); border-radius: 6px; padding: 0 5px; font-size: 10px; font-weight: 800; letter-spacing: .02em; opacity: .8; }
.ainote { font-size: 11px; line-height: 1.6; opacity: .7; margin: 16px auto 0; max-width: 320px; }
/* kept in the bottom-left corner, away from the centre/right where people tap through cuts */
.end > .report { position: absolute; left: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px 8px; color: inherit; opacity: .55; font-weight: 700; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.sheet.report h2 { font-size: 17px; margin: 2px 2px 0; }
.sheet.report #reportFor { margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kinds { display: grid; gap: 2px; margin-bottom: 10px; }
.kinds label { display: flex; gap: 10px; align-items: center; padding: 9px 4px; font-size: 14px; border-top: 1px solid var(--line); }
.kinds label:first-child { border-top: 0; }
.kinds input { accent-color: var(--pink); width: 18px; height: 18px; margin: 0; }
#reportNote { width: 100%; min-height: 76px; resize: vertical; background: #0006; border: 1px solid var(--line); color: var(--fg); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; }
#reportRights a { color: var(--pink); }
.report-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.report-btns .ghost { padding: 11px 18px; border-radius: 12px; font-weight: 800; color: var(--muted); border: 1px solid var(--line); }

/* home step on iOS: an arrow at the edge of the page, pointing at the browser's own share / page menu button */
.tour-arrow { position: absolute; z-index: 2; pointer-events: none; color: var(--yellow); filter: drop-shadow(0 2px 8px #0009); }
.tour-arrow .ic { width: 44px; height: 44px; stroke-width: 2.6; }
.tour-arrow[data-at="bottom-center"] { left: 50%; bottom: calc(env(safe-area-inset-bottom) + 6px); translate: -50% 0; animation: arrowDown 1s ease-in-out infinite; }
/* Safari 26 (iPhone): the page menu button sits at the left end of the address bar, about 28% across */
.tour-arrow[data-at="bottom-address"] { left: 28%; bottom: calc(env(safe-area-inset-bottom) + 6px); translate: -50% 0; animation: arrowDown 1s ease-in-out infinite; }
.tour-arrow[data-at="top-right"] { right: 18px; top: calc(env(safe-area-inset-top) + 6px); animation: arrowUp 1s ease-in-out infinite; }
@keyframes arrowDown { 50% { transform: translateY(8px); } }
@keyframes arrowUp { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .tour-arrow { animation: none !important; } }
.tour-warn { color: var(--yellow) !important; font-weight: 800; }
.tour-copy { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 9px 16px; border-radius: 12px; font-weight: 800; font-size: 14px; color: #fff; background: #ffffff14; border: 1px solid #ffffff2a; }
.tour-copy .ic { width: 16px; height: 16px; }
