/* War of the Wilds — the palette and the cards, shared by the game, the deck page and the website. */

:root {
  --moss: #232f1d;
  --moss-band: #2d3c26;
  --moss-line: #3f5235;
  --leaf: #dfe6c6;
  --leaf-dim: #a3b08a;
  --ink: #1b1710;
  --paper: #efe6cf;
  --paper-dim: #cfc5a8;
  --acorn: #d89b2b;
  --acorn-cap: #7a4f1c;
  --berry: #b3374a;
  --twig: #8b6a3a;
  --pebble: #77838f;
  --feather: #3f86b8;
  --relic: #6a5580;
  --creature: #33503a;
  --day: #3e5a6b;
  --home: #6b4f2c;
  --serif: "Iowan Old Style", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

/* Sized from the card's own width, so a card keeps its proportions at any size. On a card 280 wide, 1cqw is 2.8. */
.card { container-type: inline-size; position: relative; width: 210px; aspect-ratio: 5 / 7; flex: none; display: flex; flex-direction: column; overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); text-align: left; font-family: Newsreader, Georgia, serif; font-weight: 400; box-shadow: 0 3px 10px #0005; }
.card .bar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 2cqw; height: 14.3cqw; padding: 0 2.9cqw 0 3.9cqw; color: var(--paper); }
.card .bar b { font: 700 6.43cqw/1.05 Almendra, Georgia, serif; min-width: 0; }
.card .cost { display: inline-flex; flex: none; align-items: center; gap: 1.4cqw; }   /* about 3 px on a 210 px card: each circle reads as its own token */
.card .coin { width: 8.93cqw; height: 8.93cqw; font-size: 5cqw; }
.card .coin img { width: 6.8cqw; height: 6.8cqw; }
.card .art { display: block; flex: none; width: 100%; aspect-ratio: 1 / .94; object-fit: cover; object-position: top; }
.card .rule .num { display: inline-flex; align-items: center; justify-content: center; width: 1.3em; height: 1.3em; margin: 0 .05em; vertical-align: .02em; border: 1px solid currentColor; border-radius: 50%; font: 700 .85em/1 "Hanken Grotesk", system-ui, sans-serif; }
.card .rule .sym { display: inline; width: 1.25em; height: 1.25em; vertical-align: -.28em; margin: 0 .02em; }
.card .rule { display: block; padding: 4.3cqw 5cqw; font-size: 5cqw; line-height: 1.3; }
.card .clear { float: right; width: 17.1cqw; height: 21.4cqw; shape-outside: polygon(0 13.6cqw, 100% 13.6cqw, 100% 100%, 0 100%); }
.card .typemark { position: absolute; left: 2.9cqw; top: 96.4cqw; display: flex; align-items: center; justify-content: center; width: 8.93cqw; height: 8.93cqw; border-radius: 50%; background: var(--paper); }
.card .typemark img { width: 6.8cqw; height: 6.8cqw; }
.card .stats { position: absolute; right: 4.6cqw; bottom: 3.2cqw; font: 700 7.14cqw/1 "Hanken Grotesk", system-ui, sans-serif; }

.coin { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); color: var(--ink); font: 700 13px/1 "Hanken Grotesk", system-ui, sans-serif; vertical-align: middle; }
.coin img { display: block; width: 17px; height: 17px; }
.coin .d1 { translate: -.028em 0; }   /* a 1's flag leans left, so its stem sat right of centre: this puts the stem's weight on the centre. Vertically it lines up with the other digits (measured at 200 px) */

/* A home card lies on its side with the title along the bottom. */
.homecard { container-type: inline-size; width: 238px; aspect-ratio: 7 / 5; flex: none; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; box-shadow: 0 3px 10px #0005; background: var(--home); }
.homecard > img:first-child { display: block; flex: 1; min-height: 0; width: 100%; object-fit: cover; }
.homecard .bar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 2cqw; height: 10.2cqw; padding: 0 2cqw 0 2.8cqw; color: var(--paper); }
.homecard .bar b { font: 700 4.6cqw/1.05 Almendra, Georgia, serif; }
.homecard .cost { display: inline-flex; gap: 1cqw; }
.homecard .coin { width: 6.4cqw; height: 6.4cqw; }
.homecard .coin img { width: 4.9cqw; height: 4.9cqw; }

/* A resource card is only its picture. */
.rescard { width: 80px; aspect-ratio: 5 / 7; flex: none; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #f5d5a7; box-shadow: 0 2px 7px #0005; }
.rescard img { display: block; width: 100%; height: 100%; object-fit: cover; }
