/* ============================================================
   ZERAPHIA build1479 — レベルアップ / 限界突破モーダル リッチ化
   キャラ詳細・アイテム・交換所と同じ「生成り×金の二重枠×飾り角」。
   視認性：数字は大きく太く、OK/不足は色＋アイコンで区別、主ボタンはブロンズで一目で分かるように。
   ============================================================ */
#character-levelup-modal,
#limitbreak-modal,
#limitbreak-confirm-modal{
  --g-ink:#2b1e13;
  --g-sub:#6a5a47;
  --g-gold:#b88a3c;
  --g-gold-l:#dcc28c;
  --g-ok:#3e7d47;
  --g-ng:#b2432f;
}

/* ---------- 共通：パネル（二重枠＋飾り角） ---------- */
html body #character-levelup-modal .character-levelup-modal-inner,
html body #limitbreak-modal .modal,
html body #limitbreak-confirm-modal .modal{
  position:relative !important;
  border:1px solid #c6a466 !important;
  border-radius:3px !important;
  background:
    radial-gradient(ellipse 80% 18% at 50% 0%,rgba(255,236,190,.35),rgba(255,236,190,0) 100%),
    linear-gradient(180deg,#fffdf8 0%,#faf5ea 60%,#f5eee0 100%) !important;
  box-shadow:
    inset 0 0 0 4px rgba(255,255,255,.85),
    inset 0 0 0 5px rgba(198,164,102,.5),
    0 22px 60px rgba(48,36,18,.30) !important;
  color:var(--g-ink) !important;
}
html body #character-levelup-modal .character-levelup-modal-inner::before,
html body #limitbreak-modal .modal::before,
html body #limitbreak-confirm-modal .modal::before{
  content:"" !important;position:absolute !important;inset:6px !important;pointer-events:none !important;z-index:0;
  border:0 !important;border-radius:0 !important;box-shadow:none !important;opacity:1 !important;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M1 29V9L9 1h20' fill='none' stroke='%23c19a55' stroke-width='1.3'/%3E%3Cpath d='M6 22V11.5L11.5 6H22' fill='none' stroke='%23dcc28c' stroke-width='.9'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23c19a55'/%3E%3C/svg%3E") left top/22px 22px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M29 29V9L21 1H1' fill='none' stroke='%23c19a55' stroke-width='1.3'/%3E%3Cpath d='M24 22V11.5L18.5 6H8' fill='none' stroke='%23dcc28c' stroke-width='.9'/%3E%3Ccircle cx='21' cy='9' r='1.6' fill='%23c19a55'/%3E%3C/svg%3E") right top/22px 22px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M1 1v20l8 8h20' fill='none' stroke='%23c19a55' stroke-width='1.3'/%3E%3Cpath d='M6 8v10.5L11.5 24H22' fill='none' stroke='%23dcc28c' stroke-width='.9'/%3E%3Ccircle cx='9' cy='21' r='1.6' fill='%23c19a55'/%3E%3C/svg%3E") left bottom/22px 22px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M29 1v20l-8 8H1' fill='none' stroke='%23c19a55' stroke-width='1.3'/%3E%3Cpath d='M24 8v10.5L18.5 24H8' fill='none' stroke='%23dcc28c' stroke-width='.9'/%3E%3Ccircle cx='21' cy='21' r='1.6' fill='%23c19a55'/%3E%3C/svg%3E") right bottom/22px 22px no-repeat !important;
}
html body #character-levelup-modal .character-levelup-modal-inner > *,
html body #limitbreak-modal .modal > *,
html body #limitbreak-confirm-modal .modal > *{position:relative;z-index:1;}

/* 共通ボタン */
html body #character-levelup-modal .character-levelup-execute,
html body #limitbreak-modal .lb-execute-bulk-btn,
html body #limitbreak-confirm-modal #lb-confirm-ok-btn{
  border:1px solid #6e4f22 !important;border-radius:2px !important;
  background:linear-gradient(180deg,#b48d55 0%,#93703c 52%,#7c5c2d 100%) !important;
  box-shadow:inset 0 0 0 1px rgba(255,236,196,.55),inset 0 0 0 3px rgba(122,90,42,.6),inset 0 0 0 4px rgba(244,214,150,.35),0 4px 10px rgba(70,46,14,.28) !important;
  color:#fffaf0 !important;-webkit-text-fill-color:#fffaf0 !important;
  font:700 clamp(14px,4vw,16px)/1 "Noto Serif JP",serif !important;
  letter-spacing:.14em !important;
  text-shadow:0 1px 1px rgba(60,38,10,.6) !important;
  opacity:1 !important;
}
html body #character-levelup-modal .character-levelup-execute:disabled{
  border-color:rgba(176,160,132,.8) !important;
  background:linear-gradient(180deg,#f2eee7,#e3ddd1) !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.6) !important;
  color:#9a907f !important;-webkit-text-fill-color:#9a907f !important;text-shadow:none !important;
}
html body #character-levelup-modal .character-levelup-max-btn,
html body #character-levelup-modal .character-levelup-cancel,
html body #limitbreak-modal .lb-execute-single-btn,
html body #limitbreak-modal .lb-execute-btn:only-child{
  border:1px solid var(--g-gold) !important;border-radius:2px !important;
  background:linear-gradient(180deg,#fffcf3 0%,#f3e5c6 100%) !important;
  box-shadow:inset 0 0 0 2px rgba(255,253,245,.95),inset 0 0 0 3px rgba(184,138,60,.45),0 2px 6px rgba(110,76,24,.14) !important;
  color:#4a3016 !important;-webkit-text-fill-color:#4a3016 !important;
  font:700 clamp(13px,3.7vw,15px)/1 "Noto Serif JP",serif !important;
  letter-spacing:.12em !important;text-shadow:none !important;opacity:1 !important;
}

