@charset "UTF-8";


/* === 演出移植レイヤー: from source UI only === */

:root{--gold:#d9b968;--paper:#d2ae75;--ink:#382313}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;background:#030303;color:#f5ead4;font-family:"Yu Mincho","Hiragino Mincho ProN",serif}
button,input{font:inherit}.screen{display:none;min-height:100svh;position:relative;overflow:hidden}.screen.on{display:flex}
.fadein{animation:fade .55s ease both}@keyframes fade{from{opacity:0}to{opacity:1}}
#title{align-items:center;justify-content:center;background:radial-gradient(circle at 50% 32%,#241b0b 0,#090805 45%,#020202 100%)}
.titleBox{text-align:center;padding:28px}.smallEng{font:11px Georgia,serif;letter-spacing:.38em;color:#b79b62}.mainTitle{font-size:clamp(44px,9vw,96px);letter-spacing:.12em;margin:.18em 0;text-shadow:0 0 28px #8c6a2633}.sub{color:#c7b997;letter-spacing:.15em}.btn{border:1px solid #8b7445;background:#171107;color:#f7e8c5;padding:14px 27px;border-radius:999px;cursor:pointer;letter-spacing:.1em;box-shadow:0 0 20px #000}
#prologue{align-items:center;justify-content:center;background:#050403}
.bookbg{position:absolute;inset:0;background-position:center;background-size:cover;filter:brightness(.92)}
.bookShade{position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 20%,rgba(0,0,0,.35) 78%)}
.proWindow{position:relative;width:min(84vw,980px);height:min(70svh,650px);overflow:hidden;z-index:2}
.proSeq{
 position:absolute;
 left:7%;
 right:7%;
 text-align:center;
 color:#3a2414;
 font-family:"HGS行書体","HGP行書体","HG正楷書体-PRO","Yu Mincho",serif;
 font-weight:700;
 letter-spacing:.05em;
 font-size:clamp(30px,3.35vw,44px);
 line-height:1.42;
 text-shadow:0 1px #f8dfab55;
 opacity:0;
 transform:translateY(8px);
 transition:opacity .75s ease,transform .75s ease;
 pointer-events:none
}
.proSeq.show{opacity:1;transform:translateY(0)}
.proSeq strong{font-size:1em;color:#682f1d;text-shadow:0 0 1px #3b170d}
.proSeq .nowrap{white-space:nowrap}
.proSeq[data-proseq="0"]{top:9%}
.proSeq[data-proseq="1"]{top:28%}
.proSeq[data-proseq="2"]{top:47%}
.proSeq[data-proseq="3"]{top:66%}
.proSeq[data-proseq="4"]{top:43%;transform:translateY(-50%);font-size:clamp(38px,4.3vw,56px)}
.proSeq[data-proseq="4"].show{transform:translateY(-50%)}
.proWindow.finalPage .proSeq:not([data-proseq="4"]){opacity:0!important;transition:opacity .7s ease}
.proWindow.finalPage .proSeq[data-proseq="4"]{opacity:1}

.bgmToggle{display:none;position:absolute;z-index:5;left:50%;bottom:22px;transform:translateX(-50%);min-width:210px;padding:14px 28px;border:2px solid #9d814e;border-radius:999px;background:rgba(22,14,7,.82);color:#f3dcb0;font-size:20px;font-weight:700;letter-spacing:.12em;cursor:pointer;box-shadow:0 0 22px rgba(0,0,0,.55)}
.bgmToggle.on{background:rgba(67,48,17,.9);border-color:#d9b968;color:#ffe9a8;box-shadow:0 0 24px rgba(217,185,104,.28)}
.skip{position:absolute;z-index:4;right:25px;bottom:22px;background:#1e140ca8;color:#f3dcb0;border:1px solid #8c6840;padding:8px 14px;border-radius:999px;cursor:pointer}
#name{align-items:center;justify-content:center;padding:20px;background-position:center;background-size:cover}
#name:before{content:"";position:absolute;inset:0;background:rgba(0,0,0,.34)}
#name .panel{position:relative;z-index:2}
.panel{width:min(92vw,620px);background:#0c0a0794;backdrop-filter:blur(7px);border:1px solid #735e39;border-radius:22px;padding:38px 28px;text-align:center;box-shadow:0 25px 90px #000}
.panel h2{font-size:34px;margin:.2em 0}.panel p{color:#bcae8d}
.nameInput{width:100%;padding:16px;background:#050403;border:1px solid #806a42;border-radius:12px;color:#fff0cf;text-align:center;font-size:20px;outline:none;margin:20px 0 14px}
#quiz{align-items:center;justify-content:center;background:#050504;padding:18px}
.qbg{position:absolute;inset:0;background-size:cover;background-position:center;transition:background-image .45s ease;filter:brightness(.63) saturate(.88)}
.qveil{position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.48),rgba(0,0,0,.22),rgba(0,0,0,.48)),linear-gradient(to top,rgba(0,0,0,.56),transparent 48%)}
.quizPanel{position:relative;width:min(94vw,820px);z-index:2;background:rgba(8,8,6,.42);border:1px solid rgba(116,95,56,.58);border-radius:22px;padding:23px 23px 27px;box-shadow:0 30px 90px #000;backdrop-filter:blur(6px)}
.toprow{display:flex;justify-content:space-between;color:#c0ad80;font-size:12px;letter-spacing:.13em}.bar{height:3px;background:#282116;margin:11px 0 23px;border-radius:20px;overflow:hidden}.bar i{display:block;height:100%;background:linear-gradient(90deg,#866727,#e9cb72);transition:.4s}
.qtheme{color:#d4b66e;font-size:clamp(18px,2.8vw,28px);letter-spacing:.24em}.qtext{font-size:clamp(23px,4vw,36px);line-height:1.55;margin:10px 0 21px;text-shadow:0 2px 10px #000}
.answers{display:grid;gap:10px}.answer{text-align:left;background:rgba(9,8,7,.30);border:1px solid rgba(76,65,45,.65);color:#f0e5ce;border-radius:13px;padding:14px 15px;cursor:pointer;line-height:1.5;transition:.17s}.answer:hover{border-color:#ad8d50;background:rgba(23,17,7,.48)}.answer.pick{border-color:#f0cb70;background:rgba(48,36,16,.52);box-shadow:0 0 22px #e7bd5428}.answer b{color:#ddb966;margin-right:.4em}
#search{align-items:center;justify-content:center;background:#020202;text-align:center}.searchBox{width:min(90vw,650px)}.sigil{width:90px;height:90px;border:1px solid #9d8147;border-radius:50%;margin:auto;position:relative;animation:spin 2.4s linear infinite}.sigil:before,.sigil:after{content:"";position:absolute;inset:13px;border:1px solid #65542f;transform:rotate(45deg)}.sigil:after{inset:28px;border-radius:50%;transform:none}@keyframes spin{to{transform:rotate(360deg)}}.searchText{margin-top:26px;color:#c9b891;letter-spacing:.12em;height:80px;min-height:80px;display:flex;align-items:center;justify-content:center;font-size:clamp(24px,4.2vw,42px);line-height:1.2;text-shadow:0 0 16px rgba(217,185,104,.28)}
#result{align-items:center;justify-content:center;background:#020202;padding:18px}.resultCard{position:relative;width:min(94vw,790px);height:min(92svh,1050px);overflow:hidden;border-radius:22px;background:#000;box-shadow:0 30px 90px #000}.weaponImg{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center center;background:#020202;z-index:1}.resultShade{position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.45) 0,rgba(0,0,0,.16) 42%,rgba(0,0,0,0) 72%);z-index:2}
.fx{position:absolute;inset:0;pointer-events:none;mix-blend-mode:screen;z-index:3}.fx:before,.fx:after{content:"";position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);border-radius:50%;opacity:.36;animation:pulse 2.1s ease-in-out infinite}.fx:before{width:25%;height:52%;filter:blur(16px)}.fx:after{width:38%;height:64%;filter:blur(30px);opacity:.18}@keyframes pulse{50%{opacity:.58;transform:translate(-50%,-50%) scale(1.06)}}
.fx.holy:before{background:#fff2a8}.fx.fire:before{background:#ff6b20}.fx.ice:before{background:#8fe9ff}.fx.thunder:before{background:#d7d4ff}.fx.wind:before{background:#a5ffe6}.fx.earth:before{background:#d6a45e}.fx.dark:before{background:#7c42d9}.fx.eclipse:before{background:linear-gradient(90deg,#ffd86a,#6c38d4)}
.sparkles{position:absolute;inset:0;overflow:hidden}.sparkles i{position:absolute;width:4px;height:4px;border-radius:50%;background:#fff2bd;box-shadow:0 0 9px currentColor;opacity:0;animation:float 3s linear infinite}@keyframes float{0%{transform:translateY(80px);opacity:0}15%{opacity:.8}100%{transform:translateY(-230px) translateX(22px);opacity:0}}
.resultInfo{z-index:4;position:absolute;left:0;right:0;bottom:0;padding:150px 30px 30px;background:linear-gradient(to top,rgba(0,0,0,.58) 0,rgba(0,0,0,.32) 48%,rgba(0,0,0,.08) 78%,rgba(0,0,0,0) 100%)}.num{font:12px Georgia,serif;letter-spacing:.25em;color:#bda76f}.weaponName{font-size:clamp(31px,6vw,56px);letter-spacing:.06em;margin:4px 0;color:#fff3ce;text-shadow:0 0 15px #d4ad5940}.legend{color:#eee3ca;font-size:19px;line-height:1.65}.chips{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}.chip{border:1px solid #9d814e88;padding:6px 10px;border-radius:999px;font-size:14px;background:#231a0ca8}.skill{border-top:1px solid #ffffff38;border-bottom:1px solid #ffffff28;padding:13px 0;line-height:1.75;font-size:17px}.skill strong{color:#e9c66d}.diagnosis{font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;margin-top:15px;line-height:1.95;font-size:17px;color:#fffaf0;text-shadow:0 1px 5px #000}.again{margin-top:14px} .sharePrefix{font-size:clamp(15px,2.5vw,21px);color:#d9c28d;letter-spacing:.08em;margin-bottom:1px;opacity:.95}
.resultActions{display:flex;flex-wrap:wrap;gap:10px;margin-top:15px;align-items:center}
.shareX{border:1px solid #9f8750;background:rgba(10,10,10,.58);color:#fff4d7;padding:10px 16px;border-radius:999px;cursor:pointer;letter-spacing:.06em;font-weight:700}
.shareX:hover{background:rgba(55,45,24,.72);border-color:#d8b968}
.again{margin-top:0}
@media(max-width:640px){.bgmToggle{min-width:180px;padding:12px 20px;font-size:18px;bottom:18px}.proWindow{width:95vw;height:70svh}.proSeq{left:7%;right:7%;top:11%;bottom:11%;padding:4% 5%;font-size:clamp(24px,6.5vw,32px);line-height:1.48;letter-spacing:.04em}.quizPanel{padding:19px 14px 22px}.qtext{font-size:23px}.answer{font-size:14px;padding:13px}.resultCard{width:100%;height:96svh;border-radius:0}.resultInfo{padding:140px 18px 18px}.diagnosis{font-size:15px;line-height:1.85}.resultActions{gap:8px}.shareX{font-size:14px;padding:9px 13px}}

.globalBgmToggle{
 position:fixed;z-index:9999;right:18px;top:18px;
 min-width:145px;padding:10px 18px;border:2px solid #9d814e;
 border-radius:999px;background:rgba(22,14,7,.84);color:#f3dcb0;
 font-size:16px;font-weight:700;letter-spacing:.08em;cursor:pointer;
 box-shadow:0 0 18px rgba(0,0,0,.5);backdrop-filter:blur(3px)
}
.globalBgmToggle.on{background:rgba(67,48,17,.9);border-color:#d9b968;color:#ffe9a8}
@media(max-width:640px){
 .globalBgmToggle{right:10px;top:10px;min-width:125px;padding:9px 14px;font-size:14px}
}

@media(max-width:640px){
 .proSeq{left:4%;right:4%;font-size:clamp(22px,5.8vw,30px);line-height:1.38;letter-spacing:.025em}
 .proSeq[data-proseq="0"]{top:9%}
 .proSeq[data-proseq="1"]{top:28%}
 .proSeq[data-proseq="2"]{top:47%}
 .proSeq[data-proseq="3"]{top:66%}
 .proSeq[data-proseq="4"]{top:43%;transform:translateY(-50%);font-size:clamp(38px,4.3vw,56px)}
.proSeq[data-proseq="4"].show{transform:translateY(-50%)}
.proWindow.finalPage .proSeq:not([data-proseq="4"]){opacity:0!important;transition:opacity .7s ease}
.proWindow.finalPage .proSeq[data-proseq="4"]{opacity:1}
}

#quiz.quizFinishFade{
 opacity:0;
 transition:opacity 2s ease;
 pointer-events:none;
}

.weaponReading{
 margin-top:0;
 margin-bottom:6px;
 color:#d8c7a2;
 font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;
 font-size:clamp(9px,1.15vw,11px);
 line-height:1.2;
 letter-spacing:.05em;
 text-shadow:0 1px 3px #000;
 opacity:.9
}
@media(max-width:640px){
 .weaponReading{font-size:9px;margin-top:0;margin-bottom:5px}
}


#result.resultRevealFade{
 animation:weaponRevealFade .5s ease-out both;
}
@keyframes weaponRevealFade{
 from{opacity:0}
 to{opacity:1}
}


/* Safe result-card overflow fix: does not change result screen positioning */
#result .diagnosis{
 overflow-wrap:break-word;
 word-break:normal;
}
#result .weaponName{
 overflow-wrap:break-word;
}
@media(max-width:640px){
 #result .diagnosis{
  font-size:12px;
  line-height:1.45;
 }
 #result .weaponReading{
  font-size:9px;
  line-height:1.15;
  margin-bottom:4px;
 }
 #result .legend{
  margin-top:4px;
  margin-bottom:6px;
 }
 #result .skill{
  margin-top:6px;
  margin-bottom:6px;
 }
}


/* === Result weapon image fit adjustment === */
#result .resultCard::before{
  content:"";
  position:absolute;
  inset:-4%;
  z-index:0;
  background-image:var(--weapon-bg,none);
  background-size:cover;
  background-position:center;
  filter:blur(18px) brightness(.48);
  transform:scale(1.08);
  opacity:.72;
  pointer-events:none;
}
#result .weaponImg{
  object-fit:contain;
  object-position:center center;
  background:transparent;
  transform:none;
  transform-origin:center center;
}
@media(max-width:640px){
  #result .weaponImg{transform:none}
}


/* === Result footer / retry layout === */
#result{
  justify-content:flex-start;
  overflow-y:auto;
  overflow-x:hidden;
  flex-direction:column;
  min-height:100svh;
  padding-top:18px;
  padding-bottom:0;
}
#result .resultCard{
  flex:0 0 auto;
}
#result .resultActions{display:none!important}
.resultFooter{
  position:relative;
  z-index:10;
  width:100%;
  min-height:190px; /* 約5cmの下余白 */
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:28px 18px 120px;
  background:linear-gradient(to bottom,#020202 0%,#050403 45%,#020202 100%);
}
.resultFooter .again{
  margin:0;
  min-width:min(78vw,320px);
}
@media(max-width:640px){
  #result{padding:0;}
  #result .resultCard{width:100%;height:96svh;border-radius:0;}
  .resultFooter{min-height:210px;padding:30px 16px 135px;}
  .resultFooter .again{min-width:78vw;}
}


/* === Result SSR frame overlay === */
#result .resultCard{
  isolation:isolate;
}
#result .resultFrameOverlay{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:fill;
  z-index:20;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
  filter:drop-shadow(0 0 10px rgba(255,198,64,.22));
}
#result .resultInfo{
  z-index:12;
}
#result .fx{
  z-index:8;
}
#result .resultShade{
  z-index:9;
}
#result .weaponImg,
#result #missingWeapon{
  z-index:1;
}


