/* Personalization system: board materials, piece families, frames and profile surfaces. */
.avatar{width:58px;height:58px;object-fit:cover;border-radius:50%;display:block;background:#20160e}.avatar-frame-gold{padding:4px;border:2px solid #f2d98b;border-radius:50%;background:linear-gradient(135deg,#fff0a8,#986421,#f7df85);box-shadow:0 0 0 3px #d9aa4d44}.avatar-frame-walnut{padding:5px;border:5px solid #4f2d19;border-radius:50%;box-shadow:0 0 0 1px #d9aa4d}.avatar-frame-marble{padding:4px;border:4px solid #d7dce1;border-radius:50%;background:#6c7b8c}.avatar-frame-obsidian{padding:4px;border:3px solid #c79d48;border-radius:50%;background:#050608;box-shadow:0 0 14px #d9aa4d66}
.profile-hero{display:grid;grid-template-columns:minmax(290px,.7fr) minmax(0,1.3fr);gap:24px;padding:28px;background:linear-gradient(120deg,#3b2519e8,#101827ee 58%,#0b111be8),url('/assets/hall-hero.webp?v=20261119a') center/cover;border:1px solid #e4bd6e88;box-shadow:0 22px 60px #000a,inset 0 0 0 7px #100b0866}.profile-hero:before{content:"";position:absolute;inset:9px;border:1px solid #f4d98755;pointer-events:none}.profile-hero>*{position:relative}.profile-identity{display:flex;align-items:center;gap:18px}.profile-identity .avatar{width:104px;height:104px}.profile-identity h1{font:700 38px Georgia,serif;color:#ffeab2;margin:0}.profile-identity .handle{color:#a9a59a}.profile-hero .rating-crest{font:800 46px Georgia,serif;color:#f4d987}.profile-hero .progress{height:8px;background:#ffffff16;margin-top:15px}.profile-hero .progress i{display:block;height:100%;background:linear-gradient(90deg,#c28b2c,#f4d987);width:var(--progress,40%)}.profile-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.profile-edit-grid .field-wide{grid-column:1/-1}.field label{display:block;color:#c8b278;font-size:11px;letter-spacing:.13em;margin-bottom:7px}.field input,.field textarea,.field select{width:100%;padding:12px;background:#07101bd9;color:#f5ecd8;border:1px solid #806b43}.field textarea{min-height:90px;resize:vertical}.button-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.feedback{min-height:22px;color:#f1d68d}.feedback.error{color:#ff9b91}.achievement-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.achievement{padding:16px;background:linear-gradient(145deg,#4a3518,#151822);border:1px solid #d9aa4d88}.achievement h4{margin:0;color:#ffe49a}.achievement p{margin:6px 0 0;color:#c2bcaf;font-size:13px}.achievement.locked{opacity:.5;filter:grayscale(.8)}
.customizer{display:grid;grid-template-columns:minmax(0,1.2fr) 340px;gap:26px}.preview-stage{padding:25px;background:linear-gradient(145deg,#3b2415,#101722);border:1px solid #d9aa4d88;box-shadow:inset 0 0 0 6px #120c0766,0 20px 55px #0009}.custom-board{width:min(100%,680px);aspect-ratio:1;margin:auto;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));border:12px solid #4b2c1b;box-shadow:0 0 0 3px #d9aa4d,0 25px 60px #000b}.custom-board .sq{display:grid;place-items:center;position:relative;font-size:clamp(22px,5vw,65px);line-height:1}.theme-walnut .sq.light{background:linear-gradient(135deg,#e8cfa0,#c49c65)}.theme-walnut .sq.dark{background:linear-gradient(135deg,#805432,#4b2d20)}.theme-marble .sq.light{background:linear-gradient(135deg,#f4f2eb,#c8ccd0)}.theme-marble .sq.dark{background:linear-gradient(135deg,#8d949c,#555d66)}.theme-tournament .sq.light{background:linear-gradient(135deg,#e4e6c2,#b8c393)}.theme-tournament .sq.dark{background:linear-gradient(135deg,#547052,#294739)}.theme-midnight .sq.light{background:linear-gradient(135deg,#b7cae0,#6e88a4)}.theme-midnight .sq.dark{background:linear-gradient(135deg,#273a59,#101d35)}.theme-obsidian .sq.light{background:linear-gradient(135deg,#81776a,#4a443f)}.theme-obsidian .sq.dark{background:linear-gradient(135deg,#25252a,#0b0b10)}.theme-stone .sq.light{background:linear-gradient(135deg,#c9c5b4,#928e7d)}.theme-stone .sq.dark{background:linear-gradient(135deg,#77756d,#454741)}.frame-wood{border-color:#4b2c1b}.frame-gold{border-color:#d9aa4d;box-shadow:0 0 0 3px #f4d987,0 0 0 8px #5e3d1d,0 25px 60px #000b}.frame-marble{border-color:#d5d8da;box-shadow:0 0 0 5px #6c747d,0 25px 60px #000b}.frame-minimal{border:3px solid #c0c7d0;box-shadow:0 15px 40px #000b}.piece-staunton{font-family:Georgia,serif;text-shadow:0 3px 4px #0009}.piece-royal{font-family:Palatino,Georgia,serif;font-weight:800;text-shadow:0 0 12px #f2d98b88,0 4px 3px #000b}.piece-modern{font-family:Inter,system-ui,sans-serif;font-weight:900;letter-spacing:-.08em;text-shadow:0 3px 3px #0008}.customizer-panel{padding:22px;background:#0d1725e8;border:1px solid #d9aa4d66}.option-list{display:grid;gap:9px;margin-bottom:22px}.option-list button{padding:13px;text-align:left;background:#152235;color:#eee5d2;border:1px solid #526177}.option-list button.active{border-color:#f1d37e;color:#ffe5a0;box-shadow:0 0 18px #d9aa4d33}.option-list button small{display:block;color:#9eabb9;margin-top:3px}.setting-checks{display:grid;gap:10px;color:#d3cbbb}.setting-checks label{display:flex;gap:9px;align-items:center}.setting-checks input{accent-color:#d9aa4d}
.friends-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.friend-search{display:flex;gap:8px}.friend-search input{flex:1}.friend-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #fff1}.friend-row .avatar{width:38px;height:38px}.friend-row .friend-meta{flex:1}.online-dot{width:8px;height:8px;background:#75cf91;border-radius:50%;display:inline-block}.challenge-row{padding:12px;border:1px solid #d9aa4d55;margin-top:8px;background:#151f2e}.challenge-row button{margin-left:8px}
.theme-walnut .sq,.theme-marble .sq,.theme-tournament .sq,.theme-midnight .sq,.theme-obsidian .sq,.theme-stone .sq{transition:background .2s}.settings-nav{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.settings-nav button{background:#162335;color:#d9d2c2;border:1px solid #57677c;padding:10px 13px}.settings-nav button.active{border-color:#f2d98b;color:#f2d98b}
.replay-shell{padding:28px;background:linear-gradient(100deg,#0a0f17f0,#0a0e15ed),url('/assets/hall-hero.webp?v=20261119a') center/cover;border:1px solid #d9aa4d77;box-shadow:0 25px 90px #000c}.replay-board{width:min(100%,680px);aspect-ratio:1;margin:auto;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));border:12px solid #4b2c1b}.replay-board .sq{display:grid;place-items:center;font-size:clamp(22px,5vw,60px);line-height:1}.replay-meta{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 0}.analysis-output{min-height:44px;padding:12px;background:#07101b;border:1px solid #d9aa4d55;color:#f4d987}.replay-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.replay-controls input{accent-color:#d9aa4d;flex:1;min-width:180px}
@media(max-width:900px){.profile-hero,.customizer,.friends-grid{grid-template-columns:1fr}.profile-edit-grid{grid-template-columns:1fr}.profile-edit-grid .field-wide{grid-column:auto}.profile-identity h1{font-size:29px}.custom-board{border-width:7px}}
.royal-board .sq{overflow:hidden}.coord-file,.coord-rank{position:absolute;font:700 10px/1 Inter,system-ui,sans-serif;color:#fff9d8aa;font-style:normal;z-index:2;pointer-events:none}.coord-file{right:3px;bottom:2px}.coord-rank{left:3px;top:2px}.royal-board.animation-off .sq,.royal-board.animation-off .piece{transition:none!important;animation:none!important}
/* Critical board geometry: never let piece content create implicit grid rows. */
.custom-board,.royal-board,.replay-board,.game .board{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;grid-template-rows:repeat(8,minmax(0,1fr))!important;grid-auto-rows:unset!important;width:100%!important;max-width:680px;aspect-ratio:1 / 1;min-width:0;min-height:0;box-sizing:border-box}
.custom-board .sq,.royal-board .sq,.replay-board .sq,.game .board .sq{position:relative;width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;overflow:hidden;box-sizing:border-box;aspect-ratio:auto;display:grid;place-items:center}
.custom-board .sq>span,.royal-board .sq>.piece,.replay-board .sq>.piece,.game .board .sq>span{position:absolute;inset:0;width:100%;height:100%;display:grid;place-items:center;max-width:100%;max-height:100%;overflow:hidden;line-height:1;box-sizing:border-box}
.royal-board.theme-marble .sq.light,.game .board.theme-marble .sq.l{background:linear-gradient(135deg,#f4f2eb,#c8ccd0)}.royal-board.theme-marble .sq.dark,.game .board.theme-marble .sq.d{background:linear-gradient(135deg,#8d949c,#555d66)}.royal-board.theme-tournament .sq.light,.game .board.theme-tournament .sq.l{background:linear-gradient(135deg,#e4e6c2,#b8c393)}.royal-board.theme-tournament .sq.dark,.game .board.theme-tournament .sq.d{background:linear-gradient(135deg,#547052,#294739)}.royal-board.theme-midnight .sq.light,.game .board.theme-midnight .sq.l{background:linear-gradient(135deg,#b7cae0,#6e88a4)}.royal-board.theme-midnight .sq.dark,.game .board.theme-midnight .sq.d{background:linear-gradient(135deg,#273a59,#101d35)}.royal-board.theme-obsidian .sq.light,.game .board.theme-obsidian .sq.l{background:linear-gradient(135deg,#81776a,#4a443f)}.royal-board.theme-obsidian .sq.dark,.game .board.theme-obsidian .sq.d{background:linear-gradient(135deg,#25252a,#0b0b10)}.royal-board.theme-stone .sq.light,.game .board.theme-stone .sq.l{background:linear-gradient(135deg,#c9c5b4,#928e7d)}.royal-board.theme-stone .sq.dark,.game .board.theme-stone .sq.d{background:linear-gradient(135deg,#77756d,#454741)}.royal-board.piece-modern .piece,.game .board.piece-modern span{font-family:Inter,system-ui,sans-serif;font-weight:900}.royal-board.piece-royal .piece,.game .board.piece-royal span{font-family:Palatino,Georgia,serif;font-weight:800}.royal-board.frame-gold,.game .board.frame-gold{border-color:#d9aa4d;box-shadow:0 0 0 3px #f4d987,0 0 0 8px #5e3d1d,0 25px 60px #000b}.royal-board.frame-marble,.game .board.frame-marble{border-color:#d5d8da;box-shadow:0 0 0 5px #6c747d,0 25px 60px #000b}.royal-board.frame-minimal,.game .board.frame-minimal{border:3px solid #c0c7d0;box-shadow:0 15px 40px #000b}