/* ============================================================
   レベルアップ
   ============================================================ */
html body #character-levelup-modal .character-levelup-modal-inner{
  padding:22px clamp(14px,4vw,18px) 16px !important;
}
html body #character-levelup-modal .modal-close-btn{
  top:10px !important;right:10px !important;
  width:32px !important;height:32px !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  border:1px solid var(--g-gold) !important;border-radius:50% !important;
  background:radial-gradient(circle,#fffdf6 0,#f6ecd6 100%) !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.9),0 2px 5px rgba(80,56,20,.18) !important;
  color:#3a2717 !important;font:300 21px/1 "Noto Serif JP",serif !important;z-index:3 !important;
}
html body #character-levelup-modal .character-levelup-head{text-align:center !important;padding:0 0 12px !important;}
html body #character-levelup-modal .character-levelup-kicker{
  display:flex !important;align-items:center !important;justify-content:center !important;gap:8px !important;
  color:#9a7a42 !important;font:600 8px/1 "Cinzel",serif !important;letter-spacing:.32em !important;
}
html body #character-levelup-modal .character-levelup-kicker::before,
html body #character-levelup-modal .character-levelup-kicker::after,
html body #limitbreak-modal .lb-modal-kicker::before,
html body #limitbreak-modal .lb-modal-kicker::after{
  content:"";width:40px;height:10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0 11.8 8.2 20 10 11.8 11.8 10 20 8.2 11.8 0 10 8.2 8.2Z' fill='%23c19a55'/%3E%3C/svg%3E") var(--s,right) center/9px 9px no-repeat,
    linear-gradient(90deg,var(--a,transparent),var(--b,rgba(193,154,85,.85))) center/calc(100% - 4px) 1px no-repeat;
}
html body #character-levelup-modal .character-levelup-kicker::after,
html body #limitbreak-modal .lb-modal-kicker::after{--s:left;--a:rgba(193,154,85,.85);--b:transparent;}
html body #character-levelup-modal [data-levelup-name]{
  margin:8px 0 4px !important;color:var(--g-ink) !important;
  font:700 clamp(20px,5.8vw,24px)/1.25 "Noto Serif JP",serif !important;letter-spacing:.16em !important;
}
html body #character-levelup-modal .character-levelup-level{
  color:#7a5420 !important;
  font:700 clamp(22px,6.4vw,27px)/1.1 "Cinzel","Noto Serif JP",serif !important;
  letter-spacing:.04em !important;
}
html body #character-levelup-modal .character-levelup-exp{
  margin-top:6px !important;color:var(--g-sub) !important;
  font:600 11px/1.2 "Cinzel","Noto Serif JP",serif !important;letter-spacing:.08em !important;
}
/* EXPバー：現在（金）＋今回の追加分（明るい金・点滅なし） */
html body #character-levelup-modal .character-levelup-expbar{
  position:relative;
  width:min(82%,280px);height:8px;margin:7px auto 0;
  border:1px solid rgba(184,138,60,.7);border-radius:5px;
  background:linear-gradient(180deg,#efe6d4,#fbf7ee);
  box-shadow:inset 0 1px 2px rgba(80,56,20,.18);
  overflow:hidden;
}
html body #character-levelup-modal .character-levelup-expbar b,
html body #character-levelup-modal .character-levelup-expbar i{
  position:absolute;top:0;bottom:0;left:0;display:block;transition:width .2s ease,left .2s ease;
}
html body #character-levelup-modal .character-levelup-expbar b{background:linear-gradient(180deg,#e2c27a,#b88a3c);}
html body #character-levelup-modal .character-levelup-expbar i{
  background:repeating-linear-gradient(135deg,#ffe9a8 0 4px,#f6d27a 4px 8px);
  box-shadow:0 0 6px rgba(255,214,120,.9);
}
html body #character-levelup-modal .character-levelup-expbar.is-max b{background:linear-gradient(180deg,#f3d58f,#c39443);}

