/* Painted faces, inset trim and a shallow raised edge for Snowbell's controls.
   The game screens own button sizing and layout, including compact landscape HUDs. */

/* Shared control families. Artwork, board pieces and scene hit targets have their own rendering. */
body :is(
  .primary,.secondary,.play-primary,.play-text,.club-primary,.club-secondary,.chapter-play,
  .burrow-primary,.burrow-secondary,.burrow-fridge,.burrow-shop-buy,.burrow-shop-quiet,
  .k-primary,.k-button,.pz-action,.pz-secondary,.quiz-button,.quiz-ranking-button,
  .cup-action,.cup-secondary,.town-main-action,.event-again,.recovery-secondary,.shop-price,
  .town-shortcuts button,#town-guide-links button,.town-card,.care-stop,.care-fridge-link,
  .care-item button,.care-empty button,.care-counters button,.burrow-filters button,.burrow-family,
  .club-tabs button,.mail-tabs button,.wd-categories button,.wd-rotation button,
  .ranking-footer button,.mahjong-actions button,.mahjong-ranking-open,.mahjong-levels-open,
  #mahjong-levels .advance,#mahjong-levels nav button,#mahjong-levels .map-tools button,
  #mahjong-new-confirm button,#mahjong-shelf-empty button,.event-actions button,.event-foot button,
  .tools button,.hud-pause,.scene-picker,.town-map-tools button,.kitchen-camera button,
  .club-close,.wheel-close,.care-close,.cup-close,.quiz-ranking-close,.pz-dialog-head button,
  .cookbook-top button,.team-heading>button,.mahjong-guide-heading button,.mahjong-help-open,
  #mahjong-shop-close,#mahjong-ranking-close,#close-chapters,#town-menu-close,#calendar-close,
  #town-inbox,#town-logins,#town-menu-open,#calendar-claim,#chapter-friend,#hint,#dj-shuffle,
  #wardrobe-unlock,.meer-toast button,[data-village-return]
) {
  --face:var(--ivory-face);
  --ink:var(--village-ink);
  --frame:#a1ada2;
  --inlay:#fffff0bc;
  --foot:#85978f;
  --corner:9px;
  --button-studs:none;
  color:var(--ink);
  border:1px solid var(--frame);
  border-radius:var(--corner);
  background:var(--button-studs),var(--face);
  box-shadow:inset 0 0 0 1px var(--inlay),inset 0 2px 0 #ffffff24,
    inset 0 -2px 0 #173a3e0e,0 2px 0 var(--foot),0 3px 4px #182b3520;
  text-decoration:none;
  transition:filter 110ms ease,box-shadow 110ms ease;

  /* Warm brass pins appear on substantial actions with room on either side of the label. */
  &:where(.primary,.chapter-play,.club-primary,.play-primary,.k-primary,.pz-action,
    .quiz-button:not(.secondary),.cup-action,.town-main-action,.burrow-primary,.event-again,
    #calendar-claim,#mahjong-levels .advance) {
    --button-studs:radial-gradient(circle at 5px 50%,#fff0bb 0 .65px,#aa8050 .85px 1.4px,transparent 1.65px),
      radial-gradient(circle at calc(100% - 5px) 50%,#fff0bb 0 .65px,#aa8050 .85px 1.4px,transparent 1.65px);
    font-weight:700;
  }
  &:where(.primary,.chapter-play,.club-primary,.play-primary,.k-primary,.cup-action,.town-main-action,
    .event-again,.event-actions button:first-child,.burrow-primary,.burrow-fridge,.care-item button,
    #mahjong-levels .advance,#mahjong-confirm,.meer-toast button,
    [aria-selected=true],[aria-pressed=true],[aria-current]:not([aria-current=false])) {
    --face:var(--pine-face);--ink:#fffbee;--frame:#244c42;--inlay:#b6d2b37a;--foot:#183c34;
  }
  &:where(.wheel-spin,.shop-price,.burrow-shop-buy,#calendar-claim,#town-find-treasure,
    #treasure-find .play-primary,#wardrobe-unlock,.mahjong-vip-panel .play-primary,
    .quiz-button:not(.secondary)) {
    --face:var(--brass-face);--ink:#412d1d;--frame:#a57840;--inlay:#fff0c1;--foot:#906239;
  }
  &:where(#hub-cup,#chapter-cup,.cup-feature .cup-action) {
    --face:var(--berry-face);--ink:#fff8ec;--frame:#71313c;--inlay:#e3b0a48f;--foot:#5d2b36;
  }
  &:where(.pz-action) {
    --face:linear-gradient(165deg,#a84f3b,#943c2e 54%,#773327);
    --ink:#fff8e6;--frame:#774031;--inlay:#e4b888aa;--foot:#653327;
  }
  &:where(.tools button,.hud-pause,.scene-picker,.town-map-tools button,.kitchen-camera button,
    .mahjong-actions button,.mahjong-ranking-open,.mahjong-levels-open,.quiz-button.secondary,
    .quiz-ranking-button,.club-close,.wheel-close,.care-close,.cup-close,.quiz-ranking-close,
    .pz-dialog-head button,.cookbook-top button,.team-heading>button,.mahjong-guide-heading button,
    .mahjong-help-open,#mahjong-levels .map-tools button,#mahjong-shop-close,#mahjong-ranking-close,
    #close-chapters,#town-menu-close,#calendar-close,#town-menu-open,#town-inbox,#town-logins,#dj-shuffle,
    [data-village-return]) {
    --face:var(--night-face);--ink:#f7f7ed;--frame:#718899;--inlay:#bbd1da68;--foot:#172f40;
  }
  &:where(.town-card,.care-stop) {
    --face:linear-gradient(155deg,#fffef8,#fcfaf1 65%,#f1f1e7);
    --frame:#c7cfc2;--foot:#aebcaf;
  }
  &:where(.hud-pause,.circle,.club-close,.wheel-close,.care-close,.cup-close,.quiz-ranking-close,
    .pz-dialog-head button,.cookbook-top button,.team-heading>button,.mahjong-guide-heading button,
    .mahjong-help-open,#mahjong-levels .map-tools button,#mahjong-shop-close,#mahjong-ranking-close,
    #close-chapters,#town-menu-close,#calendar-close,#town-menu-open,#town-inbox,#town-logins,[data-village-return]) {
    --corner:50%;--button-studs:none;
  }
  &:where(.mail-tabs button,.club-tabs button,.burrow-filters button,.care-counters button,.wd-categories button):not([aria-selected=true],[aria-pressed=true],[aria-current]) {
    --face:transparent;--frame:transparent;box-shadow:none;
  }
  @media (hover:hover) {
    &:is(a,:enabled):hover {filter:brightness(1.075)}
  }
  &:is(a,:enabled):active {
    filter:brightness(.98);
    box-shadow:inset 0 2px 4px #172a2370,inset 0 0 0 1px var(--inlay),0 1px 0 var(--foot);
  }
  &:focus-visible {
    outline:2px solid #fff9db;outline-offset:1px;
    box-shadow:0 0 0 5px #285873;
  }
  &:disabled {
    --button-studs:none;--face:linear-gradient(#e8ebe4,#dbe0d9);
    --ink:#505e59;--frame:#b1bdb5;--inlay:#edf0e9;--foot:#b1bdb5;
    opacity:1;filter:none;box-shadow:inset 0 0 0 1px var(--inlay);text-shadow:none;
  }
  &:where(.tools button,.hud-pause,.town-map-tools button,.mahjong-actions button,
    .quiz-button.secondary,.quiz-ranking-button):disabled {
    --face:linear-gradient(#364957,#30424e);--ink:#c2cdd0;--frame:#657882;--inlay:transparent;
  }
  @media (prefers-reduced-motion:reduce) {transition:none}
}

/* Retain a single joined silhouette for the map zoom rocker. */
.town-map-tools {border-color:#859baa;border-radius:13px;box-shadow:0 2px 0 #172f40}
body .town-map-tools button:is(#town-zoom-in,#town-zoom-out) {border:0;border-radius:0}
body .town-map-tools #town-zoom-in {border-left:1px solid #a1b7c37a}
.town-map-tools button:focus-visible {outline-offset:-4px}

/* Directory shortcuts read as a set; each keeps its full touch target. */
.town-shortcuts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.town-shortcuts button {min-width:0;min-height:46px;line-height:1.2;text-align:left}
.town-shortcuts :is(img,.town-icon) {flex:none}
@media(max-width:520px){.town-shortcuts {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:350px){.town-shortcuts button {padding-inline:7px;gap:4px}}

/* Answers keep the quiz's success, selection, and elimination colours. */
.quiz-choice {box-shadow:inset 0 1px 0 #d9e8ef30,inset 0 -2px 0 #09152342,0 2px 0 #0f2136}
.quiz-choice b {
  display:grid;place-items:center;flex:none;width:29px;height:29px;border:1px solid #c8a667;
  border-radius:50%;background:#172b40;color:#f4d28e;
}
.quiz-choice.right b {background:#20513e;border-color:#a6dcb1;color:#e3f7de}
.quiz-choice:enabled:active {box-shadow:inset 0 2px 4px #0f1f38aa}
