/* kit.css - THE GAME'S OWN UI KIT ON THE WEB (Joe 2026-11-10: "the website should literally look like our video game").
   Every surface below is a painted piece from Tools/art/ui/kit/ (exported by tools/kit_export.py to assets/img/kit/),
   drawn with border-image so it 9-slices exactly like the game's sprites. Type is the game's: Chewy = "sign" (plates,
   numbers, titles - kit_screen.py's most-used face), Gochi Hand = "hand" (anything written on paper), Permanent Marker =
   "marker" (stamps). No flat fills, no CSS circles: if the game has no piece for it, add one to the kit first. */
@font-face{font-family:KitSign;src:url('/assets/fonts/chewy.woff2?v=20261025pl') format('woff2');font-display:swap}
@font-face{font-family:KitHand;src:url('/assets/fonts/gochi-hand.woff2?v=20261101') format('woff2');font-display:swap}
@font-face{font-family:KitMarker;src:url('/assets/fonts/permanent-marker.woff2?v=20261025pl') format('woff2');font-display:swap}
.kit{--sign:KitSign,'Comic Sans MS',cursive;--hand:KitHand,'Comic Sans MS',cursive;--marker:KitMarker,Impact,sans-serif;
  --ink:#2b1d10;--ink2:#6a4524;--red:#b3261a;--green:#2e6b25;font-family:var(--hand);color:var(--ink)}
.kit *{box-sizing:border-box}

/* the board: the fridge door's rusty enamel, the same sheet every in-game page sits on */
/* TALL surfaces never stretch (Joe 2026-11-10): top cap + bottom cap + a mirrored middle tile repeated down, all at
   width 100% so the art only scales uniformly. --cap = cap rows / width (kit_export.py prints it). The tile sits on
   ::after between the caps, so a cap's torn corner never shows the tile through it. */
/* The paper sits at z 0 (mid) and 1 (caps) and the words at 2 - NEVER negative z-index (Joe 2026-11-13, /faq: WebKit
   painted the paper OVER a card's words, and selecting them made them flash back). Negative-z layers under an isolated,
   filtered, rotated card are exactly where WebKit's repaint goes wrong; plain positive order has no such case. */
.k-board,.k-card{position:relative;container-type:inline-size;isolation:isolate;z-index:0}
:where(.k-board,.k-card)>*{position:relative;z-index:2}  /* zero specificity: a page's own position:absolute still wins */
.k-board:before,.k-card:before{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
  background:var(--k-top) top/100% auto no-repeat,var(--k-bot) bottom/100% auto no-repeat}
.k-board:after,.k-card:after{content:'';position:absolute;left:0;right:0;top:calc(var(--k-cap) * 100cqw - 1px);
  bottom:calc((var(--k-capb) - var(--k-fe,0)) * 100cqw - 1px);z-index:0;pointer-events:none;background:var(--k-mid) 0 0/100% auto repeat-y}
.k-board{--k-cap:.4;--k-capb:.6222;--k-top:url('/assets/img/kit/bg-fridge-door-clean-top.webp');--k-bot:url('/assets/img/kit/bg-fridge-door-clean-bot.webp');
  --k-mid:url('/assets/img/kit/bg-fridge-door-clean-mid.webp');padding:30px 24px 34px;margin:0 auto;max-width:720px;
  box-shadow:0 6px 14px #0007}
/* NEVER a filter on the board (Joe 2026-11-13, /faq in the app: text blank until selected). A filter paints the whole
   element into ONE offscreen texture; the FAQ board is 6,700 css px = 17,500 device px on a phone, past the GPU's texture
   cap, so whole tiles of cards never drew. The door art is an opaque rectangle, so box-shadow is the same shadow, free. */
/* a page title is BURNED into one sawn plank nailed to the door (Joe 2026-11-10: "I don't like the rainbow magnet tiles ...
   burn in wood text style on plank instead"). Same plank and burn as the home page's swinging sign (home.css .swing-sign):
   sign-planks.webp at its own shape, lettering kept between its two nails (7% / 84% across). Old per-letter c1..c5 spans
   still in a page just burn the same colour. */
.k-title{display:flex;align-items:center;justify-content:center;width:min(290px,90%);aspect-ratio:600/205;box-sizing:border-box;
  margin:0 auto 6px;padding:2% 19% 2% 11%;background:url('/assets/img/sign-planks.webp?v=20261025b') center/100% 100% no-repeat;
  filter:drop-shadow(0 5px 5px #0008);font:400 34px/.95 var(--paint,var(--sign));letter-spacing:.3px;text-align:center;
  white-space:nowrap;color:#2b1407;text-shadow:0 1px 0 #f6dfb055,0 -1px 0 #4a230c;-webkit-text-stroke:.6px #3a1a08}
.k-title b,.k-title span{font-weight:400;color:#2b1407}
.k-title>b,.k-title>span{opacity:.92;mix-blend-mode:multiply}
.k-sub{font:400 19px/1.25 var(--hand);text-align:center;margin:0 0 10px;color:var(--ink2)}

/* tabs: the game's riveted tin tabs (tab-idle / tab-lit, the bottom bar's look) */
.k-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 2px 8px;margin:0 -6px}
.k-tabs::-webkit-scrollbar{display:none}
.k-tab{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:74px;height:66px;
  padding:2px 6px;border:14px solid transparent;border-image:url('/assets/img/kit/tab-idle.webp') 44 fill / 14px stretch;
  font:400 14px/1 var(--sign);color:var(--ink);text-decoration:none;text-align:center;position:relative;cursor:pointer}
.k-tab img{width:26px;height:26px;margin:-8px 0 0}
.k-tab.on{border-image-source:url('/assets/img/kit/tab-lit.webp')}
.k-tab .k-badge{position:absolute;top:-16px;right:-14px}
.k-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;border-radius:11px;
  background:radial-gradient(circle at 35% 30%,#e8584a,#a8231a 70%);border:2px solid #3a120c;color:#fff;font:400 13px/1 var(--sign);
  box-shadow:0 1px 0 #0006}

/* plate buttons: green painted board = do it, bare ply = secondary, orange = loud. 9-sliced, never a CSS pill */
.k-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 6px;white-space:nowrap;
  border:12px solid transparent;border-image:url('/assets/img/kit/sign-ply-bare.webp') 34 fill / 12px stretch;background:none;
  font:400 16px/1 var(--sign);color:var(--ink);cursor:pointer;text-decoration:none;transition:transform .1s}
.k-btn:active{transform:translateY(2px)}
.k-btn img{width:24px;height:24px;margin:-6px 0}
.k-btn.green{border-image-source:url('/assets/img/kit/btn-green-bare.webp');border-image-slice:30 fill;color:#fff8e6;text-shadow:0 2px 0 #0007}
.k-btn.orange{border-image-source:url('/assets/img/kit/btn-orange.webp');border-image-slice:30 fill;color:#fff8e6;text-shadow:0 2px 0 #0007}
.k-btn .k-n{font:400 17px/1 var(--sign);opacity:.9}
.k-btn .k-n:empty{display:none}
.k-btn[disabled]{opacity:.6}

/* the steel plate (sort / small controls) */
.k-plate{display:inline-flex;align-items:center;gap:8px;height:48px;padding:0 32px;border:0;
  background:url('/assets/img/kit/plate-tab.webp') center/100% 100% no-repeat;font:400 15px/1 var(--sign);color:var(--ink)}
.k-plate select{appearance:none;-webkit-appearance:none;border:0;background:none;font:400 16px/1 var(--sign);color:var(--red);padding:0 14px 0 2px;cursor:pointer;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M0 0h10L5 7z' fill='%23b3261a'/%3E%3C/svg%3E") right center no-repeat}

/* the yellow tape strip: section counts, "FISH CAUGHT" plates */
.k-strip{display:block;width:max-content;max-width:100%;margin:10px auto 8px;padding:2px 20px;border:9px solid transparent;
  border-image:url('/assets/img/kit/sticky-note-strip.webp') 24 fill / 9px stretch;font:400 21px/1.1 var(--sign);color:var(--ink);
  transform:rotate(-1.2deg);filter:drop-shadow(0 2px 2px #0004)}

/* a card: the torn paper tab-card, slightly crooked like it was stuck on the door */
/* The plain paper is parchment-tall since 2026-11-18 (Joe, /media-kit: cb-tabcard's black border was "way too thick way too
   stretched and it's badly pixelated" - a 503 px piece with a 6 px ink outline, mirrored down the middle). Rendered 1,200 px
   with a thin burnt edge like the other papers. NO filter on a card, ever (Joe 2026-11-18, same page: words blank until
   selected on a phone, a sticky's line clipped). A filter makes the card one offscreen surface and WebKit repaints it stale
   when a font or picture lands. The shadow is drawn by the paper's middle tile instead, which holds no words; the caps
   sit over its shadow's ends. */
.k-card{--k-cap:.1875;--k-capb:.1875;--k-fe:.06;--k-top:url('/assets/img/kit/parchment-tall-top.webp');--k-bot:url('/assets/img/kit/parchment-tall-bot.webp');
  --k-mid:url('/assets/img/kit/parchment-tall-mid.webp');margin:0 0 14px;padding:24px 26px 22px 26px}
.k-card:after{filter:drop-shadow(0 3px 3px #0005)}
.k-card:nth-child(3n+1){transform:rotate(-.6deg)}.k-card:nth-child(3n+2){transform:rotate(.5deg)}
/* other papers off the same door (Joe 2026-11-10, /faq/: one paper on every card "is just really repetitive"): a torn-off
   spiral sheet, an old ring-binder page, a sticky note. Same top/mid/bot cut (kit_export.py TALL), so any height works.
   k-flip mirrors an unruled paper so its torn corners and stains land on the other side. */
.k-card.k-p-spiral{--k-cap:.1630;--k-fe:0;--k-capb:.1193;--k-top:url('/assets/img/kit/note-spiral-top.webp');--k-bot:url('/assets/img/kit/note-spiral-bot.webp');
  --k-mid:url('/assets/img/kit/note-spiral-mid.webp');padding:26px 22px 16px 9%}
.k-card.k-p-note{--k-cap:.1750;--k-fe:0;--k-capb:.1610;--k-top:url('/assets/img/kit/note-paper-top.webp');--k-bot:url('/assets/img/kit/note-paper-bot.webp');
  --k-mid:url('/assets/img/kit/note-paper-mid.webp');padding:26px 18px 18px 25%}
.k-card.k-p-sticky{--k-cap:.2982;--k-fe:0;--k-capb:.1392;--k-top:url('/assets/img/kit/sticky-note-tall-top.webp');--k-bot:url('/assets/img/kit/sticky-note-tall-bot.webp');
  --k-mid:url('/assets/img/kit/sticky-note-tall-mid.webp');padding:24px 24px 22px 24px}
.k-card.k-flip:before,.k-card.k-flip:after{transform:scaleX(-1)}
/* .k-deck = ANY list of cards (Joe 2026-11-14, /stickers: "the same repeated background parchment image needs to have some
   more variance"). Put the class on the cards' parent and the papers deal themselves in a 7-step cycle, so no page has to
   remember to mix them. A card that sets its own k-p-* keeps it. lookcheck.js REPEAT fails a page with 5+ cards on one paper. */
.k-deck>.k-card:nth-child(7n+2):not([class*=k-p-]),.k-deck>.k-card:nth-child(7n+6):not([class*=k-p-]){--k-cap:.1630;--k-fe:0;--k-capb:.1193;
  --k-top:url('/assets/img/kit/note-spiral-top.webp');--k-bot:url('/assets/img/kit/note-spiral-bot.webp');
  --k-mid:url('/assets/img/kit/note-spiral-mid.webp');padding:26px 22px 16px 9%}
.k-deck>.k-card:nth-child(7n+4):not([class*=k-p-]),.k-deck>.k-card:nth-child(7n+7):not([class*=k-p-]){--k-cap:.2982;--k-fe:0;--k-capb:.1392;
  --k-top:url('/assets/img/kit/sticky-note-tall-top.webp');--k-bot:url('/assets/img/kit/sticky-note-tall-bot.webp');
  --k-mid:url('/assets/img/kit/sticky-note-tall-mid.webp');padding:24px 24px 22px 24px}
.k-deck>.k-card:nth-child(7n+3):before,.k-deck>.k-card:nth-child(7n+3):after,
.k-deck>.k-card:nth-child(7n+7):before,.k-deck>.k-card:nth-child(7n+7):after{transform:scaleX(-1)}
.k-card.hit:after{filter:drop-shadow(0 0 6px #ffc62a) drop-shadow(0 0 2px #ffc62a)}
.k-card h3{font:400 23px/1.12 var(--sign);margin:4px 0 6px;color:var(--ink)}
.k-card p{font:400 19px/1.3 var(--hand);margin:0 0 8px;color:var(--ink)}
.k-meta{display:flex;align-items:center;gap:7px;padding-right:6px;white-space:nowrap;font:400 15px/1 var(--sign);color:var(--ink2)}
.k-meta img{width:26px;height:26px}
.k-meta .k-right{margin-left:auto;font:400 17px/1 var(--hand);white-space:nowrap}
.k-foot{display:flex;flex-wrap:wrap;align-items:center;gap:2px;justify-content:flex-end;margin:2px -4px -2px}
.k-foot .k-left:empty{display:none}.k-foot .k-left{flex:1 0 100%;margin:0 0 2px 6px;font:400 17px/1 var(--hand);color:var(--ink2)}

/* the rubber stamp (status): red ink in the red stamp frame, set at an angle */
/* Joe 2026-11-13: the word sat crooked in its frame. stamp-frame.webp is drawn TILTED, so a 9-slice of it broke its edges
   and added its tilt on top of the word's. Now the frame is the whole picture stretched behind the word, turned back by
   the tilt it keeps when stretched to a stamp's shape (~3deg), so frame and word share the one -5deg. */
/* Joe 2026-11-17 (changelog stamp circled): stamp-frame-flat.webp = the same frame turned level (-7.5deg, measured off its
   alpha), so a 9-slice keeps every edge whole at any width and the CSS turn is the only tilt. */
.k-stamp{position:relative;display:inline-block;padding:3px 10px 1px;border:8px solid transparent;
  border-image:url('/assets/img/kit/stamp-frame-flat.webp') 24 / 8px stretch;
  font:400 13px/1.2 var(--marker);text-transform:uppercase;letter-spacing:.5px;color:#b3261a;transform:rotate(-5deg);opacity:.92}
.k-stamp.go{filter:hue-rotate(110deg) saturate(.8)}.k-stamp.go{color:#b3261a}
.k-stamp.no{filter:grayscale(1) brightness(.6)}

/* lined note paper for anything the player writes */
.k-note textarea{display:block;width:100%;min-height:104px;padding:8px 12px 8px 40px;border:0;resize:vertical;outline:0;
  background:url('/assets/img/kit/note-paper.webp') 0 0/100% 100%;font:400 19px/26px var(--hand);color:#1d2a55;filter:drop-shadow(0 2px 2px #0004)}
.k-note small{display:block;flex:1;font:400 16px/1.25 var(--hand);color:var(--ink2)}
.k-note .k-row{display:flex;align-items:center;gap:8px;margin-top:6px}
.k-msg{font:400 18px/1.3 var(--hand);color:var(--red);margin:4px 0}.k-msg:empty{display:none}.k-msg.ok{color:var(--green)}
.k-tip{display:flex;gap:8px;align-items:flex-start;font:400 18px/1.3 var(--hand);color:var(--ink2);margin:10px 4px 0}
.k-tip img{width:28px;height:28px;flex:0 0 28px}
.k-tip b{font:400 17px/1 var(--sign);color:var(--red)}
.k-input{flex:1;min-width:0;height:46px;padding:0 12px;border:2px solid #6a4524;border-radius:4px;background:#fffaf0;
  font:400 20px var(--hand);color:var(--ink);box-shadow:inset 0 2px 4px #0003}
@media(prefers-reduced-motion:reduce){.k-btn{transition:none}}

/* the "stop and choose" modal (assets/confirm.js, Joe 2026-11-15): the fridge door over a dimmed page, a red Chewy heading,
   who-is-who rows on a dashed rule, plank buttons stacked full width. Only a button closes it. */
.k-modal{padding:0;border:0;background:none;width:min(400px,94vw);max-width:none;max-height:94vh;overflow:auto;color:var(--ink)}
.k-modal::backdrop{background:#0b0603d0}
.k-modal .k-board{padding:30px 20px 30px}
.k-modal-head{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.k-modal-head img{width:56px;height:56px;filter:drop-shadow(0 2px 2px #0006)}
.k-modal-head h2{margin:0;font:400 30px/1.05 var(--sign);color:var(--red);text-shadow:0 1px 0 #fff8}
.k-modal-body{margin:8px 0 4px;font:400 20px/1.3 var(--hand);text-align:center;color:var(--ink)}
.k-modal-who{margin:10px 0 4px;border-top:2px dashed #6a452488}
.k-modal-who>div{display:flex;align-items:center;gap:12px;padding:9px 2px;border-bottom:2px dashed #6a452488}
.k-modal-who .k-stamp{flex:none;width:96px;text-align:center;padding:8px 4px 6px;font-size:12px}
.k-modal-who span:last-child{min-width:0}
.k-modal-who b{display:block;font:400 22px/1.1 var(--sign);color:var(--ink);overflow-wrap:anywhere}
.k-modal-who small{display:block;font:400 17px/1.2 var(--hand);color:var(--ink2);overflow-wrap:anywhere}
.k-modal-acts{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.k-modal-acts .k-btn{width:100%;min-height:54px;font-size:20px;white-space:normal;line-height:1.1}
.k-modal .k-msg{text-align:center}
.k-modal-fine{margin:6px 0 0;font:400 17px/1.25 var(--hand);color:var(--ink2);text-align:center}
