*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:#12100f;color:#fff9e9;font-family:system-ui,-apple-system,'Noto Sans JP','Hiragino Kaku Gothic ProN',sans-serif}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.48;cursor:not-allowed}#shell{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}#frame{position:relative;aspect-ratio:3/5;width:min(100vw,calc(100dvh * 3 / 5));height:min(100dvh,calc(100vw * 5 / 3));max-height:100dvh;overflow:hidden;background:#1e201d;touch-action:none;box-shadow:0 0 0 1px #65513b,0 0 60px #000b}canvas{display:block;width:100%;height:100%;position:absolute;inset:0}.hidden{display:none!important}#overlay{position:absolute;inset:0;z-index:4;pointer-events:none}.screen{position:absolute;inset:0;pointer-events:auto}.titleScreen{display:flex;flex-direction:column;justify-content:space-between;padding:8% 7% 4%;background:linear-gradient(180deg,#100d0dcf 0%,#19100c10 27%,#130e0d00 46%,#0e1015ad 62%,#0c1317f3 85%)}.titleTop{text-align:center}.brandPill{display:inline-block;border:1px solid #cbb788a6;padding:5px 15px;border-radius:20px;font-size:clamp(8px,1.95vw,12px);color:#e9cb8b;letter-spacing:.2em}.titleJapanese{font-size:clamp(9px,2.15vw,14px);letter-spacing:.25em;color:#ebc982;margin-top:11px}.titleTop h1{margin:9px 0 1px;text-shadow:0 6px 1px #31120c,0 0 20px #18100e;line-height:1.12;font-family:serif;font-weight:1000;font-size:clamp(39px,10.5vw,66px);letter-spacing:.06em;color:#f8edc4;-webkit-text-stroke:1px #7d3d21}.titleTop h1 em{font-style:normal;color:#f9eac4;font-size:1.16em;letter-spacing:.09em}.titleSub{color:#e9b977;font-size:clamp(10px,2.5vw,16px);letter-spacing:.12em;font-weight:700}.titleActions{display:flex;flex-direction:column;gap:9px}.primary,.secondary{width:100%;border-radius:13px;border:1px solid #e4ba72;padding:13px 16px;color:#fff2c5;background:linear-gradient(180deg,#a94225,#6f201b);font-weight:900;font-size:clamp(13px,3.4vw,19px);box-shadow:0 4px 0 #3c1516,0 12px 20px #0004}.primary span{float:right}.secondary{background:linear-gradient(180deg,#283b3e,#1a292d);border-color:#93a4a5;box-shadow:0 4px 0 #121e22}.secondary span{float:right;font-size:.68em;background:#142329;border:1px solid #5a736e;border-radius:8px;padding:3px 7px}.mainMenuGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:4px}.mainMenuGrid button{border-radius:9px;padding:9px 1px;border:1px solid #ad9065;background:#352d29de;color:#ffebce;font-size:clamp(10px,2.35vw,14px);font-weight:800}.copyright{text-align:center;margin:6px 0 0;font-size:clamp(9px,2vw,12px);color:#e4cfa3}.copyright small{font-size:.8em;color:#a3a5a3}.panelScreen{background:linear-gradient(180deg,#1b2124f9,#13191cef 52%,#10181af9);padding:calc(12px + env(safe-area-inset-top,0px)) 5% 6%;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin}.panelHeading{display:flex;gap:12px;align-items:center;margin-bottom:14px}.backBtn{border:1px solid #927a51;background:#332b27;color:#ffe5ae;border-radius:9px;font-size:29px;width:44px;height:44px}.panelHeading>div:nth-child(2){flex:1}.overline{font-size:10px;letter-spacing:.22em;color:#c6a36b;font-weight:800}.panelHeading h2{font-family:serif;font-size:clamp(25px,6vw,40px);margin:2px 0}.balanceSmall{font-size:12px;color:#f5e1b3;background:#303b3a;border:1px solid #86775c;border-radius:20px;padding:7px 11px;white-space:nowrap}.mapIntro{font-size:clamp(10px,2.5vw,15px);line-height:1.8;margin:0 0 10px;color:#d2d9d2}.mapLegend{display:flex;justify-content:space-between;align-items:center;background:#233c3c;padding:7px 9px;font-size:11px;border-radius:7px;color:#e4d6b5}.mapLegend small{font-size:9px;color:#9fbbb9}.provinceGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:9px}.provinceBtn{position:relative;text-align:left;background:linear-gradient(135deg,#3e4c45,#25302d);border:1px solid #647269;color:#f5ecd1;border-radius:10px;padding:10px 7px 8px;min-height:83px;display:flex;flex-direction:column;justify-content:space-between}.provinceBtn.selected{border:2px solid #eac47b;background:linear-gradient(135deg,#6d573d,#352e2b);box-shadow:0 0 0 2px #e2a75826}.provinceBtn.won:after{content:'平定';position:absolute;right:5px;top:5px;background:#d9ba79;color:#422718;border-radius:3px;padding:2px 4px;font-size:9px;font-weight:900}.provinceBtn strong{font-size:clamp(14px,3.2vw,21px);font-family:serif}.provinceBtn .proArea{font-size:9px;color:#b3c9c2;letter-spacing:.06em}.provinceBtn .stars{font-size:12px;color:#ffc977;letter-spacing:1px}.provinceDetail{margin-top:13px;background:#302c27e8;border:1px solid #a88a57;border-radius:13px;padding:13px;box-shadow:0 8px 22px #0004}.detailTitle{font-family:serif;color:#ffe2a1;font-size:24px;font-weight:900}.detailRow{display:flex;justify-content:space-between;gap:4px;font-weight:800;font-size:clamp(11px,2.6vw,14px);margin:7px 0}.detailRow span:last-child{color:#edb76e}.detailText{font-size:12px;color:#d5cfc3;line-height:1.7;min-height:33px}.provinceDetail .primary{margin-top:9px}.collectionList{display:flex;flex-direction:column;gap:10px;padding-bottom:18px}.collectionCard{display:flex;gap:11px;align-items:center;background:#26302d;border:1px solid #726e57;border-radius:13px;padding:10px;min-height:105px}.collectionIcon{min-width:76px;height:82px;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;background:linear-gradient(135deg,#485f5a,#273731);font-size:34px}.collectionIcon small{font-size:9px;color:#dbcaa3}.collectionBody{min-width:0;flex:1}.collectionBody strong{font-size:16px;color:#ffdeaa}.collectionBody p{margin:4px 0;font-size:11px;line-height:1.5;color:#bfccc3}.collectionBody .stat{font-size:11px;color:#ecbb82}.collectionBody button,.equipActions button{border:1px solid #b99d6a;background:#554237;border-radius:7px;color:#ffe8bd;font-weight:800;padding:6px 11px;font-size:12px;margin-top:4px}.collectionBody button.active{background:#936537;color:#fff3d6}.locked{filter:saturate(.58)}.equippedBox{background:#34423c;border:1px solid #a58b61;padding:11px;border-radius:12px;margin-bottom:12px;font-size:12px;line-height:1.8}.equippedBox strong{color:#ffe0a5}.filterTabs{display:flex;gap:6px;margin:0 0 12px}.filterTabs button{flex:1;padding:8px 4px;background:#27302e;color:#dfd9c8;border:1px solid #6b756f;border-radius:8px;font-weight:800}.filterTabs button.active{background:#775138;border-color:#edc58b}.equipActions{display:flex;gap:6px}.tipText{font-size:11px;color:#b4b2a8;line-height:1.8;margin:8px 0}.gachaIntro{text-align:center;padding:14px 10px;background:radial-gradient(ellipse at 50% 35%,#6d503a,#2a3330 75%);border:1px solid #9a7f59;border-radius:16px;margin-bottom:15px}.gachaSeal{font-size:67px;line-height:1.4;position:relative}.gachaSeal span{position:absolute;font-size:25px;color:#ffe0a1;transform:translate(-6px,0)}.gachaIntro h3{font-family:serif;font-size:21px;color:#ffdea0;margin:0}.gachaIntro p{font-size:11px;line-height:1.7;color:#d6cdad}.gachaOffers{display:flex;flex-direction:column;gap:10px}.offer{display:flex;align-items:center;gap:9px;border:1px solid #8a795e;border-radius:12px;background:#273330;padding:10px 8px}.offerIcon{font-size:29px}.offer>div:nth-child(2){flex:1;min-width:0}.offer strong{display:block;color:#ffe1a1;font-size:15px}.offer small{font-size:10px;color:#b8c7c2}.offer button{color:#fff3cb;background:#8e4c32;border:1px solid #eac38b;border-radius:8px;padding:10px 6px;white-space:nowrap;font-weight:900;font-size:12px}.odds{font-size:10px;color:#bdc2b5;line-height:1.85;margin-top:16px}.gachaResult{text-align:center;background:linear-gradient(135deg,#594332,#283c40);border:2px solid #e8c078;margin-top:17px;padding:17px;border-radius:14px;animation:appear .25s ease-out}.gachaResult strong{font-size:20px;color:#ffe4a6}.gachaResult .big{font-size:59px}.gachaResult p{font-size:12px}@keyframes appear{from{transform:scale(.87);opacity:0}to{transform:scale(1);opacity:1}}.modalScreen{background:linear-gradient(180deg,#0f1514ed,#1d2422f7);display:flex;flex-direction:column;justify-content:center;align-items:center;padding:9%;text-align:center}.modalEyebrow{color:#ecc98d;font-weight:900;letter-spacing:.18em;font-size:12px}.modalScreen h2{font-family:serif;font-size:clamp(33px,8vw,50px);color:#f9e0a6;margin:11px 0}.modalScreen p{font-size:13px;line-height:1.8;color:#d4dbd1}.modalScreen .primary,.modalScreen .secondary{margin-top:10px}.skillOptions{display:flex;flex-direction:column;gap:10px;margin-top:13px;width:100%}.skillCard{display:flex;align-items:center;text-align:left;gap:12px;width:100%;min-height:91px;background:linear-gradient(120deg,#4f3b31,#293c36);border:1px solid #cfab71;border-radius:12px;color:#fbebce;padding:12px}.skillIcon{font-size:35px;min-width:44px;text-align:center}.skillCard strong{font-size:17px}.skillCard small{display:block;font-size:11px;color:#ced7c9;margin-top:4px}.rewardGrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin:18px 0}.rewardGrid>div{border:1px solid #9f8560;background:#3c3730;border-radius:9px;padding:16px 5px;font-size:12px}.rewardGrid strong{font-size:22px;display:block;margin-top:6px;color:#f5d18e}#battleHud{pointer-events:none;position:absolute;inset:0 0 auto;z-index:2;padding:13px 15px 0;background:linear-gradient(180deg,#0c1218de,#0e131354);font-size:11px}.hudTop{display:flex;align-items:center;gap:9px}.hudHero{width:46px;height:46px;border-radius:13px;background:#70553c;text-align:center;line-height:46px;font-size:28px;border:2px solid #ddaf6f}.hpleft{flex:1;min-width:0}.hudText{display:flex;justify-content:space-between;gap:4px}.hudText b{color:#fff3dc}.hudText span{color:#e1cfad}.hpbar{height:12px;background:#331e20;border:2px solid #c9a27a;border-radius:12px;overflow:hidden;margin-top:3px}#hudHpBar{height:100%;background:linear-gradient(90deg,#e34738,#ff9b6a);width:100%;transition:width .1s}.coinChip{white-space:nowrap;background:#352b23c9;border:1px solid #bfa075;padding:6px;border-radius:10px}.smallCircle{pointer-events:auto;color:#f6e7c7;width:37px;height:37px;background:#374646be;border:1px solid #a6baa9;border-radius:50%;font-weight:1000}.roomInfo{display:flex;justify-content:space-between;border-top:1px solid #8479618e;margin-top:8px;padding:7px 3px;color:#e9d4a6}.roomInfo b{color:white}.bossBar{padding:4px 4px 0;text-align:center;color:#ffc182;font-weight:900}.bossTrack{height:8px;background:#291517;border:1px solid #d7ad70;border-radius:9px;overflow:hidden;margin-top:3px}#bossFill{height:100%;width:100%;background:#e95b4c}#joystick{position:absolute;bottom:5%;left:6%;z-index:3;touch-action:none;user-select:none;-webkit-user-select:none;text-align:center;color:#f0debb9c;font-size:11px}.joystickBase{width:119px;height:119px;border:2px solid #f3d9a46b;border-radius:50%;background:#3b40405c;display:grid;place-items:center;box-shadow:inset 0 0 25px #0008}.joystickBase:before{content:'';position:absolute;width:74px;height:74px;border:1px solid #f8edc953;border-radius:50%}#stickKnob{width:48px;height:48px;border-radius:50%;background:radial-gradient(circle at 34% 28%,#f0d7a2,#9c7150);border:2px solid #fff4cc;box-shadow:0 3px 8px #0008;transform:translate(0px,0px)}#joystick span{display:block;margin-top:4px}#attackIcon{position:absolute;z-index:2;bottom:8%;right:7%;border:2px solid #dfc79d80;border-radius:50%;width:71px;height:71px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#5a36275c;font-size:30px;color:#ffe2ad;pointer-events:none}#attackIcon small{font-size:9px}#toast{position:absolute;z-index:7;left:50%;top:17%;transform:translate(-50%,-10px);background:#29261fe9;border:1px solid #d0a96c;border-radius:16px;padding:10px 19px;color:#ffdda3;font-weight:900;font-size:13px;white-space:nowrap;opacity:0;transition:.2s;pointer-events:none}#toast.show{opacity:1;transform:translate(-50%,0)}.pcHelp{font-size:12px;color:#a9a29a;margin-top:10px}@media(max-width:720px){.pcHelp{display:none}.provinceBtn{min-height:72px}.collectionIcon{min-width:65px;height:75px}.panelScreen{padding-bottom:10%}}@media(max-height:650px){.titleTop h1{font-size:clamp(34px,8vw,49px)}.titleActions{gap:5px}.titleActions .primary,.titleActions .secondary{padding:9px}.mainMenuGrid button{padding:7px 1px}.joystickBase{width:95px;height:95px}#stickKnob{width:42px;height:42px}}

