:root {
  --ink: #07080a;
  --ink2: #101216;
  --bone: #e8e2d0;
  --bone-dim: #8f8a7c;
  --blood: #ff2a3d;
  --secret: #bfe3ff;
  --scream: #ff2a3d;
  --noise: #d6ff3d;
  --paper: #d9d2bf;
  --paper-ink: #16140f;
  --mono: "Space Mono", ui-monospace, monospace;
  --type: "Special Elite", "Courier New", monospace;
  --marker: "Permanent Marker", cursive;
  --black: "UnifrakturMaguntia", serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--bone); }
body { font-family: var(--mono); overscroll-behavior: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

#sea { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; cursor: crosshair; }
#sea.hovering { cursor: pointer; }

/* ---------- texture layers ---------- */
.grain, .scan, .vignette { position: fixed; inset: -50%; pointer-events: none; z-index: 2; }
.grain {
  opacity: .16; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -.35'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .7s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}
.scan { inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.vignette { inset: 0; background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 45%, rgba(0,0,0,.85) 100%); }

/* ---------- masthead ---------- */
.mast { position: fixed; top: max(18px, env(safe-area-inset-top)); left: 22px; z-index: 5; pointer-events: none; user-select: none; }
.title { margin: 0; font-family: var(--black); font-weight: 400; font-size: clamp(44px, 7vw, 96px); line-height: .85; color: var(--bone); letter-spacing: .01em; }
.glitch { position: relative; display: inline-block; filter: url(#rough); }
.glitch::before, .glitch::after { content: attr(data-t); position: absolute; inset: 0; pointer-events: none; }
.glitch::before { color: var(--blood); mix-blend-mode: screen; transform: translate(2px, 0); clip-path: inset(0 0 60% 0); animation: gl1 4.2s infinite steps(1); opacity: .8; }
.glitch::after { color: var(--secret); mix-blend-mode: screen; transform: translate(-2px, 0); clip-path: inset(55% 0 0 0); animation: gl2 5.3s infinite steps(1); opacity: .6; }
@keyframes gl1 { 0%,92% { transform: translate(2px,0); } 93% { transform: translate(-7px,2px); clip-path: inset(20% 0 50% 0); } 95% { transform: translate(5px,-1px); } 97%,100% { transform: translate(2px,0); } }
@keyframes gl2 { 0%,88% { transform: translate(-2px,0); } 89% { transform: translate(8px,1px); clip-path: inset(70% 0 5% 0); } 91% { transform: translate(-4px,0); } 93%,100% { transform: translate(-2px,0); } }
.tag { line-height: 1.45; margin: 10px 0 0 4px; font-family: var(--type); font-size: 14px; color: var(--bone-dim); letter-spacing: .04em; }
.tag em { font-style: normal; color: var(--bone); background: linear-gradient(transparent 55%, rgba(255,42,61,.45) 55% 88%, transparent 88%); }

.count { position: fixed; top: max(24px, env(safe-area-inset-top)); right: 22px; z-index: 5; text-align: right; font-family: var(--type); color: var(--bone-dim); font-size: 12px; text-transform: lowercase; line-height: 1.1; pointer-events: none; }
.count b { display: block; font-family: var(--marker); font-weight: 400; font-size: 34px; color: var(--bone); transform: rotate(-3deg); }

.tide-btn { position: fixed; right: 22px; top: calc(max(24px, env(safe-area-inset-top)) + 70px); z-index: 5; display: flex; align-items: center; gap: 9px; padding: 8px 12px; font-family: var(--type); font-size: 13px; color: var(--bone); border: 1px dashed rgba(232,226,208,.4); background: rgba(7,8,10,.5); transform: rotate(1.5deg); }
.tide-btn .dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--bone); }
.tide-btn.on { border-style: solid; border-color: var(--secret); color: var(--secret); }
.tide-btn.on .dot { background: var(--secret); box-shadow: 0 0 12px var(--secret); animation: pulse 1.2s infinite; }
.tide-btn:hover { border-color: var(--bone); }
@keyframes pulse { 50% { opacity: .3; } }

.about-btn { position: fixed; left: 22px; bottom: calc(22px + var(--safe-b)); z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(232,226,208,.35); font-family: var(--marker); font-size: 20px; color: var(--bone-dim); background: rgba(7,8,10,.5); }
.about-btn:hover { color: var(--bone); border-color: var(--bone); }

/* ---------- deck ---------- */
.deck { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 12px; user-select: none; -webkit-user-select: none; }
.kinds { display: flex; gap: 6px; }
.kind { position: relative; isolation: isolate; white-space: nowrap; padding: 7px 12px 6px; font-family: var(--type); font-size: 13px; color: var(--paper-ink); opacity: .45; transition: opacity .2s, transform .2s; }
.kind::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper); filter: url(#torn); }
.kind:nth-child(1) { transform: rotate(-2deg); } .kind:nth-child(2) { transform: rotate(1.5deg); } .kind:nth-child(3) { transform: rotate(-1deg); }
.kind:hover { opacity: .75; }
.kind.on { opacity: 1; }
.kind.on[data-kind="secret"]::before { background: var(--secret); }
.kind.on[data-kind="scream"]::before { background: var(--scream); }
.kind.on[data-kind="scream"] { color: #0b0000; }
.kind.on[data-kind="noise"]::before { background: var(--noise); }
.kind.on::after { content: ""; position: absolute; left: 50%; top: -7px; width: 28px; height: 11px; transform: translateX(-50%) rotate(-4deg); background: rgba(232,226,208,.55); }

.recwrap { position: relative; width: 132px; height: 132px; }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); pointer-events: none; }
.ring-bg { fill: none; stroke: rgba(232,226,208,.12); stroke-width: 2; stroke-dasharray: 3 5; }
.ring-fg { fill: none; stroke: var(--blood); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; filter: drop-shadow(0 0 6px var(--blood)); }
.rec { position: absolute; inset: 14px; border-radius: 50%; display: grid; place-items: center; touch-action: none; -webkit-touch-callout: none; }
.rec-core { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #ff6a74, var(--blood) 45%, #7a0010 100%); box-shadow: 0 0 0 3px rgba(0,0,0,.6), 0 0 30px rgba(255,42,61,.35), inset 0 -6px 14px rgba(0,0,0,.45); filter: url(#rough); transition: transform .15s; }
.rec:hover .rec-core { box-shadow: 0 0 0 3px rgba(0,0,0,.6), 0 0 44px rgba(255,42,61,.6), inset 0 -6px 14px rgba(0,0,0,.45); }
.rec-lbl { position: relative; font-family: var(--marker); font-size: 15px; line-height: .95; color: #1a0003; text-align: center; transform: rotate(-6deg); pointer-events: none; }
.rec.live .rec-core { transform: scale(.9); animation: throb .5s infinite alternate; }
.rec.live .rec-lbl { color: var(--bone); }
.rec.wait .rec-core { filter: url(#rough) grayscale(.8) brightness(.6); }
@keyframes throb { to { box-shadow: 0 0 0 3px rgba(0,0,0,.6), 0 0 70px rgba(255,42,61,.85), inset 0 -6px 14px rgba(0,0,0,.45); } }

.disguise { display: flex; align-items: center; gap: 4px; font-family: var(--type); font-size: 12px; }
.dz-l { color: var(--bone-dim); margin-right: 3px; }
.dz { padding: 3px 7px; color: var(--bone-dim); border-bottom: 1px solid transparent; }
.dz:hover { color: var(--bone); }
.dz.on { color: var(--bone); border-bottom-color: var(--blood); }

/* ---------- paper scraps ---------- */
.scrap, .found { background: var(--paper); color: var(--paper-ink); font-family: var(--type); box-shadow: 0 18px 50px rgba(0,0,0,.7); position: relative; }
.scrap::before, .found::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3'/><feColorMatrix values='0 0 0 0 .1  0 0 0 0 .08  0 0 0 0 .05  0 0 0 .55 -.1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); mix-blend-mode: multiply; }
.scrap::after, .found::after { content: ""; position: absolute; top: -12px; left: 50%; width: 86px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(232,226,208,.5); box-shadow: 0 1px 2px rgba(0,0,0,.3); }

.proof { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(4,5,6,.55); backdrop-filter: blur(2px); }
.scrap { width: min(360px, calc(100vw - 32px)); padding: 26px 22px 18px; transform: rotate(-1.2deg); animation: drop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes drop { from { transform: translateY(30px) rotate(4deg); opacity: 0; } }
.scrap-h { font-size: 17px; margin-bottom: 10px; }
.scrap-h b { font-family: var(--marker); font-weight: 400; font-size: 22px; }
.wave { display: block; width: 100%; height: auto; margin: 6px 0 12px; }
.row { display: flex; gap: 8px; justify-content: space-between; }
.btn { font-family: var(--type); font-size: 14px; padding: 9px 12px; border: 1.5px solid var(--paper-ink); color: var(--paper-ink); }
.btn.ghost:hover { background: rgba(22,20,15,.08); }
.btn.throw { display: block; width: 100%; margin-top: 12px; padding: 13px; background: var(--paper-ink); color: var(--paper); font-family: var(--marker); font-size: 20px; letter-spacing: .02em; transform: rotate(.6deg); }
.btn.throw:hover { background: #000; color: #fff; }
.btn.throw:disabled { opacity: .5; cursor: wait; }
.fine { font-size: 11px; opacity: .65; margin: 10px 0 0; text-align: center; }

.found { position: fixed; z-index: 7; width: 300px; max-width: calc(100vw - 32px); padding: 18px 16px 14px; transform: rotate(1deg); animation: drop .3s cubic-bezier(.2,1.4,.4,1); }
.found-kind { font-family: var(--marker); font-size: 22px; }
.found-meta { font-size: 12px; opacity: .7; margin: -4px 0 10px; }
.found .x { position: absolute; top: 6px; right: 8px; font-size: 16px; color: var(--paper-ink); opacity: .6; z-index: 1; }
.found .x:hover { opacity: 1; }
.btn.report { font-size: 12px; border-style: dashed; opacity: .7; }
.btn.report:hover { opacity: 1; color: #a0000f; border-color: #a0000f; }
.btn.report.done { opacity: .4; pointer-events: none; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: 50%; z-index: 20; transform: translate(-50%, -50%) rotate(-2deg); max-width: min(420px, calc(100vw - 40px)); padding: 14px 18px; background: var(--ink); color: var(--bone); border: 2px solid var(--bone); font-family: var(--type); font-size: 15px; line-height: 1.4; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s; box-shadow: 6px 6px 0 var(--blood); }
.toast.show { opacity: 1; pointer-events: auto; }
.toast.bad { border-color: var(--blood); }
.toast b { font-family: var(--marker); font-weight: 400; color: var(--blood); display: block; font-size: 18px; margin-bottom: 4px; }

/* ---------- about ---------- */
.about { border: 0; padding: 0; background: transparent; max-width: min(520px, calc(100vw - 32px)); color: var(--paper-ink); }
.about::backdrop { background: rgba(4,5,6,.75); }
.about-in { background: var(--paper); padding: 28px 26px 22px; font-family: var(--type); font-size: 15px; line-height: 1.5; transform: rotate(-.8deg); position: relative; }
.about-in h2 { margin: 0 0 12px; font-family: var(--black); font-weight: 400; font-size: 38px; line-height: 1; }
.about-in ol { padding-left: 20px; margin: 0 0 14px; }
.about-in li { margin-bottom: 6px; }
.scrawl { font-family: var(--marker); font-size: 17px; line-height: 1.3; transform: rotate(-1deg); color: #7a0010; }
.legend { font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-left: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.lg.secret { background: var(--secret); } .lg.scream { background: var(--scream); } .lg.noise { background: var(--noise); }

@media (max-width: 640px) {
  .mast { left: 16px; }
  .tag { font-size: 12px; max-width: 58vw; }
  .count { right: 16px; }
  .count b { font-size: 26px; }
  .tide-btn { right: 16px; top: calc(max(24px, env(safe-area-inset-top)) + 58px); font-size: 12px; padding: 6px 9px; }
  .about-btn { left: 16px; }
  .recwrap { width: 116px; height: 116px; }
  .kind { font-size: 12px; padding: 6px 8px 5px; white-space: nowrap; }
  .sound-btn { left: auto !important; right: 16px; }
  .found { left: 16px !important; right: 16px; width: auto; top: auto !important; bottom: calc(250px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .glitch::before, .glitch::after { animation: none; }
}


/* =================== 3D / intro layer =================== */
.grain, .scan, .vignette { display: none; }
#sea { touch-action: none; }

/* UI waits until you're in the water */
.mast, .count, .tide-btn, .about-btn, .deck { transition: opacity 1.2s ease, transform 1.2s cubic-bezier(.2,.9,.2,1); }
body:not(.entered) .mast, body:not(.entered) .count, body:not(.entered) .tide-btn,
body:not(.entered) .about-btn, body:not(.entered) .deck { opacity: 0; pointer-events: none; }
body:not(.entered) .deck { transform: translate(-50%, 40px); }
body:not(.entered) .mast { transform: translateY(-20px); }
body.entered .count { transition-delay: .3s; } body.entered .tide-btn { transition-delay: .5s; }
body.entered .deck { transition-delay: .15s; } body.entered .about-btn { transition-delay: .7s; }

.intro { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(3,4,5,.55), rgba(3,4,5,.1) 70%, transparent); }
body.entering .intro { animation: tearOut 1.1s steps(9) forwards; pointer-events: none; }
@keyframes tearOut {
  0% { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
  20% { clip-path: inset(10% 0 30% 0); transform: translateX(-12px) skewX(8deg); }
  40% { clip-path: inset(40% 0 5% 0); transform: translateX(18px); filter: hue-rotate(90deg); }
  60% { clip-path: inset(0 0 60% 0); transform: translateX(-6px) scaleY(1.3); opacity: .7; }
  80% { clip-path: inset(48% 0 48% 0); transform: scaleX(1.4); opacity: .5; }
  100% { opacity: 0; clip-path: inset(50% 0 50% 0); visibility: hidden; }
}
.intro-top { font-family: var(--type); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--bone-dim); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; animation: rise 1.4s .2s both; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blood); box-shadow: 0 0 12px var(--blood); animation: pulse 1.1s infinite; }
.intro-title { margin: 0; font-family: var(--black); font-weight: 400; font-size: clamp(76px, 17vw, 230px); line-height: .8; color: var(--bone); text-shadow: 0 0 40px rgba(232,226,208,.25), 0 0 120px rgba(191,227,255,.15); animation: flickerIn 2.2s .4s both; }
@keyframes flickerIn { 0% { opacity: 0; filter: blur(12px); letter-spacing: .2em; } 30% { opacity: .2; } 34% { opacity: .9; } 36% { opacity: .1; } 55% { opacity: 1; filter: blur(0); } 60% { opacity: .5; } 64%,100% { opacity: 1; letter-spacing: .01em; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.intro-sub { font-family: var(--type); font-size: clamp(15px, 2vw, 19px); line-height: 1.6; color: var(--bone); margin: 22px 0 30px; max-width: 520px; animation: rise 1.4s 1.3s both; }
.intro-sub span { color: var(--bone-dim); font-size: .85em; }
.enter { position: relative; font-family: var(--marker); font-size: clamp(20px, 3vw, 26px); color: var(--ink); padding: 16px 38px 14px; animation: rise 1.2s 1.8s both; isolation: isolate; transform: rotate(-1.5deg); }
.enter::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bone); filter: url(#torn); transition: background .2s; }
.enter::after { content: ""; position: absolute; inset: -10px; z-index: -2; border: 1px solid rgba(232,226,208,.35); animation: breathe 2.4s infinite; }
.enter:hover::before { background: var(--blood); }
.enter:hover { color: #0b0000; }
@keyframes breathe { 50% { inset: -18px; opacity: 0; } }
.intro-fine { margin-top: 26px; font-family: var(--type); font-size: 12px; letter-spacing: .12em; color: var(--bone-dim); animation: rise 1.2s 2.2s both; }

.intro-sub b { color: var(--blood); font-weight: 400; background: linear-gradient(transparent 60%, rgba(255,42,61,.25) 60%); }
.steps { list-style: none; display: flex; gap: clamp(6px, 2.5vw, 26px); padding: 14px clamp(10px, 3vw, 26px) 12px; margin: -6px 0 28px; animation: rise 1.2s 1.6s both; background: rgba(3,4,5,.72); border: 1px solid rgba(232,226,208,.22); box-shadow: 0 10px 40px rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.steps li + li { border-left: 1px dashed rgba(232,226,208,.2); }
.steps li { position: relative; font-family: var(--type); font-size: 13px; line-height: 1.3; color: var(--bone); text-align: center; width: clamp(92px, 24vw, 132px); padding: 25px 4px 0; }
.steps li b { font-family: var(--marker); font-weight: 400; color: var(--blood); margin-right: 5px; font-size: 15px; }
.steps i { position: absolute; left: 50%; top: 0; transform: translateX(-50%); display: grid; place-items: center; width: 26px; height: 26px; font-style: normal; }
.st-rec { border-radius: 50%; background: radial-gradient(circle at 38% 32%, #ff6a74, var(--blood) 50%, #7a0010); box-shadow: 0 0 14px rgba(255,42,61,.6); }
.st-throw { color: var(--bone); font-size: 30px; line-height: 1; }
.st-light { border-radius: 50%; background: radial-gradient(circle, #fff 0 12%, var(--secret) 22%, rgba(191,227,255,.2) 50%, transparent 70%); animation: pulse 1.6s infinite; }

.coach { position: fixed; z-index: 7; pointer-events: none; color: var(--bone); font-family: var(--marker); font-size: 18px; line-height: 1.05; text-shadow: 0 2px 10px #000, 0 0 2px #000; transition: opacity .6s; animation: rise .8s both; }
.coach svg { width: 54px; height: 54px; fill: none; stroke: var(--bone); stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 1px 4px #000); }
.coach.fade { opacity: 0; }
.coach-sea { left: 0; top: 0; display: flex; align-items: flex-start; transform-origin: 100% 100%; }
.coach-sea span { transform: rotate(-5deg); margin-top: -6px; }
.coach-rec { left: 50%; bottom: calc(52px + var(--safe-b)); margin-left: -236px; display: flex; align-items: center; }
.coach-rec svg { transform: rotate(-35deg); }
.coach-rec span { transform: rotate(-4deg); color: #ff8a93; }
@media (max-width: 640px) {
  .steps li { font-size: 11px; }
  .coach { font-size: 15px; }
  .coach-rec { margin-left: -172px; bottom: calc(74px + var(--safe-b)); font-size: 14px; }
  .steps li { width: 30vw; }
  .coach-rec svg, .coach-sea svg { width: 42px; height: 42px; }
}

.hover-tag { position: fixed; left: 0; top: 0; z-index: 6; pointer-events: none; background: var(--paper); color: var(--paper-ink); font-family: var(--type); font-size: 13px; padding: 3px 8px; box-shadow: 0 6px 18px rgba(0,0,0,.5); white-space: nowrap; }
.empty-msg { position: fixed; left: 50%; top: 58%; transform: translate(-50%, -50%); z-index: 4; text-align: center; pointer-events: none; color: var(--bone); animation: rise 1.5s both; }
.empty-msg b { display: block; font-family: var(--marker); font-weight: 400; font-size: clamp(20px, 3vw, 28px); text-shadow: 0 0 20px rgba(0,0,0,.9); }
.empty-msg span { font-family: var(--type); font-size: 14px; color: var(--bone-dim); }
.mast { text-shadow: 0 2px 20px rgba(0,0,0,.8); }
@media (max-width: 640px) { .empty-msg { top: 52%; width: 90vw; } }


/* =================== letters =================== */
.modes { display: flex; gap: 2px; padding: 3px; border: 1px solid rgba(232,226,208,.25); background: rgba(3,4,5,.6); font-family: var(--type); font-size: 13px; }
.mode { padding: 5px 14px; color: var(--bone-dim); }
.mode:hover { color: var(--bone); }
.mode.on { background: var(--bone); color: var(--ink); }
.mode[data-mode="voice"].on { background: var(--blood); color: #0b0000; }
body:not(.mode-voice) .rec-lbl { font-size: 16px; }
.st-letter { color: var(--bone); font-size: 24px; line-height: 1; }

.writer .scrap { width: min(440px, calc(100vw - 28px)); }
#letterText { display: block; width: 100%; min-height: 140px; resize: none; border: 0; outline: 0; padding: 12px 10px; margin: 4px 0 6px;
  font-family: var(--type); font-size: 18px; line-height: 1.5; color: var(--paper-ink);
  background: repeating-linear-gradient(transparent 0 26px, rgba(22,20,15,.16) 26px 27px); background-attachment: local; }
#letterText::placeholder { color: rgba(22,20,15,.38); font-style: italic; }
.writer-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; opacity: .7; margin-bottom: 10px; }
#letterCount.low { color: #a0000f; opacity: 1; font-weight: bold; }
.writer .row { justify-content: flex-end; }

.found-text { margin: 8px 0 12px; font-family: var(--type); font-size: 17px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; max-height: 44vh; overflow-y: auto; }
.found-text[data-cursor="1"]::after { content: "▍"; animation: pulse .8s infinite; color: #a0000f; }
.found { width: 340px; }
@media (max-width: 640px) { #letterText { font-size: 16px; min-height: 120px; } .found-text { font-size: 15px; } }

.credit-intro { position: absolute; bottom: calc(10px + var(--safe-b)); left: 16px; right: 16px; margin: 0; font-family: var(--type); font-size: 10px; color: var(--bone-dim); opacity: .45; }
.credit { position: fixed; right: 14px; bottom: calc(6px + var(--safe-b)); z-index: 5; margin: 0; max-width: 260px; text-align: right; font-family: var(--type); font-size: 9.5px; line-height: 1.3; color: var(--bone-dim); opacity: .35; pointer-events: none; transition: opacity 1.2s; }
body:not(.entered) .credit { opacity: 0; }
@media (max-width: 900px) { .credit { display: none; } }

.steps i { width: 22px; height: 22px; }
.st-letter, .st-throw { font-size: 21px; }


/* =================== drifting along the wide sea =================== */
#sea.dragging { cursor: grabbing; }
.pan { position: fixed; top: 52%; z-index: 5; width: 44px; height: 64px; transform: translateY(-50%); font-family: var(--type); font-size: 38px; line-height: 1; color: var(--bone); opacity: .55; text-shadow: 0 0 14px #000; transition: opacity .3s; }
.pan:hover { opacity: 1; }
.pan-l { left: 6px; } .pan-r { right: 6px; }
.pan.off { opacity: 0; pointer-events: none; }
.drift { position: fixed; left: 50%; top: max(20px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; transition: opacity 1.2s .9s; }
.drift-bar { position: relative; width: 120px; height: 1px; background: rgba(232,226,208,.3); }
.drift-bar i { position: absolute; top: -3px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 8px var(--bone); transition: left .15s linear; }
.drift-lbl { font-family: var(--type); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--bone-dim); }
body:not(.entered) .pan, body:not(.entered) .drift { opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .drift { top: auto; bottom: calc(262px + var(--safe-b)); } .pan { top: 48%; } }
