/* Warm paper around the tables, with a common sound control on every route. */
:root { --paper: #f5f2e9; --surface: #fffdf6; --line: #d8d2c4; }
body { background: radial-gradient(ellipse at 86% 0, #ece6d82e, transparent 620px), var(--paper); }
.header-actions { display: flex; align-items: center; gap: 7px; }
.header-actions .help-button { background: #fffdf682; }
#arcade-sound i { font: 800 17px/1 Georgia, serif; }
#arcade-sound b { font: inherit; }
#arcade-sound[aria-pressed="true"] { color: #225544; border-color: #b5c6b9; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: clamp(17px, 3vw, 36px) 0 clamp(24px, 4vw, 46px);
  padding: clamp(48px, 6vw, 82px) clamp(23px, 5vw, 68px);
  border: 1px solid #223e32;
  border-radius: clamp(13px, 2vw, 24px);
  background: #17372a;
  box-shadow: 0 12px 36px -22px #172b20ac;
  color: #fff8e4;
  text-align: left;
}
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#132c25 0%,#132c25eb 22%,#132c2560 47%,transparent 68%), url('../assets/arcade-studio.webp') center 55% / cover; }
.hero em { color: #eed2a1; }
.hero em::after { content: none; }
.hero h1 { font-size: clamp(41px, 6.8vw, 88px); }
.hero p { margin: 15px 0 0; max-width: 42%; color: #f2e9d5; }
.game-tile { box-shadow: 0 5px 18px -11px #392e2080; }
.game-tile:focus-visible { outline-offset: 3px; }
.section-heading h2 { letter-spacing: -.055em; }
.game-heading h1 span { color: #7a6850; }
@media (max-width: 560px) {
  .header-inner { gap: 5px; }
  .header-actions { gap: 4px; }
  .header-actions .help-button { padding: 7px 10px; }
  #help { font-size: 0; gap: 0; }
  .hero { padding: 38px 20px; }
  .hero p { max-width: 54%; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-tile { transition: none; }
}

/* Printed hwatu over green wool with folded edges and a brass rule. */
.matgo-table {
  --matgo-card-width: clamp(39px, 10.1vw, 65px);
  isolation: isolate;
  padding: clamp(13px, 2.8vw, 23px);
  border: 5px solid #46352a;
  border-radius: 18px;
  background:
    repeating-linear-gradient(112deg, #fff2cf06 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 44% 33%, #3e6657 0%, #264b40 54%, #18362e 100%);
  box-shadow: inset 0 0 0 1px #c4a46b, inset 0 3px 13px #0f241e75, 0 3px 0 #2c231e, 0 13px 22px -12px #382d25a3;
}
.matgo-seat { padding: 9px 12px; background: #132d25b8; border-color: #99b39b45; }
.matgo-seat.is-turn { border-color: #d6b77b; }
.matgo-rival-pack, .matgo-card-back {
  border: 2px solid #efc29a;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, transparent 0 4px, #f0bb7b55 4px 5px), repeating-linear-gradient(-45deg,#782d24 0 4px,#ba6851 4px 5px);
}
.matgo-rival-pack { align-self: center; width: 15px; height: 20px; transform: rotate(-9deg); box-shadow: 2px 1px #6b3026, 4px 2px #cf9476; }
.matgo-board-area { position: relative; background: #12382b35; border-color: #c1bc9154; }
.matgo-hand { background: #112d24a3; box-shadow: inset 0 1px 5px #14231f66; }
.matgo-card { border: 1.5px solid #713128; border-radius: 4px; box-shadow: 0 2px 0 #803527, 1px 4px 5px #06140f73; }
.matgo-card-art {
  inset: 0; background: var(--paper-card) url('../assets/hwatu-seasons.webp') var(--month-x, 0%) var(--month-y, 0%) / 400% 300% no-repeat;
}
.matgo-card-art::before, .matgo-card-art::after { content: none; }
.matgo-card-2, .matgo-card-6, .matgo-card-10 { --month-x: 33.333333%; }
.matgo-card-3, .matgo-card-7, .matgo-card-11 { --month-x: 66.666667%; }
.matgo-card-4, .matgo-card-8, .matgo-card-12 { --month-x: 100%; }
.matgo-card-5, .matgo-card-6, .matgo-card-7, .matgo-card-8 { --month-y: 50%; }
.matgo-card-9, .matgo-card-10, .matgo-card-11, .matgo-card-12 { --month-y: 100%; }
.matgo-month { top: 3%; left: 4%; padding: 1px 2px; border-radius: 2px; background: #fff7e6ea; color: #2d231b; }
.matgo-stamp { background: #fff4deef; }
.matgo-card-ribbon i { left: 60%; top: 10%; width: 18%; height: 48%; border-radius: 0 0 2px 0; box-shadow: 0 1px 2px #42251888; }
.matgo-card.is-in-play { outline: 1px dashed #ffdf87; outline-offset: 1px; }
.matgo-stock { box-shadow: 1px 2px #763b2d, 2px 4px #e0b591, 3px 6px #653024, 4px 7px 4px #10231a; }
.matgo-arrival { display: block; position: relative; z-index: 9; flex: none; width: var(--matgo-card-width); aspect-ratio: 7 / 10; perspective: 500px; pointer-events: none; }
.matgo-rotor { position: absolute; inset: 0; transform-style: preserve-3d; }
.matgo-rotor > * { position: absolute; inset: 0; backface-visibility: hidden; }
.matgo-card-back { display: block; transform: rotateY(180deg); }
.matgo-floating { position: absolute; }
.matgo-event { pointer-events: none; position: absolute; z-index: 24; top: 50%; left: 50%; white-space: nowrap; transform: translate(-50%,-50%) rotate(-4deg); color: #ffedc3; background: #692b22f5; border: 2px solid #dab97c; border-radius: 5px; box-shadow: 2px 4px #25332c88; padding: .12em .45em .18em; font: 900 clamp(22px,4vw,42px)/1.15 'Apple SD Gothic Neo',sans-serif; letter-spacing: -.07em; }
.matgo-table[inert] button:disabled { opacity: 1; }
.matgo-arrival.has-landed::after { content: ''; position: absolute; pointer-events: none; inset: -5%; border: 2px solid #fce0a7; border-radius: 26%; animation: matgo-strike .24s ease-out forwards; }
@keyframes matgo-strike { from { transform: scale(.86); opacity: .83; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .matgo-arrival.has-landed::after { display: none; } }
.tile-art .game-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .game-cover { transition: transform .3s ease-out; }
  .game-tile:hover .game-cover { transform: scale(1.035); }
}
.matgo-captured summary { width: auto; }
.matgo-captured summary .matgo-counter { display: inline-flex; align-items: center; gap: 3px; margin: 0 2px; }
.matgo-mini-pile { --matgo-card-width: 16px; display: inline-flex; width: 16px; height: 23px; margin-right: 2px; vertical-align: middle; border-radius: 2px; box-shadow: inset 0 0 0 1px #c6c2a557; }
.matgo-mini-pile .matgo-card { border-width: 1px; border-radius: 2px; box-shadow: 1px 1px #dfb581, 2px 2px #682e25; }
.matgo-captured summary .matgo-mini-pile span { display: block; margin: 0; }
.matgo-mini-pile :is(.matgo-month,.matgo-stamp) { visibility: hidden; }

.matgo-card-art.matgo-honor { background-image: url('../assets/hwatu-honors.webp'); background-position: var(--print-x) var(--print-y); background-size: 400% 400%; }
@media (max-width: 600px) {
  .matgo-table { --matgo-card-width: clamp(44px, 13vw, 61px); }
  .matgo-captured { flex-basis: 100%; }
  .matgo-captured summary .matgo-counter { margin-inline: 1px 4px; }
}