/* === FINAL WEAPON ANNOUNCEMENT CARD === */
#result .finalWeaponCard{
  width:min(94vw,720px);
  height:auto;
  min-height:0;
  overflow:hidden;
  border-radius:24px;
  background:#050504;
  isolation:isolate;
  box-shadow:0 28px 90px #000,0 0 34px rgba(191,145,52,.16);
}
#result .resultVisual{
  position:relative;
  width:100%;
  aspect-ratio:2 / 3;
  overflow:hidden;
  background:#020202;
  z-index:1;
}
#result .resultVisual::before{
  content:"";
  position:absolute;
  inset:-5%;
  z-index:0;
  background-image:var(--weapon-bg,none);
  background-size:cover;
  background-position:center;
  filter:blur(18px) brightness(.45);
  transform:scale(1.08);
  opacity:.72;
}
#result .weaponImg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  transform:none!important;
  background:transparent;
  z-index:1;
}
#result .missingWeapon{
  display:none;
  position:absolute;
  inset:0;
  z-index:1;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#d9c28d;
  font-size:24px;
  letter-spacing:.12em;
  background:radial-gradient(circle,#241b0b,#020202 70%);
}
#result .resultVisual .fx{z-index:5}
#result .resultVisual .resultShade{
  z-index:6;
  background:linear-gradient(to top,rgba(3,3,3,.7),rgba(0,0,0,.06) 36%,transparent 66%);
}
#result .resultInfo{
  position:relative;
  left:auto;right:auto;bottom:auto;
  z-index:12;
  padding:24px 52px 58px;
  background:linear-gradient(180deg,#090806 0%,#0b0906 48%,#050403 100%);
  text-align:left;
}
#result .num{font-size:12px;letter-spacing:.24em;color:#baa36b}
#result .sharePrefix{margin:8px 0 2px;font-size:13px;letter-spacing:.18em;color:#bca878}
#result .weaponName{
  margin:2px 0 4px;
  font-size:clamp(32px,6vw,54px);
  line-height:1.16;
  color:#fff1c7;
  text-shadow:0 0 18px rgba(218,178,92,.25);
}
#result .legend{
  margin:0 0 14px;
  color:#e5d1a4;
  font-family:Georgia,"Yu Mincho","Hiragino Mincho ProN",serif;
  font-size:clamp(17px,3vw,23px);
  letter-spacing:.11em;
}
#result .xyRow{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 20px;
  padding:9px 12px;
  border-top:1px solid rgba(211,176,98,.28);
  border-bottom:1px solid rgba(211,176,98,.18);
  background:rgba(122,88,28,.08);
}
#result .xyLabel{font-size:11px;letter-spacing:.18em;color:#a99159}
#result .xyValue{font-weight:700;color:#f4dfac;letter-spacing:.12em}
#result .resultSection{margin-top:18px}
#result .sectionLabel{
  margin-bottom:5px;
  color:#bba36c;
  font-size:11px;
  letter-spacing:.2em;
}
#result .skillName{
  color:#f0c96f;
  font-size:clamp(17px,3.2vw,23px);
  font-weight:800;
  line-height:1.55;
}
#result .skillText{
  margin-top:7px;
  color:#f5ecdc;
  font-size:15px;
  line-height:1.82;
  overflow-wrap:break-word;
}
#result .chosenReason{
  margin-top:23px;
  padding-top:19px;
  border-top:1px solid rgba(255,255,255,.18);
}
#result .chosenHeading{
  margin-bottom:10px;
  color:#f0cc78;
  font-family:Georgia,"Yu Mincho","Hiragino Mincho ProN",serif;
  font-size:clamp(19px,3.4vw,27px);
  line-height:1.45;
  letter-spacing:.06em;
  text-align:center;
}
#result .diagnosis{
  margin-top:0;
  color:#fffaf0;
  font-size:15px;
  line-height:1.95;
  text-shadow:none;
}
#result .resultFrameOverlay{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:fill;
  z-index:20;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
  filter:drop-shadow(0 0 10px rgba(255,198,64,.22));
}
@media(max-width:640px){
  #result{padding:0;}
  #result .finalWeaponCard{width:100%;border-radius:0;}
  #result .resultInfo{padding:20px 34px 48px;}
  #result .weaponName{font-size:clamp(30px,9vw,44px)}
  #result .skillText,#result .diagnosis{font-size:13px;line-height:1.78}
  #result .resultFooter{min-height:210px;padding:30px 16px 135px;}
}


/* === FINAL CARD V3 layout adjustments requested === */
#result .finalWeaponCard{
  display:flex;
  flex-direction:column;
  min-height:min(92svh,1050px);
}
#result .resultVisual{
  flex:1 1 auto;
  min-height:0;
}
#result .resultOverlayInfo{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:14;
  padding:120px 42px 26px;
  background:linear-gradient(to top,rgba(0,0,0,.76) 0%,rgba(0,0,0,.44) 34%,rgba(0,0,0,.10) 70%,rgba(0,0,0,0) 100%);
}
#result .resultBottomInfo{
  position:relative;
  left:auto; right:auto; bottom:auto;
  z-index:12;
  padding:24px 42px 50px;
  background:linear-gradient(180deg,#0a0907 0%,#070605 100%);
  min-height:34%;
}
#result .resultBottomInfo .chosenReason{
  margin-top:0;
  padding-top:0;
  border-top:none;
}
#result .resultOverlayInfo .weaponName{
  margin:0 0 4px;
}
#result .resultOverlayInfo .legend{
  margin:0 0 10px;
}
#result .resultOverlayInfo .xyRow{
  margin:0 0 14px;
  background:rgba(0,0,0,.28);
  backdrop-filter:blur(2px);
}
#result .resultOverlayInfo .resultSection{margin-top:12px}
#result .resultOverlayInfo .sectionLabel{
  color:#cfb276;
  text-shadow:0 1px 4px rgba(0,0,0,.7);
}
#result .resultOverlayInfo .skillName,
#result .resultOverlayInfo .skillText,
#result .resultOverlayInfo .legend,
#result .resultOverlayInfo .weaponName,
#result .resultOverlayInfo .xyValue,
#result .resultOverlayInfo .xyLabel{
  text-shadow:0 2px 10px rgba(0,0,0,.85);
}
#result .resultOverlayInfo .skillText{
  font-size:14px;
  line-height:1.7;
}
#result .resultBottomInfo .chosenHeading{
  margin-bottom:12px;
}
#result .resultBottomInfo .diagnosis{
  font-size:15px;
  line-height:1.9;
}
#result .num,
#result .sharePrefix{display:none!important}
#result .resultFrameOverlay{
  z-index:40 !important;
}
#result .resultVisual,
#result .resultOverlayInfo,
#result .resultBottomInfo,
#result .weaponImg,
#result .resultShade,
#result .fx{
  position:relative;
}
#result .weaponImg,
#result .missingWeapon,
#result .fx,
#result .resultShade,
#result .resultOverlayInfo{
  position:absolute;
}
@media(max-width:640px){
  #result .resultVisual{aspect-ratio:auto; min-height:60svh;}
  #result .resultOverlayInfo{padding:110px 26px 20px;}
  #result .resultBottomInfo{padding:20px 26px 44px; min-height:36%;}
  #result .resultOverlayInfo .weaponName{font-size:clamp(26px,8.2vw,40px)}
  #result .resultOverlayInfo .legend{font-size:clamp(15px,4.2vw,19px)}
  #result .resultOverlayInfo .skillName{font-size:clamp(15px,4.2vw,19px)}
  #result .resultOverlayInfo .skillText{font-size:12.5px; line-height:1.65;}
  #result .resultBottomInfo .diagnosis{font-size:13px; line-height:1.82;}
}


