/* Dílna prototype — Retro 60s palette (docs/03-design-system.md) */
:root {
  --paper: #f3e9cf; --sheet: #fbf5e3; --ink: #33291f; --ink-soft: #6f6258;
  --token: #f2c14e; --flaw: #c2792b; --dado: #b5533c; --en2: #b9d4bd;
  /* scene palette, used by artwork carried over from the style sample */
  --c-paper:#f3e9cf; --c-wall:#e8dcb0; --c-dado:#b5533c; --c-rail:#7d3526; --c-floor:#a8764a; --c-skirt:#5e3b24; --c-shadow:#5e3b24; --c-dark:#2e2a26;
  --c-en1:#d3e6d4; --c-en2:#b9d4bd; --c-en3:#93b39a; --c-panel:#a9c9b0; --c-vent:#5f7d68; --c-door:#c4dcc8; --c-frame:#6e8a76; --c-plate:#d8b25a;
  --c-bench:#8a5634; --c-leg:#6b4026; --c-clock:#4e3322; --c-face:#fbf3dc; --c-token:#f2c14e; --c-sheet:#fbf5e3; --c-tray:#b7b2a2;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", -apple-system, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #2a221c; overflow: hidden; }
body { font-family: var(--sans); color: var(--ink); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#stage { position: fixed; inset: 0; display: grid; place-items: center; }
#stage > .screen { position: relative; width: min(100vw, calc(100vh * 4 / 3)); aspect-ratio: 4 / 3; background: var(--paper); overflow: hidden; }
#stage svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#stage canvas { position: absolute; display: block; touch-action: none; }
.o { stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.hot { cursor: pointer; }
.grab { cursor: grab; }

/* overlays: Proč card, material cards, penál, parent log */
#overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(40, 28, 18, .45); }
#overlay[hidden] { display: none; }
.card { position: relative; width: min(760px, 92vw); max-height: 88vh; overflow: auto; background: var(--sheet);
  border: 2px solid var(--ink); border-radius: 22px; padding: 22px 28px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.card h2 { font-family: var(--serif); font-size: 30px; margin: 4px 0 10px; }
.card p { font-size: 22px; line-height: 1.5; margin: 0 0 10px; }
.card .illo { width: 100%; aspect-ratio: 16 / 7; border-radius: 12px; background: #efe4c6; margin-bottom: 14px; overflow: hidden; }
.card .illo svg { width: 100%; height: 100%; display: block; }
.card .src { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.card .close { position: absolute; top: 12px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink);
  background: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.chip { min-height: 86px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; padding: 10px 12px; font-size: 18px; line-height: 1.35;
  cursor: pointer; display: grid; place-items: center; text-align: center; }
.chip.closed { background: var(--token); font-family: var(--serif); font-size: 34px; font-weight: 700; }
.nav { display: flex; justify-content: space-between; margin-top: 12px; }
.nav button, .btn { min-width: 60px; min-height: 60px; border-radius: 30px; border: 2px solid var(--ink); background: #fff; font-size: 26px; cursor: pointer; padding: 0 18px; }
.penal-grid { display: grid; grid-template-columns: 1fr; gap: 6px; max-height: 60vh; overflow: auto; }
.penal-grid svg { width: 100%; height: 70px; display: block; background: #3f5a4c; border-radius: 10px; }
.log table { width: 100%; border-collapse: collapse; font-size: 16px; }
.log td, .log th { border-bottom: 1px solid #d8ccb6; padding: 6px 8px; text-align: left; }
.flaw { color: var(--flaw); font-weight: 700; }
