/* SKETCHY: a sketchbook on a wooden desk under a warm desk lamp (light from the top-left).
   Clue words are masking-tape labels stuck to the desk; what you type goes on an index card. */
.sk { background: #4a2e1c; }
.sk-scene.grain { position: absolute; inset: 0; overflow: hidden; }
/* same grain, normal blend: an overlay blend over the whole scene re-composites every animated frame */
.sk-scene.grain::after { mix-blend-mode: normal; opacity: .045; }

/* ---------------------------------------------------------------- the desk */
.sk-desk { position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 14, 6, .45) 0 2px, rgba(255, 220, 170, .08) 2px 3px, transparent 3px) 0 40px / 100% 168px,
    var(--tex-wood) 0 0 / 640px 168px,
    linear-gradient(180deg, #a5693c 0%, #8c5530 55%, #6e3f22 100%);
  background-blend-mode: normal, multiply, normal; }
.sk-light { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 75% at 24% 6%, rgba(255, 236, 196, .34), rgba(255, 236, 196, .1) 45%, transparent 70%),
              radial-gradient(80% 70% at 90% 105%, rgba(var(--shadow-tint), .45), transparent 65%); }

/* ---------------------------------------------------------------- the sketchbook */
.sk-book { position: absolute; left: 332px; top: 14px; width: 936px; height: 594px; }
.sk-cover { position: absolute; inset: 0; border-radius: 12px;
  background: var(--tex-noise) 0 0 / 180px, linear-gradient(160deg, #3d3a47, #2a2733 60%, #211e29);
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .12), inset 0 -2px 0 rgba(0, 0, 0, .4), 18px 26px 38px rgba(var(--shadow-tint), .55), 4px 6px 8px rgba(var(--shadow-tint), .45); }
.sk-stack { position: absolute; left: 16px; top: 26px; right: 12px; bottom: 10px; border-radius: 3px; background: #ece2cc;
  box-shadow: 1px 2px 0 #e1d4b8, 2px 4px 0 #d6c6a6, 3px 6px 0 #cbb994, 4px 9px 8px rgba(var(--shadow-tint), .4); }
.sk-sheet { position: absolute; left: 14px; top: 22px; width: 906px; height: 558px; border-radius: 3px;
  background: var(--tex-paper) 0 0 / 300px, linear-gradient(172deg, #fffbf2 0%, #fbf4e4 55%, #f3e7cc 100%);
  background-blend-mode: multiply, normal;
  box-shadow: 0 1px 2px rgba(var(--shadow-tint), .3), 1px 2px 5px rgba(var(--shadow-tint), .2); transform-origin: 50% 0; }
/* shade along the binding, where the page bends into the rings */
.sk-sheet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34px; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--shadow-tint), .16), rgba(var(--shadow-tint), .04) 60%, transparent); }
/* a little lift in the bottom-right corner */
.sk-curl { position: absolute; right: -1px; bottom: -1px; width: 46px; height: 46px; pointer-events: none;
  background: linear-gradient(315deg, #d9cbaa 0 46%, rgba(var(--shadow-tint), .28) 48%, #fffaf0 51%, #f1e4c6 100%);
  border-top-left-radius: 6px 30px; filter: drop-shadow(-2px -2px 2px rgba(var(--shadow-tint), .18)); }
.sk-sheet.flip { animation: sk-flip .3s cubic-bezier(.5, 0, .9, .4) forwards; }
@keyframes sk-flip { to { transform: translateY(-46px) rotateX(38deg) rotate(-2deg); opacity: 0; } }
.sk-sheet.fresh { animation: sk-fresh .32s ease-out; }
@keyframes sk-fresh { from { opacity: 0; translate: 0 8px; } }

/* spiral binding: shaded wire loops dropping into punched holes */
.sk-rings { position: absolute; left: 36px; right: 36px; top: 4px; height: 50px; display: flex; justify-content: space-between; pointer-events: none; z-index: 4; }
.sk-rings i { position: relative; width: 13px; height: 44px; border-radius: 7px;
  background: linear-gradient(90deg, #474b56 0%, #9aa1ae 18%, #f1f3f7 34%, #b9bfcc 56%, #6d727e 82%, #3a3d46 100%);
  box-shadow: 2px 4px 3px rgba(var(--shadow-tint), .45); }
.sk-rings i::before { content: ""; position: absolute; left: -3px; bottom: 3px; width: 19px; height: 9px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, #1d1824 60%, rgba(29, 24, 36, .4)); }

/* sheet header: number, instruction, the sheet clock */
.sk-head { position: absolute; left: 0; right: 0; top: 30px; height: 36px; display: flex; align-items: center; gap: 16px; padding: 0 26px 0 30px; }
.sk-num { font-family: var(--font-display); font-size: 22px; color: #4a4656; opacity: .85; min-width: 70px; }
.sk-ask { flex: 1; text-align: center; font-size: 17px; font-weight: 600; color: #5d5868; }
.sk-ask b { color: var(--ink); font-weight: 800; }
.sk-ring { width: 34px; height: 34px; }
.sk-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sk-ring .trk { fill: none; stroke: rgba(74, 70, 86, .2); stroke-width: 3.5; }
.sk-ring .bar { fill: none; stroke: #4a4656; stroke-width: 3.5; stroke-linecap: round; transition: stroke .3s; }
.sk-ring.low .bar { stroke: #c8202c; }

/* ---------------------------------------------------------------- the drawing */
.sk-draw { position: absolute; left: 0; right: 0; top: 64px; bottom: 6px; }
.sk-svg, .sk-under { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; will-change: transform; }
.sk-body { opacity: 0; transition: opacity .6s ease; }
.sk-body.show { opacity: 1; }
.sk-sil { transition: opacity .5s ease; }
.sk-sil.gone { opacity: 0; }
/* the starting sketch: graphite lines, a fainter second pass, hatching on the shadow side */
.sk-sil .l { opacity: .8; }
.sk-sil .l * { fill: none; stroke: #45414f; stroke-width: 2.3px; }
.sk-sil .l2 { opacity: .34; }
.sk-sil .l2 * { fill: none; stroke: #6a6676; stroke-width: 1.3px; }
.sk-sil .h { opacity: .7; }
.sk-sil .h * { fill: url(#skHatch); stroke: none; }
.sk-t { font-family: var(--font-display); stroke: var(--ink); stroke-width: 3.5px; paint-order: stroke; stroke-linejoin: round; text-anchor: middle; }
.sk-t.plain { stroke: none; }
.sk-hide { opacity: 0; }
.sk-fade { transition: fill-opacity .3s ease, opacity .3s ease; }
.sk-pop { transform-box: fill-box; transform-origin: center; animation: sk-pop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sk-pop { from { scale: .3; } 60% { scale: 1.12; } to { scale: 1; } }
.sk-smudge { transform-box: fill-box; transform-origin: center; animation: sk-splat .36s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes sk-splat { from { scale: .15; opacity: 0; } }
.sk-doodled { transition: opacity .5s; }
.sk-doodled.gone { opacity: 0; }
.sk-nope-in { transform-box: fill-box; transform-origin: center; animation: sk-nope 1s ease-out forwards; }
@keyframes sk-nope { 0% { opacity: 0; scale: 1.3; } 14% { opacity: 1; scale: 1; } 65% { opacity: 1; } 100% { opacity: 0; } }
.sk-tap.tap { animation: sk-tap .13s ease-out; }
@keyframes sk-tap { 40% { translate: -3px 5px; } }

/* the verdict, as a rubber stamp */
.sk-stamp { position: absolute; left: 50%; top: 82px; z-index: 6; pointer-events: none; white-space: nowrap; opacity: 0;
  translate: -50% 0; rotate: -5deg; padding: 2px 22px 6px; border: 6px double currentColor; border-radius: 10px;
  font-family: var(--font-display); font-size: 52px; letter-spacing: .02em; color: #1f8a4c; mix-blend-mode: multiply; }
.sk-stamp.bad { color: #b3241f; }
.sk-stamp.show { animation: sk-stamp .3s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes sk-stamp { from { opacity: 0; scale: 1.7; } to { opacity: .9; scale: 1; } }
.sk-tried { position: absolute; left: 30px; bottom: 16px; display: flex; flex-direction: column; gap: 1px; font-size: 19px; font-weight: 600; color: #6a6676; font-style: italic; }
.sk-tried s { text-decoration-color: #c8202c; text-decoration-thickness: 2.5px; }

/* ---------------------------------------------------------------- clue labels: masking tape on the desk */
.sk-chips { position: absolute; left: 40px; right: 40px; top: 626px; display: flex; justify-content: center; gap: 16px; }
.sk-chip { position: relative; rotate: var(--r); filter: drop-shadow(0 2px 1.5px rgba(var(--shadow-tint), .4)) drop-shadow(0 6px 8px rgba(var(--shadow-tint), .18));
  animation: sk-chip-in .34s var(--d) cubic-bezier(.2, 1.3, .4, 1) both; transition: translate .12s, opacity .2s; }
@keyframes sk-chip-in { from { opacity: 0; translate: 0 18px; } }
.sk-tape { padding: 11px 20px 12px; min-width: 118px; text-align: center;
  background: var(--tex-paper) 0 0 / 300px, linear-gradient(180deg, #f6ebcc 0%, #ecdcb2 60%, #e2cf9f 100%);
  background-blend-mode: multiply, normal;
  clip-path: polygon(0 6%, 3% 0, 8% 4%, 14% 0, 86% 0, 92% 3%, 97% 0, 100% 5%, 98% 28%, 100% 50%, 98% 74%, 100% 95%, 96% 100%, 90% 97%, 84% 100%, 12% 100%, 6% 97%, 2% 100%, 0 94%, 2% 70%, 0 48%, 2% 26%); }
.sk-cw { font-family: var(--font-display); font-size: 25px; letter-spacing: .05em; color: #2b2233; line-height: 1; }
.sk-cw span { padding: 0 .5px; transition: background .08s; }
.sk-cw span.on { background: linear-gradient(176deg, transparent 14%, rgba(255, 208, 0, .78) 16% 86%, transparent 88%); }
.sk-chip.part { translate: 0 -4px; }
.sk-chip.dim { opacity: .5; }
.sk-mark { position: absolute; pointer-events: none; }
.sk-chip.yes .sk-cw { color: #17562f; }
.sk-chip.yes .sk-mark { right: -12px; top: -16px; width: 40px; height: 30px; }
.sk-chip.yes .sk-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .6)); }
.sk-chip.no .sk-cw { color: #8a8396; }
.sk-chip.no .sk-mark { left: 8px; right: 8px; top: 9px; height: 30px; }
.sk-chip.no .sk-mark svg { width: 100%; height: 100%; }
.sk-chip.no .sk-mark b { position: absolute; right: -16px; top: -20px; font-family: var(--font-display); font-weight: 400; font-size: 17px; color: #c8202c; rotate: 10deg; }
.sk-chip.missed .sk-cw { color: #17562f; text-decoration: underline wavy rgba(31, 138, 76, .7) 2px; text-underline-offset: 5px; }
.sk-chip.wob { animation: sk-wob .3s; }
.sk-chip.nope { animation: sk-thud .3s; }
@keyframes sk-wob { 25% { translate: -5px 0; } 60% { translate: 4px 0; } }
@keyframes sk-thud { 30% { translate: 0 5px; scale: .96; } }

/* ---------------------------------------------------------------- the pen line: an index card, the clearest thing on screen */
.sk-pen { position: absolute; left: 50%; top: 706px; translate: -50% 0; width: 840px; height: 86px; display: flex; align-items: center; gap: 20px; padding-right: 24px;
  border-radius: 4px; background:
    linear-gradient(90deg, transparent 0 129px, rgba(214, 64, 64, .45) 129px 131px, transparent 131px),
    repeating-linear-gradient(180deg, transparent 0 28px, rgba(70, 120, 190, .2) 28px 29px) 0 12px / 100% 100% no-repeat,
    linear-gradient(180deg, #fffefa, #f5f0e4);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(var(--shadow-tint), .12), 6px 12px 20px rgba(var(--shadow-tint), .45), 1px 2px 3px rgba(var(--shadow-tint), .35); }
.sk-mode { align-self: stretch; width: 112px; display: grid; place-items: center; border-radius: 4px 0 0 4px;
  font-family: var(--font-display); font-size: 23px; letter-spacing: .08em; color: #fff;
  background: linear-gradient(180deg, #7a7588, #5d5868); box-shadow: inset -2px 0 0 rgba(0, 0, 0, .15); transition: background .15s; }
.sk-pen[data-mode="clue"] .sk-mode { background: linear-gradient(180deg, #e0a800, #b88400); }
.sk-pen[data-mode="guess"] .sk-mode { background: linear-gradient(180deg, #e0457b, #b3245a); }
.sk-line { flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; white-space: nowrap;
  font-family: var(--font-ui); font-weight: 800; font-size: 46px; letter-spacing: .03em; color: var(--ink); }
.sk-buf span { display: inline-block; }
.sk-buf span.new { animation: sk-letter .16s ease-out; }
@keyframes sk-letter { from { translate: 0 -12px; opacity: .2; } }
.sk-caret { width: 4px; height: 46px; margin-left: 3px; background: var(--ink); border-radius: 2px; animation: sk-blink 1s steps(1) infinite; }
@keyframes sk-blink { 50% { opacity: 0; } }
.sk-hint { font-size: 15px; font-weight: 700; color: #6a6676; white-space: nowrap; }
.sk-pen[data-mode="guess"] .sk-hint { color: #b3245a; }
.sk-pen.wob, .sk-pen.full { animation: sk-wob .3s; }