/* === FINAL CARD V4: weapon visual-size normalization / title clipping fix / XY removed === */
#result .weaponImg{
  transform:scale(var(--weapon-scale,1)) !important;
  transform-origin:center center !important;
}
#result .resultOverlayInfo{
  box-sizing:border-box;
  padding-left:clamp(34px,7vw,58px);
  padding-right:clamp(34px,7vw,58px);
}
#result .resultOverlayInfo .weaponName{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:0 4px;
  font-size:clamp(25px,5.1vw,46px);
  line-height:1.18;
  letter-spacing:.025em;
  overflow-wrap:anywhere;
  word-break:keep-all;
  text-wrap:balance;
}
#result .xyRow,
#result .xyLabel,
#result .xyValue{
  display:none !important;
}
@media(max-width:640px){
  #result .resultOverlayInfo{
    padding-left:34px;
    padding-right:34px;
  }
  #result .resultOverlayInfo .weaponName{
    font-size:clamp(24px,7.2vw,36px);
    line-height:1.2;
    letter-spacing:.015em;
  }
}


/* === FINAL CARD V5: 7:3 layout / scale reset / lower text / description-only black area === */
#result .finalWeaponCard{
  display:grid !important;
  grid-template-rows:70% 30% !important;
  height:min(92svh,1050px) !important;
  min-height:0 !important;
  overflow:hidden !important;
}
#result .resultVisual{
  grid-row:1 !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  aspect-ratio:auto !important;
  overflow:hidden !important;
  position:relative !important;
}
#result .weaponImg{
  transform:none !important;
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
}
#result .resultOverlayInfo{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:auto !important;
  bottom:0 !important;
  z-index:14 !important;
  padding:170px 46px 16px !important;
  background:linear-gradient(to top,rgba(0,0,0,.84) 0%,rgba(0,0,0,.55) 32%,rgba(0,0,0,.16) 65%,rgba(0,0,0,0) 100%) !important;
}
#result .resultOverlayInfo .weaponName{
  margin:0 0 2px !important;
  font-size:clamp(24px,4.8vw,42px) !important;
  line-height:1.15 !important;
}
#result .resultOverlayInfo .legend{
  margin:0 0 7px !important;
  font-size:clamp(15px,2.8vw,20px) !important;
  line-height:1.35 !important;
}
#result .resultOverlayInfo .resultSection{
  margin-top:8px !important;
}
#result .resultOverlayInfo .sectionLabel{
  margin-bottom:2px !important;
}
#result .resultOverlayInfo .skillName{
  font-size:clamp(15px,2.8vw,20px) !important;
  line-height:1.35 !important;
}
#result .resultOverlayInfo .skillText{
  margin-top:4px !important;
  font-size:13px !important;
  line-height:1.58 !important;
}
#result .resultBottomInfo{
  grid-row:2 !important;
  position:relative !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  z-index:12 !important;
  box-sizing:border-box !important;
  padding:24px 46px 42px !important;
  background:#050403 !important;
  overflow:auto !important;
}
#result .resultBottomInfo .chosenReason{
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}
#result .resultBottomInfo .chosenHeading{
  display:none !important;
}
#result .resultBottomInfo .diagnosis{
  margin:0 !important;
  font-size:15px !important;
  line-height:1.9 !important;
  color:#fffaf0 !important;
}
#result .resultFrameOverlay{
  z-index:40 !important;
}
@media(max-width:640px){
  #result .finalWeaponCard{
    height:96svh !important;
    grid-template-rows:70% 30% !important;
  }
  #result .resultOverlayInfo{
    padding:150px 34px 14px !important;
  }
  #result .resultOverlayInfo .weaponName{
    font-size:clamp(23px,6.8vw,34px) !important;
  }
  #result .resultOverlayInfo .legend{
    font-size:14px !important;
  }
  #result .resultOverlayInfo .skillName{
    font-size:14px !important;
  }
  #result .resultOverlayInfo .skillText{
    font-size:11.5px !important;
    line-height:1.5 !important;
  }
  #result .resultBottomInfo{
    padding:20px 34px 36px !important;
  }
  #result .resultBottomInfo .diagnosis{
    font-size:12.8px !important;
    line-height:1.78 !important;
  }
}


/* === FINAL CARD V6: edge-to-edge weapon / fixed black text / remove oval glow === */

/* No individual weapon magnification. */
#result .weaponImg{
  transform:none !important;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center center !important;
  background:#020202 !important;
}

/* Remove the central oval-shaped glow only; keep other particles/effects. */
#result .fx::before,
#result .fx::after{
  display:none !important;
  content:none !important;
  animation:none !important;
}

/* Bottom 30% stays fixed inside the card; no inner swipe/scroll required. */
#result .resultBottomInfo{
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:14px 38px 20px !important;
}
#result .resultBottomInfo .chosenReason{
  width:100% !important;
}
#result .resultBottomInfo .diagnosis{
  width:100% !important;
  margin:0 !important;
  font-size:clamp(11px,1.65vw,14px) !important;
  line-height:1.62 !important;
  overflow:visible !important;
}

/* Keep result text lower over the weapon image. */
#result .resultOverlayInfo{
  bottom:0 !important;
  padding:190px 42px 10px !important;
}

@media(max-width:640px){
  #result .weaponImg{
    object-fit:cover !important;
  }
  #result .resultOverlayInfo{
    padding:175px 30px 9px !important;
  }
  #result .resultBottomInfo{
    padding:10px 28px 15px !important;
  }
  #result .resultBottomInfo .diagnosis{
    font-size:clamp(10.5px,3.05vw,12.4px) !important;
    line-height:1.58 !important;
  }
}


/* === FINAL CARD V7: strict frame containment + readings === */

/* The entire card is the hard clipping boundary. Nothing can escape the frame. */
#result .finalWeaponCard{
  position:relative !important;
  overflow:hidden !important;
  isolation:isolate !important;
}

/* Keep all actual card content inside the ornamental frame's inner edge. */
#result .resultVisual,
#result .resultBottomInfo{
  width:calc(100% - 30px) !important;
  margin-left:15px !important;
  margin-right:15px !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}

/* Weapon image stays entirely inside the framed visual area. */
#result .resultVisual{
  border-radius:10px 10px 0 0 !important;
}
#result .weaponImg,
#result .missingWeapon,
#result .fx,
#result .resultShade{
  left:0 !important;
  right:0 !important;
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
#result .weaponImg{
  transform:none !important;
  object-fit:cover !important;
  object-position:center center !important;
}

/* The ornamental frame is always the highest layer. */
#result .resultFrameOverlay{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  z-index:60 !important;
  pointer-events:none !important;
}

/* Weapon name: larger, but allowed to wrap so it never clips. */
#result .resultOverlayInfo{
  left:0 !important;
  right:0 !important;
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  padding-left:28px !important;
  padding-right:28px !important;
}
#result .weaponName{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  font-size:clamp(34px,6.4vw,60px) !important;
  line-height:1.05 !important;
  letter-spacing:.015em !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
  text-align:left !important;
}

/* Hiragana reading immediately under the weapon name. */
#result .weaponReading{
  margin:4px 0 6px !important;
  color:#f3dfad !important;
  font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif !important;
  font-size:clamp(12px,2vw,17px) !important;
  line-height:1.2 !important;
  letter-spacing:.12em !important;
  text-shadow:0 2px 8px rgba(0,0,0,.9) !important;
}

/* Alias stays under the reading. */
#result .legend{
  margin:0 0 9px !important;
}

/* Familiar effect name slightly larger. */
#result .skillName{
  font-size:clamp(20px,3.8vw,28px) !important;
  line-height:1.28 !important;
  margin:0 !important;
  overflow-wrap:anywhere !important;
}

/* Familiar effect ruby below its Japanese name. */
#result .skillRuby{
  margin:3px 0 7px !important;
  color:#ddc487 !important;
  font-family:Georgia,"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif !important;
  font-size:clamp(11px,1.8vw,15px) !important;
  line-height:1.2 !important;
  letter-spacing:.08em !important;
  text-shadow:0 2px 8px rgba(0,0,0,.85) !important;
}

/* Make sure text itself also never crosses the inner frame. */
#result .resultOverlayInfo,
#result .resultBottomInfo{
  overflow:hidden !important;
}

@media(max-width:640px){
  #result .resultVisual,
  #result .resultBottomInfo{
    width:calc(100% - 24px) !important;
    margin-left:12px !important;
    margin-right:12px !important;
  }
  #result .resultOverlayInfo{
    padding-left:24px !important;
    padding-right:24px !important;
  }
  #result .weaponName{
    font-size:clamp(31px,9vw,48px) !important;
    line-height:1.06 !important;
  }
  #result .weaponReading{
    font-size:clamp(11px,3.1vw,14px) !important;
  }
  #result .skillName{
    font-size:clamp(18px,5vw,23px) !important;
  }
  #result .skillRuby{
    font-size:clamp(10px,2.8vw,13px) !important;
  }
}


/* === FINAL CARD V8: weapon slightly lower + outer-edge black fade === */

/* Keep ornamental frame completely fixed. */
#result .resultFrameOverlay{
  inset:0 !important;
  transform:none !important;
}

/* Move only the weapon image slightly downward. No scale change. */
#result .weaponImg{
  transform:translateY(2.2%) !important;
  transform-origin:center center !important;
}

/* Add a soft black veil around the outer edge of the weapon visual.
   This hides the hard rectangular boundary and blends it into the black card area. */
#result .resultVisual::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:7;
  pointer-events:none;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,.24) 0%,
      rgba(0,0,0,0) 10%,
      rgba(0,0,0,0) 76%,
      rgba(0,0,0,.22) 88%,
      rgba(0,0,0,.72) 100%),
    linear-gradient(to right,
      rgba(0,0,0,.58) 0%,
      rgba(0,0,0,.12) 5%,
      rgba(0,0,0,0) 11%,
      rgba(0,0,0,0) 89%,
      rgba(0,0,0,.12) 95%,
      rgba(0,0,0,.58) 100%);
  box-shadow:
    inset 0 0 28px rgba(0,0,0,.62),
    inset 0 -38px 52px rgba(0,0,0,.72);
}

/* Slight blur only at the outermost boundary, not across the weapon itself. */
#result .resultVisual{
  background:#020202 !important;
}
#result .resultVisual::before{
  opacity:.5 !important;
  filter:blur(22px) brightness(.38) !important;
}

/* Ensure text stays above the blending veil, while frame stays highest. */
#result .resultOverlayInfo{
  z-index:14 !important;
}
#result .resultFrameOverlay{
  z-index:60 !important;
}

@media(max-width:640px){
  #result .weaponImg{
    transform:translateY(2.5%) !important;
  }
  #result .resultVisual::after{
    background:
      linear-gradient(to bottom,
        rgba(0,0,0,.22) 0%,
        rgba(0,0,0,0) 9%,
        rgba(0,0,0,0) 74%,
        rgba(0,0,0,.26) 87%,
        rgba(0,0,0,.76) 100%),
      linear-gradient(to right,
        rgba(0,0,0,.52) 0%,
        rgba(0,0,0,.10) 5%,
        rgba(0,0,0,0) 10%,
        rgba(0,0,0,0) 90%,
        rgba(0,0,0,.10) 95%,
        rgba(0,0,0,.52) 100%);
  }
}


/* === V9: replace result frame / do not shrink weapon image === */
#result .resultFrameOverlay{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  object-fit:fill !important;
  z-index:80 !important;
  pointer-events:none !important;
}
#result .resultCard,
#result .finalWeaponCard{
  overflow:hidden !important;
}
#result .weaponImg{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:center center !important;
  transform:none !important;
}
@media(max-width:640px){
  #result .weaponImg{
    object-position:center center !important;
  }
}


/* === V10: weapon image uses the full visual area === */

/* Remove the old inner gutter that made the weapon look smaller. */
#result .resultVisual{
  width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
  max-width:none !important;
  overflow:hidden !important;
}

/* Weapon image fills the entire 70% visual area. */
#result .weaponImg{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  min-width:100% !important;
  min-height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:center center !important;
  transform:none !important;
  margin:0 !important;
  padding:0 !important;
}

/* Frame remains fixed above the full-size weapon image. */
#result .resultFrameOverlay{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  z-index:80 !important;
  transform:none !important;
  pointer-events:none !important;
}

/* Do not reintroduce the mobile inner gutter. */
@media(max-width:640px){
  #result .resultVisual{
    width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
  #result .weaponImg{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    object-position:center center !important;
  }
}


