/* Ô ĂN QUAN V3 — MỸ THUẬT SÂN ĐÌNH
   Only visual overrides. Never change element positions/ids or game rules. */
:root {
 --cream:#fff6e4;
 --cream-dim:#f9dfb5;
 --gold-300:#ffefb3;
 --gold-400:#f6d38b;
 --gold-500:#d9a25b;
 --gold-600:#9f5429;
 --rim:#e6b875;
}
html {background:#755038;}
body {
 background:#755038 url('assets/courtyard-painterly.webp') center center / cover fixed no-repeat;
 color:#fff5dc;
}
body::before {
 background:
 radial-gradient(ellipse 96% 88% at 50% 48%,transparent 45%,rgba(21,23,13,.20) 100%),
 linear-gradient(180deg,rgba(33,28,15,.17) 0%,rgba(29,19,11,.035) 30%,rgba(49,26,12,.14) 85%,rgba(29,17,12,.26) 100%);
}
.folk-head .brand {
 border-color:#ffdc94;
 background:
 linear-gradient(171deg,rgba(74,34,15,.26),rgba(42,19,12,.78)),
 url('assets/wood-grain.webp') center / 390px auto;
 box-shadow:
 inset 0 2px 0 rgba(255,237,177,.48),inset 0 -4px 0 rgba(51,22,10,.68),
 0 5px 0 #4d2617,0 13px 29px #2915097a,
 0 0 15px #ffe1a746;
}
.folk-head .brand strong {color:#ffe7a5;text-shadow:0 3px #74401f,0 6px 11px #2e180dc9;}
.folk-head .brand::after {content:'✦  ❧  ✦';display:block;color:#ffd18d;opacity:.5;letter-spacing:.6em;font-size:6px;line-height:7px;pointer-events:none;}
.icobtn,.btn.ghost,.chip {
 background:
 linear-gradient(180deg,rgba(115,59,30,.77),rgba(49,24,16,.91)),
 url('assets/wood-grain.webp') center / 260px auto;
 border-color:#dd9f5c;
 color:#ffedcd;
 box-shadow:inset 0 1px 0 #ffdeb76b,0 4px 0 #4c291a,0 8px 18px #2c180c55;
}
.icobtn:hover,.btn.ghost:hover {filter:brightness(1.12) saturate(1.07);}
.sc {
 background:linear-gradient(116deg,rgba(14,81,67,.97),rgba(17,72,62,.95)),url('assets/wood-grain.webp') center / 420px auto;
 border-color:#e9c487;
 box-shadow:inset 0 1px #ffebbb55,inset 0 -3px #102f2480,0 6px 0 #5a3524a8,0 12px 23px #2a170c4d;
}
.sc.p1 {
 background:linear-gradient(116deg,rgba(111,39,30,.97),rgba(100,38,36,.95)),url('assets/wood-grain.webp') center / 420px auto;
}
.sc::before {
 content:'';background:#e8c281 url('assets/avatar-player.svg') center / cover no-repeat;
 border:2px solid #ffe4a6;
 box-shadow:0 3px 0 #4c2517,0 0 0 3px #0000002a;
}
.sc.p1::before {content:'';background:#d5b271 url('assets/avatar-rival.svg') center / cover no-repeat;}
.sc.turn {border-color:#fff1ae;box-shadow:0 0 0 2px #ffe9ac54,0 0 22px #ffd87836,0 8px 0 #623a2580;}
.sc .pts {text-shadow:0 2px 3px #24120fbf;}
.board {
 border:8px solid #824829;
 background:
 linear-gradient(163deg,rgba(255,219,154,.17) 0%,rgba(95,53,27,.03) 45%,rgba(51,26,15,.21) 100%),
 url('assets/wood-grain.webp') center / 640px auto repeat;
 box-shadow:
 inset 0 0 0 3px #f7cb89,
 inset 0 0 0 7px rgba(106,51,25,.74),
 inset 0 8px 15px #ffe4ab37,
 inset 0 -7px 15px #4c271d66,
 0 8px 0 #5d321d,0 13px 0 #3b2216,
 0 21px 18px #301a0d6b,0 32px 49px #1a170b69;
}
.board::before,.board::after {content:'❦';color:#6f351b;font-size:17px;text-shadow:0 1px #f8d19c80;}
.cell,.cell.quan {
 border:2px solid #eac28c;
 background:
 radial-gradient(ellipse 106% 69% at 50% -2%,rgba(55,25,11,.68) 0%,rgba(88,42,17,.42) 33%,transparent 70%),
 radial-gradient(ellipse 110% 92% at 50% 108%,rgba(242,177,104,.27),transparent 52%),
 url('assets/clay-grain.webp') center / 170px 170px repeat;
 box-shadow:
 inset 0 9px 14px rgba(43,16,8,.76),
 inset 0 -3px 7px rgba(255,222,158,.27),
 0 1px 0 rgba(255,228,174,.80),
 0 3px 4px #5f361a61;
}
.cell:not(.quan) {border-radius:19px;}
.cell.quan {border-radius:46%/31%;border-color:#f0d198;}
.cell::before {
 content:'';position:absolute;inset:1px;z-index:0;pointer-events:none;
 border-radius:inherit;
 background:radial-gradient(ellipse 40% 18% at 50% 94%,#ffe0ab2a,transparent 100%);
}
.cell.pick {border-color:#fff3af;box-shadow:inset 0 7px 14px rgba(52,25,13,.62),0 0 0 2px #ffe8a67b,0 0 23px #ffe49f63;}
.cell.pick:hover {filter:brightness(1.10);}
.cell.active {border-color:#fff3b9;box-shadow:inset 0 6px 12px rgba(53,24,12,.58),0 0 24px rgba(255,222,136,.78);}
.st {
 background:
 radial-gradient(ellipse 23% 20% at 30% 26%,rgba(255,255,239,.44),transparent 100%),
 radial-gradient(ellipse 96% 90% at 69% 92%,rgba(24,18,10,.42),transparent 73%),
 url('assets/stone-grain.png') center / 90px auto,
 var(--tone,#c6b69c);
 background-blend-mode:screen,multiply,soft-light,normal;
 box-shadow:0 3px 2px #32190980,0 5px 6px #3019083b,inset 0 1px 2px #fff4dd6f,inset 0 -2px 3px #4f30255e;
}
.st.v0{--tone:#e1d2b6}.st.v1{--tone:#bfb9a9}.st.v2{--tone:#e2c393}.st.v3{--tone:#8a8883}.st.v4{--tone:#d9b79b}
.st.big {
 --tone:linear-gradient(153deg,#f9e1b0 0%,#d1ae78 39%,#966939 78%,#5e3a21 100%);
 box-shadow:0 0 0 1px #f9dfaa,0 5px 7px #291204c1,inset 0 3px 3px #fff5db,inset 0 -6px 8px #633a21,0 0 11px #eec1765c;
}
.qtag {color:#ffe0a6;text-shadow:0 2px 2px #351c0d;letter-spacing:.19em;}
.cnt {border-color:#eac083;background:linear-gradient(180deg,#8e522a,#502710);box-shadow:0 2px 4px #2814078f;}
.status {
 background:linear-gradient(180deg,rgba(97,55,33,.98),rgba(52,28,20,.98)),url('assets/wood-grain.webp') center/330px;
 border-color:#e6b875;
 box-shadow:inset 0 1px #fff3cb57,0 4px 0 #53311c,0 10px 22px #301b0a68;
}
.panel,.sheet {
 background:linear-gradient(160deg,rgba(105,62,37,.97),rgba(48,30,21,.98)),url('assets/wood-grain.webp') center/480px;
 border-color:#e5b877;
}
/* Make the art responsive without shifting the validated board layout. */
@media(max-width:680px){
 body {background-position:center top;}
 .board {border-width:5px;box-shadow:inset 0 0 0 2px #e6bc83,0 6px 0 #5d321d,0 10px 18px #281809ad;}
 .cell:not(.quan) {border-radius:11px;}
 .cell,.cell.quan {border-width:1.5px;background-size:auto,auto,100px 100px;}
 .status {background-size:auto,220px auto;}
}
@media(prefers-reduced-motion:reduce){.sc.turn {animation:none;}}

/* Active score remains opaque and readable over painterly scenery. */
.sc.p0.turn {background:linear-gradient(116deg,rgba(13,89,73,.98),rgba(15,68,59,.98)),url('assets/wood-grain.webp') center / 420px auto;}
.sc.p1.turn {background:linear-gradient(116deg,rgba(118,44,34,.98),rgba(95,37,35,.98)),url('assets/wood-grain.webp') center / 420px auto;}
