/* Modern Classic Gaming — visual-only alternative */
html[data-j40-theme="modern"] body{background:radial-gradient(ellipse at 50% 10%,#e5f7ff,#9bd8fb 42%,#458cba) fixed;color:#132e51}
html[data-j40-theme="modern"] .shell{background:linear-gradient(180deg,#ffffff40,#fff3);border-left:1px solid #ffffffa0;border-right:1px solid #ffffffa0;box-shadow:0 12px 60px #183d5670}
html[data-j40-theme="modern"] .shell:after{background:linear-gradient(0deg,#b97440,#eac28c 85%,transparent);height:28%;opacity:.7}
html[data-j40-theme="modern"] .guest{background:linear-gradient(130deg,#fff,#eaf5ff);color:#12385d;border:1px solid #fff;box-shadow:0 5px 14px #19456745}
html[data-j40-theme="modern"] .guest small{color:#37627c}
html[data-j40-theme="modern"] .avatar{background:#dbeafa;color:#0a3d73}
html[data-j40-theme="modern"] .language{background:#fff;color:#103c6c;border:1px solid #8fc0e2}
html[data-j40-theme="modern"] .brand img{filter:drop-shadow(0 5px 6px #ffffffd9) drop-shadow(0 9px 10px #20456944)}
html[data-j40-theme="modern"] .tagline{color:#102e59;text-shadow:0 1px #fff}
html[data-j40-theme="modern"] .mode{border-radius:24px;color:#fff;border:2px solid #ffffffb0;box-shadow:0 10px 20px #143b6570,inset 0 2px 6px #ffffff80}
html[data-j40-theme="modern"] .mode[data-mode="human-vs-human/"]{background:linear-gradient(150deg,#168ef2,#0753c7 57%,#072c7d)}
html[data-j40-theme="modern"] .mode[data-mode="human-vs-computer/"]{background:linear-gradient(150deg,#36da5b,#039a4c 60%,#076a3e)}
html[data-j40-theme="modern"] .tournament-mode{background:linear-gradient(145deg,#ffcc35,#ee8b0d 57%,#d45019);color:#fff}
html[data-j40-theme="modern"] .mode svg,html[data-j40-theme="modern"] .mode .mode-outline-icon{stroke:#fff!important;fill:none!important}
html[data-j40-theme="modern"] .mode strong{text-shadow:0 2px 5px #002a5180}
html[data-j40-theme="modern"] .mode small{color:#fff}
html[data-j40-theme="modern"] .shortcut{color:#103d68;text-shadow:0 1px #fff}
html[data-j40-theme="modern"] .circle{background:linear-gradient(145deg,#fff,#e9f4ff);border:1px solid #fff;color:#073769;box-shadow:0 5px 12px #163f5b50}
html[data-j40-theme="modern"] .circle svg{stroke:#0d3b70}
html[data-j40-theme="modern"] .version{background:#082e66;color:#fff;border-radius:22px;padding:9px 16px;box-shadow:0 4px 12px #153b6470}
html[data-j40-theme="modern"] .dialog{background:#f4faff;color:#12375b;border-color:#d7a659}
html[data-j40-theme="modern"] .dialog p{color:#28506c}
html[data-j40-theme="modern"] .dialog-backdrop{background:#071e3bbd}
html[data-j40-theme="modern"] .dialog button{background:#0a5baf;color:white}
html[data-j40-theme="modern"] .tournament-choices a{background:#ffb51e;color:#172d50}
/* Edition styling: keep game DOM and interaction untouched. */
html[data-j40-theme="modern"] body:has(.felt){background:linear-gradient(160deg,#d7f0ff,#f6d4a8 50%,#b7794e) fixed;color:#142e4d}
html[data-j40-theme="modern"] body:has(.felt) main{background:linear-gradient(145deg,#ffffffdd,#eaf6ffdd);border:1px solid #ffffffc7;border-radius:22px;box-shadow:0 14px 40px #17375d42;margin-top:12px;margin-bottom:16px}
html[data-j40-theme="modern"] body:has(.felt) header{background:linear-gradient(110deg,#061e49,#0c3975);color:white;border-radius:15px;padding:12px 15px;box-shadow:0 6px 15px #14375a50}
html[data-j40-theme="modern"] body:has(.felt) header a,html[data-j40-theme="modern"] body:has(.felt) header h1{color:#fff}
html[data-j40-theme="modern"] body:has(.felt) .panel{border-radius:17px;border:1px solid #c8dbeb;background:#fffdf8;box-shadow:0 5px 16px #19416421}
html[data-j40-theme="modern"] body:has(.felt) .felt{background:radial-gradient(ellipse at 48% 38%,#168351,#075b3a 70%,#043c2b);border:9px solid #97532b;box-shadow:inset 0 0 0 3px #dca767,inset 0 5px 28px #002a18a0,0 8px 20px #5130164a;border-radius:28px}
html[data-j40-theme="modern"] body:has(.felt) .team-board:first-child{border-top:4px solid #082b60}
html[data-j40-theme="modern"] body:has(.felt) .team-board-right{border-top:4px solid #b21a34}
html[data-j40-theme="modern"] body:has(.felt) .card{box-shadow:0 5px 10px #001c1b65;border-radius:10px}
html[data-j40-theme="modern"] body:has(.felt) input,html[data-j40-theme="modern"] body:has(.felt) select{border-radius:11px;border:1px solid #9eb9cf;background:#fff;color:#173452}
@media(max-width:600px){html[data-j40-theme="modern"] body:has(.felt) main{margin:4px;padding:8px;border-radius:14px}html[data-j40-theme="modern"] body:has(.felt) .felt{border-width:5px;border-radius:16px}}
.j40-theme-control{display:flex;align-items:center;gap:7px;justify-content:center;margin:8px auto;position:relative;z-index:3}
.j40-theme-button{font:700 13px system-ui,-apple-system,sans-serif!important;background:#fff!important;color:#173c68!important;border:1px solid #8aabc6!important;border-radius:999px!important;padding:8px 13px!important;cursor:pointer!important;box-shadow:0 3px 9px #001d3b30!important;line-height:1.2!important}
.j40-theme-button:focus-visible{outline:3px solid #ffce35;outline-offset:3px}
html:not([data-j40-theme="modern"]) .j40-theme-button{background:#064934!important;color:#fff!important;border-color:#d8b84a!important}

/* Tournament placeholder shares Main Menu preference, without a separate selector. */
html[data-j40-theme="modern"] body:has(main > h1):not(:has(.felt)):not(:has(.shell)) {background:radial-gradient(circle at 50% 35%,#e4f6ff,#77c0e7 65%,#397ca7);color:#133a64}
html[data-j40-theme="modern"] body:has(main > h1):not(:has(.felt)):not(:has(.shell)) main{background:linear-gradient(150deg,#fff,#f6e6ce);border:2px solid #a97943;color:#153b64;box-shadow:0 14px 42px #23476d50}
html[data-j40-theme="modern"] body:has(main > h1):not(:has(.felt)):not(:has(.shell)) h1{color:#103e79}
html[data-j40-theme="modern"] body:has(main > h1):not(:has(.felt)):not(:has(.shell)) p{color:#274d6a}
html[data-j40-theme="modern"] body:has(main > h1):not(:has(.felt)):not(:has(.shell)) a.secondary{color:#123c6c;border-color:#9e794c}
