:root{
  --bg:#14110f;--panel:#201a16;--panel2:#2a211b;--card:#2f251f;--line:#4a392d;
  --text:#f4eadf;--muted:#bda995;--gold:#d8a84e;--red:#c65d52;--green:#67a56f;
  --blue:#5e88b8;--yellow:#c7ad53;--good:#79bb7f;--bad:#d46d65;--accent:#d39a4c;
}
*{box-sizing:border-box}html,body{margin:0;background:linear-gradient(#15110f,#0f0d0c);color:var(--text);font-family:Inter,"Yu Gothic UI","Yu Gothic",Meiryo,sans-serif;min-height:100%}
body{padding-bottom:86px}button,input,select{font:inherit}.hidden{display:none!important}
#app{max-width:1180px;margin:0 auto;min-height:100vh}.topbar{position:sticky;top:0;z-index:20;background:rgba(20,17,15,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.eyebrow{font-size:10px;letter-spacing:.2em;color:var(--gold);font-weight:800}.topbar h1{font-size:20px;margin:2px 0 0}.version{font-size:11px;color:var(--muted);font-weight:500}.resource-strip{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.resource{background:#171310;border:1px solid var(--line);border-radius:999px;padding:5px 9px;display:flex;gap:6px;align-items:center;font-size:12px}.resource span{color:var(--gold);font-weight:800}.resource strong{font-variant-numeric:tabular-nums}
main{padding:18px}.view{display:none}.view.active{display:block}.bottom-nav{position:fixed;z-index:30;left:50%;bottom:0;transform:translateX(-50%);width:min(1180px,100%);display:grid;grid-template-columns:repeat(7,1fr);background:rgba(18,15,13,.97);border-top:1px solid var(--line);padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));backdrop-filter:blur(12px)}
.bottom-nav button{border:0;background:transparent;color:var(--muted);font-size:11px;padding:6px 2px;border-radius:10px;min-height:48px}.bottom-nav button span{display:block;font-size:18px;margin-bottom:2px}.bottom-nav button.active{color:var(--text);background:#2a211b}
.hero{background:radial-gradient(circle at 75% 10%,rgba(211,154,76,.16),transparent 36%),linear-gradient(135deg,#2b211b,#1d1714);border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:16px;overflow:hidden}.hero h2{margin:0 0 8px;font-size:24px}.hero p{margin:0;color:var(--muted);line-height:1.7}.hero .kicker{font-size:12px;color:var(--gold);font-weight:800;margin-bottom:8px}
body{padding-bottom:0}body.home-mode{padding-bottom:0}.bottom-nav{display:none!important}body.home-mode .topbar{display:none}
.tavern-home{position:relative;min-height:calc(100vh - 36px);border:1px solid rgba(130,94,63,.65);border-radius:24px;overflow:hidden;background-image:linear-gradient(90deg,rgba(16,12,10,.76) 0%,rgba(19,13,11,.48) 28%,rgba(19,13,11,.18) 48%,rgba(18,13,11,.55) 100%),linear-gradient(180deg,rgba(17,12,10,.12),rgba(13,10,9,.48)),url('assets/home/tavern_bg.webp');background-size:cover;background-position:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 24px 48px rgba(0,0,0,.28)}
.tavern-home::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 18% 20%,rgba(255,222,160,.16),transparent 22%),radial-gradient(circle at 76% 14%,rgba(255,210,130,.10),transparent 18%),linear-gradient(180deg,rgba(0,0,0,.06),transparent 28%,rgba(0,0,0,.12) 72%,rgba(0,0,0,.34));pointer-events:none}
.tavern-home::after{content:'';position:absolute;left:0;right:0;bottom:0;height:34%;background:linear-gradient(180deg,rgba(0,0,0,0),rgba(25,18,15,.14) 35%,rgba(20,15,13,.48) 72%,rgba(17,13,11,.85));pointer-events:none}
.tavern-glow,.tavern-shelves,.tavern-counter{display:none}
.tavern-content{position:relative;z-index:2;display:grid;grid-template-columns:minmax(280px,.92fr) minmax(360px,1.18fr);gap:18px;padding:26px 24px 28px;min-height:calc(100vh - 36px)}
.tavern-side{position:relative;display:flex;flex-direction:column;justify-content:flex-start;gap:16px;min-height:620px;padding-top:8px}
.tavern-keeper{position:absolute;left:14px;bottom:-4px;display:flex;align-items:flex-end;justify-content:center;width:500px;height:610px;pointer-events:none;z-index:2}
.tavern-keeper-frame{position:relative;width:500px;height:610px;overflow:visible;background:transparent;mask-image:linear-gradient(180deg,#000 0 95%,transparent 100%)}
.tavern-keeper-frame::before{content:'';position:absolute;left:-4%;right:-4%;bottom:0;height:24%;background:linear-gradient(180deg,rgba(15,12,11,0),rgba(15,12,11,.05) 20%,rgba(15,12,11,.30));z-index:1;pointer-events:none}
.tavern-keeper img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center bottom;transform:none;filter:drop-shadow(0 20px 28px rgba(0,0,0,.36)) drop-shadow(0 6px 10px rgba(0,0,0,.18))}
.tavern-nameplate{position:absolute;left:6px;top:6px;z-index:3;max-width:292px;padding:13px 15px;border:1px solid rgba(255,233,210,.14);border-radius:16px;background:linear-gradient(180deg,rgba(18,14,12,.58),rgba(16,13,11,.80));backdrop-filter:blur(4px);box-shadow:0 10px 26px rgba(0,0,0,.18)}
.tavern-nameplate .eyebrow{font-size:10px;color:#e5bf87;letter-spacing:.16em;text-transform:uppercase}.tavern-nameplate h2{margin:4px 0 6px;font-size:24px}.tavern-nameplate p{margin:0;color:#dbc4b0;line-height:1.6;font-size:12px}.tavern-accent{position:absolute;left:212px;top:220px;z-index:2;width:154px;padding:12px 14px 12px;border-radius:12px;background:linear-gradient(180deg,rgba(65,42,28,.58),rgba(38,26,20,.82));border:1px solid rgba(238,210,173,.12);box-shadow:0 8px 20px rgba(0,0,0,.24);transform:rotate(-2deg)}.tavern-accent::before{content:'';position:absolute;inset:7px;border-radius:8px;border:1px dashed rgba(240,220,192,.10)}.tavern-accent-pin{position:absolute;top:-8px;left:18px;width:18px;height:18px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#f3e1b0,#8a6137 60%,#4b3224 100%);box-shadow:0 2px 4px rgba(0,0,0,.28)}.tavern-accent-kicker{font-size:9px;letter-spacing:.18em;color:#d6b584;margin-bottom:6px;position:relative;z-index:1}.tavern-accent strong{display:block;font-size:16px;position:relative;z-index:1}.tavern-accent span{display:block;margin-top:4px;font-size:11px;line-height:1.5;color:#ceb9a3;position:relative;z-index:1}
.tavern-panel{align-self:start;background:linear-gradient(180deg,rgba(15,12,11,.58),rgba(14,11,10,.82));border:1px solid rgba(255,233,210,.14);border-radius:22px;padding:18px 18px 16px;backdrop-filter:blur(7px);box-shadow:0 12px 40px rgba(0,0,0,.28)}
.tavern-status{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.tavern-status .resource{background:rgba(15,12,10,.72);border-color:rgba(255,238,219,.09)}
.tavern-next{padding:12px 14px;border:1px solid rgba(255,233,210,.10);border-radius:14px;background:rgba(255,255,255,.045);margin-bottom:14px}.tavern-next strong{display:block;font-size:17px}.tavern-next span{display:block;margin-top:4px;color:#dcc7b2;font-size:12px;line-height:1.6}
.tavern-commands{display:grid;gap:10px}.tavern-command{display:grid;grid-template-columns:56px 1fr auto;gap:12px;align-items:center;padding:12px 14px;border-radius:16px;border:1px solid rgba(255,233,210,.12);background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.018));cursor:pointer;transition:.15s transform,.15s border-color,.15s background;color:inherit}.tavern-command:hover{transform:translateY(-1px);border-color:#b18255;background:linear-gradient(180deg,rgba(211,154,76,.16),rgba(255,255,255,.03))}.tavern-command .icon{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;font-size:24px;background:linear-gradient(180deg,#59402e,#2c2019);border:1px solid rgba(255,239,222,.08)}.tavern-command strong{display:block;font-size:15px}.tavern-command span{display:block;color:#dbc6b1;font-size:12px;line-height:1.5}.tavern-command .meta{justify-self:end}.tavern-footnote{margin-top:12px;color:#cab29b;font-size:11px;line-height:1.6}.subview-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px}.subview-title .kicker{font-size:11px;color:var(--gold);font-weight:800;letter-spacing:.18em;margin-bottom:4px}.subview-title h2{margin:0;font-size:22px}.subview-title p{margin:4px 0 0;color:var(--muted);font-size:13px}.back-link{border:1px solid var(--line);background:#221b17;color:var(--text);padding:9px 12px;border-radius:12px;font-weight:700;cursor:pointer;min-height:40px}.notice{background:#1a1512;border:1px solid var(--line);border-radius:12px;padding:12px 14px;color:#c8b6a2;font-size:12px;line-height:1.7}.grid{display:grid;gap:12px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:linear-gradient(180deg,var(--panel),#1b1613);border:1px solid var(--line);border-radius:14px;padding:14px;min-width:0}.card h3{margin:0 0 8px;font-size:15px}.card p{color:var(--muted);font-size:13px;line-height:1.6;margin:6px 0}.card.clickable{cursor:pointer;transition:.15s transform,.15s border-color}.card.clickable:hover{transform:translateY(-1px);border-color:#72513a}.section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:22px 0 10px}.section-head h2{font-size:18px;margin:0}.section-head p{font-size:12px;color:var(--muted);margin:0}.pill{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);background:#181411;border-radius:999px;padding:4px 8px;font-size:11px;color:var(--muted)}.pill.good{color:#cfe9d2;border-color:#446a48}.pill.warn{color:#f0d6a8;border-color:#7a5a2c}.pill.bad{color:#efb2ad;border-color:#7a3b36}.tag{display:inline-block;font-size:10px;padding:2px 6px;border-radius:999px;margin:2px 3px 2px 0;border:1px solid rgba(255,255,255,.12);color:#e8ddcf;background:rgba(255,255,255,.04)}
.btn{border:1px solid #765538;background:linear-gradient(#6d4a2f,#553720);color:#fff4e5;padding:9px 13px;border-radius:10px;font-weight:700;cursor:pointer;min-height:40px}.btn:hover{filter:brightness(1.08)}.btn.secondary{background:#221b17;border-color:var(--line);color:var(--text)}.btn.danger{background:#612f2d;border-color:#8d4945}.btn:disabled{opacity:.45;cursor:not-allowed;filter:none}.actions{display:flex;gap:8px;flex-wrap:wrap}.small{font-size:12px}.muted{color:var(--muted)}.right{text-align:right}.center{text-align:center}.mono{font-variant-numeric:tabular-nums}
.character-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}.char-card{position:relative;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px;overflow:hidden}.char-card.selected{outline:2px solid var(--accent)}.char-card .portrait{width:52px;height:52px;border-radius:12px;display:grid;place-items:center;font-weight:900;font-size:18px;background:#171310;border:1px solid var(--line);flex:0 0 auto}.char-head{display:flex;gap:10px;align-items:center}.char-meta{min-width:0}.char-meta strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.char-meta span{display:block;color:var(--muted);font-size:11px;margin-top:2px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:10px}.stat{background:#171310;border-radius:8px;padding:7px 4px;text-align:center;min-width:0}.stat b{display:block;font-size:11px;white-space:nowrap}.stat span{display:block;font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.element-A{color:#ef8f87}.element-B{color:#94cb9a}.element-C{color:#8eb7df}.element-D{color:#b58af0}.portrait.element-bg-A{background:linear-gradient(135deg,#4e2724,#241817)}.portrait.element-bg-B{background:linear-gradient(135deg,#25402a,#182019)}.portrait.element-bg-C{background:linear-gradient(135deg,#23364a,#171d24)}.portrait.element-bg-D{background:linear-gradient(135deg,#402958,#1d1726)}
.party-slots{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.party-slot{min-height:122px;border:1px dashed #604a3a;border-radius:12px;padding:9px;background:#171310;display:flex;flex-direction:column;justify-content:space-between;gap:8px}.party-slot.filled{border-style:solid;background:#241c18}.party-slot .slot-no{font-size:10px;color:var(--gold)}
.portrait,.big-portrait,.detail-art{overflow:hidden}.art-portrait{position:relative;overflow:hidden}.art-portrait img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 16%}.portrait.art-portrait img{object-position:center 12%}.big-portrait.art-portrait img{object-position:center 16%}.detail-art img{display:block;width:100%;height:auto;max-height:420px;object-fit:cover;object-position:center top;margin:0 auto}.scout-candidate{min-width:0}.scout-candidate strong,.scout-candidate p,.scout-candidate .skillline,.scout-candidate .locked-passives{word-break:keep-all}.scout-stage{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.scout-candidate{background:linear-gradient(180deg,#2a201a,#171310);border:1px solid var(--line);border-radius:16px;padding:14px;text-align:center}.scout-candidate .big-portrait{height:126px;border-radius:13px;margin-bottom:10px;display:grid;place-items:center;font-size:34px;font-weight:900;border:1px solid var(--line);background:#1a1512}.scout-candidate .skillline{font-size:11px;color:var(--muted);margin:5px 0}.locked-passives{border:1px dashed #6b533f;padding:7px;border-radius:9px;font-size:11px;color:#c9b39e;margin:10px 0}.scout-empty{padding:34px 16px;text-align:center;border:1px dashed var(--line);border-radius:16px;color:var(--muted)}
.area-tabs{display:flex;gap:8px;overflow:auto;padding-bottom:4px}.area-tabs button{white-space:nowrap}.stage-grid{display:grid;grid-template-columns:repeat(10,minmax(46px,1fr));gap:6px}.stage-btn{border:1px solid var(--line);background:#211a16;color:var(--text);border-radius:9px;padding:8px 4px;min-height:44px;font-weight:700;cursor:pointer}.stage-btn.locked{opacity:.3;cursor:not-allowed}.stage-btn.cleared{border-color:#426448;background:#1d2a20}.stage-btn.boss{border-color:#8b6336;background:#302319}.stage-btn.current{outline:2px solid var(--accent)}
.progress{height:7px;border-radius:999px;background:#110f0d;overflow:hidden;border:1px solid #3e3026}.progress>span{display:block;height:100%;background:linear-gradient(90deg,#9b673d,#d9a34e)}
.equipment-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.gear-card{border:1px solid var(--line);background:#1b1714;border-radius:12px;padding:10px}.rarity-1{border-color:#555}.rarity-2{border-color:#6683a5}.rarity-3{border-color:#b38645}.gear-card strong{font-size:12px}.gear-card .gear-options{font-size:10px;color:var(--muted);line-height:1.5;margin-top:5px}
.daily-row,.shop-row{display:flex;gap:12px;align-items:center;justify-content:space-between;border-top:1px solid #3a2d25;padding:10px 0}.daily-row:first-child,.shop-row:first-child{border-top:0}.daily-row>div:first-child,.shop-row>div:first-child{min-width:0}.daily-row strong,.shop-row strong{display:block}.daily-row span,.shop-row span{font-size:11px;color:var(--muted)}
.idle-scene{height:170px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(#2d241e 0 52%,#1b1815 52%);position:relative;overflow:hidden}.idle-ground{position:absolute;left:0;right:0;bottom:32px;height:2px;background:#5a4534}.runner{position:absolute;bottom:34px;width:42px;height:48px;border-radius:50% 50% 42% 42%;display:grid;place-items:center;background:#241b17;border:1px solid #75563d;font-size:12px;font-weight:800;animation:walk 8s linear infinite}.runner:nth-child(2){animation-delay:-1.6s}.runner:nth-child(3){animation-delay:-3.2s}.runner:nth-child(4){animation-delay:-4.8s}.runner:nth-child(5){animation-delay:-6.4s}@keyframes walk{from{left:-52px}to{left:calc(100% + 10px)}}
.modal-backdrop{position:fixed;z-index:100;inset:0;background:rgba(0,0,0,.72);display:flex;align-items:center;justify-content:center;padding:12px}.modal{width:min(980px,100%);max-height:92vh;overflow:auto;background:#171310;border:1px solid #72533b;border-radius:18px;padding:16px;box-shadow:0 25px 80px rgba(0,0,0,.5)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.modal-head h2{margin:0;font-size:18px}.icon-btn{border:1px solid var(--line);background:#211a16;color:var(--text);width:36px;height:36px;border-radius:10px;cursor:pointer}
.battle-shell{display:grid;gap:10px}.battle-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.battle-field{position:relative;display:grid;grid-template-columns:1fr 70px 1fr;gap:10px;align-items:stretch;min-height:430px;background-image:linear-gradient(rgba(10,12,14,.10),rgba(10,12,14,.18)),radial-gradient(circle at center,rgba(255,255,255,.08),rgba(0,0,0,.10) 60%),var(--battle-bg);background-size:cover;background-position:center;border:1px solid var(--line);border-radius:16px;padding:18px 18px 8px;overflow:hidden}.battle-field::after{content:'';position:absolute;left:0;right:0;bottom:0;height:38%;background:linear-gradient(180deg,rgba(32,23,17,0),rgba(20,13,10,.16) 35%,rgba(18,12,9,.28));pointer-events:none}.battle-field>*{position:relative;z-index:1}.field-side{position:relative;min-height:100%}.field-allies,.field-enemies{display:block}.map-unit{position:absolute;width:132px;display:flex;flex-direction:column;align-items:center;gap:4px;transition:opacity .14s ease;filter:drop-shadow(0 5px 5px rgba(0,0,0,.25))}.map-unit.ally{left:calc(8px + (var(--slot) % 2) * 56px);top:calc(20px + (var(--slot) * 58px))}.map-unit.enemy{right:calc(8px + (var(--slot) % 2) * 56px);top:calc(34px + (var(--slot) * 64px))}.map-unit.acting .unit-overhead{filter:drop-shadow(0 0 6px rgba(255,224,165,.5))}.map-unit.dead{opacity:.42;filter:grayscale(1) drop-shadow(0 5px 5px rgba(0,0,0,.2))}.unit-overhead{width:106px}.unit-label{font-size:10px;font-weight:800;color:#fff7ea;text-shadow:0 2px 3px rgba(0,0,0,.7);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}.hpbar{height:6px;background:rgba(16,14,13,.78);border-radius:999px;overflow:hidden;border:1px solid rgba(255,255,255,.08)}.hpbar span{display:block;height:100%;background:#6ca474}.gaugebar{height:4px;background:rgba(16,14,13,.78);border-radius:999px;margin-top:3px;overflow:hidden;border:1px solid rgba(255,255,255,.08)}.gaugebar span{display:block;height:100%;background:#c49a4f}.unit-visual{display:flex;align-items:flex-end;justify-content:center;min-height:84px;width:100%}.battle-sprite{position:relative;overflow:hidden;width:84px;height:84px;background:none;image-rendering:auto;filter:drop-shadow(0 3px 2px rgba(0,0,0,.35));transform-origin:center bottom}.battle-sprite-sheet{position:absolute;display:block;max-width:none;max-height:none;image-rendering:auto;pointer-events:none;user-select:none}.battle-sprite.enemy{transform:scaleX(-1)}.map-unit.acting .battle-sprite.enemy{transform:scaleX(-1)}.vs{text-align:center;align-self:center;color:#fff4d8;font-weight:900;text-shadow:0 2px 4px rgba(0,0,0,.55);opacity:.78}.battle-log{height:120px;overflow:auto;background:#100e0d;border:1px solid #30251f;border-radius:10px;padding:8px;font-size:10px;line-height:1.55;color:#cdb8a5}.timeline-strip{display:flex;gap:5px;overflow:hidden;min-height:32px}.timeline-chip{font-size:9px;padding:5px 7px;border-radius:999px;background:rgba(36,28,24,.88);border:1px solid #4b392e;white-space:nowrap}.cutin{--cutin-duration:760ms;--cutin-color:#9365d8;position:absolute;z-index:30;inset:0;overflow:hidden;pointer-events:none;background:rgba(7,6,9,.28);animation:ultimateCutin var(--cutin-duration) cubic-bezier(.18,.78,.2,1) both}
.cutin-band{position:absolute;z-index:2;inset:9% -6% 9% -6%;overflow:hidden;clip-path:polygon(100% 0,100% 38%,0 100%,0 62%);background:linear-gradient(100deg,color-mix(in srgb,var(--cutin-color) 76%,#111 24%),rgba(18,14,23,.98) 42%,color-mix(in srgb,var(--cutin-color) 84%,#fff 16%));box-shadow:0 0 28px rgba(0,0,0,.42);animation:cutinBand var(--cutin-duration) cubic-bezier(.16,.78,.2,1) both}
.cutin-band::before{content:'';position:absolute;inset:0;background:repeating-linear-gradient(118deg,transparent 0 30px,rgba(255,255,255,.05) 30px 33px,transparent 33px 58px)}
.cutin-band::after{content:'';position:absolute;left:-4%;right:-4%;top:51%;height:3px;background:rgba(255,255,255,.72);transform:rotate(-19deg);box-shadow:0 -14px 0 color-mix(in srgb,var(--cutin-color) 68%,transparent),0 16px 0 rgba(255,255,255,.13)}
.cutin-face{position:absolute;z-index:3;right:4%;top:-2%;width:40%;height:102%;overflow:hidden;clip-path:polygon(18% 0,100% 0,100% 100%,0 100%);filter:drop-shadow(-12px 8px 0 rgba(0,0,0,.22))}
.cutin-face img{width:100%;height:100%;object-fit:cover;object-position:center top;transform:scale(1.12);transform-origin:50% 0;animation:cutinFace var(--cutin-duration) cubic-bezier(.16,.74,.22,1) both}
.cutin-copy{position:absolute;z-index:4;left:8%;right:38%;bottom:13%;transform:rotate(-5deg);text-align:left;text-shadow:0 4px 10px rgba(0,0,0,.74)}
.cutin-kicker{display:block;font-size:10px;letter-spacing:.30em;font-weight:900;color:#f4e9ff;margin-bottom:3px}
.cutin-skill{display:block;font-size:clamp(24px,3.8vw,46px);line-height:1;font-weight:1000;color:#fff;letter-spacing:.04em;filter:drop-shadow(3px 3px 0 rgba(18,10,25,.76))}
.cutin-name{display:block;margin-top:7px;font-size:12px;font-weight:800;letter-spacing:.16em;color:#efe5ff}
.cutin:not(.has-art) .cutin-copy{right:8%}
@keyframes ultimateCutin{0%{opacity:0}10%{opacity:1}78%{opacity:1}100%{opacity:0}}
@keyframes cutinBand{0%{transform:translate(16%,-16%)}16%{transform:translate(0,0)}82%{transform:translate(0,0)}100%{transform:translate(-12%,12%)}}
@keyframes cutinFace{0%{transform:translate(12%,-4%) scale(1.16)}18%{transform:translate(0,0) scale(1.12)}100%{transform:translate(-2%,1%) scale(1.12)}}
@media(max-width:520px){.detail-art{height:250px}.unit-battle.with-sprite .unit-visual{width:48px;flex-basis:48px}.battle-sprite{transform:scale(.75);transform-origin:left center}.cutin-band{inset:14% -12% 14% -12%}.cutin-face{right:0;width:44%}.cutin-copy{left:10%;right:36%;bottom:15%}.cutin-skill{font-size:clamp(20px,7vw,32px)}.cutin-name{font-size:9px}.cutin-kicker{font-size:8px}}

@media(max-width:960px){.tavern-content{grid-template-columns:1fr;min-height:auto}.tavern-side{position:relative;min-height:auto;gap:14px;padding-top:0}.tavern-accent{display:none}.tavern-keeper{position:relative;left:auto;bottom:auto;width:auto;height:auto;min-height:280px;order:2;pointer-events:auto}.tavern-keeper-frame{width:min(100%,380px);height:400px;overflow:visible}.tavern-keeper img{object-fit:contain;object-position:center bottom;transform:none}.tavern-nameplate{position:relative;left:auto;top:auto;max-width:none}.tavern-panel{order:1}}
@media(max-width:700px){main{padding:10px}.tavern-home{min-height:calc(100vh - 20px);border-radius:18px}.tavern-content{padding:16px;gap:14px}.tavern-keeper{min-height:220px}.tavern-keeper-frame{width:240px;height:260px}.tavern-command{grid-template-columns:48px 1fr}.tavern-command .icon{width:48px;height:48px;font-size:21px}.tavern-command .meta{grid-column:2;justify-self:start;margin-top:3px}.tavern-status{gap:6px}.tavern-nameplate h2{font-size:22px}.subview-head{align-items:flex-start;flex-direction:column}}
.master-bubble{position:absolute;left:20px;right:20px;top:24px;z-index:4;width:auto;min-height:112px;padding:18px 22px 24px;border:1px solid rgba(255,239,220,.20);border-radius:18px;background:linear-gradient(180deg,rgba(23,18,15,.84),rgba(15,12,11,.92));box-shadow:0 12px 28px rgba(0,0,0,.24);backdrop-filter:blur(5px);display:flex;flex-direction:column;justify-content:flex-start}
.master-bubble::after{content:'';position:absolute;left:50%;bottom:-12px;width:20px;height:20px;background:rgba(15,12,11,.92);border-right:1px solid rgba(255,239,220,.18);border-bottom:1px solid rgba(255,239,220,.18);transform:translateX(-50%) rotate(45deg);border-radius:0 0 4px 0}
.master-bubble-label{display:block;font-size:10px;letter-spacing:.18em;color:#d7b37f;font-weight:800;margin-bottom:10px}.master-bubble p{position:relative;z-index:1;margin:0;color:#f2e7da;font-size:14px;line-height:1.8;font-weight:600}
.scout-stage.five{grid-template-columns:repeat(5,minmax(150px,1fr))}.scout-stage.five .scout-candidate{padding:10px}.scout-stage.five .scout-candidate .big-portrait{height:108px}.scout-stage.five .scout-candidate .big-portrait.art-portrait img{object-position:center 14%}
.sale-chip{display:inline-flex;vertical-align:middle;margin-left:8px;padding:3px 7px;border-radius:999px;border:1px solid #8b6233;background:#2a1c12;color:#f1c26f;font-size:10px;letter-spacing:.04em}.old-price{display:block;text-decoration:line-through;color:#8f7c6c!important;font-size:10px!important;margin-bottom:2px}
@media(max-width:960px){.master-bubble{position:relative;left:auto;top:auto;width:100%;max-width:none;order:1}.master-bubble::after{display:none}.scout-stage.five{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.scout-stage,.scout-stage.five{grid-template-columns:repeat(2,minmax(0,1fr))}.master-bubble p{font-size:12px}}
@media(max-width:460px){.scout-stage,.scout-stage.five{grid-template-columns:1fr}}

/* Preview 19: party roster / 3:2 battle layout / action gauge / status icons */
.party-roster{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;align-items:stretch}
.party-member-card{min-width:0;border:1px solid var(--line);border-radius:15px;padding:11px;background:linear-gradient(180deg,#281f1a,#1b1613);display:flex;flex-direction:column;gap:9px}
.party-member-card.empty{border-style:dashed;justify-content:space-between;min-height:230px}.party-empty{display:grid;place-items:center;flex:1;color:var(--muted);font-size:12px}
.party-member-card .slot-no{font-size:9px;letter-spacing:.12em;color:var(--gold);font-weight:800}
.party-member-head{display:flex;gap:9px;align-items:center;min-width:0}.party-member-head>div:last-child{min-width:0}.party-member-head strong{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.party-member-head span{display:block;font-size:10px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.party-member-portrait{position:relative;width:58px;height:66px;border-radius:12px;overflow:hidden;border:1px solid rgba(255,255,255,.12);background:#171310;flex:0 0 auto}.party-member-portrait img{width:100%;height:100%;object-fit:cover;object-position:center 12%;display:block}
.party-member-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.party-member-stats>div{background:#14110f;border-radius:8px;padding:6px 3px;text-align:center;min-width:0}.party-member-stats b{display:block;font-size:10px;white-space:nowrap}.party-member-stats span{display:block;font-size:8px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.party-member-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:auto}.party-member-actions .btn{padding:7px 5px;min-height:34px;font-size:10px}.party-note{margin-top:12px}.picker-note{font-size:12px;color:var(--muted);margin:0 0 10px}

/* 5人を固定の3:2で見せる。配置順による性能補正はない。 */
.map-unit{width:118px;gap:3px}
.map-unit.ally.slot-0{left:58%;top:0}.map-unit.ally.slot-1{left:64%;top:27%}.map-unit.ally.slot-2{left:58%;top:58%}.map-unit.ally.slot-3{left:10%;top:12%}.map-unit.ally.slot-4{left:12%;top:44%}
.map-unit.enemy.slot-0{right:58%;top:0}.map-unit.enemy.slot-1{right:64%;top:27%}.map-unit.enemy.slot-2{right:58%;top:58%}.map-unit.enemy.slot-3{right:10%;top:12%}.map-unit.enemy.slot-4{right:12%;top:44%}
.unit-overhead{width:100px}.unit-label{font-size:9px}.unit-visual{min-height:96px}.battle-sprite{width:96px;height:96px}

/* HPバー上のバフ・デバフ表示。Preview 19ではCSSアイコンで先行実装。 */
.status-icons{height:18px;display:flex;align-items:center;justify-content:center;gap:2px;margin:1px 0 2px}.status-icons.empty{visibility:hidden}
.status-icon{position:relative;width:18px;height:18px;border-radius:4px;display:grid;place-items:center;box-shadow:0 1px 4px rgba(0,0,0,.46);font-style:normal;overflow:visible}
.status-icon-art{display:block;width:18px;height:18px;border-radius:4px;background-repeat:no-repeat;image-rendering:auto}
.status-icon-fallback{display:grid;place-items:center;width:18px;height:18px;border-radius:4px;border:1px solid rgba(255,255,255,.28);background:linear-gradient(135deg,#52729f,#283b62);font-size:8px;line-height:1;color:#fff}.status-icon-custom{display:block;width:18px;height:18px;border-radius:4px;object-fit:cover}.status-more{height:18px;min-width:22px;padding:0 4px;border-radius:5px;display:grid;place-items:center;background:rgba(17,14,13,.88);border:1px solid rgba(255,255,255,.22);color:#fff;font-size:8px;font-weight:900;box-shadow:0 1px 4px rgba(0,0,0,.46)}
.status-icon em{position:absolute;right:-3px;bottom:-3px;min-width:10px;height:10px;padding:0 2px;border-radius:999px;background:#120f0e;border:1px solid rgba(255,255,255,.28);font-size:7px;line-height:8px;color:#fff;font-style:normal;text-align:center;z-index:2}

/* 顔アイコン式の行動ゲージ */
.action-gauge{border:1px solid #3f3129;border-radius:13px;background:linear-gradient(180deg,#171310,#100e0d);padding:7px 10px 9px;min-height:84px;overflow:hidden}
.action-gauge-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}.action-gauge-head strong{font-size:9px;letter-spacing:.18em;color:var(--gold)}.action-gauge-head span{font-size:9px;color:var(--muted)}.ally-dot,.enemy-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin:0 3px 0 8px}.ally-dot{background:#5fa4d8}.enemy-dot{background:#d9655d}
.action-gauge-track{position:relative;height:51px;margin:0 15px 0 8px;border-radius:999px;background:linear-gradient(90deg,rgba(95,164,216,.10),rgba(216,168,78,.10) 72%,rgba(217,101,93,.15));border:1px solid rgba(255,255,255,.07)}
.action-gauge-track::before{content:'';position:absolute;left:0;right:0;top:50%;height:2px;transform:translateY(-50%);background:linear-gradient(90deg,#415361,#6b5b44 74%,#c08a50)}.action-gauge-track::after{content:'';position:absolute;right:0;top:0;bottom:0;width:3px;background:#d8a84e;box-shadow:0 0 8px rgba(216,168,78,.55)}
.action-marker{position:absolute;z-index:3;top:2px;transform:translateX(-50%);transition:left .10s linear,transform .12s ease;display:flex;align-items:center;gap:2px}.action-marker.acting{z-index:8;transform:translateX(-50%) scale(1.14)}
.action-face{width:28px;height:28px;border-radius:50%;overflow:hidden;background:#211a16;border:2px solid #5fa4d8;box-shadow:0 2px 7px rgba(0,0,0,.48);display:grid;place-items:center}.action-marker.enemy .action-face{border-color:#d9655d}.action-marker.acting .action-face{box-shadow:0 0 0 2px rgba(255,232,183,.55),0 0 12px rgba(216,168,78,.8)}
.action-face img{width:100%;height:100%;object-fit:cover;object-position:center 13%;display:block}.action-face span{font-size:10px;font-weight:900}.action-marker small{display:none}.action-goal{position:absolute;right:-19px;top:17px;font-size:8px;color:#d8a84e;font-weight:800}
.timeline-strip,.timeline-chip{display:none!important}

@media(max-width:980px){.party-roster{grid-template-columns:repeat(2,minmax(0,1fr))}.party-member-card:last-child{grid-column:1/-1}.battle-field{grid-template-columns:1fr 34px 1fr}.map-unit{width:104px}.map-unit.ally.slot-0{left:50%}.map-unit.ally.slot-1{left:56%}.map-unit.ally.slot-2{left:50%}.map-unit.enemy.slot-0{right:50%}.map-unit.enemy.slot-1{right:56%}.map-unit.enemy.slot-2{right:50%}}
@media(max-width:620px){.party-roster{grid-template-columns:1fr}.party-member-card:last-child{grid-column:auto}.action-gauge{padding-left:6px;padding-right:6px}.action-gauge-head span{display:none}.action-face{width:24px;height:24px}.map-unit{width:90px}.unit-overhead{width:82px}.unit-visual{min-height:82px}.battle-sprite{width:82px;height:82px}.battle-field{min-height:410px;padding-left:6px;padding-right:6px}.map-unit.ally.slot-0{left:44%}.map-unit.ally.slot-1{left:48%}.map-unit.ally.slot-2{left:44%}.map-unit.ally.slot-3{left:0}.map-unit.ally.slot-4{left:0}.map-unit.enemy.slot-0{right:44%}.map-unit.enemy.slot-1{right:48%}.map-unit.enemy.slot-2{right:44%}.map-unit.enemy.slot-3{right:0}.map-unit.enemy.slot-4{right:0}}

/* Preview 20 additions */
.status-icon.reliance .status-icon-fallback{background:linear-gradient(135deg,#6276a8,#303a67)}
.detail-name-head{margin-top:12px;padding-top:10px;border-top:1px solid rgba(255,255,255,.07)}

/* Preview 24: responsive tavern composition / boss presence / visible battle-log removal */
.tavern-side{
  position:relative;
  display:grid;
  grid-template-rows:auto auto;
  align-content:start;
  gap:16px;
  min-height:clamp(560px,calc(100vh - 90px),760px);
  padding-top:8px;
}
.master-bubble{
  position:relative;
  left:auto;right:auto;top:auto;
  z-index:4;
  width:auto;
  min-height:0;
  margin:0 8px;
  padding:18px 22px 24px;
}
.master-bubble::after{display:block}
.tavern-keeper{
  position:relative;
  left:auto;bottom:auto;
  width:100%;height:auto;
  min-height:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  pointer-events:none;
  z-index:2;
}
.tavern-keeper-frame{
  position:relative;
  width:min(100%,500px);
  height:clamp(380px,58vh,610px);
  overflow:visible;
}

/* Mid-bosses and area bosses must read as larger units at a glance. */
.map-unit.enemy.boss-tier-mid{width:148px;z-index:3}
.map-unit.enemy.boss-tier-mid .unit-overhead{width:116px}
.map-unit.enemy.boss-tier-mid .unit-visual{min-height:124px}
.map-unit.enemy.boss-tier-mid .battle-sprite{width:124px;height:124px}
.map-unit.enemy.boss-tier-area{width:166px;z-index:4}
.map-unit.enemy.boss-tier-area .unit-overhead{width:128px}
.map-unit.enemy.boss-tier-area .unit-visual{min-height:144px}
.map-unit.enemy.boss-tier-area .battle-sprite{width:144px;height:144px}

@media(max-width:960px){
  .tavern-side{min-height:auto;gap:14px;padding-top:0}
  .tavern-keeper{min-height:280px;pointer-events:auto}
  .tavern-keeper-frame{width:min(100%,380px);height:clamp(320px,48vh,420px)}
  .master-bubble{margin:0;width:100%}
  .master-bubble::after{display:block}
}
@media(max-width:700px){
  .tavern-keeper{min-height:220px}
  .tavern-keeper-frame{width:min(78vw,280px);height:clamp(240px,40vh,300px)}
  .master-bubble{padding:14px 16px 18px}
  .master-bubble p{font-size:12px;line-height:1.65}
}
@media(max-width:620px){
  .map-unit.enemy.boss-tier-mid{width:108px}
  .map-unit.enemy.boss-tier-mid .unit-overhead{width:90px}
  .map-unit.enemy.boss-tier-mid .unit-visual{min-height:100px}
  .map-unit.enemy.boss-tier-mid .battle-sprite{width:100px;height:100px}
  .map-unit.enemy.boss-tier-area{width:118px}
  .map-unit.enemy.boss-tier-area .unit-overhead{width:96px}
  .map-unit.enemy.boss-tier-area .unit-visual{min-height:112px}
  .map-unit.enemy.boss-tier-area .battle-sprite{width:112px;height:112px}
}


/* Preview 25: tavern keeper lower anchor / cut-in framing / pause-retire */
@media(min-width:961px){
  .tavern-side{grid-template-rows:auto 1fr}
  .tavern-keeper{align-self:end}
  .tavern-keeper-frame{height:clamp(360px,54vh,560px)}
}
@media(max-width:960px){
  .tavern-keeper{align-self:auto}
}
.cutin-c06 .cutin-face,.cutin-c07 .cutin-face{top:3%;height:97%}
.cutin-c06 .cutin-face img,.cutin-c07 .cutin-face img{
  transform-origin:50% 0;
  animation:cutinFaceLower var(--cutin-duration) cubic-bezier(.16,.74,.22,1) both;
}
@keyframes cutinFaceLower{
  0%{transform:translate(12%,1%) scale(1.07)}
  18%{transform:translate(0,5%) scale(1.04)}
  100%{transform:translate(-2%,6%) scale(1.04)}
}
.battle-retire{border-color:#7a3b36;background:#3a1e1b;color:#f3c2bd}
.battle-retire:hover{border-color:#a9544c;background:#4a2622}

.battle-retire[hidden]{display:none!important}


/* Preview 27: tavern keeper presence / wider ultimate cut-in framing */
@media(min-width:961px){
  .tavern-keeper-frame{
    width:min(100%,560px);
    height:clamp(420px,60vh,620px);
  }
  .tavern-keeper img{
    transform:scale(1.12);
    transform-origin:center bottom;
  }
}
@media(min-width:701px) and (max-width:960px){
  .tavern-keeper-frame{width:min(100%,430px);height:clamp(350px,52vh,470px)}
  .tavern-keeper img{transform:scale(1.08);transform-origin:center bottom}
}
@media(max-width:700px){
  .tavern-keeper-frame{width:min(82vw,310px);height:clamp(260px,42vh,330px)}
  .tavern-keeper img{transform:scale(1.05);transform-origin:center bottom}
}

/* The diagonal band is intentionally thicker so faces remain readable across character art. */
.cutin-band{
  inset:5% -7% 5% -7%;
  clip-path:polygon(100% 0,100% 54%,0 100%,0 46%);
}
.cutin-face{
  right:2%;
  top:0;
  width:45%;
  height:100%;
}
.cutin-face img{
  object-position:center 10%;
  transform-origin:50% 0;
  animation:cutinFaceWide var(--cutin-duration) cubic-bezier(.16,.74,.22,1) both;
}
.cutin-c06 .cutin-face,.cutin-c07 .cutin-face{top:0;height:100%}
.cutin-c06 .cutin-face img,.cutin-c07 .cutin-face img{
  animation:cutinFaceWide var(--cutin-duration) cubic-bezier(.16,.74,.22,1) both;
}
@keyframes cutinFaceWide{
  0%{transform:translate(10%,3%) scale(1.04)}
  18%{transform:translate(0,6%) scale(1.01)}
  100%{transform:translate(-2%,7%) scale(1.01)}
}
@media(max-width:520px){
  .cutin-band{inset:8% -12% 8% -12%;clip-path:polygon(100% 0,100% 56%,0 100%,0 44%)}
  .cutin-face{right:-1%;width:48%;top:0;height:100%}
  .cutin-face img{object-position:center 8%}
}

/* Preview 28: single-lane action gauge / dedicated shield bar / lower universal cut-in framing. */
.action-gauge{min-height:66px;padding-top:7px;padding-bottom:8px}
.action-gauge-track{height:34px}
.action-marker{top:2px}
.action-goal{top:9px}
.shieldbar{height:4px;background:rgba(16,14,13,.78);border-radius:999px;overflow:hidden;border:1px solid rgba(255,255,255,.08);margin-bottom:2px;display:flex;justify-content:flex-end}
.shieldbar span{display:block;height:100%;background:#78c4e4;box-shadow:0 0 4px rgba(120,196,228,.72)}
.combat-floater{position:absolute;left:50%;top:42px;z-index:12;pointer-events:none;white-space:nowrap;font-weight:1000;font-size:16px;line-height:1;text-shadow:0 2px 3px rgba(0,0,0,.92),0 0 3px rgba(0,0,0,.8);font-variant-numeric:tabular-nums}
.combat-floater.damage{color:#ff6666}
.combat-floater.heal{color:#63e38e}
.combat-floater.shield{color:#6ec7ff;font-size:13px}
@media(max-width:620px){.combat-floater{top:36px;font-size:14px}.combat-floater.shield{font-size:12px}}
/* Character art sits lower inside the common cut-in frame. This replaces per-character rescue fixes. */
.cutin-face img,.cutin-c06 .cutin-face img,.cutin-c07 .cutin-face img{
  object-position:center top;
  transform-origin:50% 0;
  animation:cutinFaceP28 var(--cutin-duration) cubic-bezier(.16,.74,.22,1) both;
}
@keyframes cutinFaceP28{
  0%{transform:translate(10%,8%) scale(1.02)}
  18%{transform:translate(0,12%) scale(.99)}
  100%{transform:translate(-2%,13%) scale(.99)}
}
@media(max-width:520px){
  .action-gauge{min-height:61px}
  .action-gauge-track{height:30px}
  .action-marker{top:2px}
  .action-goal{top:7px}
  .cutin-face img,.cutin-c06 .cutin-face img,.cutin-c07 .cutin-face img{animation:cutinFaceP28Mobile var(--cutin-duration) cubic-bezier(.16,.74,.22,1) both}
}
@keyframes cutinFaceP28Mobile{
  0%{transform:translate(10%,10%) scale(1.00)}
  18%{transform:translate(0,14%) scale(.97)}
  100%{transform:translate(-2%,15%) scale(.97)}
}

/* Preview 28.1 hotfix: the keeper's bottom fade mask clipped the enlarged head above the frame. */
.tavern-keeper-frame{
  -webkit-mask-image:none;
  mask-image:none;
  overflow:visible;
}

/* Preview 29: expedition battle vignette + equipment inventory */
.equipment-hub{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.equipment-hub>div{display:grid;gap:3px}.equipment-hub span{font-size:11px;color:var(--muted)}
.equipment-inventory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gear-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.gear-rarity-label{font-size:10px;font-weight:900;letter-spacing:.08em;margin:3px 0 5px}.rarity-text-1{color:#aaa}.rarity-text-2{color:#8caad0}.rarity-text-3{color:#d7aa5c}.gear-difficulty-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}.gear-difficulty-tabs .btn{line-height:1.25;min-height:44px}

.expedition-scene{position:relative;height:290px;border:1px solid var(--line);border-radius:18px;overflow:hidden;background-image:linear-gradient(rgba(10,8,7,.12),rgba(10,8,7,.38)),var(--expedition-bg);background-size:cover;background-position:center;isolation:isolate}.expedition-vignette{position:absolute;inset:0;background:linear-gradient(90deg,rgba(9,11,12,.32),transparent 28% 72%,rgba(9,11,12,.35)),linear-gradient(0deg,rgba(12,10,8,.7),transparent 38%);z-index:0}.expedition-side{position:absolute;inset:0;z-index:2}.expedition-unit{position:absolute;width:88px;height:88px;animation:expeditionBob 1.55s ease-in-out infinite alternate}.expedition-unit.enemy{transform:scaleX(-1);animation-name:expeditionBobEnemy}.expedition-sprite{position:absolute;inset:0;overflow:hidden}.expedition-sprite img{position:absolute;left:0;top:0;max-width:none;object-fit:fill}.expedition-side.allies .unit-0{left:4%;bottom:18%}.expedition-side.allies .unit-1{left:17%;bottom:8%;animation-delay:-.3s}.expedition-side.allies .unit-2{left:13%;bottom:42%;animation-delay:-.65s}.expedition-side.allies .unit-3{left:29%;bottom:31%;animation-delay:-.9s}.expedition-side.allies .unit-4{left:29%;bottom:3%;animation-delay:-1.1s}.expedition-side.enemies .unit-0{right:8%;bottom:16%;animation-delay:-.2s}.expedition-side.enemies .unit-1{right:22%;bottom:39%;animation-delay:-.7s}.expedition-side.enemies .unit-2{right:25%;bottom:4%;animation-delay:-1s}.expedition-clash{position:absolute;left:50%;top:45%;z-index:4;transform:translate(-50%,-50%);font-size:38px;text-shadow:0 0 12px rgba(255,255,255,.75);animation:expeditionClash 1.3s ease-in-out infinite}.expedition-caption{position:absolute;left:14px;right:14px;bottom:10px;z-index:5;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:7px 10px;border-radius:10px;background:rgba(15,13,12,.72);border:1px solid rgba(255,255,255,.08);backdrop-filter:blur(3px)}.expedition-caption b{font-size:11px;letter-spacing:.1em}.expedition-caption span{font-size:10px;color:var(--muted)}
@keyframes expeditionBob{from{translate:0 0}to{translate:7px -3px}}@keyframes expeditionBobEnemy{from{translate:0 0;transform:scaleX(-1)}to{translate:-7px -3px;transform:scaleX(-1)}}@keyframes expeditionClash{0%,100%{opacity:.35;scale:.82}50%{opacity:1;scale:1.2}}
@media(max-width:620px){.equipment-inventory{grid-template-columns:1fr}.equipment-hub{align-items:flex-start;flex-direction:column}.expedition-scene{height:240px}.expedition-unit{width:70px;height:70px}.expedition-side.allies .unit-0{left:2%;bottom:20%}.expedition-side.allies .unit-1{left:15%;bottom:5%}.expedition-side.allies .unit-2{left:11%;bottom:45%}.expedition-side.allies .unit-3{left:27%;bottom:31%}.expedition-side.allies .unit-4{left:29%;bottom:3%}.expedition-side.enemies .unit-0{right:4%;bottom:17%}.expedition-side.enemies .unit-1{right:17%;bottom:43%}.expedition-side.enemies .unit-2{right:20%;bottom:4%}.expedition-caption{left:8px;right:8px}.expedition-caption span{display:none}}
@media(prefers-reduced-motion:reduce){.expedition-unit,.expedition-clash{animation:none}}

/* Preview 30: unique effect priority, five-step dungeons, fixed tavern scene coordinates. */
.status-icon.unique{
  background:linear-gradient(135deg,rgba(222,177,76,.96),rgba(105,70,20,.96));
  box-shadow:0 0 0 1px rgba(255,218,129,.9),0 1px 5px rgba(0,0,0,.5),0 0 8px rgba(222,177,76,.32);
}
.status-icon.unique .status-icon-custom{border:1px solid rgba(255,220,138,.82);box-sizing:border-box}
.xp-item-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.dungeon-difficulty-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-top:8px}
.dungeon-difficulty-tabs .btn{min-height:46px;line-height:1.18;padding:6px 4px;font-size:10px}

/* Speech length must never move the tavern keeper. Bubble and keeper share fixed scene coordinates. */
.tavern-side{
  position:relative !important;
  display:block !important;
  min-height:620px !important;
  height:620px !important;
  padding-top:0 !important;
  gap:0 !important;
}
.master-bubble{
  position:absolute !important;
  left:20px !important;
  right:20px !important;
  top:20px !important;
  width:auto !important;
  height:132px !important;
  min-height:132px !important;
  max-height:132px !important;
  margin:0 !important;
  overflow:auto;
  box-sizing:border-box;
  z-index:5;
}
.tavern-keeper{
  position:absolute !important;
  left:50% !important;
  bottom:-4px !important;
  width:500px !important;
  height:500px !important;
  min-height:0 !important;
  transform:translateX(-50%);
  pointer-events:none !important;
  z-index:2;
}
.tavern-keeper-frame{
  width:500px !important;
  height:500px !important;
}
@media(max-width:960px){
  .tavern-side{min-height:470px !important;height:470px !important}
  .master-bubble{left:10px !important;right:10px !important;top:0 !important;height:112px !important;min-height:112px !important;max-height:112px !important}
  .tavern-keeper{position:absolute !important;left:50% !important;bottom:0 !important;width:360px !important;height:350px !important;transform:translateX(-50%) !important;pointer-events:none !important}
  .tavern-keeper-frame{width:360px !important;height:350px !important}
}
@media(max-width:700px){
  .xp-item-grid{grid-template-columns:1fr}
  .dungeon-difficulty-tabs{grid-template-columns:repeat(5,minmax(48px,1fr));overflow-x:auto;padding-bottom:3px}
  .tavern-side{min-height:405px !important;height:405px !important}
  .master-bubble{left:0 !important;right:0 !important;height:108px !important;min-height:108px !important;max-height:108px !important;padding:12px 14px 16px !important}
  .master-bubble p{font-size:12px;line-height:1.55}
  .tavern-keeper{width:300px !important;height:292px !important}
  .tavern-keeper-frame{width:300px !important;height:292px !important}
}

/* Preview 31: fix upper-stage boss overlap and tavern master framing. */
.map-unit.enemy.boss-tier-mid,.map-unit.enemy.boss-tier-area{z-index:1}
.map-unit.enemy:not(.boss-tier-mid):not(.boss-tier-area){z-index:3}
.map-unit.enemy .unit-overhead{position:relative;z-index:9}
.map-unit.enemy.boss-tier-mid{width:126px}
.map-unit.enemy.boss-tier-mid .unit-visual{min-height:104px}
.map-unit.enemy.boss-tier-mid .battle-sprite{width:104px;height:104px}
.map-unit.enemy.boss-tier-area{width:144px}
.map-unit.enemy.boss-tier-area .unit-visual{min-height:118px}
.map-unit.enemy.boss-tier-area .battle-sprite{width:118px;height:118px}
.tavern-keeper{bottom:-35px !important}
.tavern-keeper img{transform:scale(.83) !important;transform-origin:center bottom !important}
@media(max-width:960px){.tavern-keeper{bottom:-24px !important}}
@media(max-width:700px){.tavern-keeper img{transform:scale(.90) !important}}
@media(max-width:620px){
.map-unit.enemy.boss-tier-mid{width:98px}.map-unit.enemy.boss-tier-mid .unit-visual{min-height:90px}.map-unit.enemy.boss-tier-mid .battle-sprite{width:90px;height:90px}
.map-unit.enemy.boss-tier-area{width:112px}.map-unit.enemy.boss-tier-area .unit-visual{min-height:102px}.map-unit.enemy.boss-tier-area .battle-sprite{width:102px;height:102px}
}

/* Preview33 tavern master sizing */
.tavern-keeper img{transform:scale(.94) !important}
@media(max-width:700px){.tavern-keeper img{transform:scale(1.02) !important}}

/* Preview34: fixed, embedded tavern master, upper-body only. Never overlay a second master image. */
.tavern-home{background-image:linear-gradient(90deg,rgba(16,12,10,.54) 0%,rgba(19,13,11,.28) 28%,rgba(19,13,11,.18) 48%,rgba(18,13,11,.55) 100%),linear-gradient(180deg,rgba(17,12,10,.10),rgba(13,10,9,.38)),url("assets/home/tavern_bg_with_master.webp") !important;background-position:center center !important}
.tavern-keeper,.tavern-keeper-frame{display:none !important}

/* Preview35: Tavern master permanently anchored, bright and independent of the backdrop dimming. */
.tavern-home{isolation:isolate}
.tavern-side::before{content:'';position:absolute;left:-18px;bottom:-28px;width:min(105%,690px);height:min(78vh,760px);background:url('assets/home/tavern_master.webp') left bottom / contain no-repeat;z-index:2;pointer-events:none;filter:drop-shadow(0 12px 16px rgba(0,0,0,.25)) brightness(1.17)}
.master-bubble{z-index:5}
@media(max-width:960px){.tavern-side::before{left:-8px;bottom:0;width:min(80vw,440px);height:min(48vh,440px);opacity:.95}}
@media(max-width:700px){.tavern-side::before{width:min(55vw,280px);height:260px;bottom:0;opacity:.85}}

/* Preview36: Embedded tavern master only. No duplicate portrait overlay. */
.tavern-side::before{content:none !important;display:none !important;background:none !important}
.tavern-home{background-image:linear-gradient(90deg,rgba(16,12,10,.25) 0%,rgba(19,13,11,.13) 30%,rgba(19,13,11,.13) 48%,rgba(18,13,11,.45) 100%),linear-gradient(180deg,rgba(17,12,10,.02),rgba(13,10,9,.26)),url("assets/home/tavern_bg_with_master.webp") !important}

.combat-floater.damage{color:#fff;text-shadow:-1px -1px 2px #000,1px 1px 2px #000,0 2px 5px #000}
.combat-floater.critical{color:#ff4141;font-size:20px;text-shadow:-1px -1px 2px #000,1px 1px 2px #000,0 2px 6px #000}

.dungeon-gauge-idle{display:block!important;width:100%;height:100%;background-size:400% 500%;background-position:left top;background-repeat:no-repeat;background-color:transparent}

/* Preview37 lightweight expedition combat cues: cycling attack and hit sprite rows. */
.expedition-acting{animation:expeditionCombat .95s steps(1,end) infinite}
.expedition-side.enemies .expedition-acting{animation-delay:-.43s}
@keyframes expeditionCombat{0%,44%,100%{top:0}45%,68%{top:-100%}69%,82%{top:-300%}83%,99%{top:0}}
@media(prefers-reduced-motion:reduce){.expedition-acting{animation:none}}

/* Preview38: three-stage tavern scout */
.scout-lobby{position:relative;overflow:hidden;min-height:480px;border:1px solid #6d492c;border-radius:20px;background:radial-gradient(ellipse at 50% 0%,#5c321b 0%,#251b17 43%,#110f0e 100%);text-align:center;padding:80px 22px 55px}
.scout-lobby-light{font-size:78px;color:#efc277;text-shadow:0 0 40px #f4a84d;animation:scoutGlow 2s ease-in-out infinite alternate}.scout-lobby h2{font-size:clamp(28px,4vw,46px);color:#f5e5ce;margin:14px}.scout-lobby p{line-height:2;color:#d3beaa}.scout-lobby-stock{display:inline-block;margin:23px auto;padding:15px 28px;border:1px solid #755239;border-radius:14px;color:#f0d6b0;line-height:1.9;background:#19130fde}.scout-lobby-actions{justify-content:center;gap:12px;flex-wrap:wrap}
.scout-entrance{min-height:510px;border-radius:20px;border:1px solid #755239;background:radial-gradient(ellipse at 50% 55%,#725336 0%,#241a17 44%,#110f0e 100%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px;overflow:hidden}.scout-door{font-size:94px;color:#fcdca3;text-shadow:0 0 20px #ffb85f;animation:scoutGlow 1s ease-in-out infinite alternate}.scout-entrance-title{font-size:26px;color:#ffe2b1;font-weight:900;letter-spacing:.12em}.scout-shadows{display:flex;gap:25px}.scout-shadows span{display:grid;place-items:center;width:76px;height:138px;border-radius:50% 50% 24% 24%;background:linear-gradient(#211a17,#0b0909);border:1px solid #79583a;color:#80644b;font-size:36px;animation:scoutReveal 1.5s ease-out both}.scout-shadows span:nth-child(2){animation-delay:.14s}.scout-shadows span:nth-child(3){animation-delay:.28s}@keyframes scoutGlow{to{opacity:.65;filter:brightness(1.5)}}@keyframes scoutReveal{from{transform:translateY(40px);opacity:0}to{transform:translateY(0);opacity:1}}
.scout-candidate-head{display:flex;justify-content:space-between;gap:10px;margin:20px 0 12px;color:#d2b896;font-size:13px}.scout-stage.redesigned{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:stretch}.scout-stage.redesigned .scout-card{display:flex;flex-direction:column;padding:0;overflow:hidden;text-align:left;background:#201a17;border:1px solid #6b4b31}.scout-stage.redesigned .scout-art{height:clamp(340px,43vw,590px);background:radial-gradient(ellipse at 50% 45%,#493226,#130f0d 80%)}.scout-full-portrait{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.scout-full-portrait img{width:100%;height:100%;object-fit:contain;object-position:center bottom}.scout-card-body{padding:16px;display:flex;flex-direction:column;gap:8px;flex:1}.scout-card-body h3{font-size:24px;margin:0}.scout-role{font-size:12px;color:#cbb29c}.scout-skills{font-size:12px;color:#d7c7b2}.scout-skills summary{cursor:pointer;color:#edc78d;font-weight:800}.scout-skills p{margin:7px 0;line-height:1.6}.scout-passives-title{color:#edc78d;font-size:12px;font-weight:900;margin-top:5px}.scout-passive{padding:9px;border:1px solid #60472f;background:#16110e;border-radius:9px;font-size:12px}.scout-passive p{font-size:11px;line-height:1.55;margin:4px 0 0;color:#c8b4a0}.scout-passive small{color:#9f8c76}.scout-pick{margin-top:auto;width:100%}.scout-result{text-align:center;padding:25px}.scout-result-art{height:420px;display:flex;justify-content:center}.scout-result-art img{height:100%;max-width:100%;object-fit:contain}
@media(max-width:900px){.scout-stage.redesigned{grid-template-columns:1fr}.scout-stage.redesigned .scout-card{display:grid;grid-template-columns:minmax(210px,42%) 1fr}.scout-stage.redesigned .scout-art{height:420px}.scout-card-body{min-width:0}}
@media(max-width:570px){.scout-stage.redesigned .scout-card{display:flex}.scout-stage.redesigned .scout-art{height:490px}.scout-candidate-head{flex-direction:column}.scout-lobby{padding-top:48px}.scout-lobby-actions{flex-direction:column}.scout-lobby-actions button{width:100%}}

/* Preview39 Scout: reuse tavern asset; actual three candidates remain preselected. */
.scout-lobby,.scout-entrance{background-image:linear-gradient(180deg,rgba(24,15,12,.74),rgba(11,8,8,.89)),url('assets/home/tavern_bg.webp')!important;background-size:cover!important;background-position:center!important}
.scout-entrance{min-height:510px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:28px 12px}
.scout-entrance p{color:#e5c7a5;margin:3px 0 4px;font-size:13px}
.scout-shadows.real{display:flex;align-items:flex-end;justify-content:center;gap:12px;width:100%;margin:4px 0 14px}
.scout-real-shadow{display:block!important;width:min(24%,168px)!important;height:220px!important;border:none!important;border-radius:0!important;background:none!important;overflow:visible!important;filter:drop-shadow(0 0 18px rgba(235,173,91,.42))}
.scout-real-shadow img{display:block;width:100%;height:100%;object-fit:contain;object-position:bottom center;filter:brightness(0) drop-shadow(0 0 6px #b87b47);animation:scoutShadowRise 1.15s ease-out both}
.scout-real-shadow:nth-child(2) img{animation-delay:.16s}.scout-real-shadow:nth-child(3) img{animation-delay:.28s}
@keyframes scoutShadowRise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
.scout-card .scout-card-body{background:linear-gradient(180deg,#241a16,#130f0e)}
.scout-pick{position:sticky;bottom:5px;z-index:2}
.codex-tabs{display:flex;gap:8px;margin:15px 0}.codex-filter{padding:12px 0}.codex-filter select,.picker-controls select{background:#241b16;color:#f8e9d4;border:1px solid #805c41;border-radius:8px;padding:8px}
.codex-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px}.codex-card{text-align:left;border:1px solid #6b4c34;background:#201814;color:inherit;border-radius:14px;overflow:hidden;cursor:pointer;padding:0 0 12px;display:flex;flex-direction:column;gap:5px}.codex-card:hover{border-color:#e3ac65;background:#2d2019}.codex-card span,.codex-card strong,.codex-card small{padding:0 10px}.codex-card span,.codex-card small{color:#cfb293;font-size:11px}.codex-card strong{font-size:15px}.codex-art{height:165px;background:radial-gradient(ellipse at bottom,#65462e,#1c1714);overflow:hidden}.codex-art img{width:100%;height:100%;object-fit:contain}.codex-detail{display:grid;grid-template-columns:minmax(160px,38%) 1fr;gap:18px}.codex-detail-art{background:#201a16;border-radius:15px;min-height:300px;display:flex;align-items:center;justify-content:center}.codex-detail-art img{width:100%;max-height:480px;object-fit:contain}.codex-skill{padding:10px 0;border-top:1px solid #524031}.codex-skill p{line-height:1.8}.picker-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:12px}.picker-controls label{display:flex;gap:7px;align-items:center}.party-group-card .btn{margin-top:10px}.picker-passive-pair{margin:10px 0;display:flex;flex-wrap:wrap;gap:6px}.status-icon.sheha-mark .status-icon-fallback{background:#28554b;border-color:#6cd6ae}
@media(max-width:620px){.codex-detail{grid-template-columns:1fr}.codex-detail-art{min-height:220px;max-height:380px}.scout-real-shadow{height:155px!important}.scout-entrance{min-height:440px}.scout-entrance-title{font-size:21px}}

/* Preview40: gold unique debuff and normalized codex image composition. */
.status-icon.sheha-mark .status-icon-fallback{background:linear-gradient(135deg,#d7b650,#806321);border:1px solid #ffe59f;color:#241906;font-weight:900}.codex-art img{object-position:center center}.codex-detail-art img{object-position:center center}

/* Preview41: full passive encyclopedia */
.codex-passive-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:11px;margin-top:15px}
.codex-passive-card{padding:14px 15px;background:#211914;border:1px solid #654a34;border-radius:13px;line-height:1.65}
.codex-passive-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#f1d9b3}
.codex-passive-base{font-size:12px;color:#e5b66c;margin:6px 0}
.codex-passive-card p{font-size:12px;margin:4px 0;color:#ded0be}
.codex-passive-pool{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}
.codex-passive-pool span{padding:4px 7px;border:1px solid #72543a;border-radius:9px;background:#35291e;font-size:11px}

/* Mortein portrait: larger than Preview40, keep coffin and feet in view. */
.codex-art img[src$="c23_full.webp"]{transform:scale(1.14);transform-origin:center center}
.codex-detail-art img[src$="c23_full.webp"]{transform:scale(1.08);transform-origin:center center}
.art-portrait img[src$="c23_full.webp"]{transform:scale(1.10);transform-origin:center center}

/* Preview41: full passive encyclopedia */
.codex-passive-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:11px;margin-top:15px}
.codex-passive-card{padding:14px 15px;background:#211914;border:1px solid #654a34;border-radius:13px;line-height:1.65}
.codex-passive-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#f1d9b3}
.codex-passive-base{font-size:12px;color:#e5b66c;margin:6px 0}
.codex-passive-card p{font-size:12px;margin:4px 0;color:#ded0be}
.codex-passive-pool{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}
.codex-passive-pool span{padding:4px 7px;border:1px solid #72543a;border-radius:9px;background:#35291e;font-size:11px}

/* Preview46: source-based enemy encyclopedia details */
.codex-passive-stages{max-height:350px;overflow:auto;display:grid;gap:5px;margin:8px 0;}
.codex-passive-stage{border:1px solid #6e4c30;border-radius:7px;padding:7px 10px;background:#241b17;}
.codex-passive-stage summary{cursor:pointer;line-height:1.5;color:#efd3a8;}
.codex-passive-stage-details{display:grid;gap:6px;padding-top:8px;}
.codex-passive-stage-details .codex-passive-card{padding:7px;border:1px solid #634730;border-radius:6px;background:#30221d;}
.codex-passive-stage-details p{margin:4px 0;font-size:.85rem;line-height:1.55;white-space:normal;}
.codex-skill p{line-height:1.7;white-space:normal;}

/* Preview49: four-element icons and matchup visibility */
.element-badge{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex:none;width:21px;height:21px;border-radius:6px;overflow:hidden;box-shadow:0 1px 4px #0005}.element-badge img{display:block;width:100%;height:100%;object-fit:cover}.element-hp-row{display:flex;align-items:center;gap:4px}.element-hp-row .element-badge{width:20px;height:20px}.element-hp-row .hpbar{flex:1;min-width:0}.matchup-panel{border:1px solid #79674d77;border-radius:12px;padding:9px 11px;margin:8px 0;background:rgba(22,19,25,.86);color:#f1e2c9}.matchup-panel summary{font-size:12px;font-weight:700;cursor:pointer}.element-matchup-help{max-width:500px;margin:9px auto 3px;font-size:11px;line-height:1.55}.element-matchup-help img{display:block;width:100%;max-width:350px;margin:0 auto 7px;object-fit:contain;background:white;border-radius:8px}.element-matchup-help p{margin:3px 0}.matchup-context{font-size:11px;line-height:1.55}.party-element-overview{display:flex;gap:8px;flex-wrap:wrap}.party-element-overview>span{font-size:11px;display:inline-flex;gap:5px;align-items:center;padding:5px 7px;background:#28232b;border-radius:8px}.matchup-mark{font-weight:750;font-size:10px}.matchup-mark.favorable{color:#76e5b0}.matchup-mark.unfavorable{color:#ff9f99}.matchup-mark.neutral{color:#bababa}.battle-matchup{margin:0;padding:5px 9px}.battle-matchup p{font-size:11px}.timeline-element{position:absolute;right:-7px;top:-4px;width:14px;height:14px;z-index:5;pointer-events:none}.action-marker{position:absolute}.unit-overhead{min-height:34px}.unit-overhead .element-badge{box-shadow:0 1px 5px #08080ac9}.codex-card small .element-badge{width:17px;height:17px}@media(max-width:620px){.element-hp-row .element-badge{width:17px;height:17px}.element-matchup-help img{max-width:290px}.battle-matchup{font-size:10px}}


/* Preview50: compact battle-rules section in the codex; no matchup panel on the party screen. */
.codex-tabs{flex-wrap:wrap}.codex-tabs>.btn{flex:0 1 auto}.rules-nav{display:flex;gap:7px;flex-wrap:wrap;margin:14px 0}.rule-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:10px;margin:12px 0 22px}.rule-card{background:linear-gradient(145deg,#2e221c,#1e1918);border:1px solid #665039;border-radius:12px;padding:13px 14px}.rule-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.rule-card-head strong{color:#ffe2b3;font-size:14px}.rule-card-head .pill{font-size:10px;white-space:nowrap}.rule-card p{color:#d9c8b8;line-height:1.75;font-size:12px;margin:8px 0 0}.rule-element-chart{max-width:430px;margin:14px auto}.rule-element-chart img{display:block;max-width:100%;max-height:350px;object-fit:contain;background:white;border-radius:10px}.rule-note{font-size:12px;color:#e0c9b3;line-height:1.8}.rule-matchup-table{overflow-x:auto;margin:14px 0}.rule-matchup-table table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}.rule-matchup-table th,.rule-matchup-table td{padding:9px 8px;text-align:left;border-bottom:1px solid #6b5240}.rule-matchup-table .element-badge{width:18px;height:18px}@media(max-width:620px){.rule-card-grid{grid-template-columns:1fr}.rules-nav .btn{font-size:11px;padding:8px 10px}.codex-tabs .btn{font-size:11px;padding:8px 10px}}

/* Preview50 raid selection */
.raid-stage-track{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding:12px 4px 20px;-webkit-overflow-scrolling:touch}
.raid-stage-card{scroll-snap-align:start;flex:0 0 min(80vw,340px);border:1px solid var(--border,#695842);border-radius:16px;overflow:hidden;background:rgba(14,17,30,.86)}
.raid-stage-art{height:230px;background:linear-gradient(135deg,#4c202b,#221a2f);display:grid;place-items:center;overflow:hidden}
.raid-stage-art img{height:100%;width:100%;object-fit:contain}
.raid-stage-body{padding:17px}.raid-stage-body p{margin:6px 0}.raid-locked{opacity:.65}
.raid-preview{display:grid;grid-template-columns:minmax(120px,32%) 1fr;gap:16px;align-items:center}.raid-preview>img{width:100%;max-height:320px;object-fit:contain}
.raid-inline-icon{height:30px;width:30px;object-fit:contain;vertical-align:middle;margin-right:5px}
.status-icon.raid-oath-sentinel em,.status-icon.raid-oath-mender em{display:none}
@media(max-width:520px){.raid-preview{grid-template-columns:1fr}.raid-preview>img{max-height:200px}}

/* Preview50.2: No.003 Ktouna and No.035 Asteria combat frame +10%. */
.map-unit.ally.sprite-plus10 .battle-sprite{transform:scale(1.1);transform-origin:center bottom}
@media(max-width:520px){.map-unit.ally.sprite-plus10 .battle-sprite{transform:scale(.825);transform-origin:center bottom}}

/* Preview51: current wearer's portrait over the equipment icon. */
.gear-picker-item{position:relative;min-width:0}
.gear-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;margin:0 0 8px;border-radius:10px;background:#382e26;font-size:23px;border:1px solid #73604b}
.gear-owner-badge{position:absolute;right:-8px;bottom:-8px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#16120e;border:2px solid #dfbb80;overflow:hidden;font-size:16px;z-index:2}
.gear-owner-badge img{width:100%;height:100%;object-fit:cover;object-position:center 19%}
/* Dungeon enemy codex portrait: show idle cell of the 4x5 sheet, not entire sheet. */
.codex-dungeon-sprite{display:block;width:100%;height:100%;min-height:95px;background-size:400% 500%;background-position:0 0;background-repeat:no-repeat;image-rendering:auto}
.codex-dungeon-sprite.detail{min-height:235px}

/* Preview54: modest visual-scale correction for undersized c02/c06/c38, without altering sprite cell clipping. */
.map-unit.ally.sprite-plus15 .battle-sprite{transform:scale(1.15);transform-origin:center bottom}
@media(max-width:520px){.map-unit.ally.sprite-plus15 .battle-sprite{transform:scale(.8625);transform-origin:center bottom}}

/* Preview55 */
.prep-party{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.prep-slot,.prep-preset{background:#241d18;border:1px solid var(--line);border-radius:12px;padding:9px;display:flex;flex-direction:column;gap:7px;min-width:0}.prep-slot .portrait{width:100%;height:86px;overflow:hidden}.prep-slot .portrait img{max-width:100%;max-height:100%;object-fit:contain}.prep-slot strong{font-size:12px;overflow-wrap:anywhere}.prep-slot .btn{font-size:11px;padding:6px 3px;min-height:34px}.prep-presets{margin-top:16px}.reward-display{text-align:center;padding:10px}.reward-list{display:grid;gap:8px;margin:18px auto;max-width:620px}.reward-item{display:flex;justify-content:space-between;align-items:center;text-align:left;gap:12px;padding:12px;background:#271e18;border:1px solid var(--line);border-radius:12px}.reward-item b{white-space:nowrap;color:#e9c381}.reward-item p{margin:5px 0 0}@media(max-width:620px){.prep-party{grid-template-columns:repeat(3,minmax(0,1fr))}.prep-slot .portrait{height:66px}}

/* Preview55 codex detail image hotfix: no sprite-sheet stretching. */
.codex-detail-art .codex-enemy-portrait{width:100%;height:auto;max-height:min(58vh,480px);object-fit:contain;object-position:center center;}

/* Preview56: compact preparation enemies and an opt-in preset phase. */
.prep-party-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 8px}
.prep-party-heading h3{margin:0}
.prep-enemy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.prep-enemy-card{display:flex;flex-direction:column;gap:10px;min-width:0;text-align:left;background:#241d18;border:1px solid var(--line);border-radius:12px;color:inherit;padding:12px;cursor:pointer;font:inherit}
.prep-enemy-card:hover,.prep-enemy-card:focus-visible{border-color:#bc855b;background:#2f251c;outline-offset:2px}
.prep-enemy-top{display:flex;gap:10px;align-items:center;min-width:0}
.prep-enemy-image{width:46px;height:46px;flex:0 0 46px;background:#302720;border-radius:9px;overflow:hidden;display:grid;place-items:center}
.prep-enemy-image img{width:100%;height:100%;object-fit:contain}
.prep-enemy-name{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0}
.prep-enemy-name strong{font-size:13px;overflow-wrap:anywhere}
.prep-enemy-name small{font-size:11px;color:#cdb9a4}
.prep-enemy-arrow{font-size:23px;color:#d6ad7e}
.prep-enemy-tags{display:flex;flex-wrap:wrap;gap:5px}
.prep-enemy-more{font-size:11px;color:#bda98f}
.prep-preset-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.prep-preset-list .prep-preset p{margin:0;min-height:2em}
.prep-codex-detail{margin-top:15px}
@media(max-width:620px){.prep-enemy-grid,.prep-preset-list{grid-template-columns:1fr}.prep-party-heading h3{font-size:16px}}

/* Preview58 raid presentation / capped-level visibility */
.raid-stage-card{flex-basis:min(84vw,320px)}.raid-stage-art{height:196px;padding:10px 14px;background:radial-gradient(ellipse at 50% 25%,#5b3448 0%,#201a27 75%)}
.raid-stage-art img{width:100%;height:100%;object-fit:contain;object-position:center center;filter:drop-shadow(0 7px 12px #08080c70)}
.raid-stage-body{display:flex;flex-direction:column;gap:10px;padding:14px}.raid-stage-body h3{margin:0;font-size:18px}.raid-stage-body p{margin:0}.raid-titlebar{display:flex;align-items:center;justify-content:space-between;gap:8px}.raid-state{font-size:11px;color:#e4c78c}.raid-boss-name{font-size:12px;line-height:1.4;color:#d4c9c9}.raid-info-tags{display:flex;flex-wrap:wrap;gap:6px}.raid-info-tags span{background:#3e3544;border:1px solid #66546b;border-radius:8px;padding:5px 7px;font-size:11px}.raid-reward{border-top:1px solid #65556a;padding-top:9px;display:flex;flex-direction:column;gap:3px;font-size:12px}.raid-reward small{color:#bcaeac}.raid-unlock{font-size:12px;color:#e6bd83}.raid-stage-body>.btn{width:100%}
.prep-slot span.small{line-height:1.4;min-height:30px}.battle-unit-lv{display:block;text-align:center;font-size:10px;font-weight:700;color:#ffdc9f;text-shadow:0 1px 3px #000}

.prep-stage5-rule{color:#e8c894;background:#3b3027;border:1px solid #7f6841;border-radius:10px;padding:9px 11px;line-height:1.55}

/* Preview59 achievement special rewards */
.reward-line{display:flex;align-items:center;gap:12px;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.15);padding:10px 0;flex-wrap:wrap}.reward-line>span{flex:1;min-width:170px}.reward-line .btn{min-width:90px}.modal select.input{width:100%;margin:10px 0;background:#202632;color:#fff;padding:10px;border:1px solid #72777d;border-radius:6px}

/* Preview62: ensure codex attribute icons are not compressed by generic span padding. */
.codex-card small .element-badge{box-sizing:border-box;padding:0!important;width:19px;height:19px;min-width:19px;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-right:3px;overflow:hidden}
.codex-card small .element-badge img{display:block;width:100%;height:100%;min-width:100%;object-fit:contain}

/* Preview63: shared character profile tabs. Hidden panels must stay hidden even with display styles. */
[data-profile-panel][hidden]{display:none!important}
.profile-tabs{display:flex;gap:8px;margin:0 0 15px;flex-wrap:wrap}
.profile-tab{min-width:125px;flex:1;max-width:240px}
.profile-person{display:grid;grid-template-columns:minmax(140px,36%) minmax(0,1fr);gap:18px;align-items:start;min-width:0}
.profile-person-art{background:radial-gradient(ellipse at bottom,#4c3427,#1b1613);border-radius:14px;min-height:250px;display:flex;justify-content:center;align-items:center;overflow:hidden}
.profile-person-art img{width:100%;max-height:500px;object-fit:contain}
.profile-person-text{min-width:0;overflow-wrap:anywhere}
.profile-person-text h3{margin-top:0}.profile-person-text h4{margin:15px 0 5px;color:#e6bd88}
.profile-copy{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;margin:0 0 14px}
.codex-card .codex-short-profile{padding:5px 10px 0!important;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;overflow-wrap:anywhere;flex:1;color:#dcc9b1;font-size:11px}
@media(max-width:620px){.profile-person{grid-template-columns:1fr}.profile-person-art{min-height:180px;max-height:310px}.profile-person-art img{max-height:310px}.profile-tab{max-width:none}}


/* Preview66: home navigation hierarchy. Tavern art and master treatment are unchanged. */
.tavern-home-v66 .tavern-content{grid-template-columns:minmax(240px,.83fr) minmax(430px,1.17fr)}
.tavern-home-v66 .tavern-panel{padding:20px;min-width:0}
.tavern-dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.tavern-dashboard-head h2{margin:2px 0 0;color:#ffe4b9;font-size:25px;letter-spacing:.05em}
.tavern-eyebrow{display:block!important;font-size:10px!important;letter-spacing:.17em;color:#c8a477!important;font-weight:800}
.tavern-dashboard-head .tavern-status{margin-bottom:0}
.tavern-home-v66 .tavern-progress{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 15px;margin-bottom:20px;background:linear-gradient(115deg,rgba(104,69,34,.46),rgba(37,27,21,.66));border-color:rgba(223,178,114,.33)}
.tavern-home-v66 .tavern-progress strong{font-size:18px;color:#fff1d6;margin:5px 0 0}
.tavern-home-v66 .tavern-progress span:not(.tavern-eyebrow){font-size:12px;color:#e4cdb2}
.tavern-progress-go{min-height:44px;flex-shrink:0;border:1px solid #a37b4b;border-radius:10px;padding:9px 12px;background:#5b3f28;color:#fff0d3;font-weight:800;cursor:pointer}
.tavern-section-label{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:4px 0 10px;color:#ebc78f;font-weight:900;letter-spacing:.16em;font-size:10px}
.tavern-section-label span{font-size:12px;letter-spacing:0;color:#cdb498;font-weight:500}
.tavern-primary-commands{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tavern-main-command{position:relative;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;min-width:0;min-height:146px;border:1px solid rgba(232,186,111,.35);border-radius:15px;padding:14px 12px;color:#fff0d7;cursor:pointer;background:linear-gradient(155deg,rgba(111,71,39,.9),rgba(48,31,24,.9));box-shadow:inset 0 1px rgba(255,255,255,.06);transition:transform .15s,border-color .15s,background .15s}
.tavern-main-command.party{background:linear-gradient(155deg,rgba(69,70,76,.94),rgba(34,30,32,.92))}
.tavern-main-command.scout{background:linear-gradient(155deg,rgba(88,67,104,.90),rgba(39,28,46,.94))}
.tavern-main-command:hover,.tavern-main-command:focus-visible{transform:translateY(-2px);border-color:#ffda9f;outline-offset:3px}
.tavern-main-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:rgba(20,14,10,.35);font-size:22px}
.tavern-main-command strong{font-size:19px;line-height:1.15}
.tavern-main-command small{color:#e5d0bd;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.tavern-main-arrow{position:absolute;right:11px;bottom:8px;color:#d8b17e;font-size:23px}
.tavern-section-label.secondary-label{margin-top:22px}
.tavern-secondary-commands{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tavern-secondary-commands button{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;column-gap:7px;row-gap:2px;min-height:67px;border-radius:11px;border:1px solid rgba(242,209,171,.14);padding:9px 7px;text-align:left;cursor:pointer;color:#eedcc7;background:rgba(29,22,19,.78)}
.tavern-secondary-commands button:hover,.tavern-secondary-commands button:focus-visible{background:rgba(112,79,51,.48);border-color:#bc966c;outline-offset:2px}
.tavern-mini-icon{grid-row:span 2;display:grid;place-items:center;font-size:19px}
.tavern-secondary-commands strong{font-size:12px}
.tavern-secondary-commands small{font-size:10px;color:#c9b29a;line-height:1.4;overflow-wrap:anywhere}
@media(max-width:960px){.tavern-home-v66 .tavern-content{grid-template-columns:1fr}.tavern-home-v66 .tavern-side{order:2}.tavern-home-v66 .tavern-panel{order:1}}
@media(max-width:520px){.tavern-home-v66 .tavern-panel{padding:13px}.tavern-dashboard-head h2{font-size:21px}.tavern-primary-commands{gap:6px}.tavern-main-command{min-height:130px;padding:11px 8px}.tavern-main-command strong{font-size:16px}.tavern-main-command small{font-size:10px}.tavern-main-icon{width:34px;height:34px;font-size:19px}.tavern-secondary-commands{grid-template-columns:repeat(2,minmax(0,1fr))}.tavern-home-v66 .tavern-progress{align-items:flex-start;flex-direction:column}.tavern-progress-go{align-self:stretch}.tavern-home-v66 .tavern-progress strong{font-size:16px}}

/* Preview67: story-forward home cards with no pictogram icons. */
.tavern-home-v66 .tavern-card-art{isolation:isolate;position:relative;overflow:hidden}
.tavern-home-v66 .tavern-card-art::before{content:"";position:absolute;inset:0;z-index:-2;background-image:var(--home-card-art);background-size:cover;background-position:center 36%;opacity:.87;pointer-events:none}
.tavern-home-v66 .tavern-card-art::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(18,12,12,.88),rgba(18,12,12,.51) 70%,rgba(18,12,12,.34));pointer-events:none}
.tavern-home-v66 .tavern-main-command.tavern-card-art{justify-content:flex-end;min-height:159px}
.tavern-home-v66 .tavern-main-command.tavern-card-art::before{background-size:cover;background-position:center 20%;opacity:.96}
.tavern-home-v66 .tavern-main-command.tavern-card-art::after{background:linear-gradient(0deg,rgba(14,9,14,.95),rgba(14,9,14,.40) 65%,rgba(14,9,14,.18))}
.tavern-home-v66 .tavern-main-command.party::before{background-size:auto 92%;background-repeat:no-repeat;background-position:center bottom}
.tavern-home-v66 .tavern-main-command.scout-shadow::before{filter:brightness(0);opacity:.88;background-size:auto 115%;background-repeat:no-repeat;background-position:83% 27%}
.tavern-home-v66 .tavern-main-command.scout-shadow::after{background:radial-gradient(circle at 75% 33%,rgba(158,91,197,.37),transparent 45%),linear-gradient(0deg,rgba(16,9,29,.94),rgba(38,17,64,.43))}
.tavern-home-v66 .tavern-secondary-v67 button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;padding:12px;min-height:75px;transition:filter .15s,border-color .15s}
.tavern-home-v66 .tavern-secondary-v67 button:hover,.tavern-home-v66 .tavern-secondary-v67 button:focus-visible{filter:brightness(1.18)}
.tavern-home-v66 .tavern-secondary-v67 strong{font-size:14px;color:#fff0dc}
.tavern-home-v66 .tavern-secondary-v67 small{font-size:10px;color:#ebcfb5}
.tavern-secondary-v67 .mini-daily{background:#29424a;border-color:#548694}
.tavern-secondary-v67 .mini-raid{background:#51302e;border-color:#a56b60}
.tavern-secondary-v67 .mini-idle{background:#394631;border-color:#7b935f}
.tavern-secondary-v67 .mini-shop{background:#51402c;border-color:#af8954}
.tavern-secondary-v67 .mini-achieve{background:#403450;border-color:#8e75b0}
.tavern-secondary-v67 .mini-codex{background:#303e50;border-color:#6b8fae}
.tavern-secondary-v67 .mini-ranking{background:#3f3827;border-color:#9b8653}
@media(max-width:520px){.tavern-home-v66 .tavern-main-command.tavern-card-art{min-height:135px;padding:10px 7px}.tavern-home-v66 .tavern-secondary-v67 button{padding:11px}}
/* Explicit stacking keeps backdrop images above the opaque card background. */
.tavern-home-v66 .tavern-card-art::before{z-index:0}
.tavern-home-v66 .tavern-card-art::after{z-index:1}
.tavern-home-v66 .tavern-card-art>*{position:relative;z-index:2}

/* Preview71: Milka slightly larger while keeping safe per-frame inset. */
.battle-sprite-milka{transform:scale(1.22);transform-origin:center bottom;}
@media(max-width:520px){.battle-sprite-milka{transform:scale(.90);transform-origin:center bottom;}}

/* Preview72: practical filters and high-confidence individual selection */
.gear-filter-panel{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:9px;background:#241b16;border:1px solid #6b4b31;padding:12px;border-radius:12px;margin:12px 0}.gear-filter-panel label,.filter-field{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#e5c595}.gear-filter-panel select{background:#15171b;color:#fff;border:1px solid #76604a;border-radius:7px;padding:10px;min-width:0}.gear-filter-panel .btn{align-self:end}.reroll-list{max-height:360px;overflow:auto;display:grid;gap:8px;margin:12px 0}.reroll-choice{width:100%;display:flex;align-items:center;gap:12px;text-align:left;background:#261e1a;color:#f5e9db;border:1px solid #66513d;border-radius:10px;padding:8px;cursor:pointer}.reroll-choice.chosen{border:2px solid #e5bd70;background:#443026}.reroll-choice .portrait{flex:0 0 65px;height:65px}.reroll-choice span{display:grid;gap:4px;min-width:0}.reroll-choice small{font-size:11px;color:#d3bd9e;overflow-wrap:anywhere}.reroll-choice[hidden]{display:none}.reroll-preview{padding:12px;background:#272119;border:1px solid #755a39;border-radius:10px;margin:12px 0;line-height:1.6}.scout-compare-guide{display:grid;gap:4px;padding:12px;border:1px solid #82613c;background:#31251a;border-radius:10px;margin:15px 0;color:#f4d7a5}.scout-compare-guide span{font-size:12px;color:#dcc6ae}.prep-passive-summary{font-size:10px;line-height:1.4;color:#e1c38f;overflow-wrap:anywhere}@media(max-width:570px){.gear-filter-panel{grid-template-columns:repeat(2,minmax(0,1fr))}.reroll-choice .portrait{flex-basis:52px;height:52px}}

/* Preview74: Sound controls */
.audio-settings-btn {color:#f2e5c2;background:rgba(23,25,36,.8);border:1px solid #8d7651;border-radius:10px;padding:8px 11px;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.audio-panel[hidden]{display:none!important}
.audio-panel{position:fixed;z-index:10005;top:70px;right:12px;width:min(300px,calc(100vw - 24px));background:#24222b;color:#f2e5c2;border:1px solid #9b8055;border-radius:12px;padding:16px;box-shadow:0 12px 35px #000a;display:grid;gap:11px}
.audio-panel-header{display:flex;justify-content:space-between;align-items:center}.audio-panel-header button{background:none;border:none;color:inherit;font-size:24px;cursor:pointer}
.audio-panel label{display:flex;align-items:center;justify-content:space-between;font-size:14px}.audio-panel input[type=range]{width:100%;accent-color:#d9af72}
.audio-panel .audio-mute-label{justify-content:flex-start;gap:9px}

/* Preview75: 杏 tutorial speech panels */
.tutorial-shade{position:fixed;inset:0;z-index:10000;background:rgba(10,13,22,.72);display:flex;align-items:end;justify-content:center;padding:16px 14px max(22px,env(safe-area-inset-bottom));}
.tutorial-dialog{display:flex;align-items:end;width:min(760px,100%);min-height:190px;max-height:80vh;gap:0;}
.tutorial-an-art{flex:0 0 31%;height:270px;position:relative;overflow:hidden;pointer-events:none;}
.tutorial-an-art img{width:100%;height:100%;object-fit:contain;object-position:bottom center;filter:drop-shadow(0 8px 12px #0008);}
.tutorial-talk{background:linear-gradient(155deg,#fbf4e8,#efe2cf);border:2px solid #c5a879;box-shadow:0 10px 32px #0008;border-radius:16px 16px 16px 5px;color:#30271f;padding:16px 18px;flex:1;min-width:0;max-height:65vh;overflow:auto;}
.tutorial-meta{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:#80694b;margin-bottom:6px;}
.tutorial-speaker{display:inline-block;color:#694921;font-size:16px;margin-bottom:5px;}
.tutorial-talk p{font-size:15px;line-height:1.7;margin:2px 0 14px;white-space:pre-wrap;}
.tutorial-controls{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.tutorial-codex-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:9px;margin-top:12px;}
.tutorial-action-panel{position:fixed;z-index:10000;bottom:18px;left:50%;transform:translateX(-50%);width:min(730px,calc(100% - 20px));display:flex;gap:12px;align-items:center;background:#f4ead9;color:#312b23;border:2px solid #c6a979;border-radius:16px;padding:12px 16px;box-shadow:0 12px 36px #0008;}
.tutorial-action-panel>img{width:80px;height:120px;object-fit:contain;object-position:bottom;}
.tutorial-action-panel p{margin:5px 0 10px;font-size:13px;line-height:1.5;}
.tutorial-action-buttons{display:flex;flex-wrap:wrap;gap:6px;}
.prep-return-top{display:block;margin:0 0 12px;position:sticky;top:0;z-index:2;}
@media(max-width:540px){.tutorial-dialog{align-items:end;}.tutorial-an-art{height:190px;flex-basis:28%;}.tutorial-talk{padding:12px;}.tutorial-talk p{font-size:13px;}.tutorial-talk .btn{font-size:12px;padding:8px;}.tutorial-action-panel>img{display:none;}}

.tutorial-resume{margin:10px 0 14px;display:block;width:100%;}

/* Preview75.1: persistent, non-destructive tutorial resume across navigation */
.tutorial-persistent-resume[hidden]{display:none!important;}
.tutorial-persistent-resume{position:fixed;top:max(68px,env(safe-area-inset-top));left:12px;z-index:9990;max-width:min(300px,calc(100vw - 24px));padding:10px 14px;background:#f1dfbb;color:#33251a;border:2px solid #926f40;border-radius:12px;font:600 13px/1.35 inherit;box-shadow:0 6px 20px #0006;cursor:pointer;}

/* Preview77 codex summary and post-battle analytics */
.codex-summary{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.codex-summary span{border:1px solid var(--line);border-radius:8px;background:var(--panel2);padding:10px 14px;color:var(--muted)}.codex-summary strong{color:var(--text)}
.battle-analysis{margin:18px auto 12px;text-align:left;max-width:720px}.battle-analysis h3{color:var(--gold);font-size:17px;margin:4px 0}.battle-analysis p{font-size:12px;line-height:1.5}.analysis-table{border:1px solid var(--line);border-radius:9px;overflow:hidden}.analysis-head,.analysis-line{display:grid;grid-template-columns:minmax(92px,1.3fr) repeat(3,minmax(70px,1fr));gap:8px;padding:9px 10px;align-items:center;font-size:12px}.analysis-head{background:var(--panel2);color:var(--gold)}.analysis-line{border-top:1px solid var(--line)}.analysis-line>span{position:relative;display:block;padding:3px 0 5px;text-align:right}.analysis-line>span b{position:relative;z-index:1}.analysis-line>span i{position:absolute;bottom:0;left:0;height:3px;background:var(--gold);border-radius:2px;opacity:.9}.analysis-line>strong{overflow-wrap:anywhere}@media(max-width:480px){.analysis-head,.analysis-line{grid-template-columns:minmax(74px,1fr) repeat(3,minmax(55px,1fr));gap:4px;padding:7px 5px;font-size:10px}.battle-analysis{margin:10px 0}}

/* Online profile / ranking */
.online-player-chip{border:1px solid rgba(255,232,199,.28);background:rgba(20,14,11,.65);color:#f7e7d3;border-radius:999px;padding:6px 10px;font:700 11px inherit;cursor:pointer;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.online-player-chip:hover{border-color:#c79461;background:rgba(78,52,35,.75)}
.ranking-list{display:grid;gap:7px;margin-top:12px}
.ranking-row{width:100%;display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid var(--line);background:#241d18;color:var(--text);border-radius:10px;padding:10px 12px;text-align:left;cursor:pointer;font:inherit}
.ranking-row:hover,.ranking-row:focus-visible{border-color:#bc855b;background:#30251d}
.ranking-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ranking-rank{font-weight:900;color:#e9c381;font-variant-numeric:tabular-nums}
.ranking-party{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.ranking-party-member .char-head{align-items:center}.ranking-party-member p{margin:7px 0}.ranking-party-member .small{line-height:1.55}
@media(max-width:620px){.ranking-party{grid-template-columns:1fr}.ranking-row{grid-template-columns:46px minmax(0,1fr) auto}.online-player-chip{max-width:130px}}


/* Battle sprite grid clipping: class-only so deployed CSP/cache layers cannot strip frame geometry. */
.battle-sprite-sheet.sprite-cols-4{width:400%}
.battle-sprite-sheet.sprite-cols-6{width:600%}
.battle-sprite-sheet.sprite-rows-5{height:500%}
.battle-sprite-sheet.sprite-frame-0{left:0}
.battle-sprite-sheet.sprite-frame-1{left:-100%}
.battle-sprite-sheet.sprite-frame-2{left:-200%}
.battle-sprite-sheet.sprite-frame-3{left:-300%}
.battle-sprite-sheet.sprite-frame-4{left:-400%}
.battle-sprite-sheet.sprite-frame-5{left:-500%}
.battle-sprite-sheet.sprite-row-0{top:0}
.battle-sprite-sheet.sprite-row-1{top:-100%}
.battle-sprite-sheet.sprite-row-2{top:-200%}
.battle-sprite-sheet.sprite-row-3{top:-300%}
.battle-sprite-sheet.sprite-row-4{top:-400%}

/* OnlineRC: growth tutorial is an inline guide, never a fixed overlay. */
.tutorial-growth-guide{margin:10px 0 14px;border-color:#c6a979;background:linear-gradient(155deg,#f8efdf,#eadcc8);color:#312b23;box-shadow:0 8px 24px #0005}
.tutorial-growth-guide-head{display:flex;align-items:center;gap:12px}.tutorial-growth-guide-head img{width:54px;height:54px;object-fit:cover;object-position:top center;border-radius:50%;border:2px solid #c6a979;background:#efe3d0}.tutorial-growth-guide-head strong{font-size:15px}.tutorial-growth-guide-head p{margin:3px 0 0;font-size:12px;line-height:1.5}
.tutorial-growth-tasks{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.tutorial-growth-tasks span{border:1px solid #bca27a;border-radius:999px;padding:6px 10px;font-size:12px;background:#fff8ed}.tutorial-growth-tasks span.done{background:#e4f3df;border-color:#789a69;color:#37532e;font-weight:700}
.tutorial-growth-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:540px){.tutorial-growth-guide-head img{width:44px;height:44px}.tutorial-growth-guide-head p{font-size:11px}.tutorial-growth-tasks{display:grid}.tutorial-growth-actions .btn{flex:1}}

/* Preview78 ranking: global progression ranking + stage clear-party list. */
.progress-ranking-row{cursor:default}
.progress-ranking-row:hover{border-color:var(--line);background:#241d18}
.progress-ranking-row.is-me{border-color:#c49a5c;background:#33271c;box-shadow:inset 3px 0 0 #e4bc77}
.progress-ranking-stage{display:flex;align-items:flex-end;justify-content:center;flex-direction:column;gap:1px;text-align:right;min-width:120px}
.progress-ranking-stage b{font-size:12px;color:#f0d6a7}
.progress-ranking-stage small{font-size:10px;color:#b9a993}
.progress-ranking-stage em{font-style:normal;font-size:9px;font-weight:900;letter-spacing:.08em;color:#f1c778}
@media(max-width:520px){.progress-ranking-stage{min-width:92px}.progress-ranking-stage b{font-size:11px}}


/* Preview78 ranking compact clear-party snapshot. */
.clear-record-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;margin-bottom:10px;border:1px solid var(--line);border-radius:11px;background:#241d18}.clear-record-head strong{font-size:14px}.clear-record-head span{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.clear-party-compact{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.clear-party-member{min-height:0}.clear-party-member .portrait{height:82px}.clear-party-member .prep-passive-summary{font-size:10px;line-height:1.35;min-height:27px}.clear-party-gear{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding-top:6px}.clear-party-gear summary{cursor:pointer;font-size:10px;color:#e9c381}.clear-party-gear>span{display:block;margin-top:5px;font-size:9px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}.clear-party-gear[open]{position:relative;z-index:2}
@media(max-width:760px){.clear-party-compact{grid-template-columns:repeat(2,minmax(0,1fr))}.clear-party-member:last-child{grid-column:1/-1}.clear-record-head{align-items:flex-start;flex-direction:column;gap:3px}}
@media(max-width:420px){.clear-party-compact{grid-template-columns:1fr}.clear-party-member:last-child{grid-column:auto}}

/* Community and options */
.social-option-card{margin-top:14px}.social-option-card h3{margin:0 0 8px}.social-option-card h4{margin:18px 0 8px}.social-setting-line{display:flex;align-items:center;justify-content:space-between;gap:14px}.social-setting-line select{max-width:140px}.social-panel{max-width:850px;margin:16px auto}.social-head,.social-msg-head{display:flex;align-items:center;gap:8px}.social-head{justify-content:space-between;border-bottom:1px solid #7774;padding-bottom:8px}.social-messages{height:46vh;min-height:240px;max-height:580px;overflow-y:auto;padding:12px 0;display:flex;flex-direction:column;gap:14px}.social-message{display:flex;gap:9px;align-items:flex-start}.social-avatar{width:38px;height:38px;border-radius:50%;object-fit:cover;object-position:center top;border:1px solid #9989}.social-default-icon{display:inline-flex;align-items:center;justify-content:center;background:#253249}.social-msg-main{flex:1;min-width:0}.social-msg-main p{margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.social-msg-head strong{font-size:13px}.social-msg-head time{font-size:11px;opacity:.65}.social-msg-head button{font-size:11px;margin-left:auto;padding:4px 7px}.social-msg-head button+button{margin-left:0}.social-compose{display:flex;gap:8px;margin-top:8px}.social-compose input{flex:1;min-width:0}.social-block-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #8882}.social-profile-current{display:flex;align-items:center;gap:14px;margin-bottom:16px}.social-large-avatar{width:82px;height:82px;border-radius:50%;object-fit:cover;object-position:center top}.social-icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:10px}.social-icon-choice{border:1px solid #8886;border-radius:9px;background:transparent;color:inherit;padding:6px;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer}.social-icon-choice.active{outline:2px solid #d1b678}.social-icon-choice small{font-size:10px}.social-option-card p{margin-top:8px}.social-option-card button{margin-top:4px}

.bottom-nav{overflow-x:auto;justify-content:flex-start}.bottom-nav button{flex:1 0 auto;min-width:52px}

/* Preview79.1: tavern chat entry (bottom nav is hidden by design). */
.tavern-secondary-v67 .mini-chat{background:#264c48;border-color:#548f86}

/* Preview79.2: compact mobile battle field. Override legacy staggered absolute slots.
   The desktop battlefield stays unchanged. Units have their own rows; no overlap. */
@media(max-width:620px){
  .battle-backdrop{padding: max(8px,env(safe-area-inset-top)) 6px max(8px,env(safe-area-inset-bottom));align-items:flex-start;}
  .modal-battle{width:100%;max-height:calc(100dvh - max(8px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)));overflow-y:auto;overscroll-behavior:contain;padding:10px 8px;border-radius:14px;}
  .modal-battle .modal-head{margin-bottom:8px;gap:6px;}
  .modal-battle .modal-head h2{font-size:17px;line-height:1.25;}
  .modal-battle .battle-shell{gap:7px;}
  .modal-battle .battle-top{flex-wrap:wrap;gap:6px;}
  .modal-battle .battle-top>.actions{display:flex;gap:5px;flex-wrap:wrap;margin-left:auto;}
  .modal-battle .battle-top .pill{font-size:11px;padding:6px 9px;}
  .modal-battle .battle-top .btn{padding:6px 9px;min-height:34px;font-size:12px;}
  .modal-battle .action-gauge{min-height:62px;padding:7px 8px;}
  .modal-battle .action-gauge-track{height:32px;margin:0 8px 0 6px;}
  .modal-battle .action-face{width:24px;height:24px;}
  .modal-battle .battle-field{
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;
    align-items:stretch;min-height:560px;padding:10px 6px 8px;
    overflow:hidden;background-position:center center;
  }
  .modal-battle .field-side{
    display:flex;flex-direction:column;align-items:center;justify-content:space-around;
    min-width:0;min-height:0;gap:2px;
  }
  .modal-battle .map-unit,
  .modal-battle .map-unit.ally,
  .modal-battle .map-unit.enemy,
  .modal-battle .map-unit.ally[class*="slot-"],
  .modal-battle .map-unit.enemy[class*="slot-"]{
    position:relative;top:auto;left:auto;right:auto;
    flex:0 0 104px;width:100%;max-width:134px;height:104px;
    display:flex;flex-direction:column;align-items:center;justify-content:flex-end;
    gap:2px;transform:none;
  }
  .modal-battle .unit-overhead,
  .modal-battle .map-unit.enemy.boss-tier-mid .unit-overhead,
  .modal-battle .map-unit.enemy.boss-tier-area .unit-overhead{
    flex:0 0 auto;width:min(100%,118px);min-height:0;
    padding:2px 3px 3px;border-radius:7px;
    background:rgba(12,13,17,.42);backdrop-filter:blur(2px);
  }
  .modal-battle .battle-unit-lv{font-size:10px;line-height:12px;}
  .modal-battle .status-icons{height:16px;min-height:16px;max-width:100%;gap:1px;margin:0 0 1px;overflow:visible;}
  .modal-battle .status-icon,.modal-battle .status-icon-art,.modal-battle .status-icon-fallback,.modal-battle .status-icon-custom{
    width:15px;height:15px;flex:0 0 15px;
  }
  .modal-battle .status-more{height:15px;min-width:16px;font-size:7px;line-height:14px;padding:0 2px;}
  .modal-battle .element-hp-row .element-badge{width:15px;height:15px;}
  .modal-battle .hpbar{height:6px;}
  .modal-battle .gaugebar{height:4px;margin-top:2px;}
  .modal-battle .shieldbar{height:4px;}
  .modal-battle .unit-visual,
  .modal-battle .unit-battle.with-sprite .unit-visual,
  .modal-battle .map-unit.enemy.boss-tier-mid .unit-visual,
  .modal-battle .map-unit.enemy.boss-tier-area .unit-visual{
    flex:0 0 60px;width:100%;min-height:60px;display:flex;justify-content:center;align-items:flex-end;
  }
  .modal-battle .battle-sprite,
  .modal-battle .map-unit.enemy.boss-tier-mid .battle-sprite,
  .modal-battle .map-unit.enemy.boss-tier-area .battle-sprite{
    flex:0 0 auto;width:60px;height:60px;transform:none;transform-origin:center bottom;
  }
  .modal-battle .battle-sprite.enemy{transform:scaleX(-1);}
  /* v1.0.7: mobile boss sprite size/reset selectors have higher specificity
     than the generic enemy-facing rule. Preserve the enemy facing direction
     for mid bosses and area bosses; keep the existing 60px battle viewport. */
  .modal-battle .map-unit.enemy.boss-tier-mid .battle-sprite.enemy,
  .modal-battle .map-unit.enemy.boss-tier-area .battle-sprite.enemy{transform:scaleX(-1);}

  .modal-battle .map-unit.ally.sprite-plus10 .battle-sprite{transform:scale(1.04);transform-origin:center bottom;}
  .modal-battle .map-unit.ally.sprite-plus15 .battle-sprite{transform:scale(1.07);transform-origin:center bottom;}
  .modal-battle .battle-sprite-milka{transform:scale(1.05);transform-origin:center bottom;}
  .modal-battle .vs{
    position:absolute;z-index:5;top:50%;left:50%;transform:translate(-50%,-50%);
    font-size:12px;background:rgba(20,15,12,.48);border-radius:100%;
    padding:7px 6px;text-shadow:0 1px 4px #000;
  }
  .modal-battle .combat-floater{top:20px;font-size:12px;z-index:12;}
  .modal-battle .combat-floater.critical{font-size:14px;}
  /* Sparse enemy waves and single raid bosses fill their lane without shifting allies. */
  .modal-battle .field-side[data-count="1"]{justify-content:center;}
  .modal-battle .field-side[data-count="2"]{justify-content:space-evenly;}
  .modal-battle .field-side[data-count="3"]{justify-content:space-around;}
  .modal-battle .field-side[data-count="4"]{justify-content:space-around;}
  .modal-battle .field-side[data-count="1"] .map-unit.enemy.boss-tier-area,
  .modal-battle .field-side[data-count="1"] .map-unit.enemy.boss-tier-mid{height:145px;flex-basis:145px;}
  .modal-battle .field-side[data-count="1"] .map-unit.enemy.boss-tier-area .unit-visual,
  .modal-battle .field-side[data-count="1"] .map-unit.enemy.boss-tier-mid .unit-visual{min-height:90px;flex-basis:90px;}
  .modal-battle .field-side[data-count="1"] .map-unit.enemy.boss-tier-area .battle-sprite,
  .modal-battle .field-side[data-count="1"] .map-unit.enemy.boss-tier-mid .battle-sprite{width:90px;height:90px;}
}
@media(max-width:365px){
  .modal-battle .battle-field{padding-left:3px;padding-right:3px;gap:4px;}
  .modal-battle .status-icon,.modal-battle .status-icon-art,.modal-battle .status-icon-fallback,.modal-battle .status-icon-custom{width:13px;height:13px;flex-basis:13px;}
  .modal-battle .battle-top .btn{padding:5px 7px;}
}

/* Mobile skill/description readability: prevent horizontal overflow or truncation.
   Descriptions remain full text, including Japanese and unbroken effect identifiers. */
.scout-skills{min-width:0;max-width:100%;white-space:normal;text-align:left;overflow-wrap:anywhere;word-break:normal}
.scout-skill-entry{display:flex;flex-direction:column;gap:3px;min-width:0;margin:10px 0!important;line-height:1.7}
.scout-skill-name{display:block;color:#f2d39d;white-space:normal;overflow-wrap:anywhere}
.scout-skill-description{display:block;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-break:strict}
@media(max-width:700px){
  .scout-stage.redesigned .scout-card{display:flex;flex-direction:column;min-width:0}
  .scout-stage.redesigned .scout-art{height:clamp(230px,70vw,360px)}
  .scout-card-body{min-width:0;width:100%;padding:14px}
  .scout-card-body h3{font-size:21px;white-space:normal;overflow-wrap:anywhere}
  .scout-candidate strong,.scout-candidate p,.scout-candidate .skillline,
  .scout-candidate .locked-passives,.scout-passive,.scout-passive p,
  .scout-skills p,.scout-skills summary,.scout-role{
    min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;
    word-break:normal;line-break:strict;
  }
  .scout-skills p{font-size:12px;line-height:1.75}
  .modal:not(.modal-battle){max-width:100%;max-height:calc(100dvh - 24px);overflow-x:hidden;overflow-y:auto}
  .modal:not(.modal-battle) .modal-body,.modal:not(.modal-battle) .card,
  .modal:not(.modal-battle) .grid>*,.codex-detail>*,.codex-skill,
  .codex-passive-card,.codex-passive-stage-details,.rule-card{
    min-width:0;max-width:100%;
  }
  .modal:not(.modal-battle) .card p,.modal:not(.modal-battle) .card .small,
  .modal:not(.modal-battle) .card .gear-options,
  .codex-skill p,.codex-skill strong,.codex-passive-card p,
  .codex-passive-base,.codex-passive-stage-details p,
  .rule-card p,.rule-note,.matchup-panel p,.profile-copy,
  .scout-passive p,.social-option-card p{
    min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;
    word-break:normal;line-break:strict;
  }
  /* Two-column info cards with lengthy skill descriptions become one column. */
  .modal:not(.modal-battle) .grid.two{grid-template-columns:minmax(0,1fr)}
  .codex-detail{grid-template-columns:minmax(0,1fr)}
  .codex-passive-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:400px){
  .scout-card-body{padding:12px}
  .scout-stage.redesigned .scout-art{height:clamp(205px,64vw,290px)}
  .scout-skills p{font-size:12px}
}

/* Mobile selection affordance: all 5 dungeon tiers and all 7 areas remain discoverable. */
.mobile-choice-row{display:none}
.equipment-picker-actions{display:flex;justify-content:flex-start;margin:10px 0 14px}
.equipment-picker-actions .btn{min-height:44px}
@media(max-width:700px){
  .mobile-choice-row{display:flex;flex-direction:column;gap:8px;margin:12px 0 14px;min-width:0;font-weight:700;color:var(--text)}
  .mobile-choice-row>span{font-size:13px;color:var(--gold)}
  .mobile-choice-row select{display:block;width:100%;max-width:100%;min-width:0;min-height:48px;padding:11px 40px 11px 12px;border-radius:11px;border:1px solid #9a7248;background:#2d221b;color:var(--text);font-weight:700;font-size:16px;cursor:pointer;touch-action:manipulation}
  .mobile-choice-row select:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
  .area-tabs,.dungeon-difficulty-tabs{display:none!important}
}

/* v1.0.3: Clear-party result cards on narrow screens. Keep every passive text readable. */
@media (max-width: 620px) {
  .clear-party-compact {
    display:grid; grid-template-columns:minmax(0,1fr); gap:6px;
  }
  .clear-party-member, .clear-party-member:last-child {
    display:grid; grid-column:auto;
    grid-template-columns:56px minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    align-items:center; column-gap:8px; row-gap:2px;
    padding:7px 9px; min-height:unset;
  }
  .clear-party-member .portrait {
    grid-column:1; grid-row:1 / 4;
    width:54px; height:60px; margin:0; align-self:center;
  }
  .clear-party-member > strong {
    grid-column:2; grid-row:1; min-width:0;
    font-size:12px; line-height:1.25; overflow-wrap:anywhere;
  }
  .clear-party-member > .small.muted {
    grid-column:3;grid-row:1;white-space:nowrap;font-size:10px;align-self:center;
  }
  .clear-party-member .prep-passive-summary {
    grid-column:2 / 4; grid-row:2;
    display:block; min-height:0; max-height:none;
    margin:0; padding:0; font-size:10px; line-height:1.4;
    white-space:normal; overflow-wrap:anywhere;
  }
  .clear-party-member .clear-party-gear {
    grid-column:2 / 4; grid-row:3; min-width:0;
    margin:2px 0 0; padding:3px 0 0;
  }
  .clear-party-member .clear-party-gear summary {font-size:10px;line-height:1.3;}
  .clear-party-member .clear-party-gear > span {font-size:10px;overflow-wrap:anywhere;}
  .clear-record-head {gap:3px;padding:7px 9px;margin-bottom:7px;}
  .clear-record-head strong {font-size:12px;}
  .clear-record-head span {font-size:10px;}
}

/* v1.0.4: responsive, non-blocking online EXP batching controls. */
.xp-bulk-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}
.xp-bulk-actions .btn{min-width:0;white-space:normal;line-height:1.25}
.xp-batch-status{margin:8px 0 0;min-height:1.35em;font-size:12px}
@media(max-width:700px){.xp-item-grid,.xp-bulk-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.xp-item-grid .btn{min-width:0;padding:10px 4px;line-height:1.35;font-size:12px}}


/* v1.0.5: Codex full-body art contained in mobile detail viewport.
   The codex performance-tab portrait had max-height:480px, while its mobile
   container was only 220-380px tall and allowed visible overflow. Keep the
   separate profile tab untouched; preserve aspect ratio and avoid crop. */
@media (max-width:700px) {
  .modal:not(.modal-battle) .codex-detail-art {
    box-sizing:border-box;
    width:100%;
    min-width:0;
    max-width:100%;
    height:clamp(210px, 67vw, 330px);
    min-height:0;
    max-height:none;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .modal:not(.modal-battle) .codex-detail-art > img {
    display:block;
    width:auto;
    height:auto;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    object-position:center center;
    flex-shrink:1;
  }
  /* Historical c23 performance-only enlargement also crossed the boundary. */
  .modal:not(.modal-battle) .codex-detail-art > img[src$="c23_full.webp"] {
    transform:none;
  }
}

/* v1.0.8: Codex character performance tab only. Faces must remain visible.
   The profile tab, enemy codex and other portraits retain their existing framing.
   Higher specificity is intentional: v1.0.5 mobile containment rules otherwise win. */
.modal:not(.modal-battle) .codex-detail-art.art-portrait{
  display:flex;align-items:stretch;justify-content:stretch;
  box-sizing:border-box;width:100%;min-width:0;
  height:clamp(300px,40vw,400px);min-height:0;max-height:none;
  padding:0;overflow:hidden;
}
.modal:not(.modal-battle) .codex-detail-art.art-portrait > img{
  display:block;width:100%;height:100%;max-width:100%;max-height:none;
  flex-shrink:0;object-fit:cover;object-position:50% 0%;transform:none;
}
@media(max-width:700px){
  .modal:not(.modal-battle) .codex-detail-art.art-portrait{
    height:clamp(210px,67vw,330px);min-height:0;max-height:none;
  }
}

/* v1.0.11: announcements */
.tavern-secondary-v67 .mini-notices{background:#3a364f;border-color:#8e86ba}
.ap-notice-badge{display:inline-flex;vertical-align:middle;align-items:center;margin-left:6px;padding:2px 7px;border-radius:999px;background:#c74a40;color:#fff;font-size:10px;font-weight:800;white-space:nowrap}
.ap-notice-badge[hidden]{display:none!important}
.ap-notices-wrap{max-width:880px;margin:14px auto;padding:0 3px}
.ap-notices-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.ap-notice-list{display:grid;gap:11px}
.ap-notice-card{border:1px solid #7d6748;border-radius:12px;background:#28232a;overflow:hidden}
.ap-notice-card.is-unread{border-color:#d8a35d;background:#322a30}
.ap-notice-open{width:100%;position:relative;display:grid;gap:10px;text-align:left;padding:17px 40px 17px 17px;color:#f5e8d9;background:transparent;border:0;cursor:pointer;font:inherit;overflow-wrap:anywhere}
.ap-notice-open strong{font-size:15px;line-height:1.45}
.ap-notice-open:focus-visible{outline:2px solid #ffda87;outline-offset:-3px}
.ap-notice-meta{display:flex;align-items:center;gap:11px;flex-wrap:wrap;color:#c0b6ad;font-size:12px}
.ap-notice-category{color:#f2d59d;font-weight:700}
.ap-notice-new{background:#ad3f3a;border-radius:5px;color:white;padding:2px 6px;font-size:10px;font-weight:800}
.ap-notice-arrow{position:absolute;right:15px;top:50%;transform:translateY(-50%);font-size:25px;color:#c3a77c}
.ap-notice-detail{max-width:880px;margin-top:15px;padding:20px;min-width:0}
.ap-notice-detail h3{font-size:21px;line-height:1.5;margin:15px 0}
.ap-notice-body{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;font-size:14px;line-height:1.9;color:#f0e6df}
.ap-notice-error{overflow-wrap:anywhere}
@media(max-width:520px){.ap-notice-open{padding:13px 30px 13px 12px}.ap-notice-detail{padding:15px}.ap-notice-detail h3{font-size:18px}.ap-notice-body{font-size:13px;line-height:1.85}}

/* v1.0.12: main-stage rewards always appear in the victory result */
.main-clear-rewards{max-width:620px;margin:16px auto;text-align:left;padding:14px;border:1px solid var(--line);border-radius:12px;background:#211a16}
.main-clear-rewards h3{margin:0 0 12px;font-size:17px;text-align:center}
.main-clear-rewards h4{margin:14px 0 0;font-size:13px;color:#e9c381}
.main-clear-exp{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px;background:#30251d;border-radius:10px;flex-wrap:wrap}
.main-clear-exp span{font-size:12px;color:#e5d5c3}
.main-clear-exp strong{color:#e9c381;font-size:20px}
.main-clear-rewards .reward-list{margin:10px 0 0;max-width:none}
.main-clear-rewards .reward-item{padding:9px 12px}

/* v1.0.13: low-power presentation mode (per-device, no gameplay impact). */
body.ap-low-power *,body.ap-low-power *::before,body.ap-low-power *::after{
  animation-duration:0.001ms !important;
  animation-iteration-count:1 !important;
  transition-duration:0.001ms !important;
  scroll-behavior:auto !important;
}
body.ap-low-power .battle-field,body.ap-low-power .modal-battle,
body.ap-low-power .tavern-home-v66,body.ap-low-power .tavern-panel{
  backdrop-filter:none !important;
}
body.ap-low-power .battle-sprite-sheet,body.ap-low-power .raid-stage-art img,
body.ap-low-power .tavern-home-v66 img{filter:none !important;}
body.ap-low-power .combat-floater,body.ap-low-power .cutin{display:none !important;}


/* v1.0.16: Tavern master quality fix: separate assets, no low-res baked composite. */
.tavern-home-v66 {
  background-image:
    linear-gradient(90deg,rgba(16,12,10,.25) 0%,rgba(19,13,11,.13) 30%,rgba(19,13,11,.13) 48%,rgba(18,13,11,.45) 100%),
    linear-gradient(180deg,rgba(17,12,10,.02),rgba(13,10,9,.26)),
    url('assets/home/tavern_bg.webp') !important;
  background-position:center center !important;
  background-size:cover !important;
}
.tavern-home-v66 .tavern-side::before {
  content:'' !important;
  display:block !important;
  position:absolute;
  left:-23px;
  top:207px;
  bottom:auto;
  width:min(45vw,490px);
  height:750px;
  background-image:url('assets/home/tavern_master.webp') !important;
  background-repeat:no-repeat !important;
  background-position:left top !important;
  background-size:contain !important;
  opacity:1;
  z-index:2;
  pointer-events:none;
  filter:drop-shadow(0 12px 16px rgba(0,0,0,.25)) brightness(1.07);
}
.tavern-home-v66 .master-bubble {z-index:5}
@media(max-width:960px) {
  .tavern-home-v66 .tavern-side::before {
    left:0;
    top:114px;
    width:min(70vw,360px);
    height:540px;
    opacity:1;
  }
}
@media(max-width:700px) {
  .tavern-home-v66 .tavern-side::before {
    left:0;
    top:108px;
    width:min(75vw,280px);
    height:420px;
    opacity:1;
  }
}
