/* Sat-Link, the call app (call.html). A phone screen: full height on a phone, a phone-shaped column on a desktop. */
body.callapp { margin: 0; min-height: 100dvh; background: #050806; color: #eef3ef; font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; display: flex; justify-content: center; -webkit-font-smoothing: antialiased; }
.ca { position: relative; width: 100%; max-width: 440px; height: 100dvh; overflow: hidden; background: #0b100d; }
@media (min-width: 600px) and (min-height: 700px) {
  body.callapp { align-items: center; }
  .ca { height: min(900px, 94dvh); border-radius: 38px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 10px #151a17, 0 0 0 11px #2a312c; }
}

/* screens */
.ca__home, .ca__call, .ca__ended { position: absolute; inset: 0; display: none; }
.ca[data-screen="home"] .ca__home { display: flex; }
.ca[data-screen="call"] .ca__call { display: block; }
.ca[data-screen="ended"] .ca__ended { display: flex; }

/* the video: soft, a little grain and vignette, graded for the time of day */
.ca__video { position: absolute; inset: 0; display: none; background: #000; overflow: hidden; }
.ca[data-screen="call"] .ca__video, .ca[data-screen="ended"] .ca__video { display: block; }
.ca__video canvas { width: 100%; height: 100%; display: block; filter: saturate(1.06) contrast(1.04); }
.ca__video.is-golden canvas { filter: sepia(0.16) saturate(1.2) contrast(1.03); }
.ca__video.is-dawn canvas { filter: saturate(0.85) hue-rotate(-8deg) contrast(1.04); }
.ca__video.is-night canvas { filter: saturate(0.72) contrast(1.08); }
.ca.is-weak .ca__video canvas { image-rendering: pixelated; filter: saturate(0.8) contrast(1.12); }
.ca__grain { position: absolute; inset: -10%; opacity: 0.08; mix-blend-mode: overlay; pointer-events: none; animation: ca-grain 0.45s steps(3) infinite; }
.ca.is-weak .ca__grain { opacity: 0.16; }
@keyframes ca-grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } }
.ca__vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 42%, transparent 55%, rgba(0, 0, 0, 0.45)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ca__grain { animation: none; } }

/* home: the contact */
.ca__home { flex-direction: column; gap: 16px; padding: calc(26px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom)); background: radial-gradient(120% 60% at 50% 0%, #1b3325, #0b100d 70%); overflow-y: auto; }
.ca__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; }
.ca__brand small { font-weight: 500; font-size: 0.68rem; color: #9fb3a6; border: 1px solid #2f4236; border-radius: 999px; padding: 2px 8px; }
.ca__logo { color: #3ddc84; }
.ca__lede { margin: -8px 0 0; color: #9fb3a6; font-size: 0.9rem; }
.ca__card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.ca__avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; background: #1d2a22; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.35); }
.ca__who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ca__who b { font-size: 1.05rem; }
.ca__who span { color: #cfe0d4; font-size: 0.86rem; }
.ca__who small { color: #8ea596; font-size: 0.76rem; line-height: 1.35; }
.ca__doing { color: #b9d3c1 !important; }
.ca__pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: #9fb3a6; }
.ca__pick select { font: inherit; font-size: 0.86rem; color: #eef3ef; background: #16211b; border: 1px solid #2f4236; border-radius: 10px; padding: 6px 10px; }
.ca__dial { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; border: 0; border-radius: 999px; background: #3ddc84; color: #062112; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; box-shadow: 0 10px 30px rgba(61, 220, 132, 0.25); }
.ca__dial:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.ca__dial:not(:disabled):hover { background: #52e896; }
.ca__note { margin: 0; color: #8ea596; font-size: 0.78rem; line-height: 1.45; }
.ca__links { display: flex; gap: 6px; align-items: center; justify-content: center; color: #6f8577; font-size: 0.8rem; }
.ca__links a, .ca__links button { color: #b9d3c1; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.ca__links a:hover, .ca__links button:hover { color: #fff; }

/* the call: top bar, your (camera-off) tile, captions, the typed line, the controls */
.ca__top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; padding: calc(14px + env(safe-area-inset-top)) 18px 34px; background: linear-gradient(rgba(0, 0, 0, 0.55), transparent); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.ca__top b { display: block; font-size: 1.15rem; }
.ca__top span { font-size: 0.78rem; color: #d7e2da; font-variant-numeric: tabular-nums; }
.ca__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ca__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.ca__bars i { width: 3px; border-radius: 1px; background: rgba(255, 255, 255, 0.3); }
.ca__bars i:nth-child(1) { height: 4px; } .ca__bars i:nth-child(2) { height: 6px; } .ca__bars i:nth-child(3) { height: 9px; } .ca__bars i:nth-child(4) { height: 12px; }
.ca__bars[data-n="1"] i:nth-child(-n+1), .ca__bars[data-n="2"] i:nth-child(-n+2), .ca__bars[data-n="3"] i:nth-child(-n+3), .ca__bars[data-n="4"] i { background: #fff; }
.ca__bars[data-n="1"] i:nth-child(-n+1) { background: #ff8a80; }
.ca__self { position: absolute; top: calc(74px + env(safe-area-inset-top)); right: 14px; z-index: 3; width: 82px; height: 114px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; box-sizing: border-box; border-radius: 14px; background: rgba(20, 27, 23, 0.85); border: 1px solid rgba(255, 255, 255, 0.12); color: #9fb3a6; text-align: center; }
.ca__self span { font-size: 1.2rem; opacity: 0.6; }
.ca__self small { font-size: 0.62rem; line-height: 1.25; }
.ca__weak { position: absolute; top: calc(78px + env(safe-area-inset-top)); left: 14px; z-index: 3; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #ffd28a; font-size: 0.72rem; }
.ca__captions { position: absolute; left: 14px; right: 14px; bottom: calc(112px + env(safe-area-inset-bottom)); z-index: 3; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.ca.is-typing .ca__captions { bottom: calc(168px + env(safe-area-inset-bottom)); }
.ca__cap { margin: 0; max-width: 86%; padding: 7px 11px; border-radius: 14px; background: rgba(0, 0, 0, 0.58); font-size: 0.92rem; line-height: 1.35; transition: opacity 0.6s; }
.ca__cap--them { align-self: flex-start; }
.ca__cap--you { align-self: flex-end; background: rgba(61, 220, 132, 0.3); }
.ca__cap--sys { align-self: center; max-width: 94%; font-size: 0.78rem; color: #ffe3e4; background: rgba(229, 72, 77, 0.32); text-align: center; }
.ca__cap.is-old { opacity: 0.35; }
.ca__typed { position: absolute; left: 12px; right: 12px; bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 4; display: flex; gap: 8px; }
.ca__typed input { flex: 1; min-width: 0; padding: 11px 15px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(10, 14, 12, 0.8); color: #fff; font: inherit; font-size: 16px; backdrop-filter: blur(8px); }
.ca__typed input:focus { outline: none; border-color: rgba(61, 220, 132, 0.7); }
.ca__typed button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #3ddc84; color: #062112; font-size: 1rem; cursor: pointer; }
.ca__controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: space-around; padding: 14px 26px calc(20px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); }
.ca__ctl { width: 64px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.ca__ctl span { font-size: 1.35rem; line-height: 1; }
.ca__ctl small { font-size: 0.6rem; }
.ca__ctl:hover { background: rgba(255, 255, 255, 0.24); }
.ca__ctl.is-on { background: #fff; color: #111; }
.ca__ctl.is-off { background: rgba(229, 72, 77, 0.38); }
.ca__ctl--end, .ca__ctl--end:hover { background: #e5484d; }
.ca__ctl:focus-visible, .ca__dial:focus-visible { outline: 2px solid #3ddc84; outline-offset: 3px; }

/* ringing: their photo, blurred behind their face, until they pick up */
.ca__ringing { position: absolute; inset: 0; z-index: 5; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; overflow: hidden; background: #0b100d; }
.ca.is-ringing .ca__ringing { display: flex; }
.ca__ringbg { position: absolute; inset: -40px; background-size: cover; background-position: center 20%; filter: blur(28px) brightness(0.5) saturate(1.1); }
.ca__ringface { position: relative; width: 132px; height: 132px; border-radius: 50%; object-fit: cover; animation: ca-pulse 1.6s ease-out infinite; }
@keyframes ca-pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); } 100% { box-shadow: 0 0 0 26px rgba(61, 220, 132, 0); } }
.ca__ringing b { position: relative; font-size: 1.6rem; }
.ca__ringing span { position: relative; color: #cfe0d4; font-size: 0.86rem; }

/* after the call: the last frame, dimmed */
.ca__ended { z-index: 7; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(5, 8, 6, 0.72); backdrop-filter: blur(6px); cursor: pointer; text-align: center; padding: 24px; }
.ca__ended b { font-size: 1.3rem; }
.ca__ended span { color: #cfe0d4; font-variant-numeric: tabular-nums; max-width: 30ch; line-height: 1.4; }

/* the game's video mode (engine/client/ui/video-call.js): the same call screen over the game's own canvas */
.ca.ca--game { position: fixed; inset: 0; z-index: 40; width: auto; max-width: none; height: auto; background: transparent; border-radius: 0; box-shadow: none; pointer-events: none; }
.ca.ca--game[hidden] { display: none; }
.ca--game .ca__call { display: block; }
.ca--game .ca__top, .ca--game .ca__self, .ca--game .ca__typed, .ca--game .ca__controls, .ca--game .ca__ringing, .ca--game .ca__weak { pointer-events: auto; }
.ca--game .ca__controls { justify-content: center; gap: 22px; }
.ca__fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
body.is-video #game { filter: saturate(1.06) contrast(1.04); }
body.is-video.is-video-dark #game { filter: saturate(0.75) contrast(1.08); }
body.is-video.is-video-weak #game { image-rendering: pixelated; filter: saturate(0.8) contrast(1.12); }
.ca__ctl--field { background: rgba(61, 220, 132, 0.3); }
.ca__ctl--field:hover { background: rgba(61, 220, 132, 0.45); }
.ca__mission { color: #d7c28a !important; }

/* the talk button: hands-free (a tap switches to hold to talk) or hold to talk (press and hold); the pill switches back */
.ca__ctl--talk { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ca__ctl--talk.is-talking, .ca__ctl--talk.is-talking:hover { background: #3ddc84; color: #062112; }
.ca__mode { display: block; width: max-content; margin-top: 6px; padding: 3px 9px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; background: rgba(0, 0, 0, 0.35); color: #d7e2da; font: 600 0.66rem var(--font-body, system-ui, sans-serif); cursor: pointer; }
.ca__mode:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
/* five controls now (Mute, Talk, Type, Field or Play, End): smaller circles and a tighter gap on a phone so the row never overflows */
.ca__ctl small { text-align: center; line-height: 1.1; }
@media (max-width: 480px) {
  .ca__ctl { width: 56px; height: 56px; }
  .ca__controls { padding-left: 12px; padding-right: 12px; }
  .ca--game .ca__controls { gap: 10px; }
}

/* call gestures and things near her (engine/client/ui/call-gestures.js, call-life.js): a hand over the lens, and the ✨ tray */
.ca__cover { position: absolute; inset: -10%; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 55%, #6b4a3a 0%, #4a3128 45%, #22150f 100%); filter: blur(18px); transition: opacity 0.05s linear; }
.ca__ctl--moves.is-on { background: #ffd66b; color: #2a2006; }
/* the 🙂 Emotes button: the game's poses and emotes menu (#emotes, game.css .emotes) lifted out of the hidden HUD and
   over the call screen, above the call's buttons, while it is open (core/game.js showEmotes) */
.ca__ctl--emotes.is-on { background: #ffd66b; color: #2a2006; }
.emotes.emotes--call { position: fixed; bottom: calc(108px + env(safe-area-inset-bottom)); z-index: 45; max-height: 56vh; overflow-y: auto; }
.ca__tray { position: absolute; left: 50%; bottom: calc(108px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 7; width: min(560px, calc(100% - 24px)); max-height: 52vh; overflow-y: auto; padding: 10px 12px 12px; border-radius: 18px; background: rgba(12, 16, 14, 0.78); backdrop-filter: blur(12px); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.ca__tray h4 { margin: 6px 4px 6px; font: 700 0.7rem var(--font-body, system-ui, sans-serif); letter-spacing: 0.06em; text-transform: uppercase; color: #cfe0d4; }
.ca__moves { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.ca__move { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 64px; padding: 8px 4px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; }
.ca__move span { font-size: 1.35rem; line-height: 1; }
.ca__move small { font-size: 0.66rem; line-height: 1.15; text-align: center; }
.ca__move:hover { background: rgba(255, 255, 255, 0.22); }
.ca__move:focus-visible { outline: 2px solid #3ddc84; outline-offset: 2px; }
.ca__moves--auto { margin-top: 8px; grid-template-columns: 1fr; }
.ca__moves--auto .ca__move { flex-direction: row; justify-content: center; gap: 8px; min-height: 40px; }
.ca__move.is-on { background: rgba(61, 220, 132, 0.32); }
.ca__none { grid-column: 1 / -1; margin: 2px 4px; font-size: 0.75rem; color: #b9c8be; }
.ca--game .ca__tray { pointer-events: auto; }
/* six controls with ✨ Moves: smaller again on a narrow phone */
@media (max-width: 420px) {
  .ca__ctl { width: 50px; height: 50px; }
  .ca__ctl span { font-size: 1.15rem; }
  .ca--game .ca__controls { gap: 6px; }
  .ca__tray { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* a selfie together on a call (call-gestures.js selfie_together): the countdown, the flash and the picture to keep */
.ca__count { position: absolute; left: 50%; top: 38%; z-index: 5; transform: translate(-50%, -50%); font: 800 clamp(4rem, 18vw, 9rem)/1 var(--font-body, system-ui, sans-serif); color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55); pointer-events: none; }
.ca__count.is-pop { animation: ca-count 0.8s ease-out; }
@keyframes ca-count { from { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-50%, -50%) scale(1); opacity: 0.9; } }
.ca__flash { position: absolute; inset: 0; z-index: 6; background: #fff; opacity: 0; pointer-events: none; }
.ca__flash.is-on { animation: ca-flash 0.6s ease-out; }
@keyframes ca-flash { from { opacity: 0.95; } to { opacity: 0; } }
.ca__polaroid { position: absolute; right: 14px; top: calc(160px + env(safe-area-inset-top)); z-index: 7; width: 132px; padding: 7px 7px 22px; background: #fbfaf6; border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); transform: rotate(3deg); cursor: pointer; text-decoration: none; }
.ca__polaroid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #222; }
.ca__polaroid span { position: absolute; left: 7px; right: 7px; bottom: 4px; font: 600 0.62rem var(--font-body, system-ui, sans-serif); color: #3a3a3a; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__polaroid.is-in { animation: ca-pol 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes ca-pol { from { transform: rotate(-8deg) scale(0.4) translateY(60px); opacity: 0; } to { transform: rotate(3deg) scale(1); opacity: 1; } }
.ca--game .ca__polaroid { pointer-events: auto; }

/* the ✨ tray's tabs: Gestures, Faces, Near her */
.ca__tabs { position: sticky; top: -10px; z-index: 1; display: flex; gap: 6px; margin: -2px -4px 8px; padding: 2px 4px 8px; background: rgba(12, 16, 14, 0.92); }
.ca__tab { flex: 1; padding: 8px 6px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #d7e2da; font: 700 0.72rem var(--font-body, system-ui, sans-serif); cursor: pointer; white-space: nowrap; }
.ca__tab:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.ca__tab.is-on { background: #fff; color: #111; }
.ca__tab:focus-visible { outline: 2px solid #3ddc84; outline-offset: 2px; }
.ca__moves[hidden] { display: none; }

/* tap to point (call-tap.js): the picture takes a tap; a ripple where it lands; a little menu beside it */
.ca__tap { position: absolute; inset: 0; z-index: 2; cursor: crosshair; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ca--game .ca__tap, .ca--game .ca__tapmenu { pointer-events: auto; }
.ca__ripple { position: absolute; z-index: 3; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 50%; pointer-events: none; animation: ca-ripple 0.65s ease-out forwards; }
@keyframes ca-ripple { to { transform: scale(4); opacity: 0; } }
.ca__tapmenu { position: absolute; z-index: 8; min-width: 180px; max-width: 260px; padding: 8px; border-radius: 14px; background: rgba(12, 16, 14, 0.86); backdrop-filter: blur(12px); color: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); display: flex; flex-direction: column; gap: 4px; }
.ca__tapmenu b { padding: 4px 6px 6px; font: 700 0.78rem var(--font-body, system-ui, sans-serif); color: #e8f2ea; }
.ca__tapmenu button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.1); color: #fff; font: 600 0.8rem var(--font-body, system-ui, sans-serif); text-align: left; cursor: pointer; }
.ca__tapmenu button:hover { background: rgba(255, 255, 255, 0.22); }
.ca__tapmenu button:focus-visible { outline: 2px solid #3ddc84; outline-offset: 2px; }
.ca__tapmenu button span { font-size: 1.05rem; }

/* ---- the sketchbook (engine/client/ui/sketchpad.js, docs/41 section 14): a page of her field sketchbook over the
   call, the picture moved aside (game.js shifts the camera's view) so Base still sees her; one page, wiped for each drawing */
.ca { --skw: min(62vw, 1040px, calc((100vh - 376px) * 1.4286 + 44px)); }
.sk { position: absolute; z-index: 8; left: 18px; top: 104px; bottom: calc(112px + env(safe-area-inset-bottom)); width: max(420px, var(--skw)); pointer-events: auto; font-family: var(--font-body, system-ui, sans-serif); }
.sk[hidden] { display: none; }
.sk.is-in { animation: sk-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
@keyframes sk-in { from { transform: translateY(24px) rotate(-1.5deg) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.sk__book { position: relative; height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px 10px; border-radius: 16px; background: linear-gradient(160deg, #3d5a4a, #2c4236); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.06); transform: rotate(-0.6deg); }
.sk__rings { position: absolute; top: -9px; left: 8%; right: 8%; display: flex; justify-content: space-between; pointer-events: none; }
.sk__rings i { width: 10px; height: 22px; border-radius: 6px; background: linear-gradient(90deg, #8f959c, #e9edf0 45%, #8f959c); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4); }
.sk__paper { position: relative; flex: 1; min-height: 0; border-radius: 4px 4px 8px 8px; background: #fbf6e9; box-shadow: inset 0 0 40px rgba(160, 120, 60, 0.18); overflow: hidden; }
.sk__head { position: absolute; left: 14px; right: 14px; top: 6px; height: 30px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #3b3a42; font: 600 clamp(1.05rem, 1.9vw, 1.6rem)/1.1 'Caveat', 'Segoe Print', cursive; pointer-events: none; }
.sk__head b { flex: 0 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 2px solid rgba(214, 65, 46, 0.5); }
.sk__head span { flex: 0 3 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72em; color: #8a7a66; }
.sk__sheets { position: absolute; background-color: #fdf9ef; background-image: linear-gradient(rgba(110, 145, 190, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 145, 190, 0.13) 1px, transparent 1px); background-size: 5% 7.142857%; }
.sk__sheet { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk__sheet[hidden] { display: none; }
.sk__line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sk__line--ghost { opacity: 0.35; }
.sk__wash { opacity: 0; mix-blend-mode: multiply; }
.sk__words { font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive; font-weight: 600; }
.sk__sheet--html { box-sizing: border-box; padding: 3% 6%; overflow: auto; color: #3b3a42; font: 600 clamp(1.05rem, 2.2vw, 1.9rem)/1.28 'Caveat', 'Segoe Print', cursive; }
.sk__sheet--html h3 { display: none; }
.sk__sheet--html ul { margin: 0; padding: 0; list-style: none; }
.sk__sheet--html li { display: flex; gap: 0.5em; align-items: baseline; }
.sk__sheet--html li i { font-style: normal; width: 1em; flex: 0 0 auto; color: #8a7a66; opacity: 0; transition: opacity 0.2s; }
.sk__sheet--html li.is-written i { opacity: 1; }
.sk__sheet--html li.is-done span { color: #8a8c94; }
.sk__sheet--html li.is-done.is-written span { text-decoration: line-through; text-decoration-color: rgba(214, 65, 46, 0.7); }
.sk__sheet--html li.is-done i { color: #3a9a48; }
.sk__sheet--html li.is-now { color: #d6412e; }
.sk__sheet--html li.is-now i { color: #ef8a22; }
.sk__pen { position: absolute; touch-action: none; cursor: crosshair; }
.sk__empty { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: rgba(59, 58, 66, 0.45); font: 600 clamp(1rem, 1.8vw, 1.5rem) 'Caveat', 'Segoe Print', cursive; pointer-events: none; }
.sk__pencil { position: absolute; width: 36px; height: 36px; transform: translate(-3px, -32px); pointer-events: none; filter: drop-shadow(1px 3px 2px rgba(0, 0, 0, 0.3)); transition: left 0.03s linear, top 0.03s linear; z-index: 2; }
.sk__pencil svg { width: 100%; height: 100%; }
.sk__status { position: absolute; left: 10px; bottom: 8px; display: flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border-radius: 999px; background: rgba(59, 58, 66, 0.82); color: #fbf6e9; font-size: 0.82rem; pointer-events: none; z-index: 3; }
.sk__status img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #6a6a70; }
.sk__status span::after { content: ''; display: inline-block; width: 1.1em; text-align: left; animation: sk-dots 1.2s steps(4) infinite; }
@keyframes sk-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.sk__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 2px 2px 0; }
.sk__asks, .sk__pens, .sk__acts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sk__acts { margin-left: auto; }
.sk__asks button { display: flex; align-items: center; gap: 5px; padding: 6px 11px; border: 0; border-radius: 999px; background: rgba(251, 246, 233, 0.16); color: #fbf6e9; font: 600 0.8rem var(--font-body, system-ui, sans-serif); cursor: pointer; }
.sk__asks button:hover, .sk__tool:hover { background: rgba(251, 246, 233, 0.3); }
/* the 🖋️ Detailed switch: on, it glows like a lit pencil */
.sk__asks .sk__detail[aria-pressed="true"] { background: rgba(255, 208, 120, 0.34); box-shadow: inset 0 0 0 1.5px #ffd078; color: #fff8e4; }
/* the drawing style (sketch-styles.js): one button, a small menu of media over the tools */
.sk__asks .sk__stylebtn { box-shadow: inset 0 0 0 1.5px rgba(251, 246, 233, 0.35); }
.sk__asks .sk__stylebtn i { font-style: normal; font-size: 0.7em; opacity: 0.75; }
.sk__asks .sk__stylebtn[aria-expanded="true"] { background: #fbf6e9; color: #2c4236; }
.sk__styles { position: absolute; left: 10px; right: 10px; bottom: 54px; z-index: 5; display: flex; flex-direction: column; gap: 6px; max-height: 58%; padding: 8px 8px 9px; border-radius: 12px; background: rgba(34, 52, 42, 0.97); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: #fbf6e9; font: 600 0.78rem var(--font-body, system-ui, sans-serif); animation: sk-pop 0.18s ease-out; }
.sk__styles[hidden] { display: none; }
.sk__stylehead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.sk__stylehead b { font-size: 0.8rem; }
.sk__stylehead button { padding: 5px 10px; border: 0; border-radius: 999px; background: #3a9a48; color: #fff; font: inherit; cursor: pointer; }
.sk__stylegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 4px; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.sk__stylegrid button { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 5px 8px; border: 0; border-radius: 8px; background: rgba(251, 246, 233, 0.1); color: inherit; font: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sk__stylegrid button span { flex: 0 0 auto; font-size: 1rem; }
.sk__stylegrid button:hover { background: rgba(251, 246, 233, 0.24); }
.sk__stylegrid button.is-on { background: #fbf6e9; color: #2c4236; }
/* a page in a style: its own paper covers the book's squared one; a dark paper lays colour on as it is */
.sk__sheet--svg.is-dark .sk__wash { mix-blend-mode: normal; }
.sk__sheet--svg[data-medium="pixel"] .sk__words { font-family: ui-monospace, 'Courier New', monospace; font-weight: 700; }
.sk__sheet--svg[data-medium="blueprint"] .sk__words, .sk__sheet--svg[data-medium="magicscreen"] .sk__words { font-family: 'Courier New', ui-monospace, monospace; }
.sk__sheet--svg[data-medium="graffiti"] .sk__words, .sk__sheet--svg[data-medium="popart"] .sk__words { font-family: Impact, 'Arial Black', sans-serif; font-weight: 400; }
.sk__ink { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(251, 246, 233, 0.5); background: var(--ink); cursor: pointer; padding: 0; }
.sk__ink.is-on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); transform: scale(1.12); }
.sk__tool { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(251, 246, 233, 0.16); color: #fbf6e9; font-size: 1rem; cursor: pointer; }
.sk__tool.is-on { background: #fbf6e9; color: #2c4236; }
.sk__tool--close { background: rgba(229, 72, 77, 0.55); }
.sk button:focus-visible { outline: 2px solid #3ddc84; outline-offset: 2px; }
/* the guessing game (ui/sketch-guess.js): its row takes the asks' place; the answer pops across the page */
.sk.is-game .sk__asks, .sk.is-game [data-tool="clear"] { display: none; }
.sk__game { flex: 1 1 100%; display: flex; flex-direction: column; gap: 5px; color: #fbf6e9; font: 600 0.8rem var(--font-body, system-ui, sans-serif); }
.sk__game[hidden] { display: none; }
.sk__gtop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sk__gtop b { font-size: 0.9rem; }
.sk__gtop span { opacity: 0.8; }
.sk__gtop .sk__ghint { opacity: 1; color: #f2c225; }
.sk__grow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.sk__gform { display: flex; gap: 4px; }
.sk__gform[hidden] { display: none; }
.sk__gform input { width: 9.5em; padding: 6px 11px; border: 0; border-radius: 999px; background: #fbf6e9; color: #3b3a42; font: 600 0.82rem var(--font-body, system-ui, sans-serif); }
.sk__gform input:focus { outline: 2px solid #f2c225; }
.sk__gform button, .sk__gchoices button, .sk__gacts button { padding: 6px 11px; border: 0; border-radius: 999px; background: rgba(251, 246, 233, 0.16); color: #fbf6e9; font: 600 0.8rem var(--font-body, system-ui, sans-serif); cursor: pointer; }
.sk__gform button { background: #3a9a48; }
.sk__gchoices { display: flex; flex-wrap: wrap; gap: 5px; }
.sk__gchoices button { background: rgba(242, 194, 37, 0.3); animation: sk-pop 0.3s ease-out both; }
.sk__gchoices button:nth-child(2) { animation-delay: 0.06s; }
.sk__gchoices button:nth-child(3) { animation-delay: 0.12s; }
.sk__gchoices button:nth-child(4) { animation-delay: 0.18s; }
.sk__gform button:hover, .sk__gchoices button:hover, .sk__gacts button:hover { filter: brightness(1.25); }
.sk__gsaid { font-style: italic; opacity: 0.9; }
.sk__gsaid.is-in { animation: sk-pop 0.3s ease-out; }
.sk__gacts { display: flex; gap: 5px; margin-left: auto; }
.sk__gacts button[hidden] { display: none; }
.sk__gacts button[data-g="next"] { background: #3a9a48; }
.sk__reveal { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; padding: 8px 22px 9px; border-radius: 14px; background: rgba(59, 58, 66, 0.88); color: #fbf6e9; text-align: center; pointer-events: none; z-index: 4; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.sk__reveal[hidden] { display: none; }
.sk__reveal b { font: 700 clamp(1.4rem, 2.6vw, 2.2rem) 'Caveat', 'Segoe Print', cursive; color: #f2c225; }
.sk__reveal small { font-size: 0.8rem; opacity: 0.9; white-space: nowrap; }
.sk__reveal.is-in { animation: sk-reveal 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes sk-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sk-reveal { from { transform: translateX(-50%) scale(0.4) rotate(-6deg); opacity: 0; } to { transform: translateX(-50%) scale(1) rotate(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk__gchoices button, .sk__gsaid.is-in, .sk__reveal.is-in, .sk__styles { animation: none; } }
/* while the book is open: the captions move to the picture's side, the tray and the tap menu stay shut */
.ca.is-sketch .ca__captions { left: calc(max(420px, var(--skw)) + 36px); }
.ca.is-sketch .ca__tap { pointer-events: none; }
.ca__ctl--sketch { background: rgba(242, 194, 37, 0.3); }
@media (max-aspect-ratio: 1/1) {
  .sk { left: 8px; right: 8px; width: auto; top: 44vh; bottom: calc(100px + env(safe-area-inset-bottom)); }
  .sk__book { transform: none; padding: 14px 8px 8px; }
  .sk__asks button { padding: 5px 9px; font-size: 0.74rem; }
  /* the guessing game's row is taller: the book reaches up a little, and the page stays clear of the pill */
  .sk.is-game { top: 38vh; }
  .sk.is-game .sk__status { display: none; }
  .sk__gchoices button, .sk__gacts button, .sk__gform button { padding: 5px 9px; font-size: 0.74rem; }
  .ca.is-sketch .ca__captions { left: 14px; bottom: auto; top: 30vh; }
}

/* a phone (narrow, or on its side): Base's own camera tile, always off, is a small round badge in its corner rather
   than a box over her face; a line through the camera says off */
@media (max-width: 560px), (max-height: 500px) {
  .ca__self { width: 34px; height: 34px; padding: 0; gap: 0; border-radius: 50%; }
  .ca__self small { display: none; }
  .ca__self span { font-size: 0.9rem; }
  .ca__self::after { content: ''; position: absolute; left: 7px; right: 7px; top: 50%; height: 2px; border-radius: 1px; background: #9fb3a6; transform: rotate(-45deg); opacity: 0.8; }
}