/* === V12: weapon image at native size, no scaling up or down === */
#result .weaponImg{
  position:absolute !important;
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  min-width:0 !important;
  min-height:0 !important;
  object-fit:none !important;
  left:50% !important;
  top:50% !important;
  right:auto !important;
  bottom:auto !important;
  transform:translate(-50%, -50%) !important;
  margin:0 !important;
  padding:0 !important;
}
@media(max-width:640px){
  #result .weaponImg{
    width:auto !important;
    height:auto !important;
    object-fit:none !important;
    left:50% !important;
    top:50% !important;
    transform:translate(-50%, -50%) !important;
  }
}


/* === V13: native-size weapon image may extend into lower black transparent area === */
#result .finalWeaponCard{
  overflow:hidden !important;
  position:relative !important;
}
#result .resultVisual{
  overflow:visible !important;
  position:relative !important;
  z-index:1 !important;
}
#result .weaponImg{
  position:absolute !important;
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:none !important;
  left:50% !important;
  top:58% !important;
  transform:translate(-50%, -50%) !important;
  z-index:3 !important;
}
#result .missingWeapon{
  z-index:4 !important;
}
#result .fx,
#result .resultShade{
  z-index:5 !important;
}
#result .resultBottomInfo{
  position:relative !important;
  z-index:12 !important;
  background:rgba(0,0,0,.20) !important;
}
#result .resultOverlayInfo{
  z-index:14 !important;
}
#result .resultFrameOverlay{
  z-index:80 !important;
}
@media(max-width:640px){
  #result .weaponImg{
    top:60% !important;
    left:50% !important;
    transform:translate(-50%, -50%) !important;
  }
}


/* === V14: 1024px internal card, scale the whole card only === */

/*
  Internal design coordinate system:
  - card: 1024 x 1820
  - weapon source: native pixel size, normally 1024 x 1536
  - weapon image itself is NEVER resized
  - only the completed card is scaled to fit the screen
*/

#result{
  overflow:auto !important;
  align-items:flex-start !important;
  justify-content:center !important;
}

#result .resultCardViewport{
  --card-scale:1;
  position:relative !important;
  width:calc(1024px * var(--card-scale)) !important;
  height:calc(1820px * var(--card-scale)) !important;
  flex:0 0 auto !important;
  margin:18px auto !important;
  overflow:visible !important;
}

#result .resultCard,
#result .finalWeaponCard{
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:1024px !important;
  height:1820px !important;
  max-width:none !important;
  max-height:none !important;
  min-width:1024px !important;
  min-height:1820px !important;
  aspect-ratio:auto !important;
  margin:0 !important;
  border-radius:0 !important;
  overflow:hidden !important;
  transform:scale(var(--card-scale)) !important;
  transform-origin:top left !important;
}

/* Full card background layers also use the 1024 x 1820 design space. */
#result .resultVisual{
  position:absolute !important;
  inset:0 !important;
  width:1024px !important;
  height:1820px !important;
  max-width:none !important;
  max-height:none !important;
  overflow:visible !important;
  margin:0 !important;
}

/* Native weapon image: no width/height fitting, no object-fit scaling. */
#result .weaponImg{
  position:absolute !important;
  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:none !important;
  object-position:initial !important;
  left:50% !important;
  top:0 !important;
  right:auto !important;
  bottom:auto !important;
  transform:translateX(-50%) !important;
  margin:0 !important;
  padding:0 !important;
  z-index:3 !important;
}

/* Lower text area occupies the bottom fifth of the 1820px card. */
#result .resultBottomInfo{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  width:1024px !important;
  height:364px !important;
  box-sizing:border-box !important;
  z-index:12 !important;
}

/* Text/name overlays stay in the same internal 1024px coordinate system. */
#result .resultOverlayInfo{
  z-index:14 !important;
}

/* Adopted frame is stretched only as the frame overlay to the full internal card.
   Weapon image itself remains untouched. */
#result .resultFrameOverlay{
  position:absolute !important;
  inset:0 !important;
  width:1024px !important;
  height:1820px !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:fill !important;
  transform:none !important;
  z-index:80 !important;
  pointer-events:none !important;
}

/* Disable older mobile rules that resized/moved only the weapon image. */
@media(max-width:640px){
  #result .weaponImg{
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:none !important;
    left:50% !important;
    top:0 !important;
    transform:translateX(-50%) !important;
  }
}


/* === V15: move native-size weapon image further down === */
#result .weaponImg{
  top:72px !important;
  left:50% !important;
  transform:translateX(-50%) !important;
}
@media(max-width:640px){
  #result .weaponImg{
    top:92px !important;
    left:50% !important;
    transform:translateX(-50%) !important;
  }
}


/* === V16: slightly thinner frame + hide raw image edges === */
#result .resultCard,
#result .finalWeaponCard,
#result .resultVisual{
  overflow:hidden !important;
}

/* Make the adopted frame look a little thinner by overscanning it slightly. */
#result .resultFrameOverlay{
  width:1044px !important;
  height:1856px !important;
  left:-10px !important;
  top:-18px !important;
  right:auto !important;
  bottom:auto !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:fill !important;
  z-index:80 !important;
}

/* Keep the V15 native-size placement, but hide the hard top/left/right/bottom image edges. */
#result .resultVisual::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:6;
  pointer-events:none;
  background:
    linear-gradient(to right,
      rgba(0,0,0,.92) 0%,
      rgba(0,0,0,.42) 2.2%,
      rgba(0,0,0,0) 5.8%,
      rgba(0,0,0,0) 94.2%,
      rgba(0,0,0,.42) 97.8%,
      rgba(0,0,0,.92) 100%),
    linear-gradient(to bottom,
      rgba(0,0,0,.94) 0%,
      rgba(0,0,0,.36) 2.3%,
      rgba(0,0,0,0) 6.2%,
      rgba(0,0,0,0) 93.0%,
      rgba(0,0,0,.58) 97.0%,
      rgba(0,0,0,.96) 100%);
}

@media(max-width:640px){
  #result .resultFrameOverlay{
    width:1044px !important;
    height:1856px !important;
    left:-10px !important;
    top:-18px !important;
  }
}


/* ============================================================
   HTML/CSS FIXED WEAPON CARD V18
   Approved visual template. Do not vary per weapon.
   Internal card: 1024 x 1820
   Native weapon area: 1024 x 1536
   Info panel: y=1536, h=284
   ============================================================ */

#result {
  overflow:auto !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding:12px !important;
  background:#020202 !important;
}

#result .weaponCardViewport {
  --card-scale:1;
  position:relative !important;
  width:1024px;
  height:1820px;
  margin:0 auto 16px !important;
  flex:0 0 auto !important;
  overflow:visible !important;
}

#result .weaponCardFixed {
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:1024px !important;
  height:1820px !important;
  min-width:1024px !important;
  min-height:1820px !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  border-radius:0 !important;
  background:#000 !important;
  transform:scale(var(--card-scale)) !important;
  transform-origin:top left !important;
}

#result .weaponArtArea {
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:1024px !important;
  height:1536px !important;
  overflow:hidden !important;
  background:#000 !important;
  z-index:1 !important;
}

/* Weapon image: existing source file, exactly once, no CSS scaling. */
#result .weaponArtNative {
  position:absolute !important;
  left:50% !important;
  top:0 !important;
  right:auto !important;
  bottom:auto !important;

  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:none !important;
  max-height:none !important;

  object-fit:none !important;
  object-position:initial !important;
  transform:translateX(-50%) !important;
  margin:0 !important;
  padding:0 !important;
  z-index:2 !important;
}

/* No duplicate background. Only a subtle edge blend inside the art area. */
#result .weaponArtArea::after {
  content:"";
  position:absolute !important;
  inset:0 !important;
  z-index:5 !important;
  pointer-events:none !important;
  background:
    linear-gradient(to right,
      rgba(0,0,0,.88) 0%,
      rgba(0,0,0,.22) 2.2%,
      rgba(0,0,0,0) 5.2%,
      rgba(0,0,0,0) 94.8%,
      rgba(0,0,0,.22) 97.8%,
      rgba(0,0,0,.88) 100%);
}

#result .weaponInfoPanel {
  position:absolute !important;
  left:0 !important;
  top:1536px !important;
  width:1024px !important;
  height:284px !important;
  box-sizing:border-box !important;
  background:#000 !important;
  z-index:8 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:28px 86px 38px !important;
}

#result .weaponInfoPanel .chosenReason {
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}

#result .weaponInfoPanel .diagnosis {
  color:#f6f0df !important;
  font-size:25px !important;
  line-height:1.62 !important;
  letter-spacing:.03em !important;
  text-align:left !important;
  text-shadow:0 2px 10px #000 !important;
}

/* Gold separator between art and information area. */
#result .goldDivider {
  position:absolute !important;
  left:40px !important;
  top:1534px !important;
  width:944px !important;
  height:2px !important;
  z-index:70 !important;
  pointer-events:none !important;
  background:linear-gradient(
    90deg,
    rgba(222,150,26,0),
    rgba(255,211,82,.95) 8%,
    rgba(255,232,135,1) 50%,
    rgba(255,211,82,.95) 92%,
    rgba(222,150,26,0)
  ) !important;
  box-shadow:0 0 5px rgba(255,190,50,.45) !important;
}

/* Existing result text over weapon art. */
#result .weaponTextOverlay {
  position:absolute !important;
  inset:0 !important;
  z-index:16 !important;
  box-sizing:border-box !important;
  padding:126px 80px 40px !important;
  pointer-events:none !important;
}

#result .weaponTextOverlay .weaponName {
  font-size:54px !important;
}
#result .weaponTextOverlay .weaponReading {
  font-size:21px !important;
}
#result .weaponTextOverlay .legend {
  font-size:27px !important;
}
#result .weaponTextOverlay .skillName {
  font-size:28px !important;
}
#result .weaponTextOverlay .skillRuby {
  font-size:18px !important;
}
#result .weaponTextOverlay .skillText {
  max-width:760px !important;
  font-size:20px !important;
  line-height:1.6 !important;
}

/* One permanent transparent frame overlay for every weapon. */
#result .fixedFrameV18 {
  position:absolute !important;
  inset:0 !important;
  width:1024px !important;
  height:1820px !important;
  min-width:1024px !important;
  min-height:1820px !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:fill !important;
  transform:none !important;
  z-index:100 !important;
  pointer-events:none !important;
}

#result .resultFooter {
  width:100% !important;
  flex:0 0 auto !important;
  text-align:center !important;
  padding-bottom:30px !important;
}

/* Kill older per-device weapon scaling/movement rules. */
@media(max-width:640px) {
  #result .weaponArtNative {
    left:50% !important;
    top:0 !important;
    width:auto !important;
    height:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:none !important;
    transform:translateX(-50%) !important;
  }
}


/* === V19: remove top gap completely === */

/* Artwork begins exactly at the card's top edge. */
#result .weaponArtArea{
  top:0 !important;
  height:1536px !important;
  background:#000 !important;
}

/* Existing weapon PNG starts at y=0, native size, unchanged. */
#result .weaponArtNative{
  top:0 !important;
  bottom:auto !important;
  left:50% !important;
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:none !important;
  transform:translateX(-50%) !important;
}

/* Do not darken the top edge. Previous vertical fade removed. */
#result .weaponArtArea::after{
  background:
    linear-gradient(to right,
      rgba(0,0,0,.86) 0%,
      rgba(0,0,0,.18) 2.0%,
      rgba(0,0,0,0) 4.8%,
      rgba(0,0,0,0) 95.2%,
      rgba(0,0,0,.18) 98.0%,
      rgba(0,0,0,.86) 100%) !important;
}

/* Clean transparent frame layer only. */
#result .fixedFrameV18{
  content:url("images/ui/result_frame_fixed_v20.png?v=20260827-fixed-v20") !important;
  width:1024px !important;
  height:1820px !important;
  object-fit:fill !important;
}

/* Information panel begins directly after the 1536px weapon art. */
#result .weaponInfoPanel{
  top:1536px !important;
  height:284px !important;
}
#result .goldDivider{
  top:1534px !important;
}


/* === V20: enlarge only the lower black information area === */
#result .weaponCardViewport {
  width:1024px !important;
  height:1936px !important;
}