/* 素材行 */
html body #character-levelup-modal .character-levelup-materials{
  display:flex !important;flex-direction:column !important;gap:7px !important;
  padding:12px 0 0 !important;margin:0 !important;
  border-top:1px solid rgba(184,138,60,.35) !important;
}
html body #character-levelup-modal .chara-level-material-row{
  display:grid !important;grid-template-columns:clamp(46px,13vw,52px) minmax(0,1fr) auto !important;align-items:center !important;gap:10px !important;
  min-height:clamp(60px,17vw,66px) !important;
  margin:0 !important;padding:7px 9px 7px 7px !important;
  border:1px solid rgba(200,174,126,.7) !important;border-radius:3px !important;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(250,246,238,.92)) !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.8),0 2px 5px rgba(90,64,26,.06) !important;
}
html body #character-levelup-modal .chara-level-material-icon{
  width:100% !important;height:auto !important;aspect-ratio:1/1 !important;
  border:1px solid rgba(198,164,102,.75) !important;border-radius:2px !important;
  background:radial-gradient(circle at 50% 45%,#fff 0,#fbf6ea 55%,#efe5d0 100%) !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.85) !important;
  display:flex !important;align-items:center !important;justify-content:center !important;overflow:hidden !important;
}
html body #character-levelup-modal .chara-level-material-icon img{width:88% !important;height:88% !important;object-fit:contain !important;}
html body #character-levelup-modal .chara-level-material-info{min-width:0 !important;}
html body #character-levelup-modal .chara-level-material-info strong{
  display:block !important;color:var(--g-ink) !important;
  font:700 clamp(13.5px,3.9vw,15px)/1.25 "Noto Serif JP",serif !important;
}
html body #character-levelup-modal .chara-level-material-meta{
  display:flex !important;flex-wrap:wrap !important;align-items:center !important;gap:4px 8px !important;
  margin-top:5px !important;
}
html body #character-levelup-modal .chara-level-material-meta em{
  font-style:normal;padding:2px 6px;border-radius:2px;
  background:rgba(184,138,60,.13);border:1px solid rgba(184,138,60,.35);
  color:#7a5420;font:700 10px/1.2 "Cinzel","Noto Serif JP",serif;letter-spacing:.04em;
}
html body #character-levelup-modal .chara-level-material-meta i{
  font-style:normal;color:var(--g-sub);font:500 10.5px/1.2 "Noto Serif JP",serif;
}
html body #character-levelup-modal .chara-level-material-meta i b{color:var(--g-ink);font:700 12px/1 "Cinzel",serif;}
/* ステッパー：大きく押しやすく */
html body #character-levelup-modal .chara-level-material-stepper{display:flex !important;align-items:center !important;gap:5px !important;}
html body #character-levelup-modal .chara-level-material-stepper button{
  width:clamp(34px,9.6vw,38px) !important;height:clamp(34px,9.6vw,38px) !important;padding:0 !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  border-radius:2px !important;
  font:500 20px/1 "Noto Serif JP",serif !important;opacity:1 !important;
}
html body #character-levelup-modal .chara-level-material-stepper button:first-child{
  border:1px solid rgba(184,138,60,.7) !important;
  background:linear-gradient(180deg,#fffcf3,#f2e6cc) !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.8) !important;
  color:#5d3d0e !important;
}
html body #character-levelup-modal .chara-level-material-stepper button:last-child{
  border:1px solid #6e4f22 !important;
  background:linear-gradient(180deg,#b48d55 0%,#93703c 52%,#7c5c2d 100%) !important;
  box-shadow:inset 0 0 0 1px rgba(255,236,196,.5),0 2px 4px rgba(70,46,14,.25) !important;
  color:#fffaf0 !important;text-shadow:0 1px 1px rgba(60,38,10,.6) !important;
}
html body #character-levelup-modal .chara-level-material-stepper button:disabled{
  border-color:rgba(190,180,160,.7) !important;
  background:#efebe4 !important;box-shadow:none !important;
  color:#bdb4a5 !important;text-shadow:none !important;
}
html body #character-levelup-modal .chara-level-material-stepper span{
  min-width:34px !important;height:34px !important;padding:0 4px !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  border:1px solid rgba(200,174,126,.6) !important;border-radius:2px !important;
  background:#fff !important;box-shadow:inset 0 1px 2px rgba(80,56,20,.10) !important;
  color:#a39684 !important;font:700 16px/1 "Cinzel","Noto Serif JP",serif !important;
}
html body #character-levelup-modal .chara-level-material-stepper span.is-picked{
  color:var(--g-ink) !important;border-color:var(--g-gold) !important;
  background:linear-gradient(180deg,#fffaf0,#f7ecd2) !important;
}
html body #character-levelup-modal .character-levelup-max-btn{
  width:100% !important;height:40px !important;margin:10px 0 0 !important;
}
html body #character-levelup-modal .character-levelup-max-btn:disabled{opacity:.55 !important;}

