/* Readable Thai typography and one quiet profile treatment. */
body { font-family:'Sarabun',sans-serif; font-size:16px; line-height:1.7; }
.game-top-bar { height:auto; min-height:100px; flex-wrap:wrap; }
.game-top-bar>.player-profile { display:flex; align-items:center; gap:12px; padding:10px 14px; border:1px solid var(--calm-line); border-radius:14px; background:#18302d80; }
.profile-portrait { width:44px; height:44px; object-fit:cover; border-radius:50%; border:1px solid #d8c49d60; }
.profile-details { min-width:0; }
.profile-heading { display:flex; align-items:center; gap:7px; color:#e9e5d7; font:400 15px/1.6 'Sarabun',sans-serif; }
.profile-heading .moonlit-icon { width:17px; height:17px; color:#c8b481; }
.profile-level { display:flex; gap:5px; align-items:center; color:#d8c49d; font-size:13px; margin:3px 0 7px; }
.profile-progress-label { color:#adc1b5; margin-left:10px; }
.profile-track { height:4px; border-radius:4px; background:#ffffff10; overflow:hidden; }
#exp-bar { height:100%; border-radius:4px; background:linear-gradient(90deg,#749a83,#d8c49d); box-shadow:none; }
.game-scene :is(.text-xs,.text-sm),.game-dialog-box .text-xs { font-size:16px; line-height:1.7; }
:is(.game-scene,#holo-inspect-modal,#gacha-multi-modal,#wallpaper-modal) [class*="text-["] { font-size:14px; line-height:1.65; }
.game-scene h2 { font-size:26px; line-height:1.6; }
.reading-intro p,.ritual-note>p,.ritual-note li,.gentle-note p { font-size:16px; line-height:1.9; }
.eyebrow,.ritual-duration,.reading-footnote { font-size:13px; }
#arena-hint { font-size:15px; line-height:1.7; }
.game-tab-label { font-size:14px; }
.game-tab-btn { min-height:60px; }
#sound-btn { width:44px; height:44px; }
#player-karma { font-size:15px; }
.collection-help { color:#b9cabe; padding:18px 20px; border:1px solid #d8c49d30; border-radius:14px; background:#17302dcc; font-size:16px; line-height:1.8; }
.collection-help h3 { color:#e9e5d7; font-size:18px; font-weight:500; margin-bottom:6px; }
.collection-help .help-detail { font-size:14px; margin-top:8px; color:#b4c5b8; }
.binder-help { margin:0; }
.collection-name { font:400 17px/1.6 'Sarabun',sans-serif; }
.collection-caption { font-size:14px; line-height:1.7; }
.collection-rarity { font-size:12px; }
.collection-lock { font-size:13px; padding:6px 9px; }
.collection-lock .moonlit-icon { width:14px; height:14px; }
.is-locked .collection-art img { opacity:.36; filter:saturate(.35); }
#binder-filters { display:grid; gap:10px; width:100%; overflow:visible; }
.binder-filter-group { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.binder-filter-group--rarity { padding-top:10px; border-top:1px solid #d8c49d25; }
.binder-filter-btn { min-height:44px; flex-shrink:0; white-space:nowrap; font-size:15px!important; }
.inspect-ownership { color:#b7c9b9; font-size:14px; margin:8px 20px; }
#inspect-card-title { font:400 20px/1.6 'Pridi',serif; }
#inspect-card-skill { font-size:16px; line-height:1.7; }
#inspect-card-desc { font-size:16px; line-height:1.8; display:block; -webkit-line-clamp:unset; }
#holo-inspect-modal .tcg-card-container { width:min(320px,85vw); }
#holo-inspect-modal { justify-content:flex-start; }
#inspect-make-wallpaper-btn,#wallpaper-download-link { font-size:16px; }
.dialog-text-body { font-size:17px; line-height:1.9; }
.dialog-name-tag { font-size:15px; }
.runic-slot-tag { font-size:12px; white-space:nowrap; }
.runic-slot.has-card .deployed-caption { font:14px/1.4 'Cormorant Garamond',serif; padding:5px 2px; }
.deployed-caption span { font:12px/1.6 'Sarabun',sans-serif; }
.inspect-slot-btn { min-height:44px; }
#summon-1x-btn,#summon-10x-btn { font-size:16px; padding:14px 10px; }
#quests-list h4 { font-size:16px; }
#quests-list>div { gap:12px; padding:14px; }
#quests-list>div>span { white-space:nowrap; }
#gacha-multi-grid>button>div:last-child>div:first-child { font-size:16px; }
#toast { font-size:15px; line-height:1.6; }
@media(max-width:900px) {
 .game-top-bar>.player-profile { order:3; width:100%; }
 .profile-details { flex:1; }
 .game-top-bar { gap:12px; }
}
@media(max-width:640px) {
 .game-top-bar { padding:14px 16px; min-height:0; }
 .brand { font-size:24px; }
 .brand small { font-size:7px; }
 .game-top-bar>.player-profile { padding:10px 12px; }
 .profile-heading { font-size:16px; }
 .profile-level { font-size:14px; }
 .profile-progress-label { font-size:13px; }
 .game-currency-pill { padding:6px 8px; }
 .reading-intro h1 { font-size:26px; }
 .reading-intro p { font-size:16px; }
 .eyebrow { font-size:11px; letter-spacing:1.6px; }
 .reading-panel { padding:24px 10px; }
 .reading-panel>div:first-child>div>span:last-child { font-size:12px; letter-spacing:1px; }
 .arena-slots-row { gap:10px; }
 .runic-slot { width:29%; height:164px; }
 .runic-slot-tag { font-size:10px; }
 .collection-name { font-size:16px; }
 .collection-caption { font-size:14px; }
 .collection-lock { font-size:12px; }
 .reading-footnote { font-size:14px; }
 .game-bottom-dock { height:86px; }
 .game-tab-btn { padding:8px 3px; }
 .game-tab-label { font-size:13px; }
 .game-dialog-overlay { bottom:100px; }
 .collection-help { padding:16px; }
 #holo-inspect-modal .tcg-card-container { width:min(300px,80vw); }
 #scene-summon .summon-actions { grid-template-columns:minmax(0,1fr); }
 #summon-1x-btn,#summon-10x-btn { min-width:0; max-width:none; }
 .binder-filter-group--rarity { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
 .binder-filter-group--rarity .binder-filter-btn { width:100%; text-align:center; }
 #quests-list>div { align-items:flex-start; }
}
@media(max-width:370px) { .brand small { display:none; } .brand { font-size:22px; } .profile-progress-label { font-size:12px; margin-left:4px; } }

.game-top-bar>.player-profile { display:flex; }

.player-hand-dock.is-shuffling { pointer-events:none; }
#arena-deal-btn:disabled,#arena-clear-btn:disabled { opacity:.7; cursor:wait; }
#esiimsi-cylinder-wrap { transform-origin:50% 85%; touch-action:manipulation; }
#esiimsi-cylinder-wrap[aria-disabled="true"] { pointer-events:none; }
#oracle-shake-btn:disabled { cursor:wait; opacity:.8; }
.oracle-moving-sticks { position:absolute; top:29%; left:40%; width:25%; height:24%; pointer-events:none; }
.oracle-loose-stick { position:absolute; width:5px; height:100%; left:15%; border-radius:3px; background:linear-gradient(90deg,#a78750,#e6d3a1,#b89860); transform-origin:50% 100%; opacity:0; box-shadow:1px 1px 3px #0004; }
.oracle-loose-stick:nth-child(2) { left:45%; }
.oracle-loose-stick:nth-child(3) { left:75%; }
#esiimsi-ejected-stick { top:3%; left:50%; width:42px; height:135px; transform:translateX(-50%); background:linear-gradient(90deg,#c2a46f,#eee0b8,#c2a46f); color:#283e38; border:1px solid #e8d9b3; border-radius:15px 15px 6px 6px; box-shadow:0 8px 24px #0005; }
#ejected-stick-num { font-size:26px; }
#esiimsi-progress-fill { transition:width .7s ease; background:linear-gradient(90deg,#749a83,#d8c49d); }
#esiimsi-result-modal { background:#091c1dec; overflow-y:auto; }
#esiimsi-result-modal>div { background:#18302e; border-color:#d8c49d60; box-shadow:0 15px 50px #0005; margin:auto; }
#esiimsi-result-modal h3 { color:#eee8d8; font-size:24px; font-weight:400; }
#esiimsi-result-poem { font-family:'Sarabun',sans-serif; font-size:17px; line-height:1.9; background:#102526; color:#e5deca; border-color:#d8c49d30; font-style:normal; }
#esiimsi-result-grade { background:#d8c49d; color:#283e38; }
#esiimsi-result-modal [class*="text-["],#esiimsi-result-modal .text-xs { font-size:14px; }
.oracle-input-help { text-align:center; color:#b9cabe; font-size:14px; line-height:1.8; }
.oracle-input-help p { margin-top:8px; }
#oracle-motion-btn { padding:12px 20px; font-size:16px; }
#oracle-motion-btn[aria-pressed="true"] { background:#d8c49d; color:#18302e; }
#oracle-shake-btn { touch-action:manipulation; user-select:none; }
#esiimsi-cylinder-wrap { user-select:none; }

#esiimsi-result-modal .text-sky-400,#esiimsi-result-nums { color:#d8c49d; }
#esiimsi-result-modal .bg-slate-900 { background:#102526; }

#summon-10x-btn:disabled { opacity:.45; cursor:not-allowed; }
#first-gift-note { color:#e4d1aa; font-size:17px; }
#karma-badge { cursor:default; }

.profile-portrait { width:48px; height:48px; flex-shrink:0; border:0; box-shadow:0 3px 12px #0002; }
.profile-heading { letter-spacing:0; font-weight:400; }
/* Header alignment: consistent control boxes, centered glyphs and stable columns. */
.game-top-bar { display:grid; grid-template-columns:minmax(190px,1fr) auto auto; align-items:center; column-gap:20px; row-gap:14px; }
.game-top-bar .brand { margin-right:0; min-width:0; }
.game-top-bar>.player-profile { width:auto; min-height:80px; box-sizing:border-box; margin:0; padding:12px 14px; gap:12px; }
.profile-heading { line-height:24px; }
#player-rank-icon { display:flex; align-items:center; justify-content:center; flex:0 0 18px; }
.profile-level { line-height:20px; margin:2px 0 8px; flex-wrap:wrap; }
.profile-track { margin:0; }
.header-controls { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.header-controls .game-currency-pill { display:flex; align-items:center; justify-content:center; gap:7px; height:44px; min-height:44px; box-sizing:border-box; padding:0 13px; border-radius:12px; white-space:nowrap; line-height:1; }
.header-controls .game-currency-pill>span { display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.header-controls .moonlit-inline,#sound-icon { display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.header-controls .moonlit-icon { display:block; width:19px; height:19px; vertical-align:initial; }
.header-controls #sound-btn { display:flex; align-items:center; justify-content:center; width:44px; height:44px; min-width:44px; padding:0; margin:0; border-radius:12px; }
#player-streak,#player-karma { font-variant-numeric:tabular-nums; line-height:1; }
@media(max-width:1100px) {
 .game-top-bar { grid-template-columns:minmax(0,1fr) auto; }
 .game-top-bar>.player-profile { grid-column:1/-1; grid-row:2; width:100%; }
 .game-top-bar .header-controls { grid-column:2; grid-row:1; }
 .profile-details { flex:1; }
}
@media(max-width:640px) {
 .game-top-bar { gap:12px 10px; }
 .header-controls { gap:8px; }
 .header-controls .game-currency-pill:first-child { display:none; }
 .header-controls .game-currency-pill { padding:0 10px; }
 .game-top-bar>.player-profile { padding:12px; }
}
.header-controls #music-btn { width:44px; height:44px; min-width:44px; display:flex; align-items:center; justify-content:center; padding:0; border:1px solid var(--calm-line); border-radius:12px; background:transparent; color:var(--calm-muted); }
.header-controls #music-btn.music-enabled { color:var(--calm-gold); background:#d8c49d0b; }
@media(max-width:420px) { .header-controls { gap:6px; } .game-top-bar { column-gap:8px; } .game-top-bar .brand { font-size:21px; gap:6px; } .game-top-bar .brand small { font-size:6px; letter-spacing:1px; } .header-controls .game-currency-pill { padding:0 7px; } }
@media(max-width:360px) { .game-top-bar .brand-symbol { display:none; } #player-karma { font-size:13px; } }

#inspect-make-wallpaper-btn:disabled { opacity:.55; cursor:not-allowed; background:#253c35; border-color:#d8c49d35; color:#b9cabe; box-shadow:none; transform:none; }
.faith-collection-note { margin:18px 0; padding:16px; border-left:2px solid #d8c49d70; background:#17302c90; color:#b9cabe; font-size:14px; line-height:1.8; }
#inspect-card-type { font-family:'Sarabun',sans-serif; letter-spacing:.5px; }

/* Explicit action container: later gift sections must not affect mobile layout. */
#scene-summon .summon-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; width:100%; max-width:520px; margin-inline:auto; padding-bottom:8px; position:relative; z-index:20; }
#scene-summon .summon-actions button { width:100%; min-width:0; max-width:none; white-space:normal; line-height:1.6; }
@media(max-width:640px) {
 #scene-summon .summon-actions { grid-template-columns:minmax(0,1fr); }
 #scene-summon .summon-portal-circle { max-width:100%; }
}

