/* SamSam World! design tokens: colours, land palettes, type, radii, shadows, spacing.
   No web fonts: the app must work offline (ui-rounded is SF Pro Rounded on iPad / Mac). */
:root {
  /* ink and ground */
  --ink: #1E2348;
  --ink-2: #3B4166;        /* body text on white, softer than ink */
  --muted: #5A6080;        /* secondary text: 6.0:1 on white */
  --ground: #F3F6FF;       /* the app's background */
  --ground-2: #E7ECFF;     /* soft circles, chips */
  --grass: #E4F6EA;
  --line: #E6E8F2;
  --white: #FFFFFF;
  --paper: #F8F7F4;        /* the shell's background: warm paper white */
  --hair: #E8E6DF;         /* hairlines around cards and buttons */
  --star: #FFC21A; --star-edge: #E0A000; --star-text: #7A5300;
  --sticker: #1F6FD6; --sticker-text: #184E9E; --sticker-edge: #B9D9F7;  /* the sticker book: Sam's blue */
  --danger: #C62828;

  /* the main action colour (Think Land's purple) */
  --primary: #5B4BD6; --primary-edge: #3C2EA8; --primary-soft: #EEF0FF;

  /* lands: tint (backgrounds), accent (buttons, bars), text (readable land text), edge (card shadow) */
  --number-tint: #FFE7D6; --number: #E8600C; --number-text: #8A3A06; --number-edge: #F5C7A4;
  --color-tint: #FDE2EF;  --color: #C7307A;  --color-text: #8E1F57;  --color-edge: #F2B6D2;
  --think-tint: #E7E4FF;  --think: #5B4BD6;  --think-text: #3C2EA8;  --think-edge: #C4BEF5;
  --music-tint: #DDF5E6;  --music: #1E8E55;  --music-text: #135E37;  --music-edge: #AEE3C3;
  --giggle-tint: #FFF2C4; --giggle: #B07800; --giggle-text: #7A5300; --giggle-edge: #F0D57A;
  /* the current land (screens set these on their root from js/lands.js; the game bar from body[data-land]) */
  --tint: var(--ground-2); --accent: var(--primary); --land-text: var(--primary-edge); --edge: #C9D0E6; --page: var(--ground); --card-edge: #DDE2F2;

  /* type: rounded system fonts, heavy headings */
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;  /* the shell (menus, Parents' Corner, the game bar): clean, not rounded */
  --fw-head: 800; --fw-bold: 700;
  --fs-hero: clamp(40px, 6vw, 56px);
  --fs-h1: clamp(30px, 4.6vw, 52px);
  --fs-h2: clamp(22px, 2.6vw, 28px);
  --fs-big: clamp(19px, 2.2vw, 22px);
  --fs-body: 17px;
  --fs-small: 15px;

  /* shape */
  --r-xl: 32px; --r-lg: 28px; --r-md: 20px; --r-sm: 14px; --r-pill: 999px;
  --sh-1: 0 4px 0 rgba(30, 35, 72, .08);
  --sh-2: 0 6px 0 rgba(30, 35, 72, .08);
  --sh-3: 0 8px 0 rgba(30, 35, 72, .1);
  --sh-pop: 0 18px 50px rgba(30, 35, 72, .25);
  --sh-xs: 0 1px 2px rgba(20, 22, 43, .05);
  --sh-card: 0 1px 2px rgba(20, 22, 43, .04), 0 6px 20px rgba(20, 22, 43, .05);
  --sh-raise: 0 2px 4px rgba(20, 22, 43, .05), 0 14px 34px rgba(20, 22, 43, .10);

  /* space */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --gutter: clamp(16px, 3vw, 36px);
  /* the device's edges: the notch, the rounded corners and the home bar of an iPhone or iPad (0 px on other devices).
     Styles use these four, never env() itself, so the robots can try a device by setting them (tools/playtest/devices.mjs). */
  --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px);

  /* the game bar */
  --bar-h: 72px;
  --focus: 0 0 0 4px #FFFFFF, 0 0 0 7px var(--primary);
}
body[data-land="number"] { --tint: var(--number-tint); --accent: var(--number); --land-text: var(--number-text); --edge: var(--number-edge); }
body[data-land="color"]  { --tint: var(--color-tint);  --accent: var(--color);  --land-text: var(--color-text);  --edge: var(--color-edge); }
body[data-land="think"]  { --tint: var(--think-tint);  --accent: var(--think);  --land-text: var(--think-text);  --edge: var(--think-edge); }
body[data-land="music"]  { --tint: var(--music-tint);  --accent: var(--music);  --land-text: var(--music-text);  --edge: var(--music-edge); }
body[data-land="giggle"] { --tint: var(--giggle-tint); --accent: var(--giggle); --land-text: var(--giggle-text); --edge: var(--giggle-edge); }
