/* The page around the canvas, in the chosen look (game Decided 60; DESIGN.md "The look"): the walnut table, a painted
   signboard with the breadcrumb, the layers as blocks, the clock, and the cards as things lying on the table: the
   order on a clipboard, the quota on a docket, the chosen thing's card as a tag tied by a string to its thing, and the
   parts box beside the server room. The tokens are ui's, in crates/ui/src/scene.rs. */
@font-face { font-family: "Alfa Slab One"; font-weight: 400; font-style: normal; font-display: block; src: url(fonts/alfa-slab-one-400.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 400; font-style: normal; font-display: block; src: url(fonts/spectral-400.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 400; font-style: italic; font-display: block; src: url(fonts/spectral-400-italic.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 600; font-style: italic; font-display: block; src: url(fonts/spectral-600-italic.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 700; font-style: normal; font-display: block; src: url(fonts/spectral-700.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 800; font-style: normal; font-display: block; src: url(fonts/spectral-800.woff2) format("woff2"); }

:root {
  --walnut: #5b3c25;
  --fascia: #24402f;
  --brass: #cf9f45;
  --paper: #f1ead6;
  --ink: #221f1b;
  --you: #16867e;
  --lantern: #ffcf6a;
  --alarm: #c4302b;
  --sign: "Alfa Slab One", serif;
  --words: Spectral, serif;
}

html, body { margin: 0; height: 100%; overflow: hidden; background: var(--walnut); color: var(--paper); font: 400 16px/1.35 var(--words); }
canvas#table { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
button { font-family: var(--words); cursor: pointer; }

/* The top of the table: the signboard, the layers, the clock. */
#crumbs { position: fixed; top: 0; left: 0; right: 0; height: 96px; pointer-events: none; }
#crumbs > * { pointer-events: auto; position: absolute; }
#crumbs .signboard { left: 20px; top: 12px; background: var(--fascia); border: 3px solid #6b4a2c; border-radius: 4px; padding: 5px 16px 8px; transform: rotate(-1.2deg); box-shadow: 0 7px 12px rgba(20, 10, 2, 0.5); }
#crumbs h1 { margin: 0; font: 400 32px/1 var(--sign); color: var(--brass); }
#crumbs nav { display: flex; align-items: baseline; gap: 5px; margin-top: 3px; font: italic 400 15px/1.2 var(--words); color: var(--paper); }
#crumbs nav > button::after, #crumbs nav > span::after { content: ","; color: var(--paper); margin-left: 1px; display: inline-block; }
#crumbs nav > span:last-of-type::after { content: ""; }
#crumbs nav button { font: inherit; color: var(--paper); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
#crumbs nav span { font-style: normal; font-weight: 700; color: #fff6dc; }
#crumbs .layers { left: 50%; top: 18px; transform: translateX(-50%); display: flex; gap: 8px; }
#crumbs .layers button { font: 400 15px/1 var(--sign); background: #c9a26c; color: #3e2817; border: 0; border-radius: 3px; padding: 9px 13px 10px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 3px 4px rgba(20, 10, 2, 0.4); }
#crumbs .layers button[aria-pressed="true"] { background: var(--paper); transform: translateY(3px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 1px 2px rgba(20, 10, 2, 0.3); }
#crumbs .clock { right: 22px; top: 16px; display: grid; grid-template-columns: auto auto auto auto; justify-items: end; align-items: baseline; gap: 4px 6px; max-width: 360px; }
#crumbs .clock .pool, #crumbs .clock .money, #crumbs .clock .paused { grid-column: span 4; font: italic 400 14px/1.2 var(--words); color: var(--paper); }
#crumbs .clock .paused { color: var(--lantern); font-weight: 600; }
#crumbs time { grid-column: span 4; order: -1; font: 400 19px/1.1 var(--sign); color: var(--brass); }
#crumbs .clock button { font: 700 12px/1 var(--words); background: #2b2b2b; color: #e8e2cf; border: 0; border-radius: 10px; padding: 5px 9px; box-shadow: inset 0 -2px 0 #000; }
#crumbs .clock button[aria-pressed="true"] { background: var(--brass); color: var(--ink); }

/* The column of things on the table at the right. */
#panel { position: fixed; top: 96px; right: 0; bottom: 0; width: 380px; overflow-y: auto; padding: 8px 22px 30px 18px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }
.card { position: relative; background: var(--paper); color: var(--ink); padding: 12px 14px; font-size: 15px; }
.card h2 { font: 400 20px/1.15 var(--sign); margin: 0 0 6px; }
.card p { margin: 0 0 6px; }
.card p:last-child { margin-bottom: 0; }
.card button { font: 700 14px var(--words); color: var(--paper); background: var(--ink); border: 0; border-radius: 4px; padding: 6px 11px; margin: 4px 6px 0 0; }
.card button:hover { background: var(--you); }
.card button[aria-pressed="true"] { background: var(--you); }
.card .tools { display: flex; flex-wrap: wrap; margin: 6px 0; }
.card .gain { color: #1f5c45; }
.card .cost { color: #6b3020; }
.card .preview { font-style: italic; }

/* The order, clipped to a board. */
.card.order { background: #fdfaf0; border: 12px solid #a5784a; border-top-width: 30px; border-radius: 10px; transform: rotate(1.2deg); box-shadow: 0 14px 22px rgba(20, 10, 2, 0.5); }
.card.order::before { content: ""; position: absolute; left: 50%; top: -26px; width: 104px; height: 22px; margin-left: -52px; border-radius: 6px 6px 3px 3px; background: linear-gradient(#d9d9d6, #a9a9a5); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4); }

/* The quota on a docket pinned to the table. */
.card.quota { background: #fffef8; padding-top: 20px; border-bottom: 4px solid #e4dccb; border-radius: 1px; transform: rotate(-1.4deg); box-shadow: 0 8px 14px rgba(20, 10, 2, 0.45); }
.card.quota::before { content: ""; position: absolute; left: 50%; top: 6px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: #3a3a3a; box-shadow: 0 0 0 3px #cfcfcf; }
.card.quota .count { font: 700 18px/1.25 var(--words); }
.card.quota .unaccounted { color: var(--alarm); }

/* The chosen thing's card: a tag, tied by its string to the thing on the model. */
.card.tag { background: #f3e7c6; padding-left: 26px; border-radius: 3px 14px 14px 3px; transform: rotate(0.8deg); box-shadow: 0 7px 12px rgba(20, 10, 2, 0.42); }
.card.tag::before { content: ""; position: absolute; left: 9px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--walnut); box-shadow: 0 0 0 3px #d8c79a; }
.card.tag .public { border-left: 4px solid var(--lantern); padding-left: 6px; }

/* What the tool in hand would do, on a dashed card in your colour. */
.card.preview-card { background: #fffdf5; border: 2px dashed var(--you); border-radius: 6px; transform: rotate(-0.6deg); }
.card.room { background: #e9dfc6; border-left: 6px solid #e07a1f; border-radius: 2px; }
.card.notice { background: var(--paper); border-left: 6px solid var(--alarm); font-weight: 600; }
.card.hint { background: transparent; color: var(--paper); font-style: italic; padding: 0 4px; }
.card.hint p { color: var(--paper); }

/* The parts box beside the server room. */
#kit { position: fixed; top: 104px; left: 16px; width: 228px; bottom: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
#kit:empty { display: none; }
#kit .kit-lid { font: 400 16px/1 var(--sign); color: var(--paper); margin: 0 0 6px; }
#kit .part { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; text-align: left; background: #e9dfc6; color: var(--ink); border: 0; border-left: 7px solid #b04a2c; border-radius: 0 3px 3px 0; padding: 5px 9px; box-shadow: 0 2px 3px rgba(20, 10, 2, 0.35); }
#kit .part:nth-of-type(3n+2) { border-left-color: #3a5fa0; }
#kit .part:nth-of-type(3n) { border-left-color: #4c7a4a; }
#kit .part b { font: 400 13px/1.15 var(--sign); }
#kit .part small { font: italic 400 12px/1.15 var(--words); color: #4a453c; }
#kit .part[aria-pressed="true"] { background: #fffaf0; box-shadow: 0 0 0 2px var(--you), 0 5px 8px rgba(20, 10, 2, 0.35); }