/* 強化後サマリー */
html body #character-levelup-modal .character-levelup-summary{
  margin:12px 0 0 !important;padding:11px 12px !important;
  border:1px solid rgba(200,174,126,.75) !important;border-radius:3px !important;
  background:linear-gradient(180deg,#fffaf0,#f7eedc) !important;
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.75),inset 0 0 0 4px rgba(214,192,148,.3) !important;
}
html body #character-levelup-modal .character-levelup-target{
  display:flex !important;flex-wrap:wrap !important;align-items:baseline !important;justify-content:space-between !important;gap:4px 8px !important;
}
html body #character-levelup-modal .character-levelup-target > span{
  color:#8b6c3a !important;font:600 11.5px/1 "Noto Serif JP",serif !important;letter-spacing:.1em !important;
}
html body #character-levelup-modal .character-levelup-target strong{
  display:inline-flex !important;align-items:baseline !important;gap:6px !important;
  color:var(--g-sub) !important;font:700 clamp(17px,4.9vw,20px)/1 "Cinzel","Noto Serif JP",serif !important;
}
html body #character-levelup-modal .character-levelup-target strong em{font-style:normal;color:var(--g-gold);}
html body #character-levelup-modal .character-levelup-target strong ins{
  text-decoration:none;color:var(--g-ink);font-size:1.12em;
}
html body #character-levelup-modal.is-level-gain .character-levelup-target strong ins{
  color:#8a5a12;text-shadow:0 0 10px rgba(255,214,120,.8);
}
html body #character-levelup-modal .character-levelup-target strong sup{
  align-self:flex-start;margin-left:2px;padding:2px 5px;border-radius:2px;
  background:linear-gradient(180deg,#f3d58f,#c39443);color:#fffaf0;
  font:700 10px/1 "Cinzel",serif;text-shadow:0 1px 1px rgba(70,44,10,.5);
}
html body #character-levelup-modal .character-levelup-target small{
  flex-basis:100%;color:var(--g-ng) !important;font:600 10px/1.3 "Noto Serif JP",serif !important;
}
html body #character-levelup-modal .character-levelup-cost{
  display:flex !important;align-items:center !important;justify-content:space-between !important;gap:8px !important;
  margin-top:9px !important;padding-top:9px !important;
  border-top:1px dashed rgba(184,150,96,.45) !important;
  color:var(--g-sub) !important;font:600 11px/1.2 "Noto Serif JP",serif !important;
}
html body #character-levelup-modal .character-levelup-cost b{color:var(--g-ink) !important;font:700 14px/1 "Cinzel","Noto Serif JP",serif !important;}
html body #character-levelup-modal .lv-cost-exp b{color:#7a5420 !important;}
html body #character-levelup-modal .lv-cost-coin{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
html body #character-levelup-modal .lv-cost-coin img{width:16px;height:16px;object-fit:contain;}
html body #character-levelup-modal .lv-cost-coin small{color:#9a8b75;font:500 10px/1 "Cinzel",serif;}
html body #character-levelup-modal .lv-cost-coin.is-short,
html body #character-levelup-modal .lv-cost-coin.is-short b{color:var(--g-ng) !important;}

html body #character-levelup-modal .character-levelup-actions{
  display:grid !important;grid-template-columns:1fr 1.35fr !important;gap:8px !important;margin-top:14px !important;
}
html body #character-levelup-modal .character-levelup-actions button{height:46px !important;margin:0 !important;}

/* ============================================================
   限界突破
   ============================================================ */
html body #limitbreak-modal .modal{padding:0 !important;}
html body #limitbreak-modal .modal-inner{padding:20px clamp(14px,4vw,18px) 14px !important;background:none !important;}
html body #limitbreak-modal .lb-modal-kicker{
  display:flex;align-items:center;justify-content:center;gap:8px;
  color:#9a7a42;font:600 8px/1 "Cinzel",serif;letter-spacing:.32em;
}
html body #limitbreak-modal .modal-inner > h2{
  margin:7px 0 10px !important;text-align:center !important;
  color:var(--g-ink) !important;font:700 clamp(20px,5.8vw,24px)/1.25 "Noto Serif JP",serif !important;letter-spacing:.18em !important;
}
/* 対象キャラ＋共鳴Lv */
html body #limitbreak-modal .lb-head-status{
  display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:10px;
  margin:0 0 8px;padding:7px 10px 7px 7px;
  border:1px solid rgba(200,174,126,.75);border-radius:3px;
  background:linear-gradient(180deg,#fffaf0,#f6ecd6);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.75),inset 0 0 0 4px rgba(214,192,148,.3);
}
html body #limitbreak-modal .lb-head-status:empty{display:none;}
html body #limitbreak-modal .lb-head-face{
  width:46px;height:46px;border:1px solid var(--g-gold);border-radius:2px;overflow:hidden;
  background:radial-gradient(circle,#fff,#efe5d0);box-shadow:inset 0 0 0 2px rgba(255,255,255,.85);
}
html body #limitbreak-modal .lb-head-face img{width:100%;height:100%;object-fit:cover;display:block;}
html body #limitbreak-modal .lb-head-body{display:flex;flex-direction:column;gap:6px;min-width:0;}
html body #limitbreak-modal .lb-head-body strong{
  color:var(--g-ink);font:700 15px/1.2 "Noto Serif JP",serif;letter-spacing:.08em;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
