/* The shared Curonia game look. Each game chooses a palette with data-game; layout remains with the game's page.
   Fonts are pixel fonts, crisp at their own sizes: Jersey 15 at 15 and 30 px (clear digits, Latvian letters), Tiny5 at
   8 px for labels drawn on a canvas. A surface (panel, button) is: --panel/--raised fill, a 2px --edge outline, a raised
   edge (--hi top-left, --lo bottom-right) and the --cut corners. */
  @font-face { font-family: 'Jersey 15'; src: url(fonts/Jersey15.ttf); }
  @font-face { font-family: Tiny5; src: url(fonts/Tiny5.ttf); }
  :root[data-game="theycameback"] {
    /* field grey (L0914: no more brown); gold, green and red as before */
    --bg: #101315; --ink: #dde2dc; --dim: #7f8b8f; --gold: #d8b052; --ours: #8db462; --theirs: #d0644a; --them: #6f86c0;
    --panel: #1c2226; --raised: #2a3238; --hover: #36414a; --hi: #46525b; --lo: #0b0e10; --edge: #050607; --rule: #2c353b;
    --cut: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
    /* the plain pixel surface (L0914): flat, a 2px outline, notched corners; a button has a 2px darker bottom edge
       and sinks by it when pressed */
    --panel-shade: none;
    --button-shade: inset 0 -2px 0 var(--lo);
    --button-press: inset 0 2px 0 var(--lo);
    /* text on a full bar; the folders, one colour each (L0916: World, Tile and Unit are separate folders); the grain of
       a surface (none here); the title over the map */
    --on-fill: var(--bg); --f-world: #1c2226; --f-tile: #1d2621; --f-unit: #1e2230; --f-back: #12171a; --grain: none; --title: var(--gold); --fill: var(--gold);
  }
  /* the dispatch (L0916): the same pixel surfaces as paper, ink and a red stamp, like a field order of 1919. The grey
     above stays as it was (Settings: Look). */
  :root[data-game="theycameback"][data-theme="dispatch"] {
    --bg: #15130f; --ink: #2b2418; --dim: #6f6350; --gold: #9a2c1c; --ours: #476b26; --theirs: #a33a22; --them: #2c4a8a;
    --panel: #d9cca7; --raised: #cbbb8f; --hover: #e7dcb9; --hi: #efe6c8; --lo: #a3936a; --edge: #241e14; --rule: #b4a57d;
    --on-fill: #efe6c8; --fill: #b07a1e; --f-world: #d9cca7; --f-tile: #d3c08e; --f-unit: #c4c3a2; --f-back: #a99a70; --title: #e3d6b0;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect x='1' y='0' width='1' height='1' fill='%23503c1e' fill-opacity='.10'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%23503c1e' fill-opacity='.07'/%3E%3Crect x='0' y='3' width='1' height='1' fill='%23fff' fill-opacity='.18'/%3E%3C/svg%3E");
  }

  :root[data-game="rio-novo"] {
    --bg: #fff; --ink: #3f3028; --dim: #76513b; --gold: #b5653d; --ours: #4d713e; --theirs: #b5653d;
    --panel: #fff; --raised: #faf7f2; --hover: #f3eadf; --hi: #fff; --lo: #e3d5bb; --edge: #76513b; --rule: #e3d5bb;
    --cut: none; --panel-shade: none; --button-shade: none; --button-press: none; --grain: none;
  }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.game-screen { min-height: 100%; }
.game-menu[hidden] { display: none !important; }
.game-panel,

/* the surface pieces, for pages that use classes */
.px-panel { background: var(--grain), var(--panel); background-size: 8px 8px, auto; color: var(--ink); border: 2px solid var(--edge); clip-path: var(--cut); box-shadow: var(--panel-shade); }
.game-button,
.px-button { font: inherit; color: var(--ink); background: var(--raised); border: 2px solid var(--edge); clip-path: var(--cut); box-shadow: var(--button-shade); padding: 4px 10px; cursor: pointer; }
.game-button:hover,
.px-button:hover { background: var(--hover); color: var(--gold); }
.game-button:active,
.px-button:active { box-shadow: var(--button-press); }
.game-button:focus-visible,
.px-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
