:root { color-scheme:light; font: 16px/1.35 system-ui,sans-serif; color:#232921; background:#e2e5d8; }
* { box-sizing:border-box; }
body { margin:0; }
[hidden] { display:none !important; }
button { font:inherit; color:inherit; cursor:pointer; min-height:40px; }
button:focus-visible { outline:3px solid #3655b2; outline-offset:3px; }
#workshop { width:min(1100px,100%); margin:0 auto; padding:14px; }
.mast,.press-top,.inventory-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.mast { margin-bottom:14px; }
.brand { font-size:1.25rem; font-weight:850; }
.mast-actions { display:flex; gap:6px; }
.mast-actions button { border:1px solid #8b9986; background:#f8faf2; border-radius:6px; padding:5px 10px; font-size:.82rem; }
.desk { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); gap:14px; align-items:start; }
.press,.ticket { background:#f9faf1; border:1px solid #afb6a4; border-radius:10px; padding:14px; min-width:0; }
.eyebrow { margin:0 0 4px; font-size:.69rem; text-transform:uppercase; letter-spacing:.09em; font-weight:760; }
h1,h2,p { margin:0; }
h1 { font-size:1.62rem; line-height:1.1; }
h2 { font-size:1rem; }
.ready { font-size:.75rem; font-weight:750; }
.ready i { display:inline-block; width:7px; height:7px; background:#3e7e40; border-radius:50%; margin-right:5px; }
.machine { margin:10px 0 14px; }
.machine-cover { position:relative; background:#303b36; border:12px solid #525e4d; border-radius:14px; overflow:hidden; }
.intake { position:absolute; top:10px; height:8px; inset-inline:13%; background:#121915; border-radius:5px; z-index:1; }
.rollers { position:absolute; z-index:1; top:24px; height:16px; inset-inline:17%; border-radius:4px; background:repeating-linear-gradient(90deg,#1e2721 0 6px,#a9b296 6px 10px); }
#flakes { display:block; width:100%; height:auto; }
#feed-hint { padding:7px 0 0; color:#4a5847; font-size:.76rem; }
.inventory-head { margin-bottom:7px; }
#remaining { font-size:.78rem; font-weight:700; }
.papers { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.paper { display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-height:60px; padding:6px; border:1px solid #a7aa98; border-radius:5px; background:white; text-align:left; }
.paper:hover { background:#e7eed6; }
.paper strong { font-size:.82rem; }
.paper span { font-size:.69rem; color:#364132; }
.paper[disabled] { cursor:default; opacity:.36; }
#order-brief { margin-top:7px; font-size:.86rem; color:#43513e; }
.art { display:grid; grid-template-columns:repeat(10,1fr); height:76px; gap:2px; margin:12px 0; overflow:hidden; border-radius:5px; }
.art span { background:#e6e5d9; }
.targets { display:grid; gap:5px; margin:0; }
.targets > div { display:flex; justify-content:space-between; align-items:center; gap:9px; background:#edf0e4; border-radius:4px; padding:5px 7px; }
.targets dt,.targets dd { font-size:.85rem; font-weight:700; }
.targets dt::before { content:''; display:inline-block; width:10px; height:10px; margin-right:6px; border:1px solid #667463; border-radius:2px; background:var(--chip); }
.targets dd { margin:0; font-variant-numeric:tabular-nums; }
.feedback { min-height:39px; padding-top:9px; color:#43513e; font-size:.8rem; }
.outcome > button,.upgrades button { padding:7px 10px; border-radius:5px; border:1px solid #83917d; background:#fdfdf5; text-align:left; }
.upgrades { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.upgrades button span { display:block; font-size:.73rem; }
@media(max-width:700px) {
  #workshop { padding:8px; }
  .desk { grid-template-columns:minmax(0,1fr); gap:8px; }
  .press,.ticket { padding:9px; }
  .ticket { grid-row:1; }
  .art { height:34px; margin:6px 0; }
  .feedback { min-height:26px; }
}

:root {
  --ink:#153028;
  --paper:#f5efd9;
  --desk:#e6dfc8;
  --edge:#b6a786;
  --signal:#af492a;
  color:var(--ink);
  background:
    repeating-linear-gradient(90deg,#705a3710 0 1px,transparent 1px 93px),
    radial-gradient(ellipse at 30% 5%,#fff9e9,transparent 50%),var(--desk);
}
#workshop { padding:18px; }
.mast { margin-bottom:18px; border-bottom:1px solid #bcac8c; padding-bottom:10px; }
.brand { display:flex; align-items:center; gap:9px; font-family:Georgia,serif; font-weight:700; font-size:1.53rem; letter-spacing:-.025em; }
.brand-mark { background:var(--ink); color:#f9e7ac; display:grid; place-items:center; width:31px; height:31px; border-radius:9px 9px 9px 2px; font:1.05rem Georgia,serif; }
.mast-actions button { border-color:#a79c7f; background:#f5f0e0; color:#32453a; }
.desk { grid-template-columns:minmax(0,1.42fr) minmax(0,1fr); gap:16px; }
.press,.ticket { border-radius:14px; }
.press { color:#f6edcf; background:#234237; border:1px solid #203a30; padding:14px; box-shadow:0 4px 0 #293b31,0 11px 24px #39462b38; }
.press .eyebrow { color:#c7d6b8; }
.press h2 { font:700 1.15rem Georgia,serif; }
.ready { display:flex; align-items:center; color:#d4e3b8; letter-spacing:.04em; }
.ready i { background:#bdf38d; box-shadow:0 0 12px #baec8e91; }
.machine { margin-top:13px; }
.machine-cover { background:
  repeating-linear-gradient(0deg,transparent 0 12px,#b8e8d207 12px 13px),
  linear-gradient(180deg,#375444 4%,#152923 33%,#102721 82%,#355345 100%);
  border:0; border-radius:10px; box-shadow:inset 0 0 0 2px #648472, inset 0 -18px 24px #0e2119, 0 0 0 4px #162f27;
}
.intake { top:11px; height:10px; inset-inline:20%; box-shadow:0 0 3px #9db2a2; }
.rollers { top:26px; height:16px; inset-inline:21%; background:
  repeating-linear-gradient(90deg,#3c4d44 0 5px,#9fa497 5px 9px,#43564a 9px 13px); box-shadow:0 4px 4px #07160e80;
}
.glass { position:absolute; inset:1px; pointer-events:none; border:1px solid #a8d9c174; border-radius:10px; background:
  linear-gradient(143deg,transparent 13%,#abf0cc19 13.5%,#abf0cc0a 28%,transparent 28.6% 69%,#abf0cc0d 69.4% 80%,transparent 81%);
  box-shadow:inset 0 0 18px #a7ead721;
}
.chassis-label { position:absolute; top:13px; right:10px; display:grid; gap:3px; }
.chassis-label i { width:10px; height:2px; background:#7da08f; border-radius:3px; }
#feed-hint { color:#d4dfc7; padding-top:9px; }
.inventory-head { margin-bottom:8px; }
#remaining { background:#f4d99f; color:#25382c; border-radius:12px; padding:3px 8px; font-size:.72rem; }
.paper { min-height:71px; gap:4px; border-radius:6px; border-color:#cbbd9c; padding:7px; background:repeating-linear-gradient(0deg,#4d331607 0 1px,transparent 1px 4px),#fff4d9; color:var(--ink); box-shadow:0 2px 0 #172e24; }
.paper:hover { background-color:#fff8e8; border-color:#e6bd5b; translate:0 -1px; }
.stock-colors { display:flex; align-self:stretch; min-height:6px; overflow:hidden; border-radius:2px; }
.stock-colors b { flex:1; }
.ticket { background:repeating-linear-gradient(0deg,#4d331606 0 1px,transparent 1px 5px),#fbf3dc; border-color:#cabc98; padding:18px; box-shadow:0 4px 0 #a89b77,0 12px 22px #54462c17; }
.ticket .eyebrow { color:#8d3c21; }
.ticket h1 { font-family:Georgia,serif; font-size:clamp(1.7rem,3vw,2.25rem); letter-spacing:-.055em; }
.art { grid-template-columns:repeat(14,1fr); grid-template-rows:repeat(7,1fr); height:auto; aspect-ratio:2.4; gap:1px; padding:6px; background:#eadbbb; border:1px solid #d0be97; outline:1px dashed #ad9d7a; outline-offset:3px; margin:16px 4px; }
.art span { background:#e4d4b2; }
.art span.blank { background:#f9edca; }
.targets { gap:6px; }
.targets > div { background:#f1e6c8; border:1px solid #e0d2af; padding:5px 8px; }
.targets > div[data-full=true] { background:#e0e7c9; border-color:#a9b88f; }
.feedback { color:#4d4b38; }
@media(max-width:700px) {
  #workshop { padding:8px; }
  .mast { margin-bottom:10px; padding-bottom:7px; }
  .desk { grid-template-columns:minmax(0,1fr); gap:8px; }
  .ticket,.press { padding:10px; }
  .art { height:42px; margin:9px 4px; }
}

.print { position:relative; }
#stamp { position:absolute; right:14px; bottom:12px; padding:4px 9px 3px; border:3px double currentColor; border-radius:4px; background:#fff3d4e8; color:#9b3d25; transform:rotate(-10deg); font-size:.83rem; font-weight:900; letter-spacing:.12em; animation:stamp-in .3s cubic-bezier(.22,.64,.32,1); }
@keyframes stamp-in { from { opacity:0; transform:rotate(-10deg) scale(1.6); } to { opacity:1; transform:rotate(-10deg) scale(1); } }
.machine[data-running] .rollers { animation:turn .13s linear infinite; }
@keyframes turn { to { background-position:13px 0; } }
.feedback[data-outcome=empty] { color:#8b351f; font-weight:650; }
.feedback[data-outcome=win] { color:#244e2c; font-weight:750; }
@media (prefers-reduced-motion:reduce) {
  #stamp,.machine[data-running] .rollers { animation:none; }
}

.stock-colors { min-height:14px; cursor:grab; touch-action:none; }
.paper { touch-action:manipulation; }
.machine[data-hover=true] .machine-cover { outline:3px solid #e6bd71; outline-offset:2px; }
.feed-ghost { position:fixed; top:0; left:0; z-index:10; pointer-events:none; background:#fff2ce; color:#24382e; border:1px solid #d19d4b; box-shadow:0 5px 8px #2226; border-radius:4px; padding:6px 9px; font-weight:700; letter-spacing:-.01em; font-size:.82rem; }
@media(max-width:700px) {
  .ticket { display:grid; grid-template-columns:minmax(0,1fr) 92px; column-gap:10px; align-items:center; }
  #order-number,#order-title,#order-brief { grid-column:1; }
  .ticket h1 { font-size:1.5rem; }
  #order-brief { margin-top:4px; font-size:.75rem; }
  .print { grid-column:2; grid-row:1/4; margin:0; }
  .art { height:46px; width:100%; padding:3px; margin:0; outline-offset:1px; }
  #stamp { padding:3px; font-size:.58rem; bottom:4px; right:2px; border-width:2px; }
  .targets { grid-column:1/-1; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:8px; gap:4px; }
  .targets > div { display:grid; align-content:center; gap:1px; padding:3px 5px; }
  .targets dt,.targets dd { font-size:.78rem; }
  .feedback,.outcome { grid-column:1/-1; }
  .feedback { min-height:30px; font-size:.76rem; padding-top:5px; }
  #flakes { max-height:146px; }
  #feed-hint { font-size:.72rem; }
  .paper { min-height:68px; padding:5px; gap:3px; }
  .paper strong { font-size:.73rem; }
  .paper span { font-size:.64rem; }
  .stock-colors { min-height:12px; }
}
@media(max-width:355px) {
  .papers { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .ticket { grid-template-columns:minmax(0,1fr) 70px; }
}

body { min-height:100vh; }
.print { margin:15px 4px; }
.art {
  --triptych:url("/_a/order-triptych.26e71d8fb2.webp");
  --print-position:0%;
  display:block;
  position:relative;
  margin:0;
  aspect-ratio:1.92;
  padding:0;
  background:#eadbbb;
}
.art[data-print="1"] { --print-position:50%; }
.art[data-print="2"] { --print-position:100%; }
.art::before,.art::after {
  content:""; position:absolute; inset:0;
  background-image:var(--triptych);
  background-size:300% auto;
  background-position:var(--print-position) center;
}
.art::before { opacity:.57; filter:grayscale(.94) sepia(.25); }
.art::after { clip-path:inset(0 calc(100% - var(--revealed, 0%)) 0 0); transition:clip-path .27s ease; }
.paper[data-first=true] { border-color:#c87c27; box-shadow:0 0 0 2px #e7ac6045,0 2px 0 #172e24; }
.paper:active { translate:0 1px; }
@media(max-width:700px) {
  .brand { font-size:1.34rem; gap:6px; min-width:0; }
  .brand-mark { flex:0 0 25px; width:25px; height:25px; }
  .mast-actions { flex-shrink:0; }
  .mast-actions button { padding:4px 8px; min-height:44px; font-size:.73rem; white-space:nowrap; }
  .mast { gap:6px; }
  .print { margin:0; }
  .art { height:55px; }
  #flakes { max-height:118px; }
  .press .eyebrow { display:none; }
}
@media(max-width:355px) {
  .brand { font-size:1.08rem; }
  .brand-mark { flex-basis:23px; width:23px; height:23px; }
  .mast-actions { gap:4px; }
  .mast-actions button { padding-inline:6px; }
}
@media(prefers-reduced-motion:reduce) {
  .art::after { transition:none; }
}

.ticket-actions { display:flex; flex-wrap:wrap; gap:8px; }
.ticket-actions:not(:has(button:not([hidden]))) { display:none; }
.ticket-actions button,#print-dialog button { background:#fff1cf; border:1px solid #b89b68; border-radius:5px; color:#573322; padding:6px 10px; min-height:44px; font-weight:750; }
#undo { background:#f4db9a; }
#outcome:not([hidden]) { margin-top:8px; }
#print-dialog { width:min(430px,92vw); max-height:92vh; padding:14px; overflow:auto; border:1px solid #c4a676; border-radius:12px; background:#f9ecd0; color:#24372d; box-shadow:0 17px 60px #172e2470; }
#print-dialog::backdrop { background:#182d25be; }
.print-dialog-header { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:12px; }
.print-dialog-header h2 { font-family:Georgia,serif; font-size:1.42rem; }
#large-print { aspect-ratio:1; height:auto; }
@media(max-width:700px) {
  #flakes { max-height:113px; }
  .ticket-actions { grid-column:1/-1; align-self:start; }
  .ticket-actions button { font-size:.75rem; }
}
@media(max-width:700px) {
  #stamp { transform-origin:right bottom; }
  .print { overflow:hidden; padding:2px; }
}
.upgrades button { min-width:0; }
.upgrades button span { text-wrap:pretty; }

.site-document { color:#1f372c; background:#f2e9d1; min-height:100vh; }
.site-masthead,.site-main,.site-footer { width:min(1160px,100% - 32px); margin-inline:auto; }
.site-masthead,.site-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.site-masthead { padding:14px 0; border-bottom:1px solid #bfb18d; }
.site-brand { display:inline-flex; align-items:center; gap:8px; color:#173027; font:700 1.34rem Georgia,serif; letter-spacing:-.025em; text-decoration:none; }
.site-mark { background:#173027; color:#ffe3a4; display:grid; place-items:center; width:28px; height:28px; border-radius:7px; font-size:1.05rem; }
.site-masthead nav,.site-footer nav { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px 18px; font-size:.82rem; }
.site-document a:not(.site-brand,.start-button) { color:#235248; text-underline-offset:3px; }
.site-document a:hover { text-decoration-thickness:2px; }
.title-row { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:5px 16px; padding:15px 0 12px; }
.title-row h1,.guide h1,.legal h1 { font:700 clamp(2rem,4vw,3.2rem)/1.03 Georgia,serif; letter-spacing:-.05em; }
.title-row p { color:#3c5144; font-size:1rem; padding-bottom:4px; }
.game-frame { position:relative; height:clamp(550px,54vw,680px); background:#26483b; border:1px solid #203d32; border-radius:14px; overflow:hidden; box-shadow:0 4px 0 #b6a078; }
.game-cover,.game-loader { position:absolute; inset:0; }
.game-cover { display:grid; place-items:end center; padding:0 0 18px; }
.game-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.game-cover::after { position:absolute; inset:auto 0 0; height:26%; content:""; background:linear-gradient(transparent,#203c2bb8); pointer-events:none; }
.start-button { position:relative; z-index:1; display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:8px 18px; border-radius:6px; border:1px solid #873717; background:#ae4726; color:#fff9e8; box-shadow:0 4px 0 #68331d; text-decoration:none; font-weight:780; white-space:normal; text-align:center; }
.start-button:hover { background:#963b1c; }
.game-loader { display:flex; gap:10px; align-items:center; justify-content:center; color:#fcf0cb; font:700 1.2rem Georgia,serif; }
.load-mark { display:block; width:22px; height:22px; border:4px solid #76967a; border-top-color:#ffe2a1; border-radius:50%; animation:load-pulp .7s linear infinite; }
@keyframes load-pulp { to { rotate:360deg; } }
.player-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:12px; }
.player-actions button,.exit-fullscreen { min-height:44px; padding:6px 11px; border:1px solid #ae9b72; background:#faf0d7; border-radius:6px; font-size:.86rem; }
.exit-fullscreen { position:absolute; z-index:5; top:7px; right:7px; }
.game-frame[data-gf-fs="1"] { width:100vw; height:100vh; border-radius:0; }
.story,.questions,.guide-links { width:min(760px,100%); margin:28px auto; }
.story h2,.questions h2 { font:700 1.68rem/1.15 Georgia,serif; letter-spacing:-.03em; margin:25px 0 9px; }
.story p,.legal p { margin:0 0 13px; line-height:1.62; }
.questions details { border-top:1px solid #c3b38d; padding:9px 0; }
.questions summary { font-weight:750; padding:5px 3px; cursor:pointer; }
.questions details p { padding:7px 3px 0; line-height:1.6; }
.guide-title { width:min(760px,100%); margin:38px auto 0; }
.guide-title p { margin-top:7px; color:#476151; }
.guide-links { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-top:17px; margin-bottom:28px; }
.legal { max-width:760px; margin-block:28px; }
.legal h1 { margin-bottom:15px; }
.site-footer { padding:18px 0 20px; margin-top:25px; border-top:1px solid #bfb18d; }
@media (max-width:700px) {
  .site-masthead,.site-main,.site-footer { width:calc(100% - 22px); }
  .site-masthead { padding:9px 0; }
  .site-masthead nav,.site-footer nav { font-size:.72rem; gap:6px 9px; }
  .site-brand { font-size:1.16rem; gap:5px; flex-shrink:0; }
  .site-mark { width:23px; height:23px; font-size:.84rem; }
  .title-row { padding:10px 0 9px; }
  .title-row h1 { font-size:1.95rem; }
  .title-row p { font-size:.82rem; padding-bottom:0; }
  .game-frame { height:clamp(550px,calc(100svh - 100px),690px); border-radius:9px; }
  .game-cover img { object-position:center top; }
  .game-cover { align-items:center; padding-bottom:0; }
  .story,.questions { margin:22px 0; }
}
@media (prefers-reduced-motion:reduce) {
  .load-mark { animation:none; }
}