html body #limitbreak-modal .lb-head-pips{display:flex;gap:6px;padding-left:2px;}
html body #limitbreak-modal .lb-head-pips i{
  width:9px;height:9px;transform:rotate(45deg);border:1px solid var(--g-gold);background:rgba(255,255,255,.7);
}
html body #limitbreak-modal .lb-head-pips i.on{background:linear-gradient(135deg,#f6dc96,#b88a3c);box-shadow:0 0 5px rgba(214,170,80,.7);}
html body #limitbreak-modal .lb-head-pips i.next{background:#fff6dc;border-style:dashed;box-shadow:0 0 6px rgba(255,214,120,.9);}
html body #limitbreak-modal .lb-head-level{display:flex;align-items:baseline;gap:5px;white-space:nowrap;}
html body #limitbreak-modal .lb-head-level small{color:#8b6c3a;font:600 9.5px/1 "Noto Serif JP",serif;margin-right:2px;}
html body #limitbreak-modal .lb-head-level b{color:var(--g-sub);font:700 20px/1 "Cinzel",serif;}
html body #limitbreak-modal .lb-head-level b.is-next{color:#8a5a12;font-size:24px;text-shadow:0 0 10px rgba(255,214,120,.8);}
html body #limitbreak-modal .lb-head-level b.is-max{color:#8a5a12;font-size:18px;letter-spacing:.1em;}
html body #limitbreak-modal .lb-head-level em{font-style:normal;color:var(--g-gold);font:700 14px/1 serif;}
html body #limitbreak-modal .lb-modal-desc{
  margin:0 0 10px !important;text-align:center !important;
  color:var(--g-sub) !important;font:500 10.5px/1.6 "Noto Serif JP",serif !important;
}

/* 必要素材 */
html body #limitbreak-modal .lb-recipe-box{
  margin:0 0 6px !important;padding:0 !important;border:0 !important;background:none !important;box-shadow:none !important;
  display:flex !important;flex-direction:column !important;gap:6px !important;
}
html body #limitbreak-modal .lb-recipe-title{
  display:flex !important;align-items:center !important;gap:8px !important;
  margin:0 0 2px !important;padding:0 0 6px !important;border:0 !important;
  background:linear-gradient(90deg,rgba(184,138,60,.65),rgba(184,138,60,.12)) 0 100%/100% 1px no-repeat !important;
  color:var(--g-ink) !important;font:700 13.5px/1.2 "Noto Serif JP",serif !important;letter-spacing:.14em !important;text-align:left !important;
}
html body #limitbreak-modal .lb-recipe-title::before{
  content:"";width:16px;height:16px;flex:0 0 16px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2 23 17 38 20 23 23 20 38 17 23 2 20 17 17Z' fill='%23c09246'/%3E%3Cpath d='M20 10 21.5 18.5 30 20 21.5 21.5 20 30 18.5 21.5 10 20 18.5 18.5Z' fill='%23fff6e2'/%3E%3C/svg%3E") center/contain no-repeat;
}
html body #limitbreak-modal .lb-recipe-row{
  display:grid !important;grid-template-columns:44px minmax(0,1fr) auto !important;align-items:center !important;gap:10px !important;
  min-height:56px !important;margin:0 !important;padding:6px 10px 6px 6px !important;
  border:1px solid rgba(200,174,126,.7) !important;border-radius:3px !important;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(250,246,238,.92)) !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.8) !important;
}
html body #limitbreak-modal .lb-recipe-row.ng{
  border-color:rgba(190,110,95,.6) !important;
  background:linear-gradient(180deg,#fffaf8,#f9ece8) !important;
}
html body #limitbreak-modal .lb-recipe-icon{
  width:44px !important;height:44px !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  border:1px solid rgba(198,164,102,.75) !important;border-radius:2px !important;
  background:radial-gradient(circle at 50% 45%,#fff 0,#fbf6ea 55%,#efe5d0 100%) !important;
  overflow:hidden !important;
}
html body #limitbreak-modal .lb-recipe-icon img{width:88% !important;height:88% !important;object-fit:contain !important;}
html body #limitbreak-modal .lb-recipe-icon img.lb-recipe-chara-img{width:100% !important;height:100% !important;object-fit:cover !important;}
html body #limitbreak-modal .lb-recipe-name{
  display:flex !important;flex-direction:column !important;align-items:flex-start !important;gap:4px !important;min-width:0 !important;
  color:var(--g-ink) !important;font:700 clamp(13px,3.7vw,14.5px)/1.25 "Noto Serif JP",serif !important;
}
html body #limitbreak-modal .lb-recipe-shortage-label{
  display:inline-block !important;margin:0 !important;padding:2px 6px !important;border-radius:2px !important;
  background:rgba(178,67,47,.1) !important;border:1px solid rgba(178,67,47,.4) !important;
  color:var(--g-ng) !important;font:700 9.5px/1.2 "Noto Serif JP",serif !important;
}
html body #limitbreak-modal .lb-recipe-count{
  display:flex !important;align-items:baseline !important;gap:3px !important;white-space:nowrap !important;
}
html body #limitbreak-modal .lb-recipe-count b{font:700 clamp(17px,4.9vw,20px)/1 "Cinzel",serif;}
html body #limitbreak-modal .lb-recipe-count small{color:var(--g-sub);font:600 12px/1 "Cinzel",serif;}
html body #limitbreak-modal .lb-recipe-row.ok .lb-recipe-count b{color:var(--g-ok) !important;}
html body #limitbreak-modal .lb-recipe-row.ng .lb-recipe-count b{color:var(--g-ng) !important;}
html body #limitbreak-modal .lb-recipe-row.ok .lb-recipe-count::before{
  content:"";width:14px;height:14px;align-self:center;margin-right:3px;border-radius:50%;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px 10px no-repeat,#4f8a57;
}
/* 魂の器の選択 */
html body #limitbreak-modal .lb-vessel-choice-wrap{display:flex !important;flex-direction:column !important;gap:5px !important;margin:0 !important;}
html body #limitbreak-modal .lb-vessel-choice-title{color:#8b6c3a !important;font:600 11px/1.2 "Noto Serif JP",serif !important;letter-spacing:.1em !important;}
html body #limitbreak-modal .lb-vessel-choice{
  display:grid !important;grid-template-columns:36px minmax(0,1fr) auto !important;align-items:center !important;gap:9px !important;
  min-height:46px !important;padding:5px 10px 5px 5px !important;
  border:1px solid rgba(200,174,126,.7) !important;border-radius:3px !important;
  background:rgba(255,255,255,.9) !important;color:var(--g-ink) !important;opacity:1 !important;
}
html body #limitbreak-modal .lb-vessel-choice.selected{
  border-color:var(--g-gold) !important;background:linear-gradient(180deg,#fff8e6,#efd9a6) !important;
  box-shadow:inset 0 0 0 2px rgba(255,250,232,.95),0 0 10px rgba(226,186,92,.35) !important;
}
html body #limitbreak-modal .lb-vessel-choice:disabled{opacity:.55 !important;}
html body #limitbreak-modal .lb-vessel-choice-icon img{width:32px;height:32px;object-fit:contain;}
html body #limitbreak-modal .lb-vessel-choice-name{font:700 13px/1.2 "Noto Serif JP",serif !important;text-align:left !important;}
html body #limitbreak-modal .lb-vessel-choice-count{font:700 14px/1 "Cinzel",serif !important;}