#result .weaponCardFixed {
  width:1024px !important;
  height:1936px !important;
  min-width:1024px !important;
  min-height:1936px !important;
}

/* Weapon area remains exactly 1024 x 1536. */
#result .weaponArtArea {
  width:1024px !important;
  height:1536px !important;
  top:0 !important;
}

/* Weapon remains native size, untouched. */
#result .weaponArtNative {
  top:0 !important;
  left:50% !important;
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:none !important;
  transform:translateX(-50%) !important;
}

/* Larger black panel. */
#result .weaponInfoPanel {
  top:1536px !important;
  width:1024px !important;
  height:400px !important;
  padding:38px 86px 48px !important;
}

/* Divider stays exactly at the bottom of the weapon image. */
#result .goldDivider {
  top:1534px !important;
}

/* Frame stretches to the taller finished card only. */
#result .fixedFrameV18 {
  content:url("images/ui/result_frame_fixed_v20.png?v=20260827-fixed-v20") !important;
  width:1024px !important;
  height:1936px !important;
  min-width:1024px !important;
  min-height:1936px !important;
}


/* === V21 transition fix only ===
   Visual card specification remains identical to locked V20. */


/* === V22: center result card and fill smartphone width === */
#result{
  width:100% !important;
  box-sizing:border-box !important;
  padding:0 !important;
  align-items:center !important;
  justify-content:flex-start !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
}

#result .weaponCardViewport{
  position:relative !important;
  display:block !important;
  margin:0 auto !important;
  flex:0 0 auto !important;
}

#result .weaponCardFixed{
  left:0 !important;
  top:0 !important;
  margin:0 !important;
  transform-origin:top left !important;
}

#result .resultFooter{
  width:100% !important;
  margin:0 auto !important;
  text-align:center !important;
}

@media(max-width:640px){
  #result{
    width:100vw !important;
    min-width:0 !important;
    padding:0 !important;
    margin:0 !important;
    align-items:center !important;
    justify-content:flex-start !important;
    overflow-x:hidden !important;
  }

  #result .weaponCardViewport{
    margin-left:auto !important;
    margin-right:auto !important;
  }
}


/* === V23: weapon name typography only === */
#result .weaponTextOverlay .weaponName{
  font-size:calc(54px + 5pt) !important;
  color:#d9ad3c !important;
  -webkit-text-stroke:1.5px #ffffff !important;
  paint-order:stroke fill !important;
  text-shadow:
    0 2px 3px rgba(0,0,0,.85),
    0 0 5px rgba(255,255,255,.18) !important;
}


/* ============================================================
   V26 PRODUCTION RESULT CARD
   Card: 1024 x 1536
   Weapon PNG: native size, exactly once
   Black panel: translucent, inside weapon image
   ============================================================ */

#result{
  width:100% !important;
  box-sizing:border-box !important;
  padding:0 !important;
  align-items:center !important;
  justify-content:flex-start !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  background:#020202 !important;
}

#result .weaponCardViewport{
  --card-scale:1;
  position:relative !important;
  display:block !important;
  width:1024px;
  height:1536px;
  margin:0 auto !important;
  flex:0 0 auto !important;
  overflow:visible !important;
}

#result .weaponCardFixed{
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:1024px !important;
  height:1536px !important;
  min-width:1024px !important;
  min-height:1536px !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  border-radius:0 !important;
  background:#000 !important;
  transform:scale(var(--card-scale)) !important;
  transform-origin:top left !important;
}

#result .weaponArtArea{
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:1024px !important;
  height:1536px !important;
  overflow:hidden !important;
  background:#000 !important;
  z-index:1 !important;
}

#result .weaponArtNative{
  position:absolute !important;
  left:50% !important;
  top:0 !important;
  right:auto !important;
  bottom:auto !important;
  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:none !important;
  object-position:initial !important;
  transform:translateX(-50%) !important;
  margin:0 !important;
  padding:0 !important;
  z-index:2 !important;
}

#result .weaponArtArea::after{
  content:"";
  position:absolute !important;
  inset:0 !important;
  z-index:5 !important;
  pointer-events:none !important;
  background:
    linear-gradient(to right,
      rgba(0,0,0,.82) 0%,
      rgba(0,0,0,.18) 2.1%,
      rgba(0,0,0,0) 4.8%,
      rgba(0,0,0,0) 95.2%,
      rgba(0,0,0,.18) 97.9%,
      rgba(0,0,0,.82) 100%) !important;
}

#result .weaponTextOverlay{
  position:absolute !important;
  inset:0 !important;
  z-index:16 !important;
  box-sizing:border-box !important;
  padding:620px 78px 0 !important;
  pointer-events:none !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN","Times New Roman",serif !important;
}

#result .weaponTextOverlay .weaponName{
  margin:0 !important;
  font-size:69px !important;
  line-height:1.15 !important;
  letter-spacing:.02em !important;
  color:#e0b543 !important;
  -webkit-text-stroke:2px #fff !important;
  paint-order:stroke fill !important;
  text-shadow:0 3px 8px rgba(0,0,0,.82) !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
  font-weight:700 !important;
}

#result .weaponTextOverlay .weaponReading{
  margin-top:22px !important;
  font-size:22px !important;
  line-height:1.25 !important;
  color:#f6f1e5 !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
}

#result .weaponTextOverlay .legend{
  margin-top:12px !important;
  font-size:29px !important;
  line-height:1.3 !important;
  color:#f6f1e5 !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
}

#result .weaponTextOverlay .skillBlock{
  margin-top:66px !important;
  padding:0 !important;
  border:0 !important;
}

#result .weaponTextOverlay .sectionLabel{
  font-size:19px !important;
  color:#f2da8f !important;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif !important;
}

#result .weaponTextOverlay .skillName{
  margin-top:10px !important;
  font-size:31px !important;
  line-height:1.25 !important;
  color:#f2da8f !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
}

#result .weaponTextOverlay .skillRuby{
  margin-top:5px !important;
  font-size:17px !important;
  color:#f6f1e5 !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
}

#result .weaponTextOverlay .skillText{
  margin-top:8px !important;
  max-width:825px !important;
  font-size:21px !important;
  line-height:1.45 !important;
  color:#f6f1e5 !important;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif !important;
}

#result .weaponInfoPanel{
  position:absolute !important;
  left:0 !important;
  top:1176px !important;
  width:1024px !important;
  height:360px !important;
  box-sizing:border-box !important;
  background:rgba(0,0,0,.57) !important;
  z-index:20 !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding:43px 82px 26px !important;
  border:0 !important;
}

#result .weaponInfoPanel .chosenReason{
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:none !important;
}

#result .weaponInfoPanel .diagnosis{
  margin:0 !important;
  padding:0 !important;
  font-size:23px !important;
  line-height:1.48 !important;
  letter-spacing:.025em !important;
  color:#f6f1e5 !important;
  text-align:left !important;
  text-shadow:0 2px 6px rgba(0,0,0,.88) !important;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif !important;
}

#result .goldDivider{
  position:absolute !important;
  left:48px !important;
  top:1176px !important;
  width:928px !important;
  height:2px !important;
  z-index:70 !important;
  background:#ecb942 !important;
  box-shadow:0 0 4px rgba(236,185,66,.5) !important;
}

#result .fixedFrameV18{
  position:absolute !important;
  inset:0 !important;
  width:1024px !important;
  height:1536px !important;
  min-width:1024px !important;
  min-height:1536px !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:fill !important;
  transform:none !important;
  z-index:100 !important;
  pointer-events:none !important;
}

@media(max-width:640px){
  #result{
    width:100vw !important;
    padding:0 !important;
    margin:0 !important;
    align-items:center !important;
    overflow-x:hidden !important;
  }
  #result .weaponCardViewport{
    margin-left:auto !important;
    margin-right:auto !important;
  }
  #result .weaponArtNative{
    left:50% !important;
    top:0 !important;
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:none !important;
    transform:translateX(-50%) !important;
  }
}

#result .resultFooter{
  width:100% !important;
  text-align:center !important;
  margin:0 auto !important;
  padding:16px 0 30px !important;
}


/* === V28: only create a gap below the header === */
#result{
  padding-top: 0 !important;
}

#result .weaponCardViewport{
  margin-top: 56px !important;   /* about 1–2 cm visual gap */
}

@media (max-width: 640px){
  #result{
    padding-top: 0 !important;
  }

  #result .weaponCardViewport{
    margin-top: 56px !important;
  }
}


/* ============================================================
   V28 TYPOGRAPHY ONLY
   Reference: approved No.15 black + gold lettering
   Changes ONLY:
   - text color / outline treatment
   - font family / weight
   - font size
   No image/frame/layout/spacing/card geometry changes.
   ============================================================ */

#result .weaponTextOverlay,
#result .weaponInfoPanel{
  font-family:
    "Yu Mincho",
    "YuMincho",
    "Hiragino Mincho ProN",
    "Hiragino Mincho Pro",
    "Noto Serif JP",
    "Noto Serif CJK JP",
    serif !important;
}

/* Common black fill + gold edge used across the result card. */
#result .weaponTextOverlay .weaponName,
#result .weaponTextOverlay .weaponReading,
#result .weaponTextOverlay .legend,
#result .weaponTextOverlay .sectionLabel,
#result .weaponTextOverlay .skillName,
#result .weaponTextOverlay .skillRuby,
#result .weaponTextOverlay .skillText,
#result .weaponInfoPanel .diagnosis{
  color:#11100d !important;
  font-family:
    "Yu Mincho",
    "YuMincho",
    "Hiragino Mincho ProN",
    "Hiragino Mincho Pro",
    "Noto Serif JP",
    "Noto Serif CJK JP",
    serif !important;
  font-weight:700 !important;
  -webkit-text-stroke:1.2px #d6a83d !important;
  paint-order:stroke fill !important;
  text-shadow:
    0 1px 0 rgba(255,244,203,.50),
    0 2px 3px rgba(0,0,0,.65) !important;
}

/* Sizes matched to the approved No.15 visual hierarchy. */
#result .weaponTextOverlay .weaponName{
  font-size:72px !important;
}

#result .weaponTextOverlay .weaponReading{
  font-size:27px !important;
}

#result .weaponTextOverlay .legend{
  font-size:36px !important;
}

#result .weaponTextOverlay .sectionLabel{
  font-size:27px !important;
}

#result .weaponTextOverlay .skillName{
  font-size:39px !important;
}

#result .weaponTextOverlay .skillRuby{
  font-size:26px !important;
}

#result .weaponTextOverlay .skillText{
  font-size:27px !important;
}

#result .weaponInfoPanel .diagnosis{
  font-size:28px !important;
}

/* ============================================================
   V28 TYPOGRAPHY PATCH
   Adopted style: gold lettering + soft black shadow/blur
   (no gold outline / no stroke)
   ============================================================ */
#result .weaponTextOverlay .weaponName,
#result .weaponTextOverlay .weaponReading,
#result .weaponTextOverlay .legend,
#result .weaponTextOverlay .sectionLabel,
#result .weaponTextOverlay .skillName,
#result .weaponTextOverlay .skillRuby,
#result .weaponTextOverlay .skillText,
#result .weaponInfoPanel .diagnosis{
  color:#e7c165 !important;
  -webkit-text-stroke:0 !important;
  paint-order:normal !important;
  text-shadow:
    0 1px 0 rgba(255,245,220,.18),
    0 2px 5px rgba(0,0,0,.92),
    0 0 10px rgba(0,0,0,.35) !important;
}

/* V28 stronger gold-shadow text patch */
#result .weaponTextOverlay .weaponName,
#result .weaponTextOverlay .weaponReading,
#result .weaponTextOverlay .legend,
#result .weaponTextOverlay .sectionLabel,
#result .weaponTextOverlay .skillName,
#result .weaponTextOverlay .skillRuby,
#result .weaponTextOverlay .skillText,
#result .weaponInfoPanel .diagnosis{
  text-shadow:
    0 1px 0 rgba(255,245,220,.22),
    0 2px 4px rgba(0,0,0,.98),
    0 4px 10px rgba(0,0,0,.92),
    0 0 18px rgba(0,0,0,.52),
    0 0 28px rgba(0,0,0,.30) !important;
}


