/* Cordwood. Swiss: one grid, heavy grotesk numerals, one red thing at a
   time (usually the axe). Palette follows the light: paper by day, dark
   after sunset. Switzer is the brand face, from the repo's brand folder. */
@font-face { font-family: 'Switzer'; font-weight: 400; src: url(../fonts/Switzer-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Switzer'; font-weight: 600; src: url(../fonts/Switzer-600.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Switzer'; font-weight: 800; src: url(../fonts/Switzer-800.woff2) format('woff2'); font-display: swap; }
:root { --paper: #f4f2ed; --ink: #0a0a0a; --accent: #e4002b; --soft: #5f5f5f; --line: color-mix(in srgb, var(--ink) 16%, transparent); --wash: color-mix(in srgb, var(--paper) 88%, transparent); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1a18; color: var(--ink); font-family: 'Switzer', 'Helvetica Neue', Arial, sans-serif; -webkit-font-smoothing: antialiased; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
canvas#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: crosshair; }
button { font: inherit; color: inherit; cursor: pointer; }
.noscript, .fail { position: fixed; inset: 0; display: grid; place-items: center; color: #eee; padding: 24px; text-align: center; }
kbd { font: inherit; font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }

#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; gap: 8px; text-align: center; background: #f4f2ed; color: #0a0a0a; transition: opacity .6s .2s, visibility 0s .8s; }
#loader b { font-size: clamp(48px, 9vw, 96px); font-weight: 800; letter-spacing: -3px; line-height: .9; }
#loader span { font-size: 14px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #6b6b6b; }
body.ready #loader { opacity: 0; visibility: hidden; }

/* ------------------------------------------------------------ menus */
#menu { position: fixed; inset: 0; display: none; z-index: 20; overflow: auto; padding: 28px; touch-action: pan-y; -webkit-overflow-scrolling: touch; color: var(--ink); }
#menu.on { display: flex; align-items: safe center; justify-content: center; }
#menu.title { justify-content: flex-start; align-items: safe center; background: linear-gradient(90deg, var(--wash) 0 40%, transparent 68%); }
#menu.pause, #menu.over, #menu.howto, #menu.settings, #menu.shop { background: color-mix(in srgb, var(--paper) 45%, transparent); }

.title { width: min(560px, 100%); display: flex; flex-direction: column; gap: 20px; }
.title h1 { font-weight: 800; font-size: clamp(52px, 7.2vw, 104px); line-height: .86; letter-spacing: -3.5px; margin: 0; white-space: nowrap; }
.title h1 i { display: inline-block; width: .1em; height: .7em; background: var(--accent); margin-left: .1em; vertical-align: -.02em; }
.title header p { margin: 14px 0 0; font-size: 18px; line-height: 1.45; max-width: 40ch; color: var(--soft); }
.modes { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.mode { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: baseline; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 12px 4px; }
.mode .n { grid-row: span 2; font-size: 13px; font-weight: 600; color: var(--soft); }
.mode b { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.mode small { font-size: 14px; color: var(--soft); }
.mode:hover b, .mode:focus-visible b { color: var(--accent); }
.mode:focus-visible { outline: none; }
.mode.primary b { font-size: 40px; }
.opts { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 14px 54px; border-bottom: 1px solid var(--line); }
.group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.group > label { width: 84px; font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--soft); }
.themes > label { width: auto; margin-right: 6px; }
.chip { border: 1.5px solid var(--ink); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; }
.chip.on { background: var(--ink); color: var(--paper); }
.chip:hover:not(.on) { border-color: var(--accent); color: var(--accent); }
.title footer { display: flex; gap: 22px; }
.link { background: none; border: 0; padding: 0; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); }

.card { width: min(520px, 100%); background: var(--paper); border-top: 6px solid var(--ink); padding: 26px 28px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.card.wide { width: min(680px, 100%); }
.card h2 { margin: 0 0 4px; font-size: 48px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.card .sub { margin: -6px 0 0; color: var(--soft); font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.btn { border: 1.5px solid var(--ink); background: transparent; padding: 11px 20px; border-radius: 999px; font-weight: 800; font-size: 16px; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { border-color: var(--accent); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn[aria-disabled=true] { opacity: .45; }
.end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; font-size: 16px; line-height: 1.45; }
.keys { margin: 0; font-size: 14px; color: var(--soft); line-height: 1.8; }
input[type=range] { flex: 1; accent-color: var(--accent); }
dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
dl div { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); }
dt { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--soft); font-weight: 600; }
dd { margin: 2px 0 0; font-size: 26px; font-weight: 800; }
.card-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.card-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--soft); font-weight: 600; border-bottom: 1px solid var(--line); padding: 4px 0; }
.card-table td { padding: 5px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.shop { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.shoprow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.shoprow dd { font-size: 20px; }
.shoprow small { color: var(--soft); font-size: 14px; }
.shoprow .btn { min-width: 86px; }
.maxed { font-weight: 800; color: var(--soft); text-transform: uppercase; font-size: 13px; letter-spacing: .6px; }

/* ------------------------------------------------------------ hud */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; display: none; color: var(--ink); }
#hud.on { display: block; }
.logcard { position: absolute; left: 22px; top: 20px; background: var(--paper); border-top: 5px solid var(--ink); padding: 10px 14px 12px; min-width: 190px; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 10px 30px rgba(0,0,0,.14); opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; contain: layout paint; }
.logcard.on { opacity: 1; transform: none; }
.logcard em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .2s, opacity .2s; }
.logcard em.on { max-height: 20px; opacity: 1; margin-top: 4px; }
.logcard .cut { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 13px; font-weight: 600; color: var(--soft); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .2s, opacity .2s; }
.logcard .cut.on { max-height: 44px; opacity: 1; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.logcard .cut i { font-style: normal; color: var(--soft); }
.logcard .cut small { font-size: 12px; color: var(--soft); }
.logcard .cut .k { color: var(--ink); font-weight: 800; }
.logcard .cut .k::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--line); vertical-align: 0; }
.logcard .cut .k.split::before { background: #d9c6a4; }
.logcard .cut .k.kindling::before { background: #f59e2e; }
.logcard .cut .k.shingle::before { background: #4ea6e6; }
.logcard .cut .k.stick::before { background: #6cc24a; }
.logcard b { font-size: 30px; font-weight: 800; letter-spacing: -.8px; line-height: 1; }
.logcard span { font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--soft); }
.pips { display: flex; gap: 4px; margin-top: 4px; }
.pips i { width: 16px; height: 5px; background: var(--line); }
.pips i.on { background: var(--ink); }
.corner { position: absolute; right: 22px; top: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.nums { display: flex; gap: 0; background: var(--paper); border-top: 5px solid var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.14); contain: layout paint; }
.nums:empty { display: none; }
.nums div { padding: 8px 14px 10px; border-left: 1px solid var(--line); min-width: 74px; }
.nums div:first-child { border-left: 0; }
.nums dd { font-size: 30px; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.nums dd small { font-size: 16px; color: var(--soft); }
.nums dd.hot { color: var(--accent); }
.nums .sm dd { font-size: 20px; }
.order { background: var(--paper); border-top: 3px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 7px 12px 9px; min-width: 190px; display: none; flex-direction: column; gap: 2px; text-align: right; }
.order.on { display: flex; }
.order dt { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--soft); }
.order dd { font-size: 17px; font-weight: 600; }
.order dd b { font-size: 22px; font-weight: 800; }
.order small { font-size: 12px; font-weight: 600; color: var(--accent); }
.acts { display: flex; gap: 8px; }
.pill { pointer-events: auto; border: 1.5px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.callout { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font-size: clamp(30px, 5vw, 60px); font-weight: 800; letter-spacing: -1.5px; opacity: 0; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 1px rgba(0,0,0,.5); }
.callout.good { color: #fff; }
.callout.good::after { content: ''; display: block; width: 44px; height: 5px; background: var(--accent); margin: 8px auto 0; }
.callout.soft { font-size: clamp(22px, 3.4vw, 38px); }
.callout.on { animation: call 1.3s ease-out forwards; }
@keyframes call { 0% { opacity: 0; transform: translateY(10px) scale(.96); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.hint { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; opacity: 0; transition: opacity .4s; white-space: nowrap; }
.hint.on { opacity: 1; }
.banner { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--paper); border-top: 4px solid var(--accent); padding: 10px 14px; font-weight: 800; display: none; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.banner.on { display: flex; }
.toast { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.toast.on { opacity: 1; }
.mode-chop .acts .pill:not(#uPause), .mode-night .acts .pill:not(#uPause):not(#uStack), .mode-daily .acts .pill:not(#uPause) { display: none; }
.nums .bar { display: block; height: 4px; background: var(--line); margin-top: 4px; }
.nums .bar b { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.nums .sm2 { font-size: 22px; }
.card-table .mk { font-size: 17px; text-align: center; }
.order small.late { color: var(--accent); font-weight: 800; }
.order small:not(.late) { color: var(--soft); }
.daycard { position: absolute; left: 50%; top: 34%; transform: translate(-50%, 8px); background: var(--paper); border-top: 5px solid var(--ink); padding: 12px 22px 14px; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.2); opacity: 0; transition: opacity .5s, transform .5s; display: flex; flex-direction: column; gap: 2px; }
.daycard.on { opacity: 1; transform: translate(-50%, 0); }
.daycard dd { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin: 0; }
.daycard small { font-size: 13px; font-weight: 600; color: var(--soft); }
.guide.book dd { font-size: 22px; font-weight: 800; color: var(--ink); }
#menu.book { background: color-mix(in srgb, var(--paper) 45%, transparent); }
.card-table .miss { color: var(--accent); font-weight: 800; }

body.backdrop #menu, body.backdrop #hud, body.nohud #hud, body.photo #hud { display: none !important; }
/* the showcase: everything fades away while it shows itself */
#menu, #hud { transition: opacity 1.4s; }
body.showcase #menu, body.showcase #hud { opacity: 0; pointer-events: none !important; }
body.showcase #hud * { pointer-events: none !important; }
body.showcase canvas#c { cursor: none; }
.fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 40; transition: opacity .55s; }
.fade.on { opacity: 1; }
/* cinematic: nothing but the scene while you play */
body.cinematic #hud > :not(.ghost) { display: none !important; }
.ghost { display: none; position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0,0,0,.18); pointer-events: auto; opacity: .45; gap: 5px; align-items: center; justify-content: center; }
.ghost i { width: 4px; height: 13px; background: #fff; border-radius: 1px; }
@media (pointer: coarse) { body.cinematic .ghost { display: flex; } }
.pausenums { margin-top: -4px; }
.range-note { font-size: 12px; font-weight: 600; color: var(--soft); letter-spacing: .3px; }
body.backdrop canvas#c { cursor: default; }
body.backdrop #loader { display: none; }

@media (max-width: 720px) {
  #menu { padding: 18px; }
  #menu.title { background: var(--wash); }
  .opts { padding-left: 4px; }
  .logcard { left: 10px; top: 10px; min-width: 0; padding: 8px 10px 10px; }
  .logcard b { font-size: 22px; }
  .corner { right: 10px; top: 10px; }
  .nums div { padding: 6px 9px 8px; min-width: 0; }
  .nums dd { font-size: 22px; }
  .hint { bottom: 18px; font-size: 13px; white-space: normal; text-align: center; width: 86vw; }
  .card { padding: 20px 18px; }
  .card h2 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) { .callout.on { animation-duration: .01s; } }

.guide-h { font-size: 14px; letter-spacing: .6px; text-transform: uppercase; margin: 18px 0 6px; color: var(--soft); }
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin: 0; }
.guide div { border-top: 1px solid var(--line); padding-top: 6px; }
.guide dt { font-weight: 800; }
.guide dd { margin: 0; font-size: 13px; color: var(--soft); }
.guide small { font-size: 12px; font-weight: 600; color: var(--accent); }

/* the boot credit (shared/brand.js): light over the yard, a hard 1px shadow to read on bright sand */
.wl-credit.cw { color: #f4f2ec; text-shadow: 0 1px 0 rgba(0, 0, 0, .55); }