.heroCardIcon{padding:0;overflow:hidden;position:relative;background:none!important}.sealPortrait{position:relative;width:100%;height:100%;border-radius:10px;overflow:hidden;background:linear-gradient(145deg,var(--bg1),var(--bg2));border:1px solid #d6bf95;box-shadow:inset 0 0 18px #0007}.portraitAura{position:absolute;inset:auto auto 8px 50%;width:48px;height:18px;transform:translateX(-50%);background:#111b1c9e;border-radius:50%;filter:blur(2px)}.portraitSeal{position:absolute;left:8px;bottom:8px;font-size:46px;filter:drop-shadow(0 4px 4px #0008)}.portraitHeadgear{position:absolute;left:8px;top:7px;padding:2px 6px;border-radius:999px;background:#201916b8;border:1px solid var(--trim);font-size:9px;letter-spacing:.08em;color:#fff2cd;font-weight:900}.portraitWeapon{position:absolute;right:8px;bottom:12px;font-size:23px;filter:drop-shadow(0 2px 2px #0009)}.portraitCrest{position:absolute;right:8px;top:6px;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#f7e0a2;color:#3c2718;font-size:12px;font-weight:1000;border:1px solid #6e5234}.portraitTag{position:absolute;left:0;right:0;bottom:0;padding:2px 0;background:linear-gradient(90deg,#0000,#111e21c2 16%,#111e21d8 84%,#0000);font-size:8px;letter-spacing:.16em;text-align:center;color:#f6ead0;font-weight:900}.gachaHeroWrap{display:flex;justify-content:center;margin-bottom:8px}.gachaHeroWrap .sealPortrait{width:112px;height:112px}.gachaHeroWrap small{display:none}.gachaResult small{color:#d8d1c3;font-size:10px}.collectionIcon.heroCardIcon small{position:absolute;left:0;right:0;bottom:2px;text-align:center;color:#f3e7cb;text-shadow:0 1px 2px #000;font-size:8px;font-weight:800}.collectionIcon.heroCardIcon .sealPortrait{height:100%}
.versionBanner{display:inline-block;margin-top:7px;background:#e7c17d;color:#392820;border:1px solid #fff0c7;border-radius:18px;padding:5px 14px;font-size:clamp(9px,2.2vw,13px);font-weight:900;box-shadow:0 2px 9px #0007}.testLabel{color:#f6d08a;font-size:1.05em}
/* v1.3 rarity feedback and quantitative gear progression */
.totalStats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:9px;margin-bottom:8px}
.totalStats span{display:flex;flex-direction:column;gap:3px;border-radius:7px;background:#101d1cb6;padding:6px 3px;text-align:center;font-size:10px;color:#d7dcce}
.totalStats b{font-size:13px;color:#ffe7a5;white-space:nowrap}.equippedNames{font-size:11px;line-height:1.65}.equippedBox small{color:#b3d6c1;font-size:10px}
.rarityCard{position:relative;border-width:2px;padding:9px;align-items:flex-start}
.rarityCard.rarity-common{border-color:#8a968f;background:linear-gradient(120deg,#27332f,#242e2b)}
.rarityCard.rarity-good{border-color:#72ca9e;background:linear-gradient(120deg,#264d42,#26352e)}
.rarityCard.rarity-epic{border-color:#b590f8;background:linear-gradient(120deg,#403153,#272f36)}
.rarityCard.rarity-legend{border-color:#f2c76c;background:linear-gradient(120deg,#59452b,#33312b);box-shadow:inset 0 0 24px #ffcc5324,0 0 13px #e7b75d28}
.rarityCard.isEquipped:after{content:'装備中';position:absolute;top:-8px;right:9px;font-size:9px;font-weight:900;color:#2d2415;background:#f6d78e;padding:2px 6px;border-radius:5px}
.rarityCard .itemIcon{min-width:66px;width:66px;height:82px}.rarity-good .itemIcon{background:linear-gradient(145deg,#34685c,#233d38)}
.rarity-epic .itemIcon{background:linear-gradient(145deg,#664c86,#312a43)}.rarity-legend .itemIcon{background:linear-gradient(145deg,#84622d,#372a22)}
.rarityCard .itemIcon small{font-size:10px;color:#fce7b8;letter-spacing:0}
.itemHeading{display:flex;gap:5px;flex-wrap:wrap;align-items:center}
.itemHeading strong{font-size:15px}.rarityBadge{border:1px solid currentColor;border-radius:999px;padding:2px 5px;font-size:9px;font-weight:900;white-space:nowrap}
.rarity-common .rarityBadge{color:#bfc9c1}.rarity-good .rarityBadge{color:#83d4b4}.rarity-epic .rarityBadge{color:#c6a1ff}.rarity-legend .rarityBadge{color:#ffd06f}
.itemNumbers{display:flex;flex-direction:column;gap:2px;margin:7px 0 3px;border-radius:7px;padding:7px 8px;background:#0d1b1d99}
.itemNumbers b{color:#fff1bc;font-size:14px}.itemNumbers span{color:#d8e3d6;font-size:10px}
.itemMeta{font-size:10px;color:#e7c88d;margin-top:5px}
.rarityCard .equipActions{flex-wrap:wrap}.rarityCard .equipActions button{margin-top:6px}.rarityCard .equipActions .fuseBtn{border-color:#e5bf8e;background:#6a4d40}

.rarityLegend{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0 0 9px}.rarityLegend span{padding:5px 2px;border-radius:6px;text-align:center;font-weight:900;font-size:10px;background:#172b2a;border:1px solid currentColor}.gradeCommon{color:#bfc9c1}.gradeGood{color:#83d4b4}.gradeEpic{color:#c6a1ff}.gradeLegend{color:#ffd06f}.itemNumbers .nextBonus{color:#ffc977;font-size:10px;margin-top:4px;border-top:1px solid #ffffff24;padding-top:4px}

/* Ver.1.5: 音確認と城郭ミニ図鑑 */
.conchPreviewBtn{align-self:center;display:block;margin:8px auto 2px;padding:7px 14px;border-radius:40px;background:#453420c9;color:#fff0c4;border:1px solid #d8b071;font-size:clamp(11px,2.4vw,14px);font-weight:900;letter-spacing:.03em;box-shadow:0 3px 7px #0008;pointer-events:auto}
.conchPreviewBtn span{color:#fad185;padding-left:6px}
#resultScreen{justify-content:flex-start;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:6% 7% 7%;gap:0}
#resultScreen h2{font-size:clamp(26px,6.3vw,43px);margin:7px 0}
#resultScreen>p{font-size:clamp(11px,2.6vw,14px);margin:2px 0 8px}
#resultScreen .rewardGrid{margin:8px 0;gap:7px}
#resultScreen .rewardGrid>div{padding:9px 5px}
#resultScreen .rewardGrid strong{font-size:19px;margin-top:2px}
#resultScreen .primary,#resultScreen .secondary{padding:10px 12px;font-size:clamp(12px,2.9vw,16px);margin-top:7px}
.castleFactCard{width:100%;flex-shrink:0;box-sizing:border-box;text-align:left;border-radius:13px;padding:12px 13px;margin:6px 0 10px;background:linear-gradient(140deg,#f2e0b9,#d5ba89);color:#38281e;border:3px double #806041;box-shadow:0 5px 0 #1d1410}
.castleFactEyebrow{font-size:10px;letter-spacing:.1em;color:#80532d;font-weight:900}
.castleFactHeading{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline;margin:5px 0}
.castleFactHeading strong{font-family:serif;color:#3b2318;font-size:clamp(18px,4.8vw,27px)}
.castleFactHeading small{font-size:10px;color:#6d4d30}
#resultScreen .castleFactCard p{margin:5px 0;font-size:clamp(11px,2.7vw,14px);line-height:1.63;color:#463326}
#resultScreen .castleFactCard .castleFactJoke{color:#6d3f23;font-weight:800;font-size:clamp(10px,2.3vw,12px);border-top:1px solid #9f7b52;padding-top:6px;margin-top:6px}
#castleFactSource{display:inline-block;margin-top:3px;color:#5a381d;text-decoration:underline;font-weight:900;font-size:11px;pointer-events:auto}
@media(max-height:680px){#resultScreen{padding:3.5% 7% 6%}.castleFactCard{padding:9px 10px}}