/* ============================================================
   V28 MOBILE FIX + DUAL BLUR TEXT
   - no outline/stroke
   - dark shadow helps on bright weapon art
   - warm gold halo helps on dark weapon art
   - no image/frame/layout geometry changes
   ============================================================ */
html, body{
  width:100% !important;
  max-width:100% !important;
  overflow-x:hidden !important;
  overscroll-behavior-x:none !important;
  touch-action:pan-y !important;
}

#result{
  overflow-x:hidden !important;
  max-width:100vw !important;
}

#result .weaponCardViewport{
  max-width:100vw !important;
}

#result .weaponTextOverlay .weaponName,
#result .weaponTextOverlay .weaponReading,
#result .weaponTextOverlay .legend,
#result .weaponTextOverlay .sectionLabel,
#result .weaponTextOverlay .skillName,
#result .weaponTextOverlay .skillRuby,
#result .weaponTextOverlay .skillText,
#result .weaponInfoPanel .diagnosis{
  -webkit-text-stroke:0 !important;
  paint-order:normal !important;
  text-shadow:
    0 2px 4px rgba(0,0,0,.98),
    0 5px 12px rgba(0,0,0,.90),
    0 0 18px rgba(0,0,0,.48),
    0 0 6px rgba(255,224,142,.72),
    0 0 14px rgba(225,181,77,.52),
    0 0 26px rgba(225,181,77,.34) !important;
}


/* ============================================================
   V28 dark weapon text boost
   Apply the stronger readability fix only to darker weapon art.
   Target numbers: 05,07,08,09,10,12,14,15,19,20,24,27,29,30,32,33,34,42,46,47,48,49,50
   ============================================================ */
#result.darkWeaponTextBoost .weaponTextOverlay .weaponName,
#result.darkWeaponTextBoost .weaponTextOverlay .weaponReading,
#result.darkWeaponTextBoost .weaponTextOverlay .legend,
#result.darkWeaponTextBoost .weaponTextOverlay .sectionLabel,
#result.darkWeaponTextBoost .weaponTextOverlay .skillName,
#result.darkWeaponTextBoost .weaponTextOverlay .skillRuby,
#result.darkWeaponTextBoost .weaponTextOverlay .skillText,
#result.darkWeaponTextBoost .weaponInfoPanel .diagnosis{
  color:#efcb72 !important;
  -webkit-text-stroke:0 !important;
  paint-order:normal !important;
  text-shadow:
    0 1px 0 rgba(255,249,232,.22),
    0 2px 4px rgba(0,0,0,.96),
    0 5px 12px rgba(0,0,0,.88),
    0 0 10px rgba(255,226,150,.90),
    0 0 20px rgba(236,191,82,.78),
    0 0 34px rgba(236,191,82,.58),
    0 0 50px rgba(236,191,82,.32) !important;
}

/* ============================================================
   FIXED POSITION: weapon name + reading only
   Approved position: slightly below the top edge of the weapon card.
   All other result-card elements remain in their existing positions.
   ============================================================ */
#result .weaponTextOverlay .weaponName{
  position:absolute !important;
  top:155px !important;
  left:78px !important;
  right:78px !important;
  margin:0 !important;
}

#result .weaponTextOverlay .weaponReading{
  position:absolute !important;
  top:242px !important;
  left:80px !important;
  right:78px !important;
  margin:0 !important;
}


/* ============================================================
   PATCH 2: 二つ名の色を確実に黒字＋白縁取りへ固定
   ============================================================ */
#result .weaponTextOverlay .legend,
#result #rlegend{
  position:absolute !important;
  top:300px !important;
  left:80px !important;
  right:78px !important;
  margin:0 !important;
  font-size:44px !important;
  line-height:1.18 !important;
  color:#0a0a0a !important;
  -webkit-text-fill-color:#0a0a0a !important;
  -webkit-text-stroke:2.2px #ffffff !important;
  paint-order:stroke fill !important;
  text-shadow:
    0 1px 2px rgba(255,255,255,.25),
    0 2px 5px rgba(0,0,0,.18) !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
  font-weight:700 !important;
}

/* ============================================================
   FINAL TEXT ADJUSTMENTS
   - Epithet: lower position + leading diamond only
   - Personality: +1pt
   ============================================================ */

#result .weaponTextOverlay .legend,
#result #rlegend{
  position:absolute !important;
  top:362px !important;
  left:80px !important;
  right:78px !important;
  margin:0 !important;
  font-size:44px !important;
  line-height:1.18 !important;
  color:#111111 !important;
  -webkit-text-fill-color:#111111 !important;
  -webkit-text-stroke:0 !important;
  paint-order:fill !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.95),
    0 0 10px rgba(255,255,255,.82),
    0 0 18px rgba(255,255,255,.65),
    0 2px 4px rgba(255,255,255,.45),
    0 2px 6px rgba(0,0,0,.18) !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
  font-weight:700 !important;
}

#result #rlegend::before{
  content:"◇ ";
  color:#111111 !important;
  -webkit-text-fill-color:#111111 !important;
  -webkit-text-stroke:0 !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.95),
    0 0 10px rgba(255,255,255,.82),
    0 0 18px rgba(255,255,255,.65),
    0 2px 4px rgba(255,255,255,.45),
    0 2px 6px rgba(0,0,0,.18) !important;
}


/* 人物説明：現状より1ptアップ */
#result .weaponInfoPanel .diagnosis{
  font-size:calc(28px + 2pt) !important;
}


/* Result footer buttons */
#result .resultFooter{
  width:100% !important;
  display:flex !important;
  justify-content:center !important;
  gap:16px !important;
  padding:18px 20px 34px !important;
  box-sizing:border-box !important;
  flex-wrap:wrap !important;
}
#result .resultFooter .resultBtn{
  min-width:170px !important;
  padding:14px 22px !important;
  border-radius:999px !important;
  border:1px solid rgba(212,176,96,.65) !important;
  background:linear-gradient(180deg, rgba(38,30,17,.94), rgba(12,10,7,.96)) !important;
  color:#f3e3b6 !important;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif !important;
  font-weight:700 !important;
  font-size:18px !important;
  letter-spacing:.08em !important;
  box-shadow:0 6px 20px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,235,180,.12) !important;
}
#result .resultFooter .resultBtn:active{transform:translateY(1px)}
#result .resultFooter .shareBtn{
  background:linear-gradient(180deg, rgba(49,37,18,.96), rgba(18,13,7,.98)) !important;
}
@media(max-width:640px){
  #result .resultFooter{gap:10px !important; padding:14px 16px 26px !important;}
  #result .resultFooter .resultBtn{min-width:148px !important; font-size:16px !important; padding:12px 18px !important;}
}


/* ============================================================
   2026-08-30 additional requested adjustments
   - footer buttons immediately below card, horizontal
   - skill/effect text gets white soft shadow
   - legend wrapped with em dash markers instead of diamond
   ============================================================ */
#result .resultFooter{
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:center !important;
  align-items:center !important;
  gap:14px !important;
  width:min(100%, 460px) !important;
  margin:10px auto 0 !important;
  padding:8px 14px 18px !important;
  min-height:0 !important;
}
#result .resultFooter .resultBtn{
  flex:1 1 0 !important;
  min-width:0 !important;
  width:48% !important;
  white-space:nowrap !important;
}
@media (max-width:640px){
  #result .resultFooter{
    width:min(100%, 430px) !important;
    gap:10px !important;
    padding:8px 12px 18px !important;
  }
  #result .resultFooter .resultBtn{
    width:calc(50% - 5px) !important;
    min-width:0 !important;
    padding:12px 8px !important;
    font-size:15px !important;
  }
}

#result #rlegend::before{
  content:"― " !important;
}
#result #rlegend::after{
  content:" ―" !important;
  color:#111111 !important;
  -webkit-text-fill-color:#111111 !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.95),
    0 0 10px rgba(255,255,255,.82),
    0 0 18px rgba(255,255,255,.65),
    0 2px 4px rgba(255,255,255,.45),
    0 2px 6px rgba(0,0,0,.18) !important;
}

#result .weaponTextOverlay .sectionLabel,
#result .weaponTextOverlay .skillName,
#result .weaponTextOverlay .skillRuby,
#result .weaponTextOverlay .skillText{
  text-shadow:
    0 0 4px rgba(255,255,255,.96),
    0 0 10px rgba(255,255,255,.82),
    0 2px 5px rgba(255,255,255,.5),
    0 2px 6px rgba(0,0,0,.16) !important;
}

/* ============================================================
   FINAL SKILL TEXT COLOR PATCH
   眷属効果 / 眷属効果名 / 眷属効果ルビ / 眷属説明
   -> black text + white soft shadow
   ============================================================ */
#result .weaponTextOverlay .sectionLabel,
#result .weaponTextOverlay .skillName,
#result .weaponTextOverlay .skillRuby,
#result .weaponTextOverlay .skillText{
  color:#111111 !important;
  -webkit-text-fill-color:#111111 !important;
  -webkit-text-stroke:0 !important;
  paint-order:fill !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.98),
    0 0 10px rgba(255,255,255,.88),
    0 0 18px rgba(255,255,255,.68),
    0 2px 4px rgba(255,255,255,.48),
    0 2px 6px rgba(0,0,0,.16) !important;
}

/* ============================================================
   V30 FINAL RESULT LAYOUT — 2026-09-02
   Confirmed changes applied to all 50 relics:
   - existing weapon PNGs remain untouched
   - remove epithet
   - remove familiar-effect description
   - remove lower black personality panel / black blur
   - move personality copy into the former effect-description zone
   - weapon name large at upper center
   - weapon name: divine gold + dark depth + soft white halo
   - reading directly below, larger and clearly visible
   - familiar effect label/name/ruby retained
   - white mist only for readability
   ============================================================ */

/* Keep the existing source weapon PNG at its native centered position. */
#result .weaponArtNative{
  left:50% !important;
  top:0 !important;
  transform:translateX(-50%) !important;
  width:auto !important;
  height:auto !important;
  object-fit:none !important;
}

/* The card is artwork-only again: no black lower panel or divider. */
#result .weaponInfoPanel,
#result .goldDivider,
#result .legend,
#result #rlegend,
#result .skillText,
#result #rskilltext{
  display:none !important;
}

/* Remove previous dark edge/black readability layers. */
#result .weaponArtArea::after{
  background:none !important;
}

#result .weaponTextOverlay{
  position:absolute !important;
  inset:0 !important;
  z-index:20 !important;
  padding:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
  font-family:"Yu Mincho","Hiragino Mincho ProN","Noto Serif JP","Noto Serif CJK JP",serif !important;
}

/* Soft WHITE readability mist only. No black panel. */
#result .weaponTextOverlay::before{
  content:"";
  position:absolute !important;
  inset:0 !important;
  z-index:-1 !important;
  pointer-events:none !important;
  background:
    radial-gradient(ellipse 40% 24% at 75% 35%, rgba(255,255,255,.43) 0%, rgba(255,255,255,.24) 42%, rgba(255,255,255,0) 78%),
    radial-gradient(ellipse 68% 29% at 50% 61%, rgba(255,255,255,.49) 0%, rgba(255,255,255,.28) 46%, rgba(255,255,255,0) 82%) !important;
  filter:blur(18px) !important;
}

/* Weapon name: large, upper center, divine gold/black depth + white halo. */
#result .weaponTextOverlay .weaponName,
#result.darkWeaponTextBoost .weaponTextOverlay .weaponName{
  position:absolute !important;
  top:104px !important;
  left:54px !important;
  right:54px !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  text-align:center !important;
  white-space:nowrap !important;
  font-size:var(--weapon-title-size,78px) !important;
  line-height:1.08 !important;
  letter-spacing:.018em !important;
  font-weight:800 !important;
  color:#f0d48f !important;
  -webkit-text-fill-color:#f0d48f !important;
  -webkit-text-stroke:1.4px rgba(47,30,9,.92) !important;
  paint-order:stroke fill !important;
  text-shadow:
    0 2px 3px rgba(0,0,0,.86),
    0 5px 11px rgba(0,0,0,.52),
    0 0 5px rgba(255,255,255,.98),
    0 0 13px rgba(255,255,255,.82),
    0 0 24px rgba(255,255,255,.50),
    0 0 14px rgba(231,188,84,.38) !important;
}

