/* Rally design tokens — "Center court, live". See DESIGN.md §3.
   A pro-tour arena at night, and the TV graphics package that goes with it, built from the table's
   own materials: tour-blue surfaces, the 20 mm white edge line, the net tape, the two rubbers and
   the orange ball. */
@import url('https://fonts.googleapis.com/css2?family=Anybody:ital,wdth,wght@0,50..150,400..900;1,50..150,400..900&family=Instrument+Sans:wdth,wght@75..100,400..700&family=Martian+Mono:wdth,wght@75..112.5,400..700&display=swap');

:root {
  color-scheme: dark;

  /* The dark beyond the lights, and the surfaces that sit in it. */
  --arena: #060914;
  --arena-2: #0B1124;
  --arena-3: #131C38;

  /* The table: tour blue, lit when something is chosen. */
  --court: #123A9E;
  --court-hi: #1E52D6;
  --court-deep: #0B2560;

  /* The white line, and text on dark at three strengths. */
  --line: #F2F5FF;
  --line-2: rgba(242, 245, 255, 0.74);
  --line-3: rgba(242, 245, 255, 0.48);
  --hair: rgba(242, 245, 255, 0.12);
  --hair-strong: rgba(242, 245, 255, 0.26);

  /* The orange ball: the one accent. Focus, primary actions, Perfect, rally heat. */
  --ball: #FF8A1F;
  --ball-hi: #FFB65E;
  --ball-ink: #1A0D02;

  /* The rubbers: one per player. Red, and the blue sheet the rules now allow. */
  --p1: #FF2E5B;
  --p2: #2EC4FF;

  --ok: #2FD38A;
  --warn: #FFB020;

  /* Coins: gold, and only coins (shop.js COIN_SVG; the Legendary rarity is priced in them). */
  --coin: #F5C04A;
  --coin-hi: #FFE08A;
  --coin-deep: #A8741A;
  /* An item's rarity (shop.js RARITY_INK): silver, royal blue, violet, gold. Off the player colours
     and the ball's orange, so a rarity never reads as a player or as something to press. */
  --rare-common: #AEB7D0;
  --rare-rare: #5B8CFF;
  --rare-epic: #B46CFF;
  --rare-legendary: #F5C04A;
  --rare-mythic: #FF3D6E;

  /* Spin, as the ball's trail draws it at its heaviest (scene.js TRAIL_LOOK): topspin orange,
     backspin cyan. Everything that names a spin uses these. */
  --spin-top: #FF6608;
  --spin-back: #10CCFF;

  --display: 'Anybody', 'Arial Black', ui-sans-serif, sans-serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Light from the rig above; on dark, shadow is mostly a darker ground under the object. */
  --lift-1: 0 1px 0 rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  --lift-2: 0 1px 0 rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.32), 0 14px 28px rgba(0, 0, 0, 0.3);
  --lift-3: 0 2px 0 rgba(0, 0, 0, 0.45), 0 10px 24px rgba(0, 0, 0, 0.4), 0 30px 70px rgba(0, 0, 0, 0.45);

  /* Broadcast parallelogram: graphics lean forward, like the ball leaving the bat. */
  --lean: 12px;

  --r-1: 3px;
  --r-2: 6px;
  --r-3: 10px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap: cubic-bezier(0.2, 1.5, 0.4, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Legacy print palette. Only the dev tools still use it (audio demo, phone dev display);
     the game itself does not. */
  --paper: #EEEAE2;
  --paper-2: #E3DED3;
  --paper-3: #D6D0C3;
  --ink: #16150F;
  --ink-2: #4A473F;
  --ink-3: #8A867B;
  --night: #0D0E10;
  --night-2: #17191C;
  --night-3: #23262A;
  --rule: rgba(22, 21, 15, 0.14);
  --rule-strong: rgba(22, 21, 15, 0.32);
  --rule-night: rgba(238, 234, 226, 0.12);
  --table: #1D3D78;
  --lamp: #FFE3B0;
  --serif: var(--display);
  --press: 0 0 0 rgba(0, 0, 0, 0), 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Small technical labels: mono, upper case, spaced. */
.label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
