:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: #252721;
  background: #f7f6f1;
  font-synthesis: none;
  --ink: #252721;
  --subtle: #55584d;
  --line: #dddcd1;
  --surface: #fffefa;
  --green: #243d31;
}
* { box-sizing: border-box; }
body { margin: 0; }
html, button, a, select, .board { touch-action: manipulation; }
.play-surface, .play-surface *, .drag-shape, .block-burst {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.play-surface :is(input, textarea, [contenteditable]) {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
a { color: inherit; }
button, select, input { font: inherit; }
button, select, .card { -webkit-tap-highlight-color: transparent; }
button, select {
  min-height: 44px;
  color: inherit;
  background: #eeeee6;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 13px;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: #73776a; }
button:disabled { cursor: default; }
button:disabled:not(.square,.block-cell) { opacity: .66; }
button.primary { color: white; background: var(--green); }
button.primary:hover:not(:disabled) { background: #355343; }
:focus-visible { outline: 3px solid #376c59; outline-offset: 2px; z-index: 1; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 36px, 1040px); margin-inline: auto; }
.bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.nav { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -.05em; text-decoration: none; flex: none; }
.brand span { color: #f5f5df; background: var(--green); border-radius: 8px; display: inline-grid; width: 32px; height: 32px; place-items: center; margin-right: 3px; }
.nav-actions { display: flex; align-items: center; gap: clamp(8px, 3vw, 22px); min-width: 0; }
.nav-actions a { text-underline-offset: 4px; padding-block: 12px; }
.account { max-width: min(36vw, 180px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
main.wrap { padding-block: clamp(25px, 5vw, 55px) 55px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.15rem, 7vw, 4.55rem); line-height: 1.05; letter-spacing: -.075em; margin-bottom: 14px; }
.intro { margin-bottom: clamp(24px,4vw,42px); }
.intro > p:last-child { color: var(--subtle); font-size: clamp(1rem,2.2vw,1.15rem); }
.kicker { color: #47634f; font-size: .875rem; font-weight: 750; letter-spacing: .13em; margin-bottom: 12px; }
.catalog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.card:hover { border-color: #777e6c; }
.art { height: clamp(105px, 17vw, 166px); overflow: hidden; display: grid; place-content: center; isolation: isolate; position: relative; }
.card-text { padding: 15px 18px 18px; }
.card h2 { font-size: clamp(1.15rem, 3.3vw, 1.6rem); letter-spacing: -.04em; }
.card p { color: var(--subtle); margin-top: 4px; font-size: .92rem; line-height: 1.35; }
.sage .art { background: #c9dac6; color: #294637; }
.clay .art { background: #edc1ac; color: #6b3427; }
.lilac .art { background: #dcd5ef; color: #443472; }
.gold .art { background: #f6dda0; color: #554017; }
.chess-art::before, .draught-art::before {
  position: absolute;
  inset: -70% 5%;
  content: '';
  background: repeating-conic-gradient(#0001 0% 25%, transparent 0% 50%) 0 0 / 54px 54px;
  transform: rotate(-23deg);
  z-index: -1;
  mask-image: radial-gradient(ellipse, #000 5%, transparent 66%);
}
.chess-art span, .chess-art i { font-family: 'Segoe UI Symbol',serif; font-size: clamp(74px,13vw,132px); line-height: 1; font-style: normal; transform: translate(-16%,0) rotate(-13deg); }
.chess-art i { position: absolute; left: 53%; top: 30%; font-size: clamp(48px,8vw,80px); color: #fff8df; -webkit-text-stroke: 1px #294637; z-index: -1; transform: rotate(12deg); }
.draught-art span, .draught-art i { width: clamp(55px,10vw,95px); aspect-ratio: 1; position: absolute; left: 35%; top: 17%; border: 5px double #9f6755; background: #713d2d; border-radius: 50%; transform: rotate(-23deg) scaleY(.79); box-shadow: 0 9px #542e23; }
.draught-art i { left: 51%; top: 32%; background: #fff3d5; border-color: #cd9f7e; box-shadow: 0 9px #b47960; }
.block-art span, .block-art i { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; transform: translate(-28%,-10%) rotate(-14deg); }
.block-art i { position: absolute; top: 43%; left: 53%; transform: rotate(12deg); }
.block-art b { width: clamp(18px,4vw,36px); aspect-ratio: 1; border-radius: 5px; background: #665494; box-shadow: inset 0 -4px #0002; }
.block-art i b { background: #a17ab8; }
.block-art i b:first-child { visibility: hidden; }
.word-art { grid-auto-flow: column; gap: clamp(3px,1vw,9px); transform: none; }
.word-art span { display: grid; place-items: center; width: clamp(22px,5vw,50px); aspect-ratio: 1; background: #fff9e5; border-radius: 6px; font-weight: 800; font-size: clamp(.85rem,2.5vw,1.6rem); transform: rotate(-7deg); }
.word-art span:nth-child(even) { background: #d79946; transform: translateY(6px) rotate(9deg); color: #25201b; }
.back { display: inline-block; text-underline-offset: 4px; color: var(--subtle); margin-bottom: 13px; padding-block: 4px; }
.music-toggle { margin-left: 12px; margin-bottom: 10px; }
.music-toggle[aria-pressed=true] { color: white; background: var(--green); }
.effect-settings { width:min(calc(100% - 24px),420px); }
.effect-settings > button { width:100%; min-height:46px; }
.effect-options { margin:12px 0; border-block:1px solid var(--line); }
.effect-option { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:7px 0; }
.effect-option + .effect-option { border-top:1px solid var(--line); }
.effect-option input { width:24px; height:24px; min-height:0; accent-color:var(--green); }
.effect-option small { display:block; color:var(--subtle); }
.play-surface[data-motion=off] *, .play-surface[data-motion=off] *::before, .play-surface[data-motion=off] *::after { animation:none !important; transition:none !important; }
.game-help { margin-bottom: 15px; color: var(--subtle); }
.game-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: min(100%, 610px); padding: clamp(10px,2.5vw,22px); margin-top: 14px; }
.board-panel, .blocks-panel, .word-panel { display: grid; justify-items: center; gap: 9px; }
.controls { display: flex; gap: 7px; flex-wrap: wrap; }
.game-status { font-weight: 750; min-height: 1.45em; }
.game-message { width: min(100%,500px); padding: clamp(15px,4vw,24px); border-radius: 14px; background: #eef1e8; border: 1px solid #c7d2c0; }
.game-message[data-tone=result] { background: #f8ecd1; border-color: #dfc897; }
.game-message h2 { color: var(--ink); font-size: clamp(1.35rem,5vw,1.8rem); letter-spacing: -.035em; }
.game-message p { color: var(--subtle); margin-top: 5px; line-height: 1.4; }
.game-message-actions:not(:empty) { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 13px; }
.game-message-actions button { min-height: 50px; font-weight: 750; padding-inline: 17px; }
.game-message-actions .primary { flex: 1 0 min(100%,180px); }
.game-message-actions .secondary { background: #fffefa; }
.board-stage { width:min(100%,500px,72vh); width:min(100%,500px,72dvh); position:relative; }
.board-stage .board { width:100%; }
.word-stage { width:min(100%,310px); position:relative; }
.word-stage .word-board { width:100%; }
.board-result, .word-result { position:absolute; inset:0; z-index:8; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; background:#101e19a6 !important; border:0; border-radius:10px; color:#fff; padding:14px; }
.board-result { box-shadow:0 0 0 5px #101e19a6; }
.word-result { inset:-12px; width:auto; border-radius:16px; box-shadow:0 8px 25px #10201838; }
.board-result h2, .word-result h2 { color:#fff; font-size:clamp(1.2rem,5vw,2rem); }
.board-result p, .word-result p { color:#e2ece5; font-size:clamp(.85rem,3.6vw,1rem); }
.board-result .game-message-actions, .word-result .game-message-actions { justify-content:center; }
.game-setup { display: grid; gap: 14px; }
.game-setup > h2 { font-size: clamp(1.45rem,5vw,1.9rem); letter-spacing: -.04em; }
.mode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.mode-option { text-align:left; display:grid; gap: 4px; align-content:start; background:#f3f2ea; border:1px solid var(--line); min-height: 98px; padding:10px; }
.mode-option[aria-pressed=true] { background:#e4eddf; border-color:#52816a; box-shadow:inset 0 0 0 1px #52816a; }
.mode-option strong { line-height:1.2; }
.mode-option small { color:var(--subtle); font-size:.82rem; line-height:1.35; }
.mode-icon { color:var(--green); font-size:1.18rem; line-height:1; }
.game-start { min-height: 50px; font-weight: 750; }
.square.hint-target, .block-cell.hint-target { outline: 3px solid #ffc76d; outline-offset:-3px; }
.word-hint { color:var(--green); font-weight:750; }
.word-hint:empty { display:none; }
.block-stage { width: min(100%, 500px, 72vh); width: min(100%, 500px, 72dvh); position:relative; }
.block-stage .board { width:100%; }
.blocks-board.game-finished { filter:grayscale(.55) brightness(.9); }
.block-game-over { position:absolute; inset:0; z-index:6; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:20px; text-align:center; color:#fff; background:#1b202580; border-radius:10px; }
.block-game-over h2 { font-size:clamp(1.5rem,6vw,2.4rem); letter-spacing:-.04em; }
.block-game-over p { font-size:clamp(1rem,4vw,1.3rem); font-weight:750; }
.block-game-over .game-over-record { font-size:.95rem; font-weight:500; color:#e3e7e4; }
.block-game-over button { min-height:52px; min-width:min(100%,220px); margin-top:8px; font-weight:750; }
.block-effects { position:absolute; inset:0; pointer-events:none; z-index:4; display:grid; place-items:start center; }
.block-pop { isolation:isolate; position:relative; top:13%; display:grid; text-align:center; gap:2px; background:#292238; color:#ffdc92; border:1px solid #ffdb94; padding:8px 16px; border-radius:12px; box-shadow:0 7px 25px #27172f65; white-space:nowrap; }
.block-pop strong { font-size:clamp(1.13rem,5vw,1.8rem); }
.block-pop span { font-size:.9rem; color:#fff2cb; }
.block-pop.all-clear { color:#fff0b9; background:#603f2b; }
.block-pop i { width:6px; height:6px; border-radius:2px; background:#ffe29d; position:absolute; top:50%; left:50%; z-index:-1; }
@media (prefers-reduced-motion: no-preference) {
  .block-pop { animation:block-pop 1.45s ease-out both; }
  .block-pop i { animation:block-spark .85s ease-out both; }
  .mode-option { transition: background-color .18s ease,border-color .18s ease,box-shadow .18s ease; }
  @keyframes block-pop {
    0% { opacity:0; transform:translateY(12px) scale(.8); }
    15%,78% { opacity:1; transform:translateY(0) scale(1); }
    100% { opacity:0; transform:translateY(-12px) scale(.96); }
  }
  @keyframes block-spark {
    0% { opacity:1; transform:translate(0,0) rotate(0); }
    100% { opacity:0; transform:translate(var(--dx),var(--dy)) rotate(90deg); }
  }
}
.players:empty, .clock:empty, .notice:empty { display: none; }
.players, .clock, .notice { color: var(--subtle); line-height: 1.4; overflow-wrap: anywhere; }
.notice { text-align: center; }
.board { width: min(100%, 500px, 72vh); width: min(100%, 500px, 72dvh); aspect-ratio: 1; display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); grid-template-rows: repeat(8,minmax(0,1fr)); overflow: hidden; border-radius: 8px; }
.square { padding: 0; min-height: 0; position: relative; border-radius: 0; border: 0; display: grid; place-items: center; color: #293a27; }
.square.light { background: linear-gradient(145deg,#f1eedb,#e6e7d3); }
.square.dark { background: linear-gradient(145deg,#839a84,#6e8871); }
.square.selected { box-shadow: inset 0 0 0 4px #efc56a; }
.square.target::after { content: ''; width: 24%; aspect-ratio: 1; border-radius: 50%; background: #31382cb0; position: absolute; }
.square.target:has(.piece)::after { width: 90%; border: 3px solid #2d422b; background: transparent; }
.rank, .file { position: absolute; pointer-events: none; font-size: clamp(.55rem,2vw,.8rem); font-weight: 750; }
.rank { left: 3px; top: 1px; } .file { right: 3px; bottom: 0; }
.piece { position: relative; font-family: 'DejaVu Sans','Segoe UI Symbol','Arial Unicode MS',serif; font-size: min(9.5vw, 7vh, 52px); font-size: min(9.5vw, 7dvh, 52px); line-height: 1; }
.piece.white { color: #fffdf0; -webkit-text-stroke: .6px #30352a; text-shadow: 0 1px 2px #0005; }
.piece.black { color: #20291e; -webkit-text-stroke: .35px #eef1df; }
.piece.disc { width: 69%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 4px double #a1886a; font-size: min(5vw,4vh,26px); font-size: min(5vw,4dvh,26px); }
.piece.disc.white { background: #fff0cc; color: #6e542c; box-shadow: 0 3px #b29d79; }
.piece.disc.black { background: #51362d; color: #fff0cc; box-shadow: 0 3px #38291f; }
.piece.taken { opacity: .36; }
.block-stats { width: min(100%, 488px); display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:8px; }
.block-stats > span:first-child { justify-self:start; color:var(--subtle); font-size:.85rem; }
.block-score { display:grid; justify-items:center; line-height:1.05; font-variant-numeric:tabular-nums; }
.block-score > span { font-size:.7rem; font-weight:800; letter-spacing:.12em; color:#79897b; }
.block-score-value { font-size:clamp(2.1rem,9vw,3.5rem); font-weight:850; letter-spacing:-.055em; color:#263c31; }
.block-stats .block-combo { justify-self:end; font-size:.85rem; white-space:nowrap; }
.block-points { position:absolute; z-index:5; display:grid; justify-items:center; gap:2px; width:max-content; max-width:85%; padding:6px 10px; border-radius:10px; color:#fff; background:#27213de8; box-shadow:0 4px 14px #0003; text-align:center; pointer-events:none; transform:translate(-50%,-50%); }
.block-points strong { color:#ffe19e; font-size:1.4rem; }
.block-points span { font-size:.72rem; line-height:1.35; }
@media (prefers-reduced-motion: no-preference) {
  .play-surface:not([data-motion=off]) .block-points { animation:points-float 1.5s ease-out both; }
  @keyframes points-float {
    0% { opacity:0; transform:translate(-50%,-30%) scale(.8); }
    15%,70% { opacity:1; transform:translate(-50%,-65%) scale(1); }
    100% { opacity:0; transform:translate(-50%,-105%) scale(.98); }
  }
}
.block-combo { color: #4d2c1e; background: #f7d692; padding: 4px 8px; border-radius: 8px; font-weight: 750; }
.blocks-board { background: #2b243d; padding: 3px; gap: 3px; }
.block-cell, .shape > span { padding: 0; border: 0; border-radius: 4px; min-height: 0; }
.block-cell { background: #463b5c; }
.block-cell.preview-block { background: #9a88b5; }
.block-cell.preview-clear, .block-burst {
  background: #ffc970;
  box-shadow: inset 0 1px #ffefd1,inset 0 -3px #c4773480,0 0 8px #ffbd6280;
}
.fill { box-shadow: inset 0 -4px #0002; }
.c0 { background: #a685d8; } .c1 { background: #69ad96; } .c2 { background: #e0ab6b; }
.c3 { background: #8babe3; } .c4 { background: #e18da3; }
.tray { width: min(100%, 450px); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.figure { height: clamp(72px, 20vw, 108px); padding: 5px; touch-action: none; display: grid; place-content: center; }
.figure[aria-pressed=true] { border: 2px solid #765da7; background: #e8dff7; }
.shape { --tile: clamp(12px,3.6vw,18px); display: grid; gap: 2px; }
.drag-shape, .block-burst { position: fixed; z-index: 5; pointer-events: none; }
.drag-shape { inset: 0 auto auto 0; opacity: .88; filter: drop-shadow(0 4px 4px #0004); will-change: transform; }
.block-burst { border-radius: 4px; }
.game-panel { border-radius: 20px; box-shadow: 0 12px 38px #292b1910, 0 2px 5px #292b190a; }
.board { border-radius: 10px; box-shadow: 0 3px 0 #2531263b,0 9px 20px #24332522; }
.fill { box-shadow: inset 0 1px #ffffff65,inset 0 -4px #0003; }
.square:focus-visible { outline-offset: -3px; }
.square.selected { box-shadow: inset 0 0 0 3px #efc56a,inset 0 0 17px #ffc46054; }
.word-tile { box-shadow: inset 0 1px #fff5; }
.drag-source .shape { opacity: .25; }
@media (prefers-reduced-motion: no-preference) {
  .block-cell { transition: background-color 110ms ease-out; }
  .figure, .music-toggle, .key { transition: background-color 135ms ease-out, border-color 135ms ease-out; }
  .word-tile.reveal { animation: reveal-tile 220ms ease-out both; }
  @keyframes reveal-tile { from { transform: scaleY(.12); } to { transform: scaleY(1); } }
}
.placeholder { grid-column: 1/-1; grid-row: 1/-1; align-self: center; }
.word-date { color: var(--subtle); }
.word-streak { font-size:1.1rem; font-weight:800; color:#75451d; }
.word-board { display: grid; width: min(100%, 290px); grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; }
.word-tile { display: grid; place-content: center; width: 100%; aspect-ratio: 1; border: 2px solid #d7d9cf; border-radius: 5px; font-size: 1.5rem; font-weight: 780; }
.keyboard { width: min(100%, 500px); display: grid; gap: 4px; }
.key-row { display: flex; justify-content: center; gap: 3px; }
.key { flex: 0 1 8.65%; min-width: 0; padding: 0; border-radius: 5px; font-weight: 700; }
.word-panel .keyboard { gap:6px; }
.word-panel .key-row { gap:4px; }
.word-panel .key { min-height:52px; background:#e8eee9; border:1px solid #b8cabe; border-radius:8px; color:#1d3529; font-size:1rem; box-shadow:0 2px 0 #a6b9aa; }
.word-panel .key.correct { background:#376249; border-color:#376249; color:#fff; }
.word-panel .key.present { background:#e0ba65; border-color:#d0a850; color:#221d13; }
.word-panel .key.absent { background:#535754; border-color:#535754; color:#fff; }
.word-panel .keyboard {
  padding: 12px 6px 10px;
  gap: 9px;
  border-radius: 14px;
  background: #dce5df;
  box-shadow: inset 0 1px 2px #1b3e2a14;
}
.word-panel .key-row { gap: 4px; }
.word-panel .key {
  position: relative;
  isolation: isolate;
  flex: 1 1 0;
  min-height: 54px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #20392c;
  font-size: clamp(.9rem,4vw,1.15rem);
  font-weight: 650;
  box-shadow: 0 2px 0 #9aada0, 0 3px 6px #1c3c2920;
}
.word-panel .key::after {
  content: attr(data-letter);
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: max(40px,130%);
  height: 51px;
  border-radius: 9px 9px 5px 5px;
  background: #fff;
  color: #20392c;
  box-shadow: 0 -3px 12px #1c3c292c;
  font-size: 1.6rem;
  opacity: 0;
  transform: translate(-50%,8px) scale(.88);
  transform-origin: center bottom;
  pointer-events: none;
}
.word-panel .key:active:not(:disabled) {
  z-index: 4;
  background: #c8e1ce;
  transform: translateY(1px);
  box-shadow: 0 1px 0 #7d9b86;
}
.word-panel .key:active:not(:disabled)::after {
  opacity: 1;
  transform: translate(-50%,0) scale(1);
}
@media (prefers-reduced-motion: no-preference) {
  .word-panel .key::after { transition: opacity 70ms ease, transform 70ms ease; }
}
.word-panel .word-actions { width:min(100%,500px); display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.word-panel .word-actions button { min-height:50px; font-weight:700; border:1px solid #b8cabe; }
.word-panel { gap:14px; }
.word-panel .word-date { color:#4c6b59; background:#eef5ee; padding:7px 14px; border-radius:999px; font-size:.9rem; font-weight:700; }
.word-panel .word-board { gap:6px; width:min(100%,310px); }
.word-panel .word-tile { border-radius:9px; border-color:#cddbd0; background:#f7faf6; font-size:clamp(1.2rem,6vw,1.7rem); }
.word-panel .word-tile.correct { background:#376249; border-color:#376249; }
.word-panel .word-tile.present { background:#e0ba65; border-color:#d0a850; }
.word-panel .word-tile.absent { background:#535754; border-color:#535754; }
.word-panel .word-actions .primary { background:#176b52; border-color:#176b52; }
.word-panel .word-actions button:not(.primary) { background:#f1f5f0; color:#294b37; }
.legend { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; font-size: .875rem; }
.legend span { border-radius: 5px; padding: 3px 6px; }
.absent { color: white; background: #535754; border-color: #535754; }
.present { color: #221d13; background: #e0ba65; border-color: #e0ba65; }
.correct { color: white; background: #376249; border-color: #376249; }
.top-panel > div { margin-top: 13px; overflow: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
td:nth-child(2) { overflow-wrap: anywhere; }
dialog { width: min(100% - 30px, 410px); padding: 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #20251e90; }
.dialog-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 12px; }
dialog h2 { font-size: 1.3rem; }
dialog button { margin: 3px; }
#auth-fields { display: grid; gap: 7px; }
#auth-fields label { display: grid; gap: 3px; }
input { width: 100%; min-height: 44px; padding: 8px; border-radius: 7px; border: 1px solid #898d80; }
@media (max-width: 520px) {
  .wrap { width: calc(100% - 24px); }
  .catalog { gap: 9px; }
  .card { border-radius: 12px; }
  .card-text { padding: 10px; }
  .card p { font-size: .875rem; }
}

/* Game room */
body { background: #f3f5f1; color: #182c25; }
.bar { background:#fff; border-color:#dce5dd; }
.brand span { background:#176b52; border-radius:10px; }
.brand { letter-spacing:-.04em; }
.intro { padding:clamp(24px,5vw,48px); border-radius:24px; color:#f8fff9; background:radial-gradient(circle at 85% 15%,#609b76 0,transparent 38%),linear-gradient(120deg,#133d32,#257155); }
.intro .kicker,.intro > p:last-child { color:#d5eddb; }
.catalog { gap:18px; }
.card { border-color:#dce5dd; border-radius:20px; box-shadow:0 8px 25px #173c2d0b; transition:transform .2s,box-shadow .2s; }
.card:hover { transform:translateY(-3px); box-shadow:0 15px 32px #173c2d20; }
.card-text { padding:18px 20px 21px; }
.sage .art { background:linear-gradient(135deg,#b7d5c2,#e4f0df); }
.clay .art { background:linear-gradient(135deg,#edbea2,#f6dfca); }
.lilac .art { background:linear-gradient(135deg,#c6bfec,#ebe4fb); }
.gold .art { background:linear-gradient(135deg,#efd181,#fff0bd); }
.game-panel { border-color:#dce5dd; box-shadow:0 18px 50px #24493812; }
.game-setup { padding:clamp(16px,4vw,28px); }
.mode-grid { gap:10px; }
.mode-option { border-radius:14px; background:#f5f8f4; padding:15px; min-height:120px; }
.mode-option[aria-pressed=true] { background:#e2f2e6; border-color:#338867; box-shadow:inset 0 0 0 1px #338867; }
.mode-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:#dbece0; color:#176b52; font-size:1.2rem; }
button.primary { background:#176b52; border-radius:12px; }
.board-panel .board { border:5px solid #375d49; border-radius:10px; box-shadow:0 6px 0 #244535,0 12px 24px #163e2d30; }
.square.light { background:#e8eedb; }
.square.dark { background:#83a889; }
.square.last-move.light { background:#d5dd8d; }
.square.last-move.dark { background:#98b86c; }
.square.king-in-check { background:#e14f4f; box-shadow:inset 0 0 0 3px #b62d33, inset 0 0 18px #ffb7a380; }
.chess-piece { display:block; width:94%; height:94%; filter:drop-shadow(0 2px 1px #1b302b65); }
.chess-piece img { display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.square.target:has(.chess-piece)::after { border-color:#325f46; }
.rank,.file { z-index:1; }
@media (max-width:520px) {
  .intro { padding:25px 20px; border-radius:19px; }
  .catalog { gap:10px; }
  .card-text { padding:12px; }
  .mode-option { min-height:110px; padding:11px; }
}