/* 共鳴ボーナス（キャラ詳細と同じカード表現） */
html body #limitbreak-modal .lb-bonus-box{
  display:flex !important;flex-direction:column !important;gap:6px !important;
  margin:12px 0 0 !important;padding:12px 0 0 !important;border:0 !important;
  border-top:1px solid rgba(184,138,60,.35) !important;background:none !important;box-shadow:none !important;
}
html body #limitbreak-modal .lb-bonus-row{
  display:grid !important;grid-template-columns:auto minmax(0,1fr) auto !important;align-items:center !important;gap:10px !important;
  min-height:42px !important;margin:0 !important;padding:6px 10px 6px 8px !important;
  border:1px solid rgba(200,174,126,.6) !important;border-radius:3px !important;
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(250,245,234,.86)) !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.75) !important;opacity:1 !important;
}
html body #limitbreak-modal .lb-bonus-level{
  display:flex !important;align-items:center !important;justify-content:center !important;
  min-width:44px !important;height:24px !important;padding:0 6px !important;
  border:1px solid var(--g-gold) !important;border-radius:2px !important;
  background:linear-gradient(180deg,#fffaf0,#efdfbd) !important;
  color:#5d3d0e !important;font:700 10.5px/1 "Cinzel",serif !important;
}
html body #limitbreak-modal .lb-bonus-summary{color:var(--g-ink) !important;font:600 clamp(11.5px,3.3vw,13px)/1.45 "Noto Serif JP",serif !important;}
html body #limitbreak-modal .lb-bonus-state{
  padding:4px 7px !important;border-radius:2px !important;border:1px solid transparent !important;
  font:600 9.5px/1 "Noto Serif JP",serif !important;white-space:nowrap !important;
}
html body #limitbreak-modal .lb-bonus-row.unlocked{border-color:rgba(184,138,60,.75) !important;background:linear-gradient(180deg,#fffaf0,#f5e9cf) !important;}
html body #limitbreak-modal .lb-bonus-row.unlocked .lb-bonus-level{background:linear-gradient(180deg,#f3d58f,#c39443) !important;color:#fffaf0 !important;border-color:#946a28 !important;}
html body #limitbreak-modal .lb-bonus-row.unlocked .lb-bonus-state{background:rgba(184,138,60,.14) !important;border-color:rgba(184,138,60,.5) !important;color:#7a5420 !important;}
/* 次回解放：今回の突破で得られる効果を強調 */
html body #limitbreak-modal .lb-bonus-row.next{
  border:1px solid var(--g-gold) !important;
  background:linear-gradient(180deg,#fff6dc,#f3dfae) !important;
  box-shadow:inset 0 0 0 2px rgba(255,250,232,.95),0 0 12px rgba(226,186,92,.45) !important;
}
html body #limitbreak-modal .lb-bonus-row.next .lb-bonus-level{background:#fff !important;border-style:dashed !important;}
html body #limitbreak-modal .lb-bonus-row.next .lb-bonus-state{background:linear-gradient(180deg,#b48d55,#7c5c2d) !important;color:#fffaf0 !important;border-color:#6e4f22 !important;}
html body #limitbreak-modal .lb-bonus-row.locked .lb-bonus-summary,
html body #limitbreak-modal .lb-bonus-row.locked .lb-bonus-level{opacity:.55 !important;}
html body #limitbreak-modal .lb-bonus-row.locked .lb-bonus-state{background:rgba(150,140,125,.12) !important;color:#8f8574 !important;}