/* Reading: clearly visible and directly under the weapon name. */
#result .weaponTextOverlay .weaponReading,
#result.darkWeaponTextBoost .weaponTextOverlay .weaponReading{
  position:absolute !important;
  top:205px !important;
  left:70px !important;
  right:70px !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  text-align:center !important;
  white-space:nowrap !important;
  font-size:30px !important;
  line-height:1.2 !important;
  letter-spacing:.10em !important;
  font-weight:700 !important;
  color:#f3dfaa !important;
  -webkit-text-fill-color:#f3dfaa !important;
  -webkit-text-stroke:1px rgba(45,29,11,.86) !important;
  paint-order:stroke fill !important;
  text-shadow:
    0 2px 3px rgba(0,0,0,.78),
    0 0 4px rgba(255,255,255,.98),
    0 0 10px rgba(255,255,255,.82),
    0 0 18px rgba(255,255,255,.46) !important;
}

/* Familiar effect remains on the right side. */
#result .weaponTextOverlay .skillBlock{
  position:absolute !important;
  top:394px !important;
  right:66px !important;
  width:446px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  text-align:center !important;
}

#result .weaponTextOverlay .sectionLabel,
#result.darkWeaponTextBoost .weaponTextOverlay .sectionLabel{
  margin:0 0 18px !important;
  padding:0 !important;
  font-size:31px !important;
  line-height:1.2 !important;
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
  -webkit-text-stroke:0 !important;
  font-weight:800 !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.98),
    0 0 10px rgba(255,255,255,.90),
    0 0 18px rgba(255,255,255,.68),
    0 2px 5px rgba(0,0,0,.14) !important;
}

#result .weaponTextOverlay .skillName,
#result.darkWeaponTextBoost .weaponTextOverlay .skillName{
  margin:0 !important;
  padding:0 !important;
  font-size:39px !important;
  line-height:1.22 !important;
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
  -webkit-text-stroke:0 !important;
  font-weight:800 !important;
  overflow-wrap:anywhere !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.98),
    0 0 10px rgba(255,255,255,.90),
    0 0 18px rgba(255,255,255,.68),
    0 2px 5px rgba(0,0,0,.14) !important;
}

#result .weaponTextOverlay .skillRuby,
#result.darkWeaponTextBoost .weaponTextOverlay .skillRuby{
  margin:12px 0 0 !important;
  padding:0 !important;
  font-size:26px !important;
  line-height:1.22 !important;
  letter-spacing:.035em !important;
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
  -webkit-text-stroke:0 !important;
  font-weight:700 !important;
  overflow-wrap:anywhere !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.98),
    0 0 10px rgba(255,255,255,.90),
    0 0 18px rgba(255,255,255,.68),
    0 2px 5px rgba(0,0,0,.14) !important;
}

/* Personality replaces the removed familiar-effect description. */
#result .weaponTextOverlay .diagnosis,
#result.darkWeaponTextBoost .weaponTextOverlay .diagnosis{
  position:absolute !important;
  top:742px !important;
  left:82px !important;
  right:82px !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
  text-align:center !important;
  font-size:34px !important;
  line-height:1.48 !important;
  letter-spacing:.018em !important;
  font-weight:800 !important;
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
  -webkit-text-stroke:0 !important;
  paint-order:fill !important;
  text-shadow:
    0 0 4px rgba(255,255,255,.99),
    0 0 10px rgba(255,255,255,.92),
    0 0 19px rgba(255,255,255,.74),
    0 2px 5px rgba(0,0,0,.14) !important;
}

/* The permanent frame remains above all card content. */
#result .resultFrameOverlay,
#result .fixedFrameV18{
  width:1024px !important;
  height:1536px !important;
  min-width:1024px !important;
  min-height:1536px !important;
  object-fit:fill !important;
  z-index:100 !important;
}


/* ============================================================
   2026-09-03 legal pages + footer links + result button move
   ============================================================ */
html,body{
  padding-bottom:0;
}
body{
  padding-bottom:78px;
}
.siteLegalBar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:9998;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:8px 12px calc(8px + env(safe-area-inset-bottom));
  background:linear-gradient(to top, rgba(4,3,2,.97), rgba(4,3,2,.84));
  border-top:1px solid rgba(208,173,96,.30);
  backdrop-filter:blur(8px);
  box-shadow:0 -8px 30px rgba(0,0,0,.24);
}
.siteLegalLinks{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif;
  font-size:13px;
  letter-spacing:.14em;
}
.siteLegalLinks a{
  color:#e8d3a0;
  text-decoration:none;
}
.siteLegalLinks a:hover{
  color:#fff0c5;
}
.siteLegalLinks .sep{
  color:rgba(232,211,160,.56);
}
.siteLegalCopy{
  color:#bca882;
  font-size:11px;
  letter-spacing:.08em;
  text-align:center;
}
#title, #prologue, #name, #quiz, #search{
  padding-bottom:86px;
}
#prologue .skip{
  bottom:86px;
}
#result .resultFooter{
  margin:6px auto 0 !important;
  padding:8px 12px calc(92px + env(safe-area-inset-bottom)) !important;
}
#result .resultFooter .resultBtn{
  width:calc(50% - 7px) !important;
}
@media (max-width:640px){
  body{padding-bottom:86px;}
  .siteLegalBar{
    gap:3px;
    padding:8px 10px calc(10px + env(safe-area-inset-bottom));
  }
  .siteLegalLinks{
    font-size:12px;
    gap:6px;
    letter-spacing:.12em;
  }
  .siteLegalCopy{
    font-size:10px;
  }
  #title, #prologue, #name, #quiz, #search{
    padding-bottom:94px;
  }
  #prologue .skip{
    bottom:94px;
  }
  #result .resultFooter{
    gap:10px !important;
    margin:4px auto 0 !important;
    padding:6px 10px calc(98px + env(safe-area-inset-bottom)) !important;
  }
}


/* ============================================================
   2026-09-03 result-only legal links + compact footer + fixed buttons
   ============================================================ */
body{
  padding-bottom:0 !important;
}
#title,
#prologue,
#name,
#quiz,
#search{
  padding-bottom:0 !important;
}
#prologue .skip{
  bottom:22px !important;
}
#result{
  justify-content:flex-start !important;
  align-items:center !important;
  padding:0 0 0 !important;
  overflow-y:auto !important;
}
#result .weaponCardViewport{
  flex:0 0 auto !important;
}
#result .resultBottomDock{
  position:sticky;
  bottom:0;
  left:0;
  width:100%;
  z-index:80;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  margin-top:0;
  padding:0 0 calc(4px + env(safe-area-inset-bottom));
  background:linear-gradient(to top, rgba(3,2,1,.96), rgba(3,2,1,.88) 36%, rgba(3,2,1,.00) 100%);
  backdrop-filter:blur(8px);
}
#result .resultFooter{
  position:static !important;
  width:min(100%, 460px) !important;
  margin:0 auto !important;
  padding:8px 12px 6px !important;
  min-height:0 !important;
  gap:12px !important;
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:center !important;
  align-items:center !important;
  background:transparent !important;
}
#result .resultFooter .resultBtn{
  flex:1 1 0 !important;
  width:calc(50% - 6px) !important;
  min-width:0 !important;
  white-space:nowrap !important;
}
#result .siteLegalBar{
  position:static !important;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding:2px 10px 6px;
  background:transparent;
  border-top:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}
#result .siteLegalLinks{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex-wrap:wrap;
  font-size:11px;
  letter-spacing:.12em;
}
#result .siteLegalLinks a{
  color:#e8d3a0;
  text-decoration:none;
}
#result .siteLegalLinks .sep{
  color:rgba(232,211,160,.52);
}
#result .siteLegalCopy{
  color:#bca882;
  font-size:10px;
  letter-spacing:.06em;
  text-align:center;
}
@media (max-width:640px){
  #result .resultBottomDock{
    padding-bottom:calc(2px + env(safe-area-inset-bottom));
  }
  #result .resultFooter{
    width:min(100%, 430px) !important;
    gap:10px !important;
    padding:6px 10px 4px !important;
  }
  #result .resultFooter .resultBtn{
    padding:12px 8px !important;
    font-size:15px !important;
  }
  #result .siteLegalBar{
    gap:1px;
    padding:2px 8px 4px;
  }
  #result .siteLegalLinks{
    font-size:10px;
    gap:6px;
    letter-spacing:.10em;
  }
  #result .siteLegalCopy{
    font-size:9px;
  }
}


/* ============================================================
   2026-09-03 buttons anchored directly under weapon card
   - do not stick to viewport bottom while scrolling
   ============================================================ */
#result .resultBottomDock{
  position:static !important;
  bottom:auto !important;
  left:auto !important;
  margin-top:0 !important;
  flex:0 0 auto !important;
  width:100% !important;
  backdrop-filter:none !important;
  background:linear-gradient(to bottom, rgba(3,2,1,.00), rgba(3,2,1,.92) 38%, rgba(3,2,1,.98) 100%) !important;
}
#result .resultFooter{
  position:static !important;
  margin:0 auto !important;
  padding-top:8px !important;
}


/* ============================================================
   V35 FINAL RESULT POSITION FIX
   - DO NOT shrink the weapon card on mobile
   - remove the old 56px top gap
   - buttons sit immediately under the card
   - legal links only on result screen and kept compact
   ============================================================ */

#result{
  padding:0 !important;
  margin:0 !important;
  justify-content:flex-start !important;
  align-items:center !important;
  overflow-x:hidden !important;
  background:#020202 !important;
}

#result .weaponCardViewport{
  margin-top:0 !important;
  margin-bottom:0 !important;
  flex:0 0 auto !important;
}

#result .resultBottomDock{
  position:static !important;
  width:100% !important;
  flex:0 0 auto !important;
  margin:0 !important;
  padding:0 0 calc(2px + env(safe-area-inset-bottom)) !important;
  background:#020202 !important;
  backdrop-filter:none !important;
}

#result .resultFooter{
  position:static !important;
  width:min(100%,460px) !important;
  min-height:0 !important;
  margin:0 auto !important;
  padding:5px 10px 3px !important;
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  background:#020202 !important;
}

#result .resultFooter .resultBtn{
  flex:1 1 0 !important;
  width:calc(50% - 5px) !important;
  min-width:0 !important;
  padding:10px 8px !important;
  font-size:15px !important;
  line-height:1.15 !important;
  white-space:nowrap !important;
}

#result .siteLegalBar{
  position:static !important;
  width:100% !important;
  margin:0 !important;
  padding:1px 8px 3px !important;
  gap:0 !important;
  background:#020202 !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}

#result .siteLegalLinks{
  font-size:10px !important;
  line-height:1.2 !important;
  gap:5px !important;
  letter-spacing:.09em !important;
}

#result .siteLegalCopy{
  margin-top:1px !important;
  font-size:8px !important;
  line-height:1.1 !important;
}

/* Mobile: preserve the exact V33 card scale (width based only). */
@media (max-width:640px){
  #result{
    width:100vw !important;
    min-height:100svh !important;
    overflow-y:hidden !important;
  }

  #result .weaponCardViewport{
    margin-top:0 !important;
  }

  #result .resultFooter{
    width:min(100%,430px) !important;
    padding:4px 8px 2px !important;
    gap:8px !important;
  }

  #result .resultFooter .resultBtn{
    padding:9px 6px !important;
    font-size:14px !important;
  }

  #result .siteLegalBar{
    padding:1px 6px 2px !important;
  }

  #result .siteLegalLinks{
    font-size:9px !important;
  }

  #result .siteLegalCopy{
    font-size:7px !important;
  }
}


/* ============================================================
   V36 result screen behavior
   - scrolling is allowed
   - buttons stay immediately below the weapon card
   - card size is preserved (mobile uses width-fit only)
   - result legal/footer remains only on result screen
   ============================================================ */
