@import url('./shell.css');
@import url('./progression.css');
@import url('./battle.css');
@import url('./events.css');
@import url('./character.css');
@import url('./result.css');
@import url('./i18n.css');

.record-banner{display:flex;gap:12px;align-items:center;min-height:111px;padding:4px 3px 6px;border:14px solid transparent;border-image:var(--panel) 66 fill / 14px / 0 stretch;margin:1px 0 13px}
.record-banner>div{flex:1;min-width:0}.record-banner>div>strong{font-size:16px}.record-banner>div>strong>b{font-size:27px;color:#667443;margin-left:12px}.record-banner small{font-size:12px;color:#a08c63}
.record-banner p{font-size:10px;color:#877855;margin-top:7px;line-height:20px}.record-banner p b{color:#646d42;font-size:12px;margin-left:4px}.record-banner p>span{display:block}
.battle-ledger{border:13px solid transparent;border-image:var(--panel) 66 fill / 13px / 0 stretch;padding:0 3px}.ledger-entry{display:flex;align-items:center;gap:7px;min-height:76px;border-bottom:1px solid #c3b18b;padding:9px 0}.ledger-entry:last-child{border-bottom:0}
.ledger-emblem{width:49px;height:49px;position:relative;flex-shrink:0}.ledger-emblem>small{position:absolute;left:0;bottom:-2px;min-width:15px;text-align:center;background:#6b7451;color:#f5e4bc;font-size:10px;border:1px solid #495c3e;border-radius:2px}
.ledger-realm{flex:1;min-width:0}.ledger-realm>strong{font-size:13px;display:block}.ledger-realm>small{font-size:9px;color:#988768;display:block;margin-top:6px;white-space:nowrap}.ledger-score{text-align:right;min-width:43px}.ledger-score>strong{font-size:15px;color:#6a7448}.ledger-score>small{font-size:9px;display:block;margin-top:3px;color:#9a8b67}
.ledger-result{display:grid;place-items:center;width:27px;height:31px;border:1px solid #a49470;color:#948362;font-size:17px;transform:rotate(-6deg);margin-left:4px;margin-right:2px}.ledger-result.won{color:#a75b40;border:2px solid #a75b40}
.record-limit{font-size:10px;color:#9b9070;text-align:center;display:block;padding-top:15px}
.empty-records,.empty-state{padding:40px 0;text-align:center;color:#9b9474}.empty-records p{font-size:17px;padding:17px 0 22px}.empty-records>.game-icon{width:90px!important;height:90px!important}
.modal-backdrop{position:fixed;inset:0;z-index:40;background:#172119c9;display:flex;align-items:center;justify-content:center;padding:15px}
.modal{width:100%;max-width:380px;max-height:calc(100svh - 30px);overflow:auto;position:relative;outline:0;padding:13px 12px 18px;border:19px solid transparent;border-image:var(--panel) 66 fill / 19px / 0 stretch;filter:drop-shadow(0 8px 9px #0e211270);text-align:center;animation:modal-in .16s ease}
.modal h2{font-family:var(--serif);font-size:28px;letter-spacing:3px;margin:0 0 20px;font-weight:900;color:#3e5944}
.modal-close{position:absolute;right:8px;top:8px;width:34px;height:34px;background:#a65d41;border-color:#69432d;color:#ffedc7;z-index:2}
.modal>.eyebrow{font-size:11px;color:#8b7751;margin-bottom:7px;letter-spacing:1px}
.modal>p{font-size:12px;line-height:1.8;color:#7c785d;margin:10px 0 20px}.modal-tip{display:block;font-size:10px;line-height:1.6;color:#8f876b;margin-top:14px}
.modal-spirit-seal{height:145px;width:145px;margin:0 auto 5px;position:relative}
.modal-spirit-seal>.spirit-portrait{display:block;width:145px;height:145px}
.modal .stars{margin:-8px 0 15px}
.modal-skill{margin-top:16px;text-align:left;background:#ded5b5;border-top:2px solid #b2a177;border-bottom:1px solid #b2a177;padding:13px}
.modal-skill strong{display:flex;justify-content:space-between;gap:10px;font-size:16px;color:#526446}.modal-skill strong span{font-size:11px;color:#8d815c}
.modal-skill p{font-size:12px;line-height:1.8;color:#747157;margin-top:7px}.modal-skill small{font-size:10px;color:#937a52;display:block;margin-top:8px}.modal-spirit-actions>small{font-size:10px;color:#938568;display:block;margin-top:13px}
.form-label{text-align:left;display:block;color:#877a57;font-size:12px;margin:17px 0 8px}
.modal input{width:100%;min-height:48px;border:2px solid #b1a07a;background:#f8edce;padding:10px;color:#4b583c;border-radius:4px;text-align:center}
.settings-profile{display:flex;align-items:center;gap:10px;text-align:left;padding:10px 0 16px;border-bottom:1px solid #b8a67c}
.settings-profile>span:nth-child(2){flex:1}.settings-profile strong{font-size:15px}.settings-profile small{display:block;font-size:11px;color:#8c7a56;margin-top:5px}.settings-profile .button{min-height:40px;padding:6px 12px;font-size:12px}
.setting-row{min-height:78px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #b8a67c;padding:12px 0;margin-bottom:15px;text-align:left;font-size:13px}
.setting-row>span{display:flex;align-items:center;gap:8px;font-weight:800}.game-toggle{display:flex;gap:10px;align-items:center;min-width:83px;min-height:42px;padding:5px 10px;background:#b5b59a;border:2px solid #797959;border-radius:4px;color:#596043;box-shadow:0 2px #b1a17b}
.game-toggle i{width:20px;height:20px;border:1px solid #797754;background:#d5d0ac;border-radius:2px}.game-toggle.on{background:#648663;color:#fff1c6;border-color:#41563c}.game-toggle.on i{background:#dec681;border-color:#646645}.game-toggle.on i:after{content:'✓';color:#526141;display:block;font-weight:900;font-size:16px;line-height:18px;text-align:center}
.modal .settings-note{font-size:10px;color:#948668;margin:17px 0 8px}.danger{color:#a45c3f}.danger-button{background:#995b42;color:#fff0cc}
.breakthrough-art,.level-symbol{color:#9f945c;margin-bottom:11px}.breakthrough-art .game-icon{width:86px!important;height:86px!important}
.realm-change{display:flex;align-items:center;justify-content:center;gap:12px;font-size:16px;margin:25px 0;color:#9b9579}.realm-change strong{color:#5f7547;font-size:20px}.power-gain{font-size:13px;padding:17px 0;color:#928060}.power-gain strong{font-size:26px;color:#728249;margin-left:10px}
.help-gesture{height:100px;display:grid;place-items:center;position:relative;color:#648968;margin:10px auto 0;width:160px}
.help-gesture:before,.help-gesture:after{content:'';position:absolute;width:78px;height:78px;border:2px solid #929872;border-radius:50%;background:#bac39855}.help-gesture:after{width:30px;height:30px;background:#95ac8188;transform:translate(15px,-12px)}.help-gesture>.icon{position:relative;z-index:1;transform:rotate(-40deg);margin:0 0 34px 43px}
.help-instructions{display:flex;justify-content:center;gap:13px;color:#7b785a;font-size:11px;margin:18px 0}.help-keyboard{display:none;font-size:10px;color:#8d876c;margin:12px 0}.help-caption{font-size:18px;margin:6px 0 13px;color:#5d7148}
.level-modal{max-width:412px;padding:13px 0 20px;overflow:visible;border:0;background:none;color:#f0e4c1;filter:none}
.level-modal h2{margin:0 auto 18px;padding:13px 10px 16px;width:235px;background:var(--plaque) center/100% 100% no-repeat;font-size:25px;color:#ffe9b4;text-shadow:0 2px #2b4338;letter-spacing:2px}.level-up-badge{font:700 12px var(--sans);color:#d1cba5;margin-left:8px;letter-spacing:0}
.skill-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.skill-choice{display:flex;flex-direction:column;align-items:center;position:relative;min-height:265px;padding:6px 0 11px;border:9px solid transparent;border-image:var(--panel) 66 fill / 9px / 0 stretch;color:var(--ink);filter:drop-shadow(0 4px 1px #152a2566);text-align:center}
.skill-choice .choice-icon{height:100px;width:100%;display:grid;place-items:center;flex-shrink:0;border-bottom:1px solid #c3b68b;margin-bottom:7px}
.choice-icon .game-icon{max-width:100%;width:94px!important;height:94px!important}
.choice-copy{display:flex;flex-direction:column;align-items:center;width:100%;flex:1}
.choice-copy>small{font-size:9px;color:#847a56;line-height:15px;font-weight:650;margin-bottom:4px}
.skill-choice strong{font-family:var(--serif);font-size:17px;line-height:21px;letter-spacing:0;min-height:24px;display:flex;align-items:center;justify-content:center;width:100%;font-weight:900}
.skill-choice em{display:block;font-size:11px;line-height:18px;color:#426342;font-weight:800;margin:5px 0 7px}
.skill-choice p{color:#776e50;font-size:11px;line-height:18px;margin:0;white-space:pre-line;letter-spacing:0}
.skill-choice kbd{position:absolute;inset:auto auto -13px 50%;transform:translateX(-50%);width:20px;height:20px;display:none;place-items:center;border:1px solid #b09a68;border-radius:3px;color:#eed7a2;background:#3b4836;font:700 10px/1 var(--sans);pointer-events:none}
.skill-choice:active{transform:translateY(3px)!important;filter:brightness(1.08)}
.result-mark{display:grid;place-items:center;height:65px;width:65px;border:2px solid #a19165;color:#8f946d;font-size:42px;margin:0 auto 17px;transform:rotate(-4deg)}.result-mark.victory{color:#9f4c37;border-color:#9f4c37}
.result-stats{display:flex;justify-content:space-around;padding:17px 0;border-top:1px solid #b9ae86;border-bottom:1px solid #b9ae86;margin:16px 0}.result-stats small{display:block;font-size:10px;color:#938668;margin-bottom:6px}.result-stats strong{font-size:23px;color:#5c7245}
.result-rewards{display:flex;justify-content:space-around;margin:20px 0}.result-rewards>span{display:flex;flex-direction:column;align-items:center;gap:5px;color:#977b47}.result-rewards .game-icon{width:35px!important;height:35px!important}.result-rewards strong{font-size:21px}.result-rewards small{font-size:10px;color:#8e8564}
.result-build{display:flex;justify-content:center;flex-wrap:wrap;gap:11px;margin:17px 0 24px}.result-build>span{position:relative;background:#d7d0af;border:1px solid #b3a077;border-radius:3px;padding:3px}.result-build small{font-size:9px;position:absolute;bottom:-5px;right:0;background:#f4e7be;padding:0 3px}.replace-list{margin:18px 0 0}.language-list{margin:4px 0 0}.language-list .button{font-family:var(--sans);font-size:16px}.language-current{min-width:118px;gap:6px;justify-content:space-between;padding-left:16px}
#toast{position:fixed;bottom:104px;left:50%;transform:translateX(-50%) translateY(7px);max-width:calc(100% - 30px);width:max-content;z-index:80;background:#344530f5;border:1px solid #baa577;padding:11px 18px;color:#f4eaca;font-size:12px;line-height:1.5;text-align:center;border-radius:3px;opacity:0;pointer-events:none;transition:.16s;box-shadow:0 3px #273321}
#toast.visible{opacity:1;transform:translateX(-50%)}
@keyframes breathe{50%{opacity:.45}}@keyframes modal-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@media(min-width:600px){.app-shell,#app{height:min(920px,100svh)}.help-keyboard{display:block}.skill-choice kbd{display:grid}}
@media(max-height:740px){
  .skill-choice{min-height:247px}.level-modal{padding-top:20px;padding-bottom:22px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