/* 実行エリア */
html body #limitbreak-modal .lb-execute-area{display:flex !important;flex-direction:column !important;gap:8px !important;margin-top:14px !important;}
html body #limitbreak-modal .lb-execute-btn{width:100% !important;height:48px !important;margin:0 !important;}
html body #limitbreak-modal .lb-execute-note{
  margin-top:2px !important;text-align:center !important;color:var(--g-sub) !important;font:500 10px/1.5 "Noto Serif JP",serif !important;
}
/* 不足 */
html body #limitbreak-modal .lb-lack-box{
  margin-top:12px !important;padding:10px 12px !important;
  border:1px solid rgba(190,110,95,.55) !important;border-radius:3px !important;
  background:linear-gradient(180deg,#fffaf8,#f8e9e5) !important;box-shadow:inset 0 0 0 2px rgba(255,255,255,.7) !important;
}
html body #limitbreak-modal .lb-lack-title{color:var(--g-ng) !important;font:700 12.5px/1.3 "Noto Serif JP",serif !important;letter-spacing:.1em !important;margin-bottom:6px !important;}
html body #limitbreak-modal .lb-lack-row{display:flex !important;justify-content:space-between !important;padding:4px 0 !important;border-top:1px dashed rgba(178,67,47,.25) !important;}
html body #limitbreak-modal .lb-lack-name{color:var(--g-ink) !important;font:600 12px/1.3 "Noto Serif JP",serif !important;}
html body #limitbreak-modal .lb-lack-count{color:var(--g-ng) !important;font:700 12px/1.3 "Noto Serif JP",serif !important;}
html body #limitbreak-modal .lb-no-material{
  margin-top:12px !important;padding:12px !important;text-align:center !important;
  border:1px dashed rgba(184,138,60,.5) !important;border-radius:3px !important;
  color:#7a5420 !important;font:700 12.5px/1.5 "Noto Serif JP",serif !important;
}
html body #limitbreak-modal .btn-cancel-txt,
html body #limitbreak-confirm-modal .btn-cancel-txt{
  display:block !important;width:100% !important;height:42px !important;margin-top:10px !important;
  border:1px solid rgba(190,166,120,.6) !important;border-radius:2px !important;
  background:rgba(255,255,255,.75) !important;
  color:#5d4a33 !important;font:600 13px/1 "Noto Serif JP",serif !important;letter-spacing:.14em !important;
}

/* ---------- 実行確認 ---------- */
html body #limitbreak-confirm-modal .modal-inner{background:none !important;}
html body #limitbreak-confirm-modal .modal-inner > h2{
  text-align:center !important;color:var(--g-ink) !important;
  font:700 20px/1.3 "Noto Serif JP",serif !important;letter-spacing:.16em !important;
}
html body #limitbreak-confirm-modal .lb-next-bonus{
  padding:10px 12px !important;border:1px solid var(--g-gold) !important;border-radius:3px !important;
  background:linear-gradient(180deg,#fff6dc,#f3dfae) !important;box-shadow:inset 0 0 0 2px rgba(255,250,232,.95) !important;
}
html body #limitbreak-confirm-modal .lb-next-bonus-title{color:var(--g-ink) !important;font:700 14px/1.4 "Noto Serif JP",serif !important;}
html body #limitbreak-confirm-modal .lb-confirm-level strong{color:#8a5a12 !important;font:700 20px/1 "Cinzel",serif !important;}
html body #limitbreak-confirm-modal .lb-confirm-consume-box{
  border:1px solid rgba(200,174,126,.7) !important;border-radius:3px !important;background:rgba(255,255,255,.85) !important;
}
html body #limitbreak-confirm-modal .lb-confirm-warning{color:var(--g-ng) !important;font-weight:700 !important;}
html body #limitbreak-confirm-modal #lb-confirm-ok-btn{height:46px !important;}