#result{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  align-items:center !important;
  justify-content:flex-start !important;
  padding:0 !important;
  background:#020202 !important;
}

#result .weaponCardViewport{
  margin:0 auto 0 !important;
  flex:0 0 auto !important;
}

#result .resultBottomDock{
  position:static !important;
  width:100% !important;
  margin:0 !important;
  padding:0 0 calc(20px + env(safe-area-inset-bottom)) !important;
  background:#020202 !important;
  flex:0 0 auto !important;
}

#result .resultFooter{
  position:static !important;
  width:min(100%, 460px) !important;
  margin:0 auto !important;
  padding:6px 10px 8px !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  background:#020202 !important;
}

#result .resultFooter .resultBtn{
  flex:1 1 0 !important;
  min-width:0 !important;
  white-space:nowrap !important;
}

#result .siteLegalBar{
  position:static !important;
  width:100% !important;
  margin:0 !important;
  padding:8px 8px 16px !important;
  background:#020202 !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}

#result .siteLegalLinks{
  font-size:10px !important;
  line-height:1.2 !important;
  gap:6px !important;
}

#result .siteLegalCopy{
  margin-top:3px !important;
  font-size:8px !important;
  line-height:1.1 !important;
}

@media (max-width:640px){
  #result{
    min-height:100svh !important;
    overflow-y:auto !important;
  }

  #result .weaponCardViewport{
    margin:0 auto 0 !important;
  }

  #result .resultBottomDock{
    padding:0 0 calc(16px + env(safe-area-inset-bottom)) !important;
  }

  #result .resultFooter{
    width:min(100%, 430px) !important;
    padding:6px 8px 7px !important;
    gap:8px !important;
  }

  #result .resultFooter .resultBtn{
    padding:10px 6px !important;
    font-size:14px !important;
  }

  #result .siteLegalBar{
    padding:6px 6px 14px !important;
  }

  #result .siteLegalLinks{
    font-size:9px !important;
  }

  #result .siteLegalCopy{
    font-size:7px !important;
  }
}


/* ============================================================
   V37 final result layout adjustment
   - restore the previous 56px top gap
   - keep scrolling allowed
   - place Again / Share directly below weapon card (not viewport-bottom feel)
   - switch result screen to simple block flow for predictable placement
   ============================================================ */
#result.screen.on{
  display:block !important;
}
#result{
  padding-top:56px !important;
  padding-bottom:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  background:#020202 !important;
  min-height:100svh !important;
  box-sizing:border-box !important;
}
#result .weaponCardViewport{
  margin:0 auto 0 !important;
  display:block !important;
}
#result .resultBottomDock{
  position:static !important;
  display:block !important;
  width:100% !important;
  margin:0 auto !important;
  padding:0 0 calc(20px + env(safe-area-inset-bottom)) !important;
  background:#020202 !important;
}
#result .resultFooter{
  position:static !important;
  width:min(100%, 460px) !important;
  margin:0 auto !important;
  padding:6px 10px 8px !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  background:#020202 !important;
}
#result .siteLegalBar{
  position:static !important;
  width:min(100%, 460px) !important;
  margin:0 auto !important;
  padding:8px 8px 16px !important;
  background:#020202 !important;
}
@media (max-width:640px){
  #result{
    padding-top:56px !important;
  }
  #result .resultFooter{
    width:min(100%, 430px) !important;
    padding:6px 8px 7px !important;
    gap:8px !important;
  }
  #result .siteLegalBar{
    width:min(100%, 430px) !important;
    padding:6px 6px 14px !important;
  }
}


/* ============================================================
   V38 final requested placement
   - keep 56px top gap
   - keep weapon card/image size unchanged
   - action buttons directly below weapon card
   - legal links/copyright at page bottom
   - scrolling remains allowed
   ============================================================ */
#result.screen.on{
  display:block !important;
  min-height:auto !important;
  height:auto !important;
}
#result{
  padding-top:56px !important;
  padding-bottom:0 !important;
  min-height:auto !important;
  height:auto !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  background:#020202 !important;
}
#result .weaponCardViewport{
  margin:0 auto !important;
  display:block !important;
}
#result .resultFooter{
  position:static !important;
  width:min(100%,460px) !important;
  min-height:0 !important;
  margin:0 auto !important;
  padding:8px 10px 10px !important;
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  background:#020202 !important;
}
#result .resultFooter .resultBtn{
  flex:1 1 0 !important;
  min-width:0 !important;
  white-space:nowrap !important;
}
#result .resultAdSpacer{
  width:100% !important;
  min-height:180px !important;
  background:#020202 !important;
}
#result .siteLegalBar{
  position:static !important;
  width:100% !important;
  margin:0 !important;
  padding:12px 8px calc(18px + env(safe-area-inset-bottom)) !important;
  background:#020202 !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}
#result .siteLegalLinks{
  font-size:10px !important;
  line-height:1.25 !important;
  gap:6px !important;
}
#result .siteLegalCopy{
  margin-top:4px !important;
  font-size:8px !important;
  line-height:1.15 !important;
}
@media(max-width:640px){
  #result{
    padding-top:56px !important;
    min-height:auto !important;
    height:auto !important;
    overflow-y:auto !important;
  }
  #result .resultFooter{
    width:min(100%,430px) !important;
    padding:7px 8px 9px !important;
    gap:8px !important;
  }
  #result .resultFooter .resultBtn{
    padding:10px 6px !important;
    font-size:14px !important;
  }
  #result .resultAdSpacer{
    min-height:150px !important;
  }
  #result .siteLegalBar{
    padding:10px 6px calc(16px + env(safe-area-inset-bottom)) !important;
  }
  #result .siteLegalLinks{
    font-size:9px !important;
  }
  #result .siteLegalCopy{
    font-size:7px !important;
  }
}


/* ============================================================
   V40 precise result-layout fix
   - keep 56px top gap
   - keep weapon card/image size unchanged
   - remove phantom viewport height below card
   - buttons directly below card
   - keep shorter ad/footer scroll space
   ============================================================ */
#result.screen.on{
  display:block !important;
  min-height:auto !important;
  height:auto !important;
}
#result{
  padding-top:56px !important;
  padding-bottom:0 !important;
  min-height:auto !important;
  height:auto !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  background:#020202 !important;
}
#result .weaponCardViewport{
  margin:0 auto !important;
  padding:0 !important;
  display:block !important;
  min-height:0 !important;
  overflow:visible !important;
}
#result .resultFooter{
  position:static !important;
  width:min(100%,460px) !important;
  min-height:0 !important;
  height:auto !important;
  margin:0 auto !important;
  padding:6px 10px 10px !important;
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  background:#020202 !important;
}
#result .resultFooter .resultBtn{
  flex:1 1 0 !important;
  min-width:0 !important;
  margin:0 !important;
  white-space:nowrap !important;
}
#result .resultAdSpacer{
  width:100% !important;
  min-height:90px !important;
  height:90px !important;
  background:#020202 !important;
}
#result .siteLegalBar{
  position:static !important;
  width:100% !important;
  margin:0 !important;
  padding:12px 8px calc(18px + env(safe-area-inset-bottom)) !important;
  background:#020202 !important;
}
@media(max-width:640px){
  #result{padding-top:56px !important;}
  #result .resultFooter{
    width:min(100%,430px) !important;
    padding:6px 8px 9px !important;
    gap:8px !important;
  }
  #result .resultAdSpacer{
    min-height:75px !important;
    height:75px !important;
  }
}


/* V41: Q1-Q16 question text only, 2pt smaller */
#quiz .qtext{
  font-size:calc(clamp(23px,4vw,36px) - 2pt) !important;
}
@media(max-width:640px){
  #quiz .qtext{
    font-size:calc(23px - 2pt) !important;
  }
}


/* V42: Q1-Q16 question text additional 2pt smaller */
#quiz .qtext{
  font-size:calc(clamp(23px,4vw,36px) - 4pt) !important;
}
@media(max-width:640px){
  #quiz .qtext{
    font-size:calc(23px - 4pt) !important;
  }
}


/* ============================================================
   WORKING ADJUSTMENTS 2026-09-04
   Requested only: title text, fixed prologue text position,
   tighter Q-to-question spacing and smartphone one-screen quiz fit.
   ============================================================ */

/* Prologue: every sentence appears at exactly the same position. */
#prologue .proWindow{
  display:block !important;
}
#prologue .proSeq,
#prologue .proSeq[data-proseq="0"],
#prologue .proSeq[data-proseq="1"],
#prologue .proSeq[data-proseq="2"],
#prologue .proSeq[data-proseq="3"],
#prologue .proSeq[data-proseq="4"]{
  top:46% !important;
  bottom:auto !important;
  transform:translateY(-50%) !important;
}
#prologue .proSeq.show,
#prologue .proSeq[data-proseq="4"].show{
  transform:translateY(-50%) !important;
}

/* Quiz: bring Q label closer to question text. */
#quiz .bar{
  margin-bottom:14px !important;
}
#quiz .qtheme{
  margin:0 0 2px !important;
  line-height:1.15 !important;
}
#quiz .qtext{
  margin:3px 0 14px !important;
  line-height:1.42 !important;
}

@media(max-width:640px){
  #quiz{
    padding:8px !important;
    align-items:center !important;
  }
  #quiz .quizPanel{
    width:min(96vw,820px) !important;
    padding:12px 12px 14px !important;
    border-radius:16px !important;
  }
  #quiz .toprow{
    font-size:11px !important;
    line-height:1.2 !important;
  }
  #quiz .bar{
    margin:7px 0 10px !important;
  }
  #quiz .qtheme{
    font-size:16px !important;
    line-height:1.1 !important;
    margin:0 0 1px !important;
  }
  #quiz .qtext{
    margin:2px 0 10px !important;
    line-height:1.32 !important;
  }
  #quiz .answers{
    gap:7px !important;
  }
  #quiz .answer{
    padding:9px 11px !important;
    font-size:13px !important;
    line-height:1.34 !important;
    border-radius:11px !important;
  }
}


/* V49: external-browser gate. Added without changing the game screens. */
#browserGate{
  background:
    radial-gradient(circle at 50% 36%, rgba(217,184,104,.14), transparent 30%),
    linear-gradient(180deg,#090806 0%,#17120b 56%,#070605 100%);
  padding:24px;
  box-sizing:border-box;
}
#browserGate.on{
  display:flex;
  align-items:center;
  justify-content:center;
}
.browserGateBox{
  width:min(88vw,560px);
  padding:38px 28px 32px;
  box-sizing:border-box;
  text-align:center;
  border:1px solid rgba(221,190,117,.6);
  background:rgba(8,7,5,.88);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 18px 60px rgba(0,0,0,.55),
    0 0 42px rgba(208,174,90,.10);
}
.browserGateTitle{
  margin-top:10px;
  font-family:"Yu Mincho","Hiragino Mincho ProN","Noto Serif JP",serif;
  font-size:clamp(26px,6vw,38px);
  font-weight:800;
  letter-spacing:.08em;
  color:#f1dfb0;
  text-shadow:0 0 16px rgba(219,183,89,.22);
}
.browserGateText{
  margin:22px 0 26px;
  font-size:14px;
  line-height:1.9;
  color:#eee7d8;
}
.browserOpenBtn{
  width:min(100%,360px);
}
.browserGateHelp{
  display:none;
  margin-top:20px;
  padding:14px 12px;
  border-top:1px solid rgba(230,201,137,.22);
  color:#eee8dc;
  font-size:13px;
  line-height:1.8;
}
.browserGateHelp.active{ display:block; }
.browserGateCopied{
  display:inline-block;
  margin-top:6px;
  color:#cdbb8a;
  font-size:11px;
}


/* V52: iPhone / iPad は「ブラウザで開く」ボタンを出さず、Safariで開く手順を1回だけ表示 */
.browserGateIos{
  display:none;
}
.browserGateIos.active{
  display:block;
}
.browserGateIos .browserGateText{
  margin:22px 0 10px;
}
.browserGateIosNote{
  margin:0 0 6px;
  color:#cdbb8a;
  font-size:12px;
  line-height:1.7;
}