/* ---------- 調整 ---------- */
html body #character-levelup-modal .modal-close-btn{left:auto !important;}
/* 素材リストは縦スクロール。中身は縮めない（不足欄が潰れないように） */
html body #limitbreak-modal #lb-material-list{
  overflow-y:auto !important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  scrollbar-width:thin;scrollbar-color:rgba(150,128,96,.5) transparent;
  padding-right:2px !important;
}
html body #limitbreak-modal #lb-material-list > *{flex:0 0 auto !important;}
html body #limitbreak-modal #lb-material-list::-webkit-scrollbar{width:3px;}
html body #limitbreak-modal #lb-material-list::-webkit-scrollbar-thumb{background:rgba(150,128,96,.5);border-radius:3px;}
html body #limitbreak-modal .lb-lack-list{max-height:none !important;}
/* 不足行：左の赤帯はやめ、枠色と数字で示す */
html body #limitbreak-modal .lb-recipe-row.ng{
  border-radius:3px !important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.8) !important;
}
html body #limitbreak-modal .lb-recipe-row.ng .lb-recipe-name{color:var(--g-ink) !important;}
html body #limitbreak-modal .lb-bonus-state{min-width:0 !important;border-radius:2px !important;display:inline-flex !important;align-items:center !important;}
html body #limitbreak-modal .lb-bonus-level{line-height:1 !important;}
html body #limitbreak-modal .lb-bonus-row.unlocked .lb-bonus-level,
html body #limitbreak-modal .lb-bonus-row.next .lb-bonus-level{color:inherit;}
html body #limitbreak-modal .lb-bonus-row.next .lb-bonus-level{color:#8a5a12 !important;}
html body #limitbreak-modal .lb-bonus-row.unlocked .lb-bonus-level{color:#fffaf0 !important;}
html body #character-levelup-modal .modal-close-btn{position:absolute !important;right:12px !important;top:12px !important;margin:0 !important;}
html body #limitbreak-modal .lb-bonus-state{box-shadow:none !important;}
html body #limitbreak-modal .lb-bonus-state::before,
html body #limitbreak-modal .lb-bonus-state::after{content:none !important;display:none !important;}
html body #limitbreak-modal .lb-bonus-level{padding-top:1px !important;}
/* レベルアップ：画面に収まらない時はモーダル内スクロール。素材のEXPと所持は1行に */
html body #character-levelup-modal .character-levelup-modal-inner{
  max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  overflow-y:auto !important;overscroll-behavior:contain;scrollbar-width:none;
}
html body #character-levelup-modal .character-levelup-modal-inner::-webkit-scrollbar{display:none;}
html body #character-levelup-modal .chara-level-material-meta{flex-wrap:nowrap !important;gap:6px !important;white-space:nowrap !important;}
html body #character-levelup-modal .chara-level-material-meta em{padding:2px 4px;font-size:9.5px;}
html body #character-levelup-modal .chara-level-material-meta i{font-size:10px;}
@media (max-height:740px){
  html body #character-levelup-modal .character-levelup-modal-inner{padding-top:16px !important;padding-bottom:12px !important;}
  html body #character-levelup-modal [data-levelup-name]{margin:5px 0 2px !important;font-size:19px !important;}
  html body #character-levelup-modal .character-levelup-level{font-size:21px !important;}
  html body #character-levelup-modal .character-levelup-head{padding-bottom:8px !important;}
  html body #character-levelup-modal .character-levelup-materials{padding-top:8px !important;gap:5px !important;}
  html body #character-levelup-modal .chara-level-material-row{min-height:54px !important;padding:5px 8px 5px 6px !important;}
  html body #character-levelup-modal .chara-level-material-stepper button{width:32px !important;height:32px !important;}
  html body #character-levelup-modal .chara-level-material-stepper span{height:32px !important;min-width:30px !important;}
  html body #character-levelup-modal .character-levelup-max-btn{height:36px !important;margin-top:8px !important;}
  html body #character-levelup-modal .character-levelup-summary{margin-top:8px !important;padding:8px 10px !important;}
  html body #character-levelup-modal .character-levelup-actions{margin-top:10px !important;}
  html body #character-levelup-modal .character-levelup-actions button{height:42px !important;}
}
@media (max-width:360px){
  html body #character-levelup-modal .chara-level-material-row{grid-template-columns:40px minmax(0,1fr) auto !important;gap:7px !important;}
  html body #character-levelup-modal .chara-level-material-info strong{font-size:12.5px !important;white-space:nowrap !important;}
  html body #character-levelup-modal .chara-level-material-meta{flex-wrap:wrap !important;gap:3px 5px !important;}
  html body #character-levelup-modal .chara-level-material-stepper{gap:3px !important;}
  html body #character-levelup-modal .chara-level-material-stepper button{width:29px !important;height:29px !important;font-size:17px !important;}
  html body #character-levelup-modal .chara-level-material-stepper span{height:29px !important;min-width:26px !important;font-size:14px !important;}
}

/* build1641: 限界突破の効果名は「\n」で改行できる（<br>は安全のため文字として表示されるので使わない） */
html body .lb-bonus-summary,
html body .lb-next-bonus-title,
html body .gacha-resonance-current b,
html body .gacha-resonance-overview-row .effect{white-space:pre-line !important;}
