:root {
  --bg: #0b0e2a;
  --bg2: #151a46;
  --panel: rgba(18, 22, 58, 0.88);
  --panel-solid: #161b48;
  --line: rgba(190, 182, 255, 0.35);
  --line-strong: #b8b0ff;
  --text: #eef0ff;
  --muted: #a3a7d8;
  --accent: #9fd2ff;
  --accent2: #c9b6ff;
  --gold: #f1d48a;
  --danger: #ff7092;
  --ok: #8ff0c0;
  --radius: 14px;
  --serif: 'Shippori Mincho B1', 'Hiragino Mincho ProN', serif;
  --sans: 'DotGothic16', 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
#app { position: fixed; inset: 0; }

/* ---------- 共通部品 ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.bgimg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,14,42,.35), rgba(11,14,42,.92) 70%); }
.content { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 12px 16px 96px; -webkit-overflow-scrolling: touch; }
.wrap { max-width: 880px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: .06em; margin: 0; }
h2 { font-size: 22px; margin: 6px 0 12px; display: flex; align-items: center; gap: 10px; }
h2::before { content: '☾'; color: var(--accent2); font-size: 18px; }
.muted { color: var(--muted); font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; backdrop-filter: blur(6px); box-shadow: 0 6px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.btn { border: 1px solid var(--line-strong); background: linear-gradient(180deg, #3a3f8a, #23286a); border-radius: 10px; padding: 10px 16px; font-weight: 700; letter-spacing: .04em; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 8px rgba(0,0,0,.4); transition: transform .08s, filter .15s; min-height: 44px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #8fb8ff, #5a63d8); color: #0b0e2a; border-color: #dfe6ff; }
.btn.gold { background: linear-gradient(180deg, #ffe6a3, #c99a3e); color: #2a1d05; border-color: #fff1c9; }
.btn.ghost { background: transparent; }
.btn.danger { background: linear-gradient(180deg, #ff8fa8, #b23a5f); border-color: #ffc4d1; }
.btn.small { padding: 6px 10px; min-height: 34px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: rgba(8,10,32,.7); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }

/* ---------- 上部バー・下部ナビ ---------- */
.topbar { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: linear-gradient(180deg, rgba(11,14,42,.95), rgba(11,14,42,.6)); border-bottom: 1px solid var(--line); }
.topbar .title { font-family: var(--serif); font-size: 17px; letter-spacing: .08em; }
.stat-pill { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.35); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.stat-pill .ico { color: var(--gold); }
.stat-pill.lamp .ico { color: var(--accent); }
.nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px); background: rgba(10,12,36,.96); border-top: 1px solid var(--line); }
.nav button { background: none; border: 0; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; min-height: 52px; }
.nav button .ni { font-size: 22px; line-height: 1; }
.nav button.on { color: var(--text); }
.nav button.on .ni { color: var(--accent); text-shadow: 0 0 12px var(--accent); }

/* ---------- タイトル ---------- */
.title-screen { align-items: center; justify-content: flex-end; text-align: center; }
.title-screen .bgimg::after { background: linear-gradient(180deg, rgba(11,14,42,0) 30%, rgba(11,14,42,.85) 85%); }
.logo { position: relative; z-index: 1; margin-bottom: 28px; }
.logo .sub { font-family: var(--serif); letter-spacing: .5em; color: var(--accent2); font-size: 13px; }
.logo h1 { font-size: clamp(34px, 8vw, 64px); font-weight: 800; letter-spacing: .12em; text-shadow: 0 0 24px rgba(160,190,255,.8), 0 2px 0 #1b1f5a; background: linear-gradient(180deg, #fff, #cfd6ff 60%, #9aa6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .catch { margin-top: 8px; font-family: var(--serif); color: #dfe3ff; font-size: 15px; letter-spacing: .2em; }
.title-menu { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; width: min(320px, 86vw); margin-bottom: calc(env(safe-area-inset-bottom) + 48px); }

/* ---------- ギルド（クエスト） ---------- */
.lamp-board { display: flex; align-items: center; gap: 14px; }
.lamp-board .big { font-family: var(--serif); font-size: 34px; color: var(--accent); text-shadow: 0 0 18px rgba(159,210,255,.7); }
.lamps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.lamps i { width: 10px; height: 14px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 50% 35%, #fff, #9fd2ff 45%, #3b63d8); box-shadow: 0 0 8px #9fd2ff; }
.quest { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(58,52,110,.55), rgba(20,24,60,.6)); border: 1px solid var(--line); margin-bottom: 8px; }
.quest.done { opacity: .55; }
.rank { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; font-weight: 800; border: 1px solid; }
.rank-E { color: #c8cce0; border-color: #c8cce0; } .rank-D { color: #8ff0c0; border-color: #8ff0c0; }
.rank-C { color: #9fd2ff; border-color: #9fd2ff; } .rank-B { color: #c9b6ff; border-color: #c9b6ff; }
.rank-A { color: #ffb36b; border-color: #ffb36b; } .rank-S { color: #ffe08a; border-color: #ffe08a; box-shadow: 0 0 14px rgba(255,224,138,.5); }
.quest .qt { font-weight: 700; }
.quest .qm { font-size: 12px; color: var(--muted); margin-top: 2px; }
.quest .over { color: var(--danger); }
.rank-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rank-pick button { padding: 8px 0; border-radius: 10px; background: rgba(8,10,32,.6); border: 1px solid var(--line); font-family: var(--serif); font-weight: 800; font-size: 18px; }
.rank-pick button.on { background: #3a3f8a; border-color: var(--line-strong); }

/* ---------- 仲間 ---------- */
.char-card { position: relative; overflow: hidden; padding: 0; cursor: pointer; min-height: 150px; display: flex; }
.char-card .pic { width: 42%; background-size: cover; background-position: center top; }
.char-card .info { flex: 1; padding: 12px; }
.char-card .nm { font-family: var(--serif); font-size: 20px; }
.bar { height: 8px; border-radius: 99px; background: rgba(0,0,0,.45); overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #8ff0c0, #9fd2ff); }
.bar.gauge > i { background: linear-gradient(90deg, #c9b6ff, #ffe08a); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; font-size: 13px; }
.stats div { background: rgba(0,0,0,.25); border-radius: 8px; padding: 4px 6px; }
.stats b { display: block; font-size: 15px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; }
@media (max-width: 640px) { .detail-hero { grid-template-columns: 1fr; } }
.portrait { border-radius: var(--radius); background-size: cover; background-position: center top; min-height: 340px; border: 1px solid var(--line); box-shadow: 0 0 40px rgba(140,160,255,.25); }
.tabs { display: flex; gap: 6px; margin: 14px 0 10px; }
.tabs button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(8,10,32,.5); font-weight: 700; }
.tabs button.on { background: #3a3f8a; border-color: var(--line-strong); }
.slot { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(8,10,32,.45); margin-bottom: 6px; }
.slot .sl { width: 54px; font-size: 12px; color: var(--muted); }
.item-name { font-weight: 700; }
.tree { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.node { padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8,10,32,.45); }
.node.learned { border-color: var(--accent); box-shadow: 0 0 12px rgba(159,210,255,.3) inset; }
.node.locked { opacity: .5; }
.node .nt { font-weight: 700; } .node .nd { font-size: 12px; color: var(--muted); margin: 4px 0 6px; }

/* ---------- 出撃 ---------- */
.stage-card { position: relative; overflow: hidden; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; }
.stage-card .bgimg::after { background: linear-gradient(90deg, rgba(11,14,42,.95), rgba(11,14,42,.4)); }
.stage-card > * { position: relative; z-index: 1; }
.stage-card.locked { filter: grayscale(.8) brightness(.6); cursor: default; }
.stage-card .ch { color: var(--accent2); font-family: var(--serif); font-size: 13px; letter-spacing: .2em; }
.stage-card .sn { font-family: var(--serif); font-size: 24px; }
.pick { display: flex; gap: 8px; flex-wrap: wrap; }
.pick button { flex: 1 1 120px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8,10,32,.5); text-align: left; }
.pick button.on { border-color: var(--accent); background: rgba(80,100,200,.35); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: rgba(8,10,32,.6); font-weight: 800; }

/* ---------- 戦闘 ---------- */
.battle { background: radial-gradient(ellipse at 50% 0%, #2a2f78 0%, #11143a 55%, #070920 100%); }
.battle canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.bhud-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top) + 8px) 10px 8px; display: flex; gap: 8px; align-items: flex-start; pointer-events: none; z-index: 2; }
.bhud-top > * { pointer-events: auto; }
.order { display: flex; gap: 4px; padding: 4px; background: rgba(8,10,32,.7); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.order .o { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 2px solid; background-size: cover; background-position: center 15%; position: relative; }
.order .o.ally { border-color: #9fd2ff; } .order .o.enemy { border-color: #ff7092; }
.order .o.now { transform: scale(1.12); box-shadow: 0 0 10px #fff; }
.stage-label { margin-left: auto; text-align: right; font-family: var(--serif); font-size: 13px; color: var(--muted); background: rgba(8,10,32,.6); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 520px) {
  .stage-label { font-size: 12px; padding: 4px 8px; white-space: nowrap; }
  .stage-label span { display: none; }
  .stage-label br { display: none; }
  .order .o { width: 28px; height: 28px; }
  .order .o:nth-child(n+7) { display: none; }
}
.bpanel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 10px 10px calc(env(safe-area-inset-bottom) + 10px); background: linear-gradient(180deg, rgba(8,10,32,0), rgba(8,10,32,.92) 30%); }
.unit-box { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; max-width: 560px; }
.unit-box .face { width: 52px; height: 52px; flex: none; border-radius: 10px; background-size: cover; background-position: center 12%; border: 2px solid var(--line-strong); }
.unit-box.enemy .face { border-color: var(--danger); }
.unit-box .ub-name { font-weight: 800; }
.unit-box .ub-bars { flex: 1; display: grid; gap: 4px; }
.unit-box .ub-hp { font-size: 12px; color: var(--muted); }
.cmds { display: flex; gap: 6px; flex-wrap: wrap; max-width: 760px; }
.cmds .btn { flex: 1 1 88px; padding: 10px 8px; }
.cmds .btn.ult { background: linear-gradient(180deg, #fff1c9, #c9a0ff); color: #1a1040; border-color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 18px #ffe9a8; } }
.skill-list { display: grid; gap: 6px; max-width: 560px; }
.skill-list button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(20,24,60,.9); }
.skill-list button:disabled { opacity: .4; }
.skill-list .sd { font-size: 12px; color: var(--muted); }
.preview-box { background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; max-width: 560px; font-size: 14px; }
.preview-box .pv { display: flex; justify-content: space-between; gap: 8px; }
.facing { display: grid; grid-template-columns: repeat(2, 64px); gap: 8px; justify-content: center; margin-bottom: 8px; }
.facing button { height: 52px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(40,46,110,.9); font-size: 24px; }
.facing button.on { background: var(--accent); color: #0b0e2a; }
.hint { font-size: 13px; color: var(--accent); margin-bottom: 6px; text-shadow: 0 1px 2px #000; }

/* ---------- 演出 ---------- */
#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
#overlay > * { pointer-events: auto; }
.cutin { position: absolute; inset: 0; overflow: hidden; background: rgba(5,6,20,.6); animation: fadein .15s; }
.cutin .band { position: absolute; left: -10%; right: -10%; top: 18%; height: 58%; transform: skewY(-6deg); overflow: hidden; border-top: 2px solid #fff; border-bottom: 2px solid #fff; box-shadow: 0 0 60px rgba(180,200,255,.9); animation: bandin .35s cubic-bezier(.2,.9,.2,1); }
.cutin .band .img { position: absolute; inset: -10% 0; background-size: cover; background-position: center 25%; transform: skewY(6deg) scale(1.08); animation: slowzoom 1.9s linear forwards; }
.cutin .band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.35) 50%, rgba(255,255,255,0)); transform: translateX(-100%); animation: shine .7s .25s ease-out forwards; }
.cutin .name { position: absolute; right: 6%; bottom: 14%; text-align: right; font-family: var(--serif); animation: namein .5s .2s both cubic-bezier(.2,.9,.2,1); }
.cutin .name .sk { font-size: clamp(30px, 7vw, 64px); font-weight: 800; letter-spacing: .12em; color: #fff; text-shadow: 0 0 20px var(--glow, #9fd2ff), 0 3px 0 #1b1f5a; }
.cutin .name .ln { font-size: clamp(14px, 3vw, 20px); color: #e9ecff; letter-spacing: .15em; margin-top: 4px; text-shadow: 0 1px 4px #000; }
.cutin .flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash .5s 1.55s; }
.cutin.enemy .band { box-shadow: 0 0 60px rgba(200,120,255,.9); border-color: #e6b8ff; }
@keyframes fadein { from { opacity: 0; } }
@keyframes bandin { from { transform: skewY(-6deg) translateX(110%); } }
@keyframes slowzoom { to { transform: skewY(6deg) scale(1.18); } }
@keyframes shine { to { transform: translateX(100%); } }
@keyframes namein { from { opacity: 0; transform: translateX(60px); } }
@keyframes flash { 30% { opacity: .9; } }
.dialog { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,6,20,.72), rgba(5,6,20,.92)); backdrop-filter: blur(3px); cursor: pointer; display: flex; justify-content: center; }
.dstage { position: relative; width: min(980px, 100%); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 16px calc(env(safe-area-inset-bottom) + 18px); }
.dcast { display: flex; justify-content: center; align-items: flex-end; gap: 1.5%; height: min(52vh, 460px); margin-bottom: -18px; }
.bust { position: relative; height: 100%; flex: 0 1 calc((100% - 4.5%) / var(--n)); max-width: 300px; transition: transform .25s, filter .25s, opacity .25s; filter: brightness(.42) saturate(.6); transform: translateY(14px) scale(.94); transform-origin: 50% 100%; z-index: 1; }
.bust .bimg { position: absolute; inset: 0; background-size: cover; background-position: center top; border-radius: 18px 18px 0 0;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%), radial-gradient(ellipse 70% 90% at 50% 40%, #000 60%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%), radial-gradient(ellipse 70% 90% at 50% 40%, #000 60%, transparent 100%); mask-composite: intersect; }
.bust.speaking { filter: none; transform: translateY(0) scale(1.04); z-index: 2; }
.bust.speaking::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: 0; height: 40%; background: radial-gradient(ellipse at 50% 100%, rgba(170,190,255,.35), transparent 70%); pointer-events: none; }
.bust.narr { filter: brightness(.3) saturate(.4); }
.dbox { position: relative; z-index: 3; min-height: 132px; background: linear-gradient(180deg, rgba(28,32,86,.97), rgba(12,14,40,.98)); border: 1px solid var(--line-strong); border-top: 3px solid var(--accent, #9fd2ff); border-radius: 16px; padding: 30px 22px 22px; box-shadow: 0 -8px 40px rgba(0,0,0,.5), 0 0 30px rgba(120,140,255,.2); }
.dbox .dname { position: absolute; top: -18px; left: 18px; min-width: 120px; padding: 6px 18px; border-radius: 10px; background: linear-gradient(180deg, #2f3580, #1b1f5a); border: 1px solid var(--accent, #9fd2ff); font-family: var(--serif); font-size: 17px; letter-spacing: .12em; color: #fff; box-shadow: 0 0 14px color-mix(in srgb, var(--accent, #9fd2ff) 50%, transparent); }
.dbox .dname:empty { display: none; }
.dbox .dtext { font-size: 17px; line-height: 1.85; }
.dbox.narr { text-align: center; font-family: var(--serif); padding-top: 24px; border-top-color: var(--line-strong); }
.dbox .dnext { position: absolute; right: 16px; bottom: 10px; color: var(--accent2); font-size: 14px; animation: blink 1s infinite; }
@media (max-width: 600px) {
  .dcast { height: 44vh; gap: 0; }
  .bust { margin: 0 -3%; }
  .dbox { min-height: 120px; padding: 28px 16px 18px; }
  .dbox .dtext { font-size: 15.5px; }
}
@keyframes blink { 50% { opacity: .3; } }
.modal-bg { position: absolute; inset: 0; background: rgba(5,6,20,.7); display: grid; place-items: center; padding: 16px; }
.modal { width: min(520px, 100%); max-height: 86vh; overflow-y: auto; }
.result-title { font-family: var(--serif); font-size: 40px; text-align: center; letter-spacing: .3em; text-shadow: 0 0 24px #9fd2ff; margin: 8px 0 14px; }
#toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); transform: translateX(-50%); z-index: 60; pointer-events: none; }
#toast div { background: rgba(20,24,70,.96); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 16px; margin-bottom: 6px; font-weight: 700; animation: toast 2.4s forwards; text-align: center; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.gold-pop { color: var(--gold); }
/* 透明背景の会話立ち絵が届いたら、枠なしで立たせる */
.bust.cut .bimg { border-radius: 0; -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent 100%); mask-image: linear-gradient(180deg, #000 85%, transparent 100%); }
.bust.cut { max-width: 340px; }
/* 武器アイコン（レア度で色が変わる） */
.ticon { display: inline-grid; place-items: center; flex: none; border-radius: 8px; vertical-align: middle;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 28%, #1a1f50), #0b0e2a 85%);
  border: 1.5px solid color-mix(in srgb, var(--rc) 75%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.ticon.r-legend { animation: legendglow 2.4s infinite; }
@keyframes legendglow { 50% { box-shadow: 0 0 12px var(--rc), inset 0 1px 0 rgba(255,255,255,.2); } }
.iart { position: relative; display: inline-block; flex: none; border-radius: 10px; border: 0; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 25%, #1a1f50), #0b0e2a 85%); box-shadow: inset 0 0 0 2px var(--rc), 0 0 8px color-mix(in srgb, var(--rc) 40%, transparent); }
.iart img { display: block; border-radius: 8px; }
.iart > picture { display: block; width: 100%; height: 100%; }
.iart > picture > img { width: 100%; height: 100%; }
.iart .badge { position: absolute; right: -6px; bottom: -6px; }
.wt { display: inline-flex; align-items: center; gap: 4px; margin: 2px 10px 2px 0; font-size: 13px; color: var(--text); }
.who { display: inline-flex; gap: 3px; vertical-align: middle; }
.who i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background-size: cover; background-position: center 12%; display: inline-block; }
.legend-rar { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; margin: 4px 0 10px; }
/* タイトルの「タップしてはじめる」 */
.splash { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(env(safe-area-inset-bottom) + 70px); background: linear-gradient(180deg, rgba(11,14,42,0) 40%, rgba(11,14,42,.75)); cursor: pointer; transition: opacity .4s; }
.splash.out { opacity: 0; }
.splash-text { font-family: var(--serif); font-size: 18px; letter-spacing: .3em; color: #eef0ff; text-shadow: 0 0 14px #9fd2ff; animation: blink 1.6s infinite; }
.settings-btn { margin-left: 4px; }
/* Codex製アイコン（レア度の枠を重ねる） */
.ticon-img { position: relative; display: inline-block; flex: none; vertical-align: middle; }
.ticon-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ticon-img .ic { inset: 12%; width: 76%; height: 76%; }
.ticon-img img.pixel-native { image-rendering: pixelated; }
.ticon-img .ic.pixel-native { inset: 0; width: 100%; height: 100%; }
@media (max-width: 360px) {
  .native-slot-art { width: 40px !important; height: 40px !important; }
}
.ticon-img.r-legend { filter: drop-shadow(0 0 5px var(--rc)); }
.ticon-img.r-epic { filter: drop-shadow(0 0 3px var(--rc)); }
/* 持ち物・詳細 */
.clickable { cursor: pointer; }
.slot.clickable:hover { filter: brightness(1.12); }
.detail-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.detail-box { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8,10,32,.45); line-height: 1.7; }
.detail-box > b { display: block; color: var(--gold); font-family: var(--serif); letter-spacing: .1em; margin-bottom: 2px; }
.screen .nav { grid-template-columns: repeat(5, 1fr); }
/* 出撃メンバー */
.modal.wide { width: min(720px, 100%); }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.member { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 12px; border: 2px solid var(--line); background: rgba(8,10,32,.6); text-align: left; }
.member.on { border-color: var(--gold); box-shadow: 0 0 14px rgba(241,212,138,.35); }
.member:disabled { opacity: 1; }
.member .mpic { height: 120px; background-size: 200% auto; background-position: 50% 6%; }
.member:not(.on) .mpic { filter: grayscale(.6) brightness(.6); }
.member .mno { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2a1d05; font-weight: 800; }
.member .minfo { padding: 8px; }
.member .mtags { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.member .mtags .tag { font-size: 11px; padding: 1px 6px; }
.fpv-wrap { position: relative; height: 230px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 0%, #2a2f78 0%, #11143a 60%, #070920 100%); }
.fpv-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bust .bimg { background-repeat: no-repeat; }
.bust.cut { max-width: 380px; }
@media (max-width: 600px) {
  .dcast { height: 50vh; }
  .bust.cut { flex: 0 0 calc(150% / var(--n)); max-width: none; margin: 0 calc(-25% / var(--n)); }
}
.fx-line { color: #c9b6ff; font-size: 12px; margin-top: 2px; }

/* 視点の操作盤は ui-skin.css の .view-controls にまとめる。 */

/* ===== 出撃：国の地図 — 月銀の道標 ===== */
.watlas { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: var(--brass) var(--bg); }
.wmap { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 3px; overflow: hidden; border: 2px solid var(--brass); margin: 6px 0 12px; background: #0c1024; box-shadow: 0 8px 24px #05091699; }
.wmap-bg { position: absolute; inset: 0; background-size: 100% 100%; background-position: center; }
.wmap::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 35px #05091666; border: 1px solid #d3d7e166; pointer-events: none; }
.wmap-title { position: absolute; left: 14px; top: 12px; z-index: 2; font-family: var(--serif); letter-spacing: .12em; color: var(--paper); background: #101629ed; border: 1px solid var(--brass); padding: 7px 14px; font-size: 14px; }
.wmap-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; filter: drop-shadow(0 1px 2px #050916); pointer-events: none; }
.wmap-lines line { stroke-width: 2; stroke-linecap: round; }
.wmap-lines .done { stroke: #eed19ac9; }
.wmap-lines .next { stroke: #c5e8ff; stroke-dasharray: 6 5; animation: wdash 2s linear infinite; }
.wmap-lines .locked { stroke: #b9bfd56b; stroke-dasharray: 3 6; }
.wmap-lines .sealed { stroke: #b99ec877; stroke-dasharray: 2 8; }
@keyframes wdash { to { stroke-dashoffset: -22; } }
.wnode { --node-rim: #d3d7e1; --node-face: #23314c; position: absolute; z-index: 3; transform: translate(-50%, -50%); width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 50%; padding: 0; border: 1px solid var(--node-rim); background: radial-gradient(circle at 35% 25%, var(--node-face), #0c1024 85%); color: var(--text); font-weight: 800; cursor: pointer; box-shadow: 0 3px 9px #050916cc, inset 0 0 0 3px #0c1024, inset 0 0 0 4px var(--node-rim); }
.wnode::before { content: ''; position: absolute; inset: -5px; background: url('assets/ui/map-medallion.png') center / contain no-repeat; pointer-events: none; }
.wnode .wn-ch { position: relative; z-index: 1; font-size: 14px; text-shadow: 0 1px 3px #050916; }
.wnode .wn-ok { position: absolute; z-index: 2; right: -4px; top: -4px; width: 18px; height: 18px; border: 1px solid #fff0c0; border-radius: 50%; background: var(--gold); color: #281e12; font-size: 12px; line-height: 17px; }
.wnode .wn-name { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 7px; white-space: nowrap; font-size: 12px; color: var(--text); background: #101629ed; border: 1px solid #a08b6080; padding: 1px 6px; pointer-events: none; font-family: var(--serif); }
.wnode.st-cleared { --node-rim: #eed19a; --node-face: #4d483b; }
.wnode.st-cleared::before { filter: sepia(.6) saturate(.75); }
.wnode.st-open { --node-rim: #c5e8ff; --node-face: #3b5873; box-shadow: 0 0 0 4px #b8dcf433, 0 3px 9px #050916cc, inset 0 0 0 3px #0c1024; }
.wnode.st-choose { --node-rim: #eed19a; --node-face: #675538; border-radius: 8px; outline: 1px dashed #eed19a99; outline-offset: 5px; }
.wnode.st-choose::before { filter: sepia(.85) saturate(.8); }
.wnode.st-choose::after { content: '⑂'; position: absolute; right: -7px; top: -10px; color: var(--gold); font-size: 20px; text-shadow: 0 1px 4px #000; }
.wnode.st-locked { --node-rim: #8c96ac; --node-face: #22283c; filter: saturate(.25); }
.wnode.st-sealed { --node-rim: #aa95b1; --node-face: #372c46; border-style: dashed; }
.wnode.st-sealed::before { filter: grayscale(.65) brightness(.8); }
.wnode.st-sealed::after { content: ''; position: absolute; height: 1px; width: 27px; background: #aa95b1; transform: rotate(-35deg); left: 8px; top: 21px; pointer-events: none; }
.wnode.boss { width: 48px; height: 48px; --node-rim: #e3a5bb; --node-face: #673d53; }
.wnode.boss::before { inset: -7px; background-image: url('assets/ui/map-boss.png'); }
.wnode.boss.st-cleared { --node-rim: #eed19a; --node-face: #4d483b; }
.wnode.sel { outline: 2px solid var(--gold); outline-offset: 7px; z-index: 4; }
.wnode:hover, .wnode:focus-visible { filter: brightness(1.2); z-index: 5; }
@media (max-width: 640px) {
  .watlas .wmap { min-width: 640px; }
  .wnode .wn-name { display: none; }
  .wnode.sel .wn-name, .wnode:focus-visible .wn-name { display: block; }
}
.wfacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.wfacts > div { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.wfacts span { font-size: 11px; color: var(--muted); }
.wfacts b { font-size: 13px; }
.wchoice { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--brass); }
.wchoice .wc-title { font-family: var(--serif); font-size: 18px; color: var(--gold); padding-left: 32px; background: url('assets/ui/map-choice.png') left center / 24px no-repeat; }
.wc-opt { position: relative; isolation: isolate; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-radius: 3px; border: 1px solid var(--brass); background: var(--surface); color: var(--text); cursor: pointer; }
.wc-opt::before { content: ''; position: absolute; inset: -1px; border: 1px solid transparent; border-image: url('assets/ui/window-small.png') 23% / 18px / 0 stretch; pointer-events: none; }
.wc-opt b { font-family: var(--serif); font-size: 18px; color: var(--paper); }
.wc-opt span { font-size: 14px; line-height: 1.7; color: var(--muted); }
.wc-opt.on { border-color: var(--gold); background: linear-gradient(120deg,#354868,#141b32); box-shadow: inset 3px 0 var(--gold); }
.wc-opt:hover { border-color: var(--silver); filter: brightness(1.12); }
@media (prefers-reduced-motion: reduce) { .wmap-lines .next { animation: none; } }

/* ===== 商店（月灯りの道具屋。材質の仕上げは ui-skin.css） ===== */
.shop-hero { position: relative; display: grid; grid-template-columns: 110px 1fr; grid-template-rows: auto 1fr auto; gap: 6px 12px; align-items: center;
  padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; border: 1px solid rgba(241,212,138,.45);
  background: linear-gradient(180deg, rgba(70,46,24,.92), rgba(40,26,14,.92)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4), 0 4px 18px rgba(0,0,0,.45); }
.shop-hero::before { content: ''; position: absolute; inset: 6px; border: 1px dashed rgba(241,212,138,.25); border-radius: 10px; pointer-events: none; }
.shop-keeper { grid-row: 1 / 4; width: 110px; height: 130px; border-radius: 10px; background: url('assets/shop/keeper.png') center bottom / contain no-repeat,
  radial-gradient(circle at 50% 35%, rgba(241,212,138,.35), transparent 60%), rgba(0,0,0,.25); }
.shop-sign { font-weight: 900; font-size: 20px; letter-spacing: .12em; color: var(--gold); text-shadow: 0 2px 0 #3a2410, 0 0 12px rgba(241,212,138,.4); }
.shop-bubble { position: relative; background: #f6ecd6; color: #3a2a18; border-radius: 12px; padding: 9px 12px; font-size: 14px; line-height: 1.5; font-weight: 600; }
.shop-bubble::before { content: ''; position: absolute; left: -8px; top: 14px; border: 8px solid transparent; border-right-color: #f6ecd6; border-left: 0; }
.shop-purse { justify-self: end; font-size: 18px; color: var(--gold); background: rgba(0,0,0,.35); padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(241,212,138,.4); }
.coin { color: #ffd76a; margin-right: 4px; }
.shop-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 10px; }
.shop-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(241,212,138,.3); background: rgba(40,28,16,.75); color: #e9dcc0; font-weight: 700; font-size: 13px; }
.shop-tabs button.on { background: linear-gradient(180deg, #8a6a32, #5a4220); color: #fff6dc; border-color: var(--gold); box-shadow: 0 0 10px rgba(241,212,138,.35); }
.shop-tabs .sti { font-size: 20px; line-height: 22px; }
.sfilter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sfilter button { height: 36px; min-width: 36px; border-radius: 18px; border: 1px solid var(--line); background: rgba(20,24,60,.8); color: var(--text); cursor: pointer; padding: 0 10px; font-weight: 700; }
.sfilter button i { display: block; width: 30px; height: 30px; margin: 0 -7px; border-radius: 50%; background-size: cover; background-position: center top; }
.sfilter button.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(241,212,138,.5); }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.scard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(250,240,215,.97), rgba(232,216,184,.97)); color: #2e2214; border: 2px solid #b89a62; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.scard.r-rare { border-color: #4f8fd6; } .scard.r-epic { border-color: #9a5fd6; } .scard.r-legend { border-color: #e0b040; }
.scard .muted { color: #6a5638; }
.scard-top { display: flex; gap: 10px; align-items: center; }
.sname { font-size: 17px; font-weight: 900; line-height: 1.25; }
.sname span { color: #2e2214 !important; }
.scard.r-rare .sname span { color: #1f5fa8 !important; } .scard.r-epic .sname span { color: #6a2fa8 !important; } .scard.r-legend .sname span { color: #9a6a00 !important; }
.stype { font-size: 12px; color: #6a5638; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.sowned { margin-left: auto; background: #3a2a18; color: #f6ecd6; padding: 1px 7px; border-radius: 999px; font-size: 11px; }
.schips { display: flex; flex-wrap: wrap; gap: 5px; }
.schip { display: inline-flex; align-items: baseline; gap: 3px; font-size: 12px; color: #5a4628; background: rgba(90,70,40,.12); border-radius: 6px; padding: 3px 7px; }
.schip b { font-size: 15px; color: #2e2214; }
.schip.main { background: #3a2a18; color: #f1d48a; } .schip.main b { color: #fff; font-size: 18px; }
.schip.neg b { color: #b0303a; }
.scard .fx-line { color: #6a2fa8; font-size: 12px; }
.sdesc { font-size: 14px; color: #3a2a18; line-height: 1.5; }
.swho { display: flex; flex-wrap: wrap; gap: 6px; }
.sface { display: flex; flex-direction: column; align-items: center; width: 40px; }
.sface i { width: 34px; height: 34px; border-radius: 50%; background-size: cover; background-position: center top; border: 2px solid #b89a62; }
.sface em { font-style: normal; font-size: 11px; font-weight: 800; margin-top: 1px; }
.sface em.up { color: #1f8a4a; } .sface em.down { color: #b0303a; } .sface em.eq { color: #8a7656; }
.sbuy { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 44px; border-radius: 10px; cursor: pointer;
  border: 1px solid #7a5a22; background: linear-gradient(180deg, #f3d27a, #c99a3a); color: #2e1e08; font-size: 18px; font-weight: 900; }
.sbuy .sbl { margin-left: 10px; font-size: 13px; background: rgba(0,0,0,.18); padding: 2px 10px; border-radius: 999px; }
.sbuy.poor { background: linear-gradient(180deg, #cfc6b4, #a89e8a); color: #6a5c48; }
.sbuy.sell { background: linear-gradient(180deg, #a8d8b8, #6aa880); border-color: #3a6a4a; }
.sicon-ph { width: 56px; height: 56px; display: grid; place-items: center; font-size: 26px; background: rgba(0,0,0,.1); border-radius: 10px; }
@media (max-width: 640px) {
  .shop-hero { grid-template-columns: 76px 1fr; padding: 10px; }
  .shop-keeper { width: 76px; height: 96px; }
  .shop-sign { font-size: 16px; }
  .shop-bubble { font-size: 13px; }
  .shop-tabs { grid-template-columns: repeat(3, 1fr); }
  .sgrid { grid-template-columns: 1fr; }
}

/* 初めてのヒント */
.tip-head { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #2a2010; background: var(--gold); padding: 2px 10px; border-radius: 999px; }
.tip-p { margin: 0 0 8px; line-height: 1.7; font-size: 14px; }
.tip-p b { color: var(--gold); }

/* クレジット */
.cr-h { font-size: 14px; color: var(--gold); margin: 14px 0 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.cr-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed rgba(190,182,255,.15); }
.cr-what { color: var(--muted); }
.cr-by { color: var(--accent); text-align: right; }
@media (max-width: 640px) { .cr-row { grid-template-columns: 1fr; gap: 1px; } .cr-by { text-align: left; } }
.sregion { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; color: #2e2214; background: color-mix(in srgb, var(--rc) 45%, #f6ecd6); border: 1px solid color-mix(in srgb, var(--rc) 70%, #3a2a18); }
.sregion.new { background: #e04a4a; color: #fff; border-color: #8a1a1a; animation: snew 1.4s ease-in-out infinite; }
@keyframes snew { 50% { box-shadow: 0 0 0 3px rgba(224,74,74,.3); } }
.snext { margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(241,212,138,.5); color: var(--gold); font-size: 13px; text-align: center; background: rgba(40,28,16,.6); }

/* ===== 持ち物：アイテムボックス（木箱・内張りの仕上げは ui-skin.css） ===== */
.ibox { padding: 12px; border-radius: 14px; background: linear-gradient(180deg, rgba(38,30,22,.95), rgba(22,18,14,.95)); border: 2px solid #6a5434; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 6px 20px rgba(0,0,0,.5); }
.ibox-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ibox-title { font-weight: 900; font-size: 17px; color: #f1d48a; letter-spacing: .06em; }
.ibox-sort { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.ibox-sort button { font-size: 12px; padding: 4px 9px; border-radius: 6px; border: 1px solid #6a5434; background: rgba(0,0,0,.35); color: #d8c8a8; cursor: pointer; }
.ibox-sort button.on { background: #8a6a32; color: #fff6dc; border-color: #f1d48a; }
.ibox-tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.ibox-tabs button { flex: 1; min-width: 56px; padding: 7px 4px; border: 1px solid #5a4630; border-bottom: 3px solid #3a2c1e; border-radius: 8px 8px 4px 4px; background: #2e2418; color: #c8b896; font-weight: 800; cursor: pointer; }
.ibox-tabs button.on { background: #5a4424; color: #fff2cc; border-bottom-color: #f1d48a; }
.ibox-main { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.ibox-grid { display: grid; grid-template-columns: repeat(var(--cols), 56px); gap: 4px; padding: 8px; border-radius: 10px; background: #14100c; border: 1px solid #4a3a26; max-height: 62vh; overflow-y: auto; }
.bslot { position: relative; width: 56px; height: 56px; padding: 0; display: grid; place-items: center; cursor: pointer; border-radius: 6px;
  background: radial-gradient(circle at 50% 40%, #3a3024, #221a12); border: 1px solid #4e3e2a; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 -3px 0 var(--rcol, transparent); }
.bslot.r-common { --rcol: #8a8ca0; } .bslot.r-rare { --rcol: #4f8fd6; } .bslot.r-epic { --rcol: #9a5fd6; } .bslot.r-legend { --rcol: #e0b040; }
.bslot.empty { cursor: default; background: #1a140e; border-color: #2e2418; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6); }
.bslot.sel { outline: 3px solid #ffe08a; outline-offset: -1px; animation: bsel 1s ease-in-out infinite; z-index: 1; }
@keyframes bsel { 50% { outline-color: #fff6c8; box-shadow: 0 0 12px rgba(255,224,138,.6), inset 0 -3px 0 var(--rcol); } }
.bnum { position: absolute; right: 2px; bottom: 3px; font-size: 12px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.bface { position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background-size: cover; background-position: center top; border: 1px solid #f1d48a; }
.buniq { position: absolute; right: 3px; top: 1px; font-size: 11px; color: #ffd76a; text-shadow: 0 0 3px #000; }
.bph { font-size: 22px; color: #c8b896; }
.ibox-detail { min-height: 300px; padding: 12px; border-radius: 10px; background: linear-gradient(180deg, #f6ecd6, #e6d6b4); color: #2e2214; border: 2px solid #b89a62; }
.ibox-detail .muted { color: #6a5638; }
.bd-empty { color: #6a5638; padding: 30px 6px; text-align: center; }
.bd-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.bd-kind { font-size: 12px; color: #6a5638; }
.bd-name { font-size: 20px; font-weight: 900; line-height: 1.25; }
.bd-sub { font-size: 12px; color: #5a4628; margin-top: 2px; }
.bd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 8px; }
.bd-stats div { display: flex; flex-direction: column; align-items: center; padding: 5px 2px; border-radius: 6px; background: rgba(90,70,40,.12); }
.bd-stats span { font-size: 11px; color: #6a5638; } .bd-stats b { font-size: 17px; }
.bd-stats .main { background: #3a2a18; } .bd-stats .main span { color: #f1d48a; } .bd-stats .main b { color: #fff; }
.bd-box { font-size: 13px; line-height: 1.6; padding: 7px 9px; border-radius: 6px; background: rgba(90,70,40,.1); margin-bottom: 8px; }
.bd-box .fx-line, .ibox-detail div[class=""] { color: #6a2fa8; }
.bd-label { font-size: 13px; font-weight: 800; margin: 8px 0 5px; }
.bd-whos { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-who { display: flex; flex-direction: column; align-items: center; width: 62px; padding: 5px 2px; border-radius: 8px; border: 1px solid #b89a62; background: #fffaf0; cursor: pointer; color: #2e2214; }
.bd-who i { width: 36px; height: 36px; border-radius: 50%; background-size: cover; background-position: center top; }
.bd-who span { font-size: 10px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58px; }
.bd-who em { font-style: normal; font-size: 11px; font-weight: 900; }
.bd-who em.up { color: #1f8a4a; } .bd-who em.down { color: #b0303a; } .bd-who em.eq { color: #8a7656; }
.bd-who.on { background: #3a2a18; color: #f6ecd6; border-color: #f1d48a; } .bd-who.on em { color: #f1d48a; }
.bd-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.bd-actions .btn { flex: 1; }
.bd-foot { font-size: 12px; color: #6a5638; margin-top: 6px; }
@media (max-width: 900px) {
  .ibox-main { grid-template-columns: 1fr; }
  .ibox-grid { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); max-height: 46vh; }
  .bslot { width: 100%; height: auto; aspect-ratio: 1; }
}
/* 羊皮紙の上で読めるレア度の色 */
.bd-name.rc-common { color: #2e2214; } .bd-name.rc-rare { color: #1f5fa8; } .bd-name.rc-epic { color: #6a2fa8; } .bd-name.rc-legend { color: #9a6a00; }
.bd-rar { font-weight: 800; padding: 0 6px; border-radius: 4px; color: #fff; }
.bd-rar.r-common { background: #7a7c8e; } .bd-rar.r-rare { background: #2f6fb8; } .bd-rar.r-epic { background: #7a3fc0; } .bd-rar.r-legend { background: #b08410; }
@media (max-width: 640px) {
  .ibox { padding: 8px; }
  .ibox-tabs button { min-width: 0; padding: 7px 2px; font-size: 13px; }
  .ibox-sort { margin-left: 0; width: 100%; } .ibox-sort button { flex: 1; }
  .ibox-grid { padding: 5px; gap: 3px; }
}

/* 装備・道具の説明文と入手場所 */
.lore { font-family: var(--serif); font-size: 14px; line-height: 1.8; color: #d8d2ff; padding: 8px 12px; margin: 8px 0; border-left: 3px solid var(--gold); background: rgba(255,255,255,.04); border-radius: 0 8px 8px 0; }
.bd-lore { font-family: var(--serif); font-size: 13px; line-height: 1.75; color: #4a3820; padding: 6px 10px; margin-bottom: 8px; border-left: 3px solid #b89a62; background: rgba(184,154,98,.12); border-radius: 0 6px 6px 0; }
.src-list { font-size: 12px; line-height: 1.7; margin-top: 2px; }
.bd-src { margin-top: 10px; font-size: 12px; }
.bd-src summary { cursor: pointer; font-weight: 800; color: #5a4628; }

/* MP（仮の見た目。デザインはCodexに依頼） */
.mp-row { display: flex; gap: 6px; align-items: center; font-size: 11px; margin: 2px 3px; }
.mp-row .bar.mp { flex: 1; height: 6px; margin: 0; }
.bar.mp i { background: linear-gradient(90deg, #4f7fe0, #8fc8ff); }
.exp-bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,.4); overflow: hidden; margin-top: 4px; }
.exp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9a24a, #ffe08a); }

/* ---- 結果画面：経験値と戦利品（2026-10-03 仮置き。デザインはCodexに依頼） ---- */
.result-h { font-size: 14px; margin: 14px 0 6px; color: var(--gold, #e0c070); }
.xp-list { display: grid; gap: 6px; }
.xp-row { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; background: rgba(10, 14, 32, .55); }
.xp-row.bench { opacity: .8; }
.xp-face { width: 44px; height: 48px; flex: 0 0 44px; border-radius: 4px; background-size: cover; background-position: center top; }
.xp-body { flex: 1; min-width: 0; }
.xp-head, .xp-foot { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.xp-gain { color: #9fe0ff; }
.xp-bar { height: 8px; margin: 4px 0; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.xp-fill { display: block; height: 100%; background: linear-gradient(90deg, #6fb7ff, #c9c3ff); transition: width 1s ease-out; }
.xp-up { color: var(--gold, #e0c070); font-weight: bold; }
.loot-grid { display: grid; grid-template-columns: repeat(auto-fill, 56px); gap: 6px; }
.loot-gold { font-size: 11px; cursor: default; }

/* 月銀の装丁：灯守の詰所。光は数の周囲だけに置き、文字面を静かに保つ。 */
.screen:has(.guild-hub) > .bgimg::after { background: linear-gradient(180deg, #0c10244d, #0c1024d9 85%); }
.screen:has(.guild-hub) .content { padding-top: 28px; }
.guild-hub { display: grid; gap: 22px; min-width: 0; }
.guild-progress { display: grid; grid-template-columns: minmax(0, 1fr) 208px; gap: 14px; }
.guild-hub .card { min-width: 0; padding: 24px; }
.guild-hub .lamp-board { gap: 22px; min-height: 166px; border-color: #bfa77d; background: var(--grain), radial-gradient(ellipse at 12% 60%, #8d744b38, transparent 62%), linear-gradient(130deg, #293448, #131b30); }
.guild-lamp-count { display: flex; align-items: center; gap: 12px; flex: none; }
.guild-lamp-count .lamp-mark { position: relative; isolation: isolate; display: grid; place-items: center; width: 62px; height: 72px; color: #ffdf98; font-size: 42px; text-shadow: 0 0 18px #eabb6470, 0 2px 3px #090d1b; }
.guild-lamp-count .lamp-mark::before { content: ''; position: absolute; inset: -30px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, #f4c9782c, #f4c9780e 42%, transparent 67%); pointer-events: none; }
.guild-hub .lamp-board .big { font-family: var(--sans); font-size: clamp(48px, 7vw, 64px); font-weight: 400; line-height: 1.1; font-variant-numeric: tabular-nums; color: #ffe7b0; text-shadow: 0 2px 3px #080c1b, 0 0 22px #eabd692f; }
.guild-lamp-copy { min-width: 0; }
.guild-hub .guild-lamp-title { display: block; margin: 0 0 3px; font-size: 21px; color: #ffedc9; letter-spacing: .09em; }
.guild-hub .guild-lamp-title::before, .guild-hub .guild-lamp-title::after { content: none; }
.guild-lamp-copy > .muted { font-size: 14px; color: #d2cbbf; }
.guild-hub .lamps { gap: 7px; margin-top: 15px; max-width: 370px; }
.guild-hub .lamps:empty { display: none; }
.guild-hub .lamps i { position: relative; width: 8px; height: 11px; border-radius: 50% 50% 42% 42%; border: 1px solid #e5c07b; background: radial-gradient(circle at 50% 32%, #fff6d9, #edc876 44%, #977443); box-shadow: 0 0 6px #efd09055; }
.guild-rank { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.guild-rank-head { display: flex; align-items: baseline; gap: 14px; }
.guild-rank h3 { font-size: 19px; color: var(--silver); white-space: nowrap; }
.guild-cap-value { font-family: var(--sans); font-size: 40px; font-weight: 400; line-height: 1.2; color: var(--accent); }
.guild-rank > .muted { font-size: 13px; line-height: 1.8; }
.guild-paths { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 14px; }
.guild-paths > .card { display: flex; flex-direction: column; }
.guild-paths h2 { margin: 0 0 18px; font-size: 22px; }
.guild-paths h2::after { max-width: 108px; }
.guild-hub .guild-destination { border-color: #9bacbe; background: var(--grain), linear-gradient(140deg, #2b3b54, #121a30 80%); }
.guild-stage-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.guild-stage-meta .tag { border-color: #95896f; font-size: 13px; padding: 2px 9px; }
.guild-stage-meta .muted { font-size: 14px; }
.guild-stage-name { font-family: var(--serif); display: block; font-size: 25px; line-height: 1.6; letter-spacing: .06em; margin: 12px 0 24px; color: #fff0cf; overflow-wrap: anywhere; }
.guild-stage-empty { margin-bottom: 24px; font-size: 15px; }
.guild-practice-copy { font-size: 14px; line-height: 1.9; margin-bottom: 22px; }
.guild-hub .guild-main-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; min-height: 52px; font-size: 16px; text-align: left; padding: 12px 17px; }
.guild-hub .guild-main-action > span { color: #e9d5ac; font-size: 21px; }
.guild-hub .guild-main-action.primary { border-color: #e5d4a6; background: linear-gradient(120deg, #435775, #2c3b56); box-shadow: inset 0 0 0 1px #dec79599, 0 3px 8px #05091688; }
.guild-debug { display: flex; flex-wrap: wrap; gap: 8px; }

/* 演習は場所を選ぶ小さな台帳。章・地名・敵の目安を一候補の中で揃える。 */
.modal.card:has(> .practice-picker) { width: min(580px, 100%); padding: 25px; background: var(--grain), linear-gradient(145deg, #26334b, #11192e); }
.practice-picker { min-width: 0; }
.practice-picker h2 { margin: 0 0 12px; font-size: 24px; }
.practice-intro { margin-bottom: 18px; font-size: 14px; line-height: 1.8; }
.practice-picker .practice-places { grid-template-columns: minmax(0, 1fr); gap: 9px; }
.practice-picker .practice-place { min-width: 0; min-height: 98px; padding: 13px 42px 13px 15px; border: 1px solid #818b9e; border-radius: 2px; background: linear-gradient(115deg, #2c3a52, #141e34); overflow: visible; box-shadow: inset 0 0 0 3px #0c13264d, 0 2px 4px #05091655; }
.practice-place .practice-chapter { font-size: 12px; color: var(--gold); letter-spacing: .08em; }
.practice-place > b { font-family: var(--serif); font-size: 19px; line-height: 1.65; color: #f9efdb; overflow-wrap: anywhere; }
.practice-place .practice-place-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 4px; font-size: 13px; }
.practice-place-meta > span { color: #d5e4f0; white-space: nowrap; }
.practice-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; color: #e7d1a3; }
.practice-picker .practice-cancel { width: 100%; min-height: 48px; margin-top: 18px; }
@media (hover: hover) { .practice-picker .practice-place:hover { border-color: var(--gold); background: linear-gradient(115deg, #374b68, #1a2842); } }

/* 戦果の頁：見出しは明朝、獲得量と成長の数字はDotGothic16。 */
.modal.card:has(> .battle-report) { width: min(700px, 100%); padding: 24px 28px; max-height: min(90dvh, 980px); overflow-x: hidden; background: var(--grain), radial-gradient(ellipse at 50% 0%, #364863, #151d33 72%); border-color: #b7becf; }
.modal.card:has(> .report-loss) { border-color: #a88697; background: var(--grain), radial-gradient(ellipse at 50% 0%, #3a3049, #151a2e 72%); }
.battle-report { min-width: 0; }
.battle-report .result-title { margin: 0 0 14px; font-size: clamp(30px, 5vw, 40px); line-height: 1.7; letter-spacing: .2em; padding-left: .2em; }
.battle-report .result-title::after { height: 23px; max-width: 225px; }
.battle-report .result-win { color: #ffe4a8; }
.battle-report .result-loss { color: #e8cbd5; text-shadow: 0 2px 3px #080c1b; }
.battle-report .result-h { display: flex; align-items: center; gap: 12px; margin: 21px 0 10px; font-family: var(--serif); font-size: 18px; font-weight: 700; color: #edd3a6; letter-spacing: .08em; }
.battle-report .result-h::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, #b8a27f88, transparent); }
.modal .battle-report .slot.result-reward { flex-wrap: nowrap; padding: 13px 16px; border-color: #a69c87; background: linear-gradient(100deg, #77603b33, #151b2e); }
.battle-report .result-reward > .grow { font-size: 15px; color: #f0e5ce; }
.battle-report .slot.result-reward > .gold-pop { font-family: var(--sans); font-size: 28px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.battle-report .xp-list { display: grid; gap: 8px; }
.battle-report .xp-row { position: relative; display: flex; gap: 12px; align-items: center; min-width: 0; padding: 10px 12px; border-radius: 2px; border: 1px solid #64738c80; background: linear-gradient(100deg, #23324a, #0e172b); box-shadow: inset 0 1px #d8e7f20c; }
.battle-report .xp-row.bench { opacity: 1; border-color: #626b7e80; background: linear-gradient(100deg, #242b3a, #131a2b); }
.battle-report .xp-row.leveled { border-color: #c7ab7477; background: linear-gradient(110deg, #63533838, #192339 55%, #141c2e); }
.battle-report .xp-face { width: 48px; height: 53px; flex: 0 0 48px; border: 1px solid #a5b0c4; border-radius: 2px; box-shadow: 0 2px 4px #05091666; }
.battle-report .xp-row.leveled .xp-face { border-color: #dcc495; }
.battle-report .xp-body { flex: 1; min-width: 0; }
.battle-report .xp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 15px; line-height: 1.6; }
.xp-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 9px; min-width: 0; }
.xp-name { overflow-wrap: anywhere; font-family: var(--sans); font-weight: 400; color: #fff5e4; }
.xp-bench { display: inline-block; font-size: 11px; line-height: 1.6; padding: 1px 6px; border: 1px solid #8f98ac; color: #d8dfeb; background: #111a2c; white-space: nowrap; }
.battle-report .xp-gain { font-family: var(--sans); font-size: 23px; font-weight: 400; color: #c2e7ff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.battle-report .xp-gain small { font-size: 12px; color: #c0d4e6; }
.battle-report .xp-bar { position: relative; isolation: isolate; height: 10px; margin: 6px 0; overflow: hidden; border: 1px solid #77839b; border-radius: 1px; background: #070e1d; box-shadow: inset 0 2px 4px #0007; }
.battle-report .xp-bar::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), #0b122c66 calc(25% - 1px), #0b122c66 25%); }
.battle-report .xp-fill { display: block; height: 100%; background: linear-gradient(180deg, #edf9ff77, transparent 42%), linear-gradient(90deg, #6a9caf, #c4e7f4); transition: width 1.05s cubic-bezier(.16,.7,.25,1); box-shadow: 1px 0 5px #d8f5ffaa; }
.battle-report .leveled .xp-fill { background: linear-gradient(180deg, #fff4cb77, transparent 42%), linear-gradient(90deg, #af8e51, #efd69c); }
.battle-report .leveled .xp-bar::after { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, #fff4cb77, transparent 42%), linear-gradient(90deg, #af8e51, #ffe6a9); transform: scaleX(var(--xp-before, 0)); transform-origin: left; animation: report-xp-light 1.15s .25s ease-out both; pointer-events: none; }
.battle-report .xp-foot { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; font-family: var(--sans); font-size: 12px; line-height: 1.7; }
.xp-level { color: #e0e5ed; font-variant-numeric: tabular-nums; white-space: nowrap; }
.battle-report .xp-up { display: inline-flex; flex-wrap: wrap; gap: 0 7px; color: #ffe0a0; font-weight: 400; animation: report-level-arrive .5s .65s both; }
.xp-up > span { white-space: nowrap; }
.battle-report .xp-cap { color: #c8c9cf; }
.battle-report .loot-grid { display: grid; grid-template-columns: repeat(auto-fill, 56px); gap: 7px; padding: 10px; border: 1px solid #7d6d5288; border-radius: 2px; background: #1c1c1c; box-shadow: inset 0 2px 6px #05091688; }
.battle-report .loot-grid .bslot { width: 56px; height: 56px; min-width: 56px; min-height: 56px; aspect-ratio: 1; padding: 0; }
.battle-report .loot-gold { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; cursor: default; border-color: #a58b51; background: radial-gradient(ellipse at 35% 20%, #655536, #2c271d); }
.loot-gold .loot-coin { color: #edc979; font-size: 18px; line-height: 1.2; text-shadow: 0 1px 2px #100e0a; }
.battle-report .loot-grid .loot-gold .gold-pop { max-width: 100%; padding: 0 2px; font-family: var(--sans); font-size: 12px; line-height: 1.4; color: #fff0bb; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.loot-gold .gold-pop small { font-size: 10px; margin-left: 1px; }
.loot-caption { margin-top: 7px; font-size: 12px; line-height: 1.8; }
.loot-empty, .result-empty { padding: 12px 14px; border-left: 2px solid #8d99ae; background: #0c14284d; font-size: 14px; line-height: 1.9; }
.battle-report .result-intro { font-size: 14px; line-height: 1.9; text-align: left; padding: 12px 14px; margin: 0 0 16px; background: #11172999; border-left: 2px solid #bc93a5; }
.result-exp-note { font-size: 13px; line-height: 1.8; margin: -3px 0 10px; }
.battle-report .result-recruit { display: grid; grid-template-columns: 48px minmax(0, 1fr); margin-top: 12px; }
.result-recruit > b { color: #b6eed2; font-size: 14px; font-weight: 400; line-height: 1.8; }
.slot.result-farewell { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 15px 16px; margin-top: 14px; border-color: #a9819277; border-left: 3px solid #bb8696; background: var(--grain), linear-gradient(110deg, #412c3b, #1b1a2c); }
.result-farewell > span { color: #dbc6cc; font-family: var(--serif); font-size: 15px; }
.result-farewell > b { color: #efc8cd; font-size: 14px; line-height: 1.9; font-weight: 400; overflow-wrap: anywhere; }
.battle-report .result-actions { position: sticky; bottom: -24px; z-index: 4; display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 -24px; padding: 12px 0 24px; background: linear-gradient(#151d3300, #151d33 10px); }
.report-loss .result-actions { background: linear-gradient(#151a2e00, #151a2e 10px); }
.battle-report .result-actions > .btn { flex: 1 1 110px; min-width: 0; min-height: 50px; font-size: 16px; }
@keyframes report-xp-light { 0% { opacity: 1; transform: scaleX(var(--xp-before, 0)); } 70% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes report-level-arrive { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .screen:has(.guild-hub) .content { padding-top: 20px; }
  .guild-hub { gap: 16px; }
  .guild-progress { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .guild-hub .card { padding: 20px; }
  .guild-hub .lamp-board { gap: 20px; min-height: 140px; }
  .guild-lamp-count { gap: 8px; }
  .guild-lamp-count .lamp-mark { width: 38px; height: 62px; font-size: 31px; }
  .guild-hub .lamp-board .big { font-size: 52px; }
  .guild-hub .guild-lamp-title { font-size: 19px; letter-spacing: .03em; }
  .guild-lamp-copy > .muted { font-size: 12px; }
  .guild-hub .lamps { gap: 6px; margin-top: 10px; }
  .guild-hub .guild-rank { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 12px; align-items: center; padding-block: 14px; }
  .guild-rank-head { gap: 15px; }
  .guild-rank h3 { font-size: 18px; }
  .guild-cap-value { font-size: 32px; }
  .guild-rank > .muted { font-size: 12px; }
  .guild-paths { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .guild-paths h2 { font-size: 21px; margin-bottom: 15px; }
  .guild-stage-name { font-size: 24px; margin-block: 10px 18px; }
  .guild-practice-copy { font-size: 13px; margin-bottom: 18px; }
  .modal.card:has(> .practice-picker) { padding: 22px 17px; }
  .practice-picker h2 { font-size: 23px; }
  .practice-intro { font-size: 13px; }
  .practice-place > b { font-size: 18px; }
  .practice-place .practice-place-meta { font-size: 12px; gap: 3px 10px; }
  .modal.card:has(> .battle-report) { padding: 20px 16px; max-height: 90dvh; }
  .battle-report .result-title { font-size: 30px; margin-bottom: 12px; }
  .battle-report .result-h { font-size: 17px; margin-top: 18px; }
  .modal .battle-report .slot.result-reward { padding: 11px 14px; }
  .battle-report .slot.result-reward > .gold-pop { font-size: 25px; }
  .battle-report .xp-row { padding: 9px; gap: 10px; }
  .battle-report .xp-face { width: 44px; height: 49px; flex-basis: 44px; }
  .battle-report .xp-head { font-size: 14px; gap: 6px; }
  .battle-report .xp-gain { font-size: 20px; }
  .battle-report .xp-gain small { font-size: 11px; }
  .xp-identity { gap: 2px 7px; }
  .battle-report .xp-foot { font-size: 11px; gap: 2px 8px; }
  .battle-report .loot-grid { padding: 8px; gap: 6px; }
  .battle-report .result-actions { bottom: -20px; margin-bottom: -20px; padding-bottom: 20px; }
  .battle-report .result-actions > .btn { font-size: 15px; padding-inline: 10px; }
}
@media (max-width: 420px) {
  .screen:has(.guild-hub) .topbar .title { flex: 1 1 100%; font-size: 16px; }
  .screen:has(.guild-hub) .topbar .stat-pill { margin-right: 2px; }
  .screen:has(.guild-hub) .topbar .mute { margin-left: auto; }
  .guild-hub .lamp-board { gap: 14px; padding-inline: 18px; }
  .guild-lamp-count .lamp-mark { width: 29px; font-size: 26px; }
  .guild-hub .guild-rank { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}
@media (prefers-reduced-motion: reduce) {
  .battle-report .xp-fill { transition: none; }
  .battle-report .xp-up, .battle-report .leveled .xp-bar::after { animation: none; }
  .battle-report .leveled .xp-bar::after { content: none; }
}

/* 必殺技は同じ月銀の銘板に。台詞の下地を保ち、映像の明暗に文字を委ねない。 */
.ult-movie { position: fixed; inset: 0; z-index: 60; isolation: isolate; overflow: hidden; background: #060a18; display: grid; place-items: center; animation: ultIn .18s ease-out; cursor: pointer; }
.ult-movie.out { opacity: 0; transition: opacity .25s; }
.ult-movie video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ult-movie::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, #060a1822, transparent 22%, transparent 50%, #060a1855 78%, #060a18b8); }
.ult-movie .name, .cutin .name {
  position: absolute; z-index: 2; right: clamp(24px, 5vw, 72px); bottom: calc(env(safe-area-inset-bottom) + max(80px, 10vh));
  width: min(760px, calc(100% - 48px)); max-width: calc(100% - 48px); min-width: 0; padding: 17px 26px 20px;
  text-align: left; font-family: var(--serif); color: #fff5df; pointer-events: none;
  border: 1px solid #b9c7d4; border-left: 3px solid var(--glow, #b8dcf4); border-radius: 2px;
  background: var(--grain), linear-gradient(115deg, #1c2a40f5, #10172cf5); box-shadow: inset 0 0 0 3px #07112377, 0 5px 24px #03071680;
}
.ult-movie .name { left: 0; right: 0; margin-inline: auto; }
.ult-movie .name::before, .cutin .name::before { content: ''; position: absolute; inset: -1px; border: 1px solid transparent; border-image: var(--frame-small) 23% / 20px / 0 stretch; pointer-events: none; }
.ult-movie .skill-kicker, .cutin .skill-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-family: var(--sans); font-size: 12px; line-height: 1.5; letter-spacing: .12em; color: #e5cea2; }
.ult-movie .skill-kicker > span, .cutin .skill-kicker > span { font-family: var(--serif); font-size: 17px; color: var(--glow, #b8dcf4); line-height: 1; }
.ult-movie .name .sk, .cutin .name .sk { min-width: 0; font-family: var(--serif); font-size: clamp(28px, 4.8vw, 52px); font-weight: 800; line-height: 1.5; letter-spacing: .07em; color: #fff4dc; text-shadow: 0 2px 3px #040a18, 0 0 18px color-mix(in srgb, var(--glow, #b8dcf4) 24%, transparent); overflow-wrap: anywhere; }
.ult-movie .name .ln, .cutin .name .ln { margin-top: 8px; padding-top: 8px; border-top: 1px solid #afbac73d; font-family: var(--sans); font-size: clamp(15px, 1.7vw, 19px); line-height: 1.85; letter-spacing: .025em; color: #e8edf4; text-shadow: 0 1px 2px #040a18; overflow-wrap: anywhere; }
.ult-movie .skip { position: absolute; z-index: 3; right: max(18px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 15px; border: 1px solid #b6aa8a; border-radius: 2px; background: var(--grain), #10182beb; box-shadow: inset 0 0 0 2px #080e1c, 0 2px 8px #03071680; font-family: var(--sans); font-size: 13px; line-height: 1.5; letter-spacing: .035em; color: #f2e7ce; pointer-events: none; }
.ult-movie .skip-mark { display: block; position: relative; width: 14px; height: 13px; border-right: 2px solid #dbc390; }
.ult-movie .skip-mark::before, .ult-movie .skip-mark::after { content: ''; position: absolute; top: 3px; width: 6px; height: 6px; border-top: 1px solid #dbc390; border-right: 1px solid #dbc390; transform: rotate(45deg); }
.ult-movie .skip-mark::before { left: 0; }
.ult-movie .skip-mark::after { left: 5px; }
.cutin .band { border-color: #cfdae4; box-shadow: 0 0 40px #a4bed86b; }
.cutin.enemy .name { border-color: #c7a5c4; background: var(--grain), linear-gradient(115deg, #35293ef5, #17172df5); }
.cutin.enemy .skill-kicker { color: #ebc8db; }
@media (max-width: 640px) {
  .ult-movie .name, .cutin .name { right: 16px; width: calc(100% - 32px); max-width: calc(100% - 32px); padding: 14px 16px 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  .ult-movie .name { left: 0; right: 0; }
  .ult-movie .name .sk, .cutin .name .sk { font-size: clamp(27px, 7.2vw, 36px); letter-spacing: .045em; }
  .ult-movie .name .ln, .cutin .name .ln { margin-top: 6px; padding-top: 6px; font-size: 15px; line-height: 1.8; }
  .ult-movie .skip { right: max(16px, env(safe-area-inset-right)); padding-inline: 13px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .ult-movie .name, .cutin .name { bottom: calc(70px + env(safe-area-inset-bottom)); padding: 9px 18px 11px; width: min(660px, calc(100% - 40px)); max-width: calc(100% - 40px); }
  .ult-movie .skill-kicker, .cutin .skill-kicker { margin-bottom: 1px; font-size: 11px; }
  .ult-movie .name .sk, .cutin .name .sk { font-size: 30px; line-height: 1.35; }
  .ult-movie .name .ln, .cutin .name .ln { margin-top: 4px; padding-top: 4px; font-size: 14px; line-height: 1.7; }
  .ult-movie .skip { bottom: calc(10px + env(safe-area-inset-bottom)); }
}
@keyframes ultIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- 灯守の記録：月銀の装丁と静かな読書面 ---- */
.guild-hub .guild-records { grid-column: 1 / -1; padding: 24px; border-color: #a29378; background: var(--grain), linear-gradient(115deg, #323c50, #192238 62%, #111a2d); }
.guild-records-heading { display: flex; align-items: center; gap: 15px; min-width: 0; }
.guild-records-heading > div { flex: 1; min-width: 0; }
.guild-records-heading h2 { display: flex; flex-wrap: wrap; margin: 2px 0 0; gap: 6px 12px; color: #f8e9c9; }
.guild-records-heading h2::before, .guild-records-heading h2::after { content: none; }
.guild-records-seal { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 56px; color: #e6cf9c; font-family: var(--serif); font-size: 34px; border: 1px solid #a09272; border-radius: 2px; background: #0e182a; box-shadow: inset 0 0 0 3px #212b3b, inset 0 0 0 4px #a0927233; }
.rec-kicker { font-family: var(--sans); font-size: 11px; line-height: 1.8; letter-spacing: .12em; color: #d4bd94; }
.guild-records-copy { max-width: 620px; margin: 14px 0 12px; font-size: 14px; line-height: 1.9; }
.guild-records-index { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0 0 18px; font-family: var(--serif); font-size: 14px; color: #e0d8c8; }
.guild-records-index > span + span::before { content: '·'; margin-right: 16px; color: #a7997b; }
.guild-records .guild-main-action { max-width: 360px; }
.modal.card:has(> .records), .modal.card:has(> .rec-detail) { overflow-x: hidden; padding: 27px 28px; max-height: 90dvh; background: var(--grain), linear-gradient(145deg, #2c374e, #11192d 80%); border-color: #b9b7ab; }
.modal.card:has(> .records) { width: min(720px, 100%); }
.modal.card:has(> .rec-detail) { width: min(620px, 100%); }
.records, .rec-detail { min-width: 0; }
.rec-header { margin-bottom: 18px; }
.rec-header h2 { margin: 3px 0 5px; font-size: 29px; color: #f8ead0; }
.rec-intro { margin: 0; font-family: var(--serif); font-size: 14px; line-height: 1.8; letter-spacing: .04em; color: #d0d1d5; }
.records .rec-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding-bottom: 10px; border-bottom-color: #a09272; }
.records .rec-tabs button { min-width: 0; min-height: 48px; padding: 10px 5px; font-family: var(--serif); font-size: 16px; letter-spacing: .08em; }
.rec-list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 3px 8px; color: #d8c4a0; font-size: 12px; letter-spacing: .08em; }
.rec-list-heading > span:last-child { font-size: 16px; font-variant-numeric: tabular-nums; color: #f3e5cb; }
.rec-list-heading small { font-size: 11px; margin-left: 4px; color: #c4c2bf; }
.records .rec-list { display: grid; gap: 7px; max-height: 49dvh; overflow-y: auto; overflow-x: hidden; padding: 3px 4px 5px; margin-inline: -4px; scrollbar-color: #a09272 #0e1628; overscroll-behavior: contain; }
.records .rec-item { position: relative; display: grid; grid-template-columns: 22px 46px minmax(0, 1fr) 12px; align-items: center; gap: 11px; min-width: 0; min-height: 82px; padding: 13px 14px; text-align: left; border-radius: 2px; background: linear-gradient(100deg, #2a354a, #172237); border: 1px solid #8897aa66; color: #f3eee3; box-shadow: inset 0 1px #e5edf812, 0 2px 4px #05091633; }
.records .rec-item:has(.rec-new) { border-color: #b79d6888; border-left: 3px solid #d7ba7e; padding-left: 12px; background: linear-gradient(100deg, #52493766, #243147 45%, #172237); }
.rec-number { align-self: start; padding-top: 6px; color: #a8aebc; font-size: 11px; font-variant-numeric: tabular-nums; }
.rec-face { display: block; width: 46px; height: 51px; border-radius: 2px; border: 1px solid #9fa8b9; background-size: cover; background-position: center top; flex: 0 0 auto; box-shadow: inset 0 0 0 2px #07102066, 0 2px 4px #05091666; }
.rec-face.big { width: 78px; height: 86px; border-color: #cab78c; }
.rec-emblem { display: grid; place-items: center; width: 46px; height: 51px; background: linear-gradient(145deg, #323d4f, #141e31); border: 1px solid #a1937655; font-family: var(--serif); font-size: 25px; color: #d9c5a0; box-shadow: inset 0 0 0 3px #10192a; }
.rec-emblem-event { color: #bcd6e4; }
.rec-emblem.big { width: 60px; height: 76px; flex: 0 0 60px; font-size: 36px; }
.rec-entry { display: block; min-width: 0; }
.rec-title { display: block; font-family: var(--serif); font-size: 19px; line-height: 1.6; font-weight: 700; letter-spacing: .035em; color: #f4e9d6; overflow-wrap: anywhere; }
.rec-item:has(.rec-new) .rec-title { padding-right: 42px; }
.rec-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; font-size: 12px; line-height: 1.8; color: #c0c7d4; margin-top: 2px; }
.rec-open { grid-column: 4; color: #d5c09b; font-family: var(--serif); font-size: 24px; line-height: 1; }
.tag.rec-new { color: #f7e3b3; border-color: #c1a46c; background: #453b2f; border-radius: 2px; font-size: 11px; font-weight: 400; padding: 1px 6px; white-space: nowrap; }
.rec-item > .rec-new { position: absolute; top: 16px; right: 37px; }
.records .rec-talk { grid-template-columns: 22px minmax(0, 1fr) 12px; }
.rec-talk .rec-open { grid-column: 3; }
.rec-entry-meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 11px; color: #c1c8d8; }
.rec-entry-meta > span { color: #dac49b; }
.rec-empty { display: grid; justify-items: center; gap: 7px; padding: 30px 15px; border: 1px dashed #8d99ae66; color: #e3ded1; background: #10192a77; text-align: center; }
.rec-empty > span { font-family: var(--serif); font-size: 32px; color: #c3b08d; }
.rec-empty > b { font-family: var(--serif); font-size: 17px; }
.rec-empty p { margin: 0; color: #c1c8d8; font-size: 13px; line-height: 1.9; }
.rec-detail-head { gap: 16px; padding-bottom: 19px; margin-bottom: 0; border-bottom: 1px solid #b2a18266; }
.rec-detail-head > div { flex: 1; min-width: 0; }
.rec-detail-head h2 { display: block; margin: 4px 0; font-size: 27px; line-height: 1.65; color: #f8e8c9; letter-spacing: .045em; overflow-wrap: anywhere; }
.rec-detail-head h2::before, .rec-detail-head h2::after { content: none; }
.rec-detail-meta { color: #bfc7d6; font-size: 11px; letter-spacing: .08em; }
.rec-pages { padding: 6px 0 4px; }
.rec-part { min-width: 0; }
.rec-part-mark { display: flex; align-items: center; gap: 10px; margin-top: 17px; color: #cdb994; font-size: 10px; font-variant-numeric: tabular-nums; }
.rec-part-mark > i { display: block; width: 33px; height: 1px; background: #a89c8055; }
.rec-p { margin: 8px 0 17px; font-family: var(--sans); font-size: 15px; line-height: 2.15; letter-spacing: .02em; color: #e7e5df; overflow-wrap: anywhere; }
.rec-continuation { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 8px 0 4px; background: #b9a77b0c; border: 1px dashed #b5a17c66; border-left: 2px solid #c2aa79; }
.rec-continuation-mark { font-family: var(--serif); font-size: 24px; color: #dac39a; }
.rec-continuation > div { flex: 1; min-width: 0; }
.rec-continuation b { font-family: var(--serif); font-size: 15px; line-height: 1.8; font-weight: 700; color: #dfcba6; }
.rec-continuation p { margin: 3px 0 0; font-size: 12px; line-height: 1.9; color: #bdc4d0; }
.rec-end { color: #b9a782; text-align: center; font-size: 16px; margin: 8px 0; }
.rec-actions { position: sticky; bottom: -27px; z-index: 4; margin: 14px 0 -27px; padding: 12px 0 27px; background: linear-gradient(#151e3100, #151e31 10px); }
.rec-actions > .btn { width: 100%; min-height: 48px; }

/* ---- 商店の七つの棚と、仲間の契約札 ---- */
.shop-tabs.shop-nav { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.shop-tabs.shop-nav button { min-width: 0; min-height: 58px; }
.shop-tabs.shop-nav button[data-st='hire'], .shop-tabs.shop-nav button[data-st='sell'] { border-top: 2px solid #947b52; }
.shop-tabs.shop-nav .sti { font-family: var(--serif); }
.card.hire-intro { padding: 20px 22px; margin: 5px 0 18px; background: var(--grain), linear-gradient(125deg, #303948, #161f31); border-color: #ac9874; }
.hire-intro-heading { display: flex; align-items: center; gap: 16px; }
.hire-intro-heading > div { flex: 1; min-width: 0; }
.hire-intro-heading h2 { display: block; margin: 3px 0; font-size: 24px; color: #f3e5c7; }
.hire-intro-heading h2::before, .hire-intro-heading h2::after { content: none; }
.hire-roster { flex: 0 0 auto; padding: 5px 11px; border: 1px solid #a88e60; background: #10182a; color: #d4c4a5; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hire-roster b { font-size: 25px; font-weight: 400; color: #fae6b2; }
.hire-roster small { font-size: 11px; margin-left: 3px; }
.hire-roster.is-full { border-color: #c69ba3; color: #eecbd0; }
.hire-terms { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 10px; margin-top: 8px; border-top: 1px solid #ac987444; color: #c9c9cd; font-size: 13px; }
.hire-terms b { color: #ffe5b0; margin-left: 5px; font-size: 17px; font-weight: 400; white-space: nowrap; }
.hire-intro > p { color: #c7cbd5; font-size: 12px; line-height: 1.9; margin: 9px 0 13px; }
.hire-warning { display: flex; align-items: center; gap: 10px; background: #3b273466; border-left: 2px solid #c7929b; padding: 9px 12px; font-size: 13px; line-height: 1.85; color: #e0cbd0; }
.hire-warning > span:first-child { font-size: 19px; color: #d3a5ab; }
.hire-warning b { color: #ffd2d8; font-weight: 400; }
.sgrid.hire-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.scard.hire-card { gap: 10px; cursor: default; padding: 16px 17px; border-top: 3px solid #9b7c4c; }
.hire-card-kicker { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; margin-bottom: -2px; border-bottom: 1px solid #8c724133; color: #766042; font-size: 10px; letter-spacing: .1em; }
.hire-card .scard-top { gap: 14px; }
.hire-face { display: block; width: 64px; height: 78px; flex: 0 0 64px; background-size: contain; background-repeat: no-repeat; background-position: center bottom; }
.hire-card .hire-face { image-rendering: auto; border: 1px solid #ac936055; border-bottom: 2px solid #967848; border-radius: 2px; box-shadow: inset 0 0 0 3px #dfcea42e; }
.hire-card .sname { font-family: var(--serif); font-size: 23px; font-weight: 800; line-height: 1.55; }
.hire-card .stype { font-size: 12px; line-height: 1.75; }
.hire-level { display: inline-block; margin-top: 5px; font-size: 11px; color: #695238; }
.hire-card .sdesc { font-size: 14px; line-height: 1.9; margin-top: 1px; }
.hire-skills-label { color: #766044; font-size: 10px; margin-top: 2px; margin-bottom: -7px; letter-spacing: .08em; }
.hire-card .schips { margin-bottom: 5px; gap: 5px; }
.hire-card .schip { padding: 3px 7px; font-size: 12px; line-height: 1.7; background: #72592f10; color: #4a3a26; border: 1px solid #8c704533; }
.hire-card .sbuy { min-height: 50px; font-size: 22px; }

/* 転職も名簿と同じ人物札。選択は従来どおり、その職業へ進む。 */
.btn.jobchange-trigger { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; text-align: left; min-height: 50px; padding-inline: 14px; }
.jobchange-trigger > span:first-child { flex: 1; }
.job-proof { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; border: 1px solid #a28c6266; background: #111a2c; color: #e4cfa4; font-family: var(--sans); font-size: 11px; font-weight: 400; white-space: nowrap; }
.modal.card:has(> .jobchange-panel) { width: min(640px, 100%); max-height: 90dvh; overflow-x: hidden; padding: 25px 26px; border-color: #b6a484; background: var(--grain), linear-gradient(140deg, #2b374e, #11192d); }
.jobchange-heading h2 { margin: 2px 0 13px; font-size: 29px; color: #f6e7c9; }
.jobchange-current { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid #9ea9ba66; background: #0c172a77; }
.jobchange-current > div { min-width: 0; }
.jobchange-current > div > b { display: block; color: #f4e8cf; font-family: var(--serif); font-size: 19px; line-height: 1.7; overflow-wrap: anywhere; }
.jobchange-current > div > span { display: block; color: #bec7d5; font-size: 11px; line-height: 1.8; }
.jobchange-current .job-proof b { font-size: 18px; font-weight: 400; }
.jobchange-intro { font-family: var(--sans); margin: 13px 1px 16px; font-size: 13px; line-height: 1.95; color: #cbd1dc; }
.jobchange-list-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; padding: 0 2px 7px; color: #ddc9a5; font-size: 12px; }
.jobchange-list-heading > span:last-child { color: #b8c0cf; font-size: 11px; }
.members.jobchange-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.jobchange-list .job-option { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr) 13px; align-items: center; gap: 13px; padding: 12px 14px; min-width: 0; min-height: 104px; text-align: left; color: #e9e7e1; border: 1px solid #8c9aad77; border-radius: 2px; background: linear-gradient(105deg, #2e3c52, #182338); box-shadow: inset 0 1px #dce9f812; }
.job-option .job-face { width: 60px; height: 76px; border-bottom: 1px solid #b6a076; }
.job-option-body { display: block; min-width: 0; }
.job-name { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.6; color: #f2e5cb; overflow-wrap: anywhere; }
.job-weapons { display: block; color: #c2cddc; font-size: 12px; line-height: 1.8; margin: 2px 0 6px; }
.job-skills { display: flex; flex-wrap: wrap; gap: 4px 5px; }
.job-skills > span { padding: 2px 6px; background: #0d192baa; border: 1px solid #90a1b433; font-size: 11px; line-height: 1.7; color: #e2dacb; }
.job-select { color: #dbc395; font-family: var(--serif); font-size: 26px; }
.jobchange-actions { position: sticky; bottom: -25px; z-index: 4; margin: 14px 0 -25px; padding: 12px 0 25px; background: linear-gradient(#151e3100, #151e31 10px); }
.jobchange-actions > .btn { width: 100%; min-height: 48px; }
@media (hover: hover) {
  .records .rec-item:hover, .jobchange-list .job-option:hover { border-color: #ddc190; background: linear-gradient(100deg, #3c4d66, #223149); }
}
@media (max-width: 640px) {
  .guild-hub .guild-records { padding: 20px; }
  .guild-records-heading { gap: 12px; }
  .guild-records-seal { width: 40px; height: 49px; flex-basis: 40px; font-size: 29px; }
  .guild-records-heading h2 { font-size: 22px; }
  .guild-records-copy { font-size: 13px; }
  .guild-records .guild-main-action { max-width: none; }
  .modal.card:has(> .records), .modal.card:has(> .rec-detail) { padding: 22px 17px; }
  .rec-header { margin-bottom: 14px; }
  .rec-header h2 { font-size: 25px; }
  .rec-header h2::after { min-width: 24px; max-width: 90px; }
  .rec-intro { font-size: 13px; }
  .records .rec-tabs { gap: 5px; }
  .records .rec-tabs button { min-height: 48px; font-size: 14px; letter-spacing: .03em; }
  .records .rec-list { max-height: 46dvh; }
  .records .rec-item { grid-template-columns: 42px minmax(0, 1fr) 10px; gap: 9px; padding: 11px 10px; min-height: 78px; }
  .records .rec-item:has(.rec-new) { padding-left: 8px; }
  .rec-item .rec-number { display: none; }
  .rec-item .rec-face, .rec-item .rec-emblem { width: 42px; height: 47px; }
  .rec-item .rec-title { font-size: 17px; }
  .rec-item .rec-summary { font-size: 11px; }
  .rec-item .rec-open { grid-column: 3; }
  .rec-item > .rec-new { top: 12px; right: 27px; font-size: 10px; padding-inline: 5px; }
  .rec-item:has(.rec-new) .rec-title { padding-right: 37px; }
  .records .rec-talk { grid-template-columns: minmax(0, 1fr) 10px; }
  .rec-talk .rec-open { grid-column: 2; }
  .rec-detail-head { gap: 12px; padding-bottom: 16px; }
  .rec-detail-head .rec-face.big { width: 62px; height: 69px; }
  .rec-detail-head .rec-emblem.big { width: 42px; height: 58px; flex-basis: 42px; font-size: 29px; }
  .rec-detail-head h2 { font-size: 23px; line-height: 1.65; }
  .rec-detail-head .rec-kicker { font-size: 10px; letter-spacing: .07em; }
  .rec-p { font-size: 14px; line-height: 2.1; margin-bottom: 18px; }
  .rec-continuation { padding: 12px; gap: 10px; }
  .rec-continuation b { font-size: 14px; }
  .rec-actions { bottom: -22px; margin-bottom: -22px; padding-bottom: 22px; }
  .shop-tabs.shop-nav { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; padding: 7px 7px 10px; }
  .shop-tabs.shop-nav button { grid-column: span 3; min-height: 52px; padding: 6px 2px; }
  .shop-tabs.shop-nav button:nth-child(n+5) { grid-column: span 4; flex-direction: row; justify-content: center; gap: 7px; }
  .card.hire-intro { padding: 18px 16px; margin-bottom: 16px; }
  .hire-intro-heading { gap: 10px; align-items: flex-start; }
  .hire-intro-heading h2 { font-size: 21px; line-height: 1.65; }
  .hire-intro-heading .rec-kicker { font-size: 10px; letter-spacing: .04em; }
  .hire-roster { padding: 4px 8px; font-size: 12px; }
  .hire-roster b { font-size: 23px; }
  .hire-terms { gap: 7px 19px; }
  .hire-warning { font-size: 12px; padding: 9px 10px; gap: 8px; }
  .scard.hire-card { padding: 15px; }
  .hire-card .hire-face { width: 64px; height: 80px; }
  .hire-card .sname { font-size: 22px; }
  .modal.card:has(> .jobchange-panel) { padding: 22px 17px; }
  .jobchange-heading h2 { font-size: 25px; }
  .jobchange-current { grid-template-columns: 42px minmax(0, 1fr); gap: 9px 12px; padding: 11px; }
  .jobchange-current .rec-face { width: 42px; height: 47px; }
  .jobchange-current > .job-proof { grid-column: 2; justify-self: start; }
  .jobchange-current > div > b { font-size: 18px; }
  .jobchange-list .job-option { grid-template-columns: 48px minmax(0, 1fr) 10px; padding: 11px 10px; gap: 10px; }
  .job-option .job-face { width: 48px; height: 66px; }
  .job-name { font-size: 19px; }
  .job-weapons { font-size: 11px; }
  .job-skills > span { font-size: 10px; padding-inline: 5px; }
  .jobchange-actions { bottom: -22px; margin-bottom: -22px; padding-bottom: 22px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .records .rec-list { max-height: 32dvh; }
  .rec-header { margin-bottom: 9px; }
  .rec-header h2 { font-size: 24px; margin-block: 0; }
  .rec-header .rec-intro { display: none; }
}

/* ---- 影の深淵：紫銀の入口と、底へ続く層の道標 ---- */
.guild-hub .guild-abyss {
  grid-column: 1 / -1; position: relative; isolation: isolate; gap: 0;
  border-color: #9388b0; border-top: 2px solid #bbb0d4;
  background: var(--grain), radial-gradient(ellipse at 95% 0%, #645c8633, transparent 54%), linear-gradient(140deg, #24243d, #101225 62%, #070b18);
  box-shadow: inset 0 0 0 4px #080c1b88, inset 0 -28px 55px #03051099, 0 8px 22px #05091688;
}
.guild-abyss-heading { display: flex; align-items: center; gap: 18px; min-width: 0; }
.guild-abyss-heading > div { min-width: 0; flex: 1; }
.abyss-kicker { font-family: var(--sans); font-size: 11px; letter-spacing: .12em; color: #c4b7d9; line-height: 1.8; }
.guild-abyss-heading h2 { display: block; margin: 4px 0 3px; font-size: 29px; color: #ede3fa; letter-spacing: .13em; }
.guild-abyss-heading h2::before, .guild-abyss-heading h2::after { content: none; }
.abyss-subtitle { font-family: var(--serif); font-size: 13px; color: #bcb8d0; letter-spacing: .06em; }
.abyss-seal { position: relative; display: block; flex: 0 0 78px; width: 78px; height: 92px; background: radial-gradient(ellipse at 50% 35%, #9183c225, #040816 65%); border: 1px solid #8b7aa566; box-shadow: inset 0 0 0 4px #101124, inset 0 0 0 5px #75668e44; }
.abyss-seal i { position: absolute; border: 1px solid #a397c077; border-radius: 50%; left: 9px; right: 9px; height: 28px; top: 17px; box-shadow: 0 7px 12px #0007; }
.abyss-seal i:nth-child(2) { left: 16px; right: 16px; top: 37px; height: 22px; border-color: #8776a65c; }
.abyss-seal i:nth-child(3) { left: 23px; right: 23px; top: 55px; height: 16px; border-color: #675b823f; }
.abyss-seal b { position: absolute; display: block; left: 27px; top: 13px; font-family: var(--serif); font-size: 24px; font-weight: 400; color: #dcd1ef; text-shadow: 0 0 12px #aca0d044; }
.guild-abyss-copy { margin: 17px 0; max-width: 660px; font-size: 14px; line-height: 1.9; color: #cbc7db; }
.abyss-depth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid #8f82ab44; padding: 13px 0; gap: 16px; }
.abyss-depth > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; min-width: 0; }
.abyss-depth > div + div { border-left: 1px solid #8f82ab44; padding-left: 16px; }
.abyss-depth > div > span { font-size: 12px; color: #bab7ce; }
.abyss-depth b { font-family: var(--sans); font-weight: 400; font-size: 27px; line-height: 1.3; color: #eee4ff; font-variant-numeric: tabular-nums; }
.abyss-depth > div + div b { color: #b9d3dd; }
.abyss-depth small { font-size: 13px; margin-left: 3px; }
.abyss-milestone-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; margin: 17px 0 7px; font-size: 11px; color: #cbc1d9; }
.abyss-milestone-heading > span:last-child { color: #e3c89a; }
.abyss-milestones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-bottom: 20px; }
.abyss-milestone { display: grid; justify-items: center; gap: 2px; min-width: 0; padding: 7px 3px 6px; border: 1px solid #8d7ca044; background: linear-gradient(#30304644, #0a102177); }
.abyss-milestone i { font-style: normal; font-size: 16px; line-height: 1.3; color: #b7a2cb; }
.abyss-milestone b { font-size: 15px; font-weight: 400; color: #d3c8e0; font-variant-numeric: tabular-nums; }
.abyss-milestone small { font-size: 10px; margin-left: 2px; }
.abyss-milestone > span { font-size: 10px; color: #b4a9c3; }
.abyss-milestone.is-claimed { border-color: #b29a695c; background: linear-gradient(#89714522, #171727); }
.abyss-milestone.is-claimed i, .abyss-milestone.is-claimed > span { color: #ead2a3; }
.guild-hub .guild-abyss .guild-main-action { border-color: #b0a2ca; background: linear-gradient(110deg, #39364e, #20223b); color: #f0e6ff; }
.guild-hub .guild-abyss .guild-main-action > span { color: #d7c7ed; }
.modal.card:has(> .abyss-picker) { width: min(620px, 100%); max-height: 90dvh; padding: 25px; overflow-x: hidden; background: var(--grain), radial-gradient(ellipse at 85% 0%, #62538126, transparent 48%), linear-gradient(150deg, #26263f, #0d1225 72%, #070b18); border-color: #9c8fb8; }
.abyss-picker { min-width: 0; }
.abyss-picker-heading h2 { margin: 3px 0; font-size: 27px; color: #eee4fa; }
.abyss-picker-heading h2::before { color: #c5b4e0; }
.abyss-picker-sub { margin: 0 0 15px; color: #bcb7ce; font-family: var(--serif); font-size: 14px; letter-spacing: .06em; }
.abyss-picker-depth { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 15px; padding: 12px 14px; border: 1px solid #8a7ba455; background: #080e2088; font-size: 12px; color: #c5bdd8; }
.abyss-picker-depth b { font-size: 26px; font-weight: 400; color: #f0e5ff; font-variant-numeric: tabular-nums; }
.abyss-picker-depth small { font-size: 13px; margin-left: 3px; }
.abyss-picker-depth > span:last-child { margin-left: auto; color: #aaa3bd; }
.abyss-picker .abyss-intro { margin: 13px 0; font-size: 13px; color: #cbc7db; line-height: 1.9; }
.abyss-star { color: #f0d298; }
.abyss-list-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; margin: 16px 0 8px; color: #bab1ce; font-size: 11px; }
.abyss-picker .abyss-floors { position: relative; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.abyss-picker .abyss-floor { display: grid; grid-template-columns: 60px minmax(0, 1fr) 18px; align-items: center; gap: 13px; padding: 13px; min-width: 0; min-height: 108px; border: 1px solid #786b964d; border-radius: 2px; background: linear-gradient(110deg, #242a3e, #10172a); overflow: visible; box-shadow: inset 0 0 0 3px #070c1b44, 0 2px 6px #04071655; }
.abyss-picker .abyss-floor.is-unexplored { border-color: #b4a0d0; border-left: 3px solid #c8b3e5; padding-left: 11px; background: linear-gradient(115deg, #48405e88, #20253d 50%, #12182b); box-shadow: inset 0 0 0 2px #bb9cdb0c, 0 3px 12px #04071688; }
.abyss-floor-number { display: grid; justify-items: center; align-content: center; min-height: 80px; border: 1px solid #8d81aa55; background: radial-gradient(ellipse at 50% 20%, #71618722, #060b1988 70%); box-shadow: inset 0 0 0 3px #121729; }
.abyss-floor-number > span { font-size: 10px; color: #b4a7c5; line-height: 1.2; }
.abyss-floor-number b { font-family: var(--sans); font-size: 30px; font-weight: 400; line-height: 1.5; color: #e0d4f2; font-variant-numeric: tabular-nums; }
.abyss-floor-body { display: block; min-width: 0; }
.abyss-floor .abyss-floor-status { display: inline-block; padding: 1px 6px; font-size: 11px; line-height: 1.6; letter-spacing: .02em; color: #c0d9db; border: 1px solid #79979b55; background: #1c30354d; }
.abyss-floor.is-unexplored .abyss-floor-status { color: #efe0ff; border-color: #bb9bda88; background: #65537a44; }
.abyss-floor-name { display: block; margin-top: 3px; font-family: var(--serif); font-size: 20px; font-weight: 700; color: #eee6f5; line-height: 1.65; overflow-wrap: anywhere; }
.abyss-floor .practice-place-meta { gap: 2px 14px; font-size: 12px; margin-top: 4px; }
.abyss-floor .practice-place-meta > span { color: #bdc4d6; white-space: normal; }
.abyss-floor .practice-place-meta b { font-size: 14px; font-weight: 400; color: #e5dfef; }
.abyss-floor-reward { display: block; margin-top: 8px; padding-top: 5px; border-top: 1px solid #ad956f44; color: #f3d49c; font-size: 12px; line-height: 1.7; }
.abyss-floor-reward.is-claimed { color: #b9b3c3; }
.abyss-floor-reward.is-claimed > span { color: #baa47e; }
.abyss-floor .abyss-floor-arrow { position: static; transform: none; color: #bda5d6; font-size: 24px; justify-self: center; }
.abyss-actions { position: sticky; bottom: -25px; z-index: 4; margin: 12px 0 -25px; padding: 13px 0 25px; background: linear-gradient(#0c112400, #0c1124 12px); }
.abyss-actions > .btn { width: 100%; min-height: 48px; }
@media (hover: hover) {
  .abyss-picker .abyss-floor:hover { border-color: #d1b8e5; background: linear-gradient(115deg, #3d3856, #1f2b41); }
}
@media (max-width: 600px) {
  .guild-hub .guild-abyss { padding: 20px; }
  .guild-abyss-heading { gap: 13px; }
  .abyss-seal { flex-basis: 65px; width: 65px; height: 84px; }
  .abyss-seal b { left: 21px; }
  .guild-abyss-heading h2 { font-size: 25px; letter-spacing: .09em; }
  .abyss-kicker { font-size: 10px; letter-spacing: .06em; }
  .abyss-subtitle { font-size: 12px; letter-spacing: .02em; }
  .guild-abyss-copy { font-size: 13px; margin-block: 14px; }
  .abyss-depth { gap: 10px; }
  .abyss-depth > div { display: grid; justify-content: start; gap: 6px; }
  .abyss-depth > div + div { padding-left: 10px; }
  .abyss-depth > div > span { font-size: 11px; }
  .abyss-depth b { font-size: 25px; }
  .abyss-milestones { gap: 5px; }
  .modal.card:has(> .abyss-picker) { padding: 22px 17px; }
  .abyss-picker .abyss-floor { grid-template-columns: 48px minmax(0, 1fr) 15px; gap: 10px; padding: 12px 10px; }
  .abyss-picker .abyss-floor.is-unexplored { padding-left: 8px; }
  .abyss-floor-number b { font-size: 26px; }
  .abyss-floor-name { font-size: 18px; }
  .abyss-floor .practice-place-meta { gap: 2px 10px; }
  .abyss-actions { bottom: -22px; margin-bottom: -22px; padding-bottom: 22px; }
}

/* ---- 月灯りの商店：八つの棚と合成のレシピ札 ---- */
.shop-tabs.shop-nav { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.shop-tabs.shop-nav button { min-width: 0; min-height: 58px; line-height: 1.5; }
.shop-tabs.shop-nav button[data-st='craft'] { border-top: 2px solid #947b52; }
.shop-tabs.shop-nav button > span:last-child { overflow-wrap: anywhere; }

.card.craft-intro, .card.craft-empty {
  color: #423020; border-color: #b18d56; background: var(--shop-paper);
  box-shadow: inset 0 0 0 3px #fff4, inset 0 0 0 4px #ad8d5333, 0 5px 12px #0006;
}
.card.craft-intro::before, .card.craft-empty::before { inset: 4px; border: 1px solid #b18d5633; border-image: none; }
.card.craft-intro { padding: 20px 22px; margin: 6px 0 18px; }
.craft-intro-heading { display: flex; align-items: center; gap: 12px; }
.craft-intro-heading > div { flex: 1; min-width: 0; }
.craft-kicker { color: #785d3f; font-size: 11px; line-height: 1.75; letter-spacing: .07em; }
.craft-intro-heading h2 { display: block; margin: 3px 0 0; color: #3f2b1b; font-size: 27px; }
.craft-intro-heading h2::before, .craft-intro-heading h2::after { content: none; }
.craft-guarantee {
  display: grid; place-items: center; flex: none; width: 70px; height: 70px; padding: 8px;
  border: 1px solid #9e7742; border-radius: 50%; outline: 1px solid #9e774266; outline-offset: -5px;
  background: #9d723712; color: #735029; font-family: var(--serif); font-size: 15px; font-weight: 800;
  text-align: center; transform: rotate(-7deg);
}
.craft-intro > p { margin: 10px 0 11px; color: #473424; font-size: 14px; line-height: 1.8; }
.craft-guide { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 10px 0; border-block: 1px solid #a5875144; font-size: 12px; line-height: 1.8; color: #685039; }
.craft-guide b { color: #3d2c1e; font-weight: 400; }
.craft-intro-note { margin-top: 9px; color: #765d42; font-size: 11px; line-height: 1.85; }
.sgrid.craft-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.scard.craft-card { min-width: 0; padding: 18px 16px 14px; gap: 0; }
.craft-card.craft-ready { border-top-width: 3px; }
.craft-material-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; color: #785d3e; font-size: 11px; letter-spacing: .04em; }
.craft-state { padding: 2px 7px; border: 1px solid #a9916b; background: #87715212; color: #766044; font-size: 11px; line-height: 1.6; white-space: nowrap; letter-spacing: 0; }
.craft-ready .craft-state { border-color: #7a9068; background: #66734d15; color: #415d38; }
.craft-card .craft-materials { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.craft-card .craft-materials > .schip {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) 65px; align-items: center; gap: 9px;
  width: 100%; min-width: 0; min-height: 63px; padding: 8px;
  border: 1px solid #b29b7455; border-radius: 2px; background: #fffaf333;
  color: #463422; font-size: 13px; line-height: 1.75;
}
.craft-material-name { min-width: 0; overflow-wrap: anywhere; }
.craft-card .craft-materials > .schip.lack { opacity: 1; text-decoration: none; border-color: #b5777355; background: #a65a5110; }
.craft-lack-label { display: block; width: fit-content; padding: 0 5px; margin-top: 2px; color: #9b4141; background: #9b41410d; border: 1px solid #9b414144; font-size: 10px; line-height: 1.65; }
.craft-stock { text-align: right; font-variant-numeric: tabular-nums; }
.craft-stock > span { display: block; font-size: 10px; color: #80684d; white-space: nowrap; }
.craft-card .craft-stock b { display: block; color: #3e3020; font-size: 21px; line-height: 1.5; font-weight: 400; white-space: nowrap; }
.craft-stock em { margin-left: 4px; color: #82694e; font-size: 14px; font-style: normal; }
.craft-materials .lack .craft-stock b { color: #a23f42; }
.craft-arrow { display: flex; align-items: center; gap: 12px; min-height: 31px; margin: 1px 8px; color: #967340; }
.craft-arrow::before, .craft-arrow::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, #9c7c4222, #9c7c4266); }
.craft-arrow::after { transform: scaleX(-1); }
.craft-arrow > span { font-size: 24px; line-height: 1.2; }
.craft-output-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: #786044; font-size: 11px; line-height: 1.7; }
.craft-output-label > span { font-size: 10px; color: #8d7457; }
.craft-card .craft-output { min-height: 76px; padding: 8px 0 12px; gap: 12px; }
.craft-output > .iart, .craft-output > .ticon, .craft-output > .ticon-img { flex: none; }
.craft-card .craft-output .sname { font-family: var(--serif); font-size: 21px; font-weight: 800; line-height: 1.55; overflow-wrap: anywhere; }
.craft-card .craft-output .stype { line-height: 1.75; }
.craft-card .craft-buy { gap: 8px; justify-content: flex-start; padding: 8px 10px; min-height: 52px; font-size: 21px; line-height: 1.5; }
.craft-card .craft-buy::before { content: none; }
.craft-fee-label { color: #785730; font-size: 11px; font-weight: 400; flex: none; }
.craft-price { min-width: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.craft-card .craft-buy .sbl { margin-left: auto; padding: 3px 8px; border-radius: 2px; font-size: 13px; white-space: nowrap; }
.craft-card .craft-buy.poor .craft-fee-label { color: #6c5b45; }
.card.craft-empty { display: flex; align-items: center; gap: 14px; padding: 24px 22px; }
.craft-empty-mark { flex: none; color: #9a7945; font-family: var(--serif); font-size: 36px; }
.craft-empty > div { min-width: 0; }
.craft-empty b { display: block; font-family: var(--serif); color: #4b3522; font-size: 19px; line-height: 1.7; overflow-wrap: anywhere; }
.craft-empty p { margin: 7px 0 0; color: #765a3d; font-size: 12px; line-height: 1.9; }
@media (hover: hover) {
  .craft-card:hover { box-shadow: inset 0 0 0 3px #fff6, inset 0 0 0 4px #ad8d5355, 0 6px 15px #0008; }
}
@media (max-width: 640px) {
  .shop-tabs.shop-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 7px 7px 10px; }
  .shop-tabs.shop-nav button, .shop-tabs.shop-nav button:nth-child(n+5) { grid-column: auto; min-height: 56px; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px; font-size: 12px; }
  .card.craft-intro { padding: 17px 16px; margin-bottom: 16px; }
  .craft-kicker { font-size: 10px; letter-spacing: .03em; }
  .craft-intro-heading h2 { font-size: 24px; }
  .craft-guarantee { width: 61px; height: 61px; font-size: 13px; }
  .craft-intro > p { font-size: 13px; }
  .craft-guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 11px; }
  .scard.craft-card { padding: 16px 13px 13px; }
  .craft-card .craft-materials > .schip { gap: 7px; }
  .craft-card .craft-output .sname { font-size: 20px; }
  .card.craft-empty { padding: 20px 16px; gap: 10px; }
  .craft-empty b { font-size: 17px; }
}

/* 絆の索引：ふたりの顔、会話の題名、解放までの勝利を別々に読む。 */
.records .rec-tabs { grid-template-columns:repeat(5,minmax(44px,1fr)); }
.records .rec-tabs button { min-width:44px; min-height:48px; padding-inline:4px; }
.rec-bond-intro { margin:0 0 11px; padding:9px 11px; border-left:2px solid #bda578; background:#111b2d88; color:#d2d5de; font-size:12px; line-height:1.8; }
.records .rec-bond { grid-template-columns:18px 96px minmax(0,1fr) 12px; gap:12px; min-height:126px; padding:14px; }
.records .rec-bond:has(.rec-new) { padding-left:12px; }
.records .rec-bond:has(.rec-new) .rec-title { padding-right:0; }
.rec-bond .rec-pair { position:relative; display:grid; grid-template-columns:repeat(2,45px); align-items:center; gap:6px; min-width:0; }
.rec-bond .rec-pair::after { content:''; position:absolute; left:50%; top:50%; width:6px; height:6px; transform:translate(-50%,-50%) rotate(45deg); border:1px solid #ecd1a0; background:#243149; box-shadow:0 0 0 2px #152136; pointer-events:none; }
.rec-bond .rec-pair .rec-face { width:45px; height:51px; border-color:#b2afab; }
.rec-bond-meta { display:flex; flex-wrap:wrap; align-items:center; gap:5px 8px; margin-bottom:3px; min-width:0; }
.rec-bond-state { font-size:11px; line-height:1.7; color:#e6c994; letter-spacing:.06em; }
.records .rec-bond .rec-new { position:static; font-size:11px; padding:0 5px; }
.rec-bond .rec-title { font-size:19px; line-height:1.5; }
.rec-bond-names { display:flex; flex-wrap:wrap; gap:0 8px; margin-top:4px; font-size:12px; line-height:1.8; color:#cdd6e3; }
.rec-bond-names > span { min-width:0; overflow-wrap:anywhere; }
.rec-bond-names > span + span::before { content:'·'; color:#bba788; margin-right:8px; }
.rec-bond-read { display:block; margin-top:6px; color:#ebd7b0; font-size:11px; line-height:1.6; }
.rec-bond .rec-open { grid-column:4; }
.records .rec-bond.rec-locked { opacity:1; cursor:default; border:1px dashed #77839888; background:linear-gradient(110deg,#1e293c,#111b2c); box-shadow:inset 0 1px #e5edf808; }
.rec-bond.rec-locked .rec-pair .rec-face { filter:grayscale(.55); opacity:.72; border-color:#7f8da2; }
.rec-bond.rec-locked .rec-pair::after { border-color:#8998ad; background:#131e30; }
.rec-bond.rec-locked .rec-bond-state { color:#bfcad9; }
.rec-bond.rec-locked .rec-title { color:#bec6d4; letter-spacing:.12em; }
.rec-bond-remaining { display:block; margin-top:6px; color:#dfceb0; font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.rec-bond-remaining b { color:#f7e5bf; font-size:17px; font-variant-numeric:tabular-nums; font-weight:400; }

/* 護符：永久に刻む十の枠と、所持している護符を並べる。 */
.charm-box { display:grid; gap:10px; min-width:0; margin-top:16px; padding:14px; border:1px solid #a99a7b; border-radius:2px; background:var(--grain),linear-gradient(135deg,#30394b,#111c2f); box-shadow:inset 0 0 0 3px #0a142355; }
.charm-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; min-width:0; }
.charm-heading > div { display:grid; gap:1px; }
.charm-kicker { font-size:10px; line-height:1.7; letter-spacing:.1em; color:#d6bd94; }
.charm-title { font-family:var(--serif); font-size:21px; line-height:1.4; letter-spacing:.08em; color:#f5e6c9; }
.charm-count { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px; padding:5px 8px; border:1px solid #a89a794d; background:#0e182a; color:#d0c9bb; font-size:11px; line-height:1.5; }
.charm-count b { color:#f4deb0; font-size:21px; font-weight:400; font-variant-numeric:tabular-nums; }
.charm-slots { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:5px; padding-top:1px; }
.charm-slots > i { display:block; height:7px; border:1px solid #70809788; border-radius:1px; background:#0b1425; }
.charm-slots > i.on { border-color:#e6cc94; background:linear-gradient(90deg,#94764e,#e7cb93); box-shadow:0 0 5px #eed19a22; }
.charm-note { margin:0; font-size:12px; line-height:1.8; color:#cbd3de; overflow-wrap:anywhere; }
.charm-note b { display:block; margin-top:3px; color:#efd5a5; font-weight:400; }
.charm-gains { display:flex; flex-wrap:wrap; gap:4px 8px; padding:7px 8px; border:1px solid #b29b6c44; background:#bd9f6220; font-size:11px; line-height:1.7; }
.charm-gains > span { color:#c7c5bf; }
.charm-gains > b { font-weight:400; color:#f1debc; font-variant-numeric:tabular-nums; }
.charm-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); gap:7px; min-width:0; }
.charm-box .btn.charm-choice { display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:9px; min-width:0; min-height:68px; padding:10px; text-align:left; font-weight:400; letter-spacing:0; border-color:#95a5bb; background:linear-gradient(115deg,#2b3a50,#142136); box-shadow:inset 0 0 0 2px #09132355,0 2px 5px #05091655; }
.charm-box .btn.charm-choice::before { border-image-width:12px; opacity:.45; }
.charm-seal { position:relative; display:grid; place-items:center; width:28px; height:36px; border:1px solid #d8bb83; border-radius:1px; background:linear-gradient(145deg,#f1dfba,#bca277); color:#293c52; font-family:var(--serif); font-size:17px; text-shadow:none; box-shadow:inset 0 0 0 3px #79654866; }
.charm-seal::after { content:''; position:absolute; top:-4px; left:9px; width:8px; height:4px; border:1px solid #cfb480; background:#132138; pointer-events:none; }
.charm-choice-body { display:grid; gap:2px; min-width:0; }
.charm-choice-body > b { color:#f1e7d4; font-family:var(--serif); font-size:15px; line-height:1.5; font-weight:700; overflow-wrap:anywhere; }
.charm-effect { color:#c4d4e7; font-size:12px; line-height:1.6; }
.charm-effect strong { color:#f1d29b; font-size:16px; font-weight:400; font-variant-numeric:tabular-nums; }
.charm-choice-end { display:grid; justify-items:end; gap:3px; }
.charm-owned { color:#c8d0db; font-size:11px; line-height:1.5; white-space:nowrap; }
.charm-owned b { color:#ecddbf; font-weight:400; font-variant-numeric:tabular-nums; }
.charm-use { display:flex; gap:8px; align-items:center; color:#f5deb1; font-size:12px; line-height:1.6; white-space:nowrap; }
.charm-use > span { font-family:var(--serif); font-size:20px; line-height:1; }
.charm-empty { display:block; padding:10px; background:#0e182a88; border:1px dashed #8b97aa66; color:#c7d0dc; font-size:12px; line-height:1.8; }
@media (hover:hover) {
  .records .rec-bond.rec-locked:hover { border-color:#77839888; background:linear-gradient(110deg,#1e293c,#111b2c); }
}
@media (max-width:640px) {
  .records .rec-tabs { gap:4px; }
  .records .rec-tabs button { padding-inline:2px; font-size:14px; letter-spacing:0; }
  .rec-bond-intro { padding:8px 10px; font-size:11px; }
  .records .rec-bond { grid-template-columns:82px minmax(0,1fr) 10px; gap:9px; min-height:125px; padding:12px 10px; }
  .records .rec-bond:has(.rec-new) { padding-left:8px; }
  .rec-bond .rec-pair { grid-template-columns:repeat(2,38px); gap:6px; }
  .rec-bond .rec-pair .rec-face { width:38px; height:44px; }
  .rec-bond .rec-open { grid-column:3; }
  .rec-bond .rec-title { font-size:17px; }
  .rec-bond-names { font-size:11px; gap:0 5px; }
  .rec-bond-names > span + span::before { margin-right:5px; }
  .rec-bond-remaining { font-size:11px; }
  .charm-box { padding:12px; gap:9px; }
  .charm-box .btn.charm-choice { min-height:68px; }
}

/* 出撃前の作戦手帖：偵察 → 編成 → 道具。月銀の枠の中で準備の順番を読む。 */
.modal.card:has(> .prep-panel), .modal.card:has(> .scout-detail) {
  overflow-x: hidden; max-height: 90dvh; padding: 25px 26px;
  background: var(--grain), linear-gradient(145deg, #2a374e, #111a2d 82%); border-color: #b3bdcb;
}
.modal.card:has(> .prep-panel) { width: min(760px, 100%); }
.modal.card:has(> .scout-detail) { width: min(620px, 100%); }
.prep-panel, .scout-detail { min-width: 0; }
.prep-header { padding-bottom: 15px; border-bottom: 1px solid #a9b3c466; }
.prep-kicker, .scout-kicker { color: #d6c4a2; font-size: 11px; letter-spacing: .1em; line-height: 1.8; }
.prep-kicker { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 13px; }
.prep-kicker > span { color: #b8c5d8; letter-spacing: .04em; }
.prep-header h2, .scout-head h2 { display: block; margin: 4px 0 11px; color: #f8ecd4; font-size: 29px; line-height: 1.55; overflow-wrap: anywhere; }
.prep-header h2::before, .prep-header h2::after, .scout-head h2::before, .scout-head h2::after { content: none; }
.prep-goal { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 8px 10px; background: #101a2c88; border-left: 2px solid #cdb485; }
.prep-goal > span { flex: none; color: #c8bda8; font-size: 11px; white-space: nowrap; }
.prep-goal > b { color: #faebc9; font-size: 14px; font-weight: 400; line-height: 1.8; overflow-wrap: anywhere; }
.prep-practice { color: #bddece; font-size: 11px; margin: 7px 0 0; }
.prep-guide { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 5px 13px; margin-top: 13px; font-size: 12px; line-height: 1.8; color: #dce3ec; }
.prep-guide b { font-size: 10px; font-weight: 400; color: #d6bc87; }
.prep-guide > i { color: #90a2bb; font-style: normal; }
.prep-section { padding-top: 20px; margin-top: 19px; border-top: 1px solid #8f9db74d; min-width: 0; }
.prep-section.prep-scout { padding-top: 17px; margin-top: 0; border-top: 0; }
.prep-section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; min-width: 0; }
.prep-step { display: grid; place-items: center; flex: none; width: 29px; height: 29px; border: 1px solid #a9977166; background: #0f1a2d; color: #d7c192; font-size: 12px; font-variant-numeric: tabular-nums; }
.prep-section-head h3 { flex: 1 1 170px; font-size: 20px; color: #eee6d5; letter-spacing: .03em; line-height: 1.6; }
.prep-count { padding: 2px 8px; background: #102134; border: 1px solid #7b9aab; color: #d2e9f4; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prep-head-note { margin-left: auto; color: #dfc6bd; font-size: 12px; white-space: nowrap; }
.prep-note { color: #c1ccdc; font-size: 12px; line-height: 1.85; margin: 8px 0 12px; overflow-wrap: anywhere; }
.prep-panel .scout-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.prep-panel .scout-chip { display: grid; grid-template-columns: 40px minmax(0, 1fr) 10px; align-items: center; gap: 10px; min-width: 0; min-height: 68px; padding: 9px 11px; text-align: left; border-color: #a591a577; background: linear-gradient(115deg, #3a3043, #19253a); letter-spacing: 0; }
.prep-panel .scout-chip::before { border-image-width: 12px; opacity: .55; }
.prep-panel .scout-face { display: block; background-size: cover; background-position: center top; background-repeat: no-repeat; width: 40px; height: 45px; flex: none; border: 1px solid #b5a8b0; border-radius: 2px; box-shadow: inset 0 0 0 2px #0b122a66; }
.scout-chip-body { display: block; min-width: 0; }
.scout-chip-body > b { display: block; font-family: var(--serif); color: #f1e5dc; font-size: 16px; line-height: 1.6; font-weight: 700; overflow-wrap: anywhere; }
.scout-chip-body > span { display: flex; flex-wrap: wrap; gap: 4px 11px; line-height: 1.8; }
.scout-chip-level { color: #c3d1e2; font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
.scout-chip-count { color: #e8c5bf; font-size: 11px; font-weight: 400; white-space: nowrap; }
.scout-chip-open { color: #b7bdce; font-family: var(--serif); font-size: 24px; line-height: 1; }
.prep-presets { margin: 12px 0 15px; padding: 12px; border: 1px solid #9cabbb55; background: #0b172966; box-shadow: inset 0 1px #dbe7ed0a; }
.prep-subhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.prep-subhead h4 { margin: 0; color: #e5d8be; font-family: var(--serif); font-size: 15px; letter-spacing: .04em; line-height: 1.8; }
.prep-subhead > span { color: #b8c4d4; font-size: 10px; line-height: 1.8; }
.prep-panel .preset-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.prep-panel .preset-slot { display: grid; grid-template-columns: minmax(0, 1fr) 50px; gap: 0; min-width: 0; border: 1px solid #8e9cb17a; border-radius: 2px; background: linear-gradient(100deg, #293a52, #142037); }
.prep-panel .preset-slot .btn { border: 0; border-radius: 0; box-shadow: none; letter-spacing: 0; min-height: 56px; }
.prep-panel .preset-slot .btn::before { content: none; }
.prep-panel .preset-load { display: grid; grid-template-columns: 21px minmax(0, 1fr); align-items: center; gap: 7px; padding: 8px 7px; min-width: 0; text-align: left; background: none; }
.preset-number { color: #d2bc8e; font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums; }
.preset-label { display: block; min-width: 0; }
.preset-label > b { display: block; color: #e5e1d4; font-family: var(--serif); font-size: 14px; line-height: 1.6; white-space: nowrap; }
.preset-state-loaded, .preset-state-empty { color: #bbd7e6; font-size: 10px; font-weight: 400; line-height: 1.6; white-space: nowrap; }
.preset-state-empty { display: none; }
.prep-panel .preset-load:disabled { opacity: 1; filter: none; background: #101a2b; }
.preset-load:disabled .preset-number, .preset-load:disabled .preset-label > b { color: #9aa7ba; }
.preset-load:disabled .preset-state-loaded { display: none; }
.preset-load:disabled .preset-state-empty { display: inline; color: #9aa7ba; }
.prep-panel .preset-slot .preset-save { min-width: 44px; min-height: 44px; padding: 7px 3px; align-self: stretch; border-left: 1px solid #8495ab66; color: #e7d8b9; background: #31405777; font-size: 12px; }
.prep-panel .preset-last { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 8px 11px; border-color: #a8b4c177; background: #23374b; text-align: left; font-size: 13px; font-weight: 400; }
.preset-last > span:first-child { color: #d6c29a; font-size: 21px; line-height: 1; }
.preset-last-action { margin-left: auto; color: #c7dced; font-size: 11px; }
.preset-help { margin: 8px 0 0; color: #bcc9d9; font-size: 10px; line-height: 1.8; }
.prep-panel .prep-members { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prep-members .member { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 0; min-width: 0; min-height: 104px; padding: 8px; border: 1px solid #8091aa77; border-radius: 2px; background: linear-gradient(110deg, #29394f, #142138); }
.prep-members .member.on { border-color: #d6bc88; background: linear-gradient(110deg, #504b3b88, #2b3b50 60%, #1c2b40); box-shadow: inset 0 0 0 1px #dbc08c33, 0 2px 7px #05091644; }
.prep-members .member .mpic { height: 88px; width: 66px; border-bottom: 1px solid #899aaf77; border-radius: 1px; background-size: 240% auto; }
.prep-members .member .mno { top: 7px; left: 7px; width: 23px; height: 23px; border-radius: 2px; background: #e8cf99; box-shadow: 0 1px 3px #070c1988; font-size: 12px; }
.prep-members .member .minfo { min-width: 0; padding: 0 1px 18px 11px; }
.prep-members .minfo > b { display: block; color: #e9e5d9; font-family: var(--serif); font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.prep-members .member.on .minfo > b { color: #ffedc4; }
.prep-members .member .mtags { margin: 3px 0 4px; gap: 3px; }
.prep-members .member .mtags .tag { padding: 0 4px; font-size: 10px; line-height: 1.8; background: #0c192a88; }
.prep-members .member-stats { font-size: 10px; line-height: 1.8; color: #bcc8d8; }
.member-state { position: absolute; right: 9px; bottom: 7px; color: #99a9be; font-size: 10px; line-height: 1.6; }
.prep-members .member.on .member-state { color: #f2d8a8; }
.prep-map-heading { margin-top: 15px; }
.prep-ally-mark { display: inline-block; width: 8px; height: 8px; margin-right: 4px; transform: rotate(45deg); background: #83b7e6; border: 1px solid #c1e0ff; }
.prep-panel .fpv-wrap { height: 260px; }
.prep-panel #cc { display: grid; gap: 7px; min-width: 0; }
.prep-panel .prep-supply { display: grid; grid-template-columns: 40px minmax(0, 1fr) 120px; gap: 8px 11px; padding: 11px 12px; min-width: 0; border-color: #9cacc177; }
.prep-supply > .ticon, .prep-supply > .ticon-img { align-self: start; margin-top: 3px; }
.prep-supply-copy { min-width: 0; min-height: 44px; align-self: center; line-height: 1.8; }
.prep-supply-copy > b { color: #eee7d6; font-size: 14px; font-weight: 400; }
.prep-supply .supply-owned { display: inline-block; color: #c2cfde; font-size: 10px; white-space: nowrap; }
.prep-supply .supply-desc { color: #b6c4d5; font-size: 11px; line-height: 1.8; }
.prep-supply .stepper { gap: 5px; justify-content: flex-end; align-self: center; }
.prep-supply .stepper button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; font-size: 21px; font-weight: 400; }
.prep-supply .stepper b { display: inline-block; min-width: 21px; text-align: center; color: #f5e5c6; font-size: 17px; font-weight: 400; font-variant-numeric: tabular-nums; }
.prep-empty { display: grid; gap: 4px; padding: 18px; border: 1px dashed #8b9bb366; background: #0d172b66; color: #d8dcd9; text-align: center; }
.prep-empty > span { color: #b9c7d8; font-size: 11px; }
.prep-panel .prep-actions, .scout-actions { position: sticky; bottom: -25px; z-index: 4; display: grid; gap: 8px; margin: 15px 0 -25px; padding: 14px 0 25px; background: linear-gradient(#141e3000, #141e30 12px); }
.prep-panel .prep-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.prep-panel .prep-actions .btn, .scout-actions .btn { width: 100%; min-width: 0; min-height: 48px; }
.prep-panel .prep-actions #go { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #fff0cd; background: #344963; border-color: #dfc48d; box-shadow: inset 0 -3px #ad9466, 0 3px 8px #05091677; }
.prep-actions #go > span { color: #e8cfa0; font-family: var(--serif); font-size: 24px; line-height: 1; }
.scout-head { gap: 16px; padding-bottom: 17px; margin-bottom: 14px; border-bottom: 1px solid #b2a9ad55; }
.scout-head > div { min-width: 0; }
.scout-head h2 { margin: 2px 0 5px; font-size: 26px; }
.scout-head .rec-face.big { width: 78px; height: 88px; border-color: #ba9ead; }
.scout-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 9px; color: #cbd1df; font-size: 11px; line-height: 1.8; }
.scout-level { color: #c2d8e9; font-variant-numeric: tabular-nums; }
.scout-level b { color: #f3e7cf; font-size: 19px; font-weight: 400; }
.scout-meta .tag { padding: 0 5px; font-size: 10px; }
.scout-meta .scout-boss { color: #ffd0d6; border-color: #b18497; background: #462f42; }
.scout-profile { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 16px; border: 1px solid #91a2b466; background: #0c192b88; }
.scout-profile > div { padding: 9px 12px; min-width: 0; }
.scout-profile > div + div { border-left: 1px solid #8e9fb44d; }
.scout-profile dt { color: #b5c3d3; font-size: 10px; line-height: 1.8; }
.scout-profile dd { margin: 2px 0 0; color: #f3e8d2; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.scout-detail .scout-element { color: var(--scout-element); border-color: var(--scout-element); background: #0d1a2d; border-radius: 2px; font-size: 12px; padding: 1px 7px; }
.scout-section h3, .scout-detail .detail-box h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; margin: 0 0 8px; color: #e8dac1; font-family: var(--serif); font-size: 17px; letter-spacing: .04em; line-height: 1.7; }
.scout-section h3 > span, .scout-detail .detail-box h3 > span { color: #b6c4d6; font-family: var(--sans); font-size: 10px; letter-spacing: 0; }
.scout-detail .scout-stats { margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.scout-detail .scout-stats > div { padding: 8px 4px; text-align: center; min-width: 0; border-bottom: 1px solid #a99c7a66; background: #0d192b; }
.scout-stats > div > span { display: block; color: #b9c8da; font-size: 10px; line-height: 1.8; }
.scout-detail .scout-stats b { display: block; margin-top: 1px; color: #f2e6cd; font-size: 23px; font-weight: 400; line-height: 1.4; }
.scout-detail .detail-box { margin-top: 14px; padding: 12px; border-radius: 2px; border-color: #8f9fb466; background: #10203366; }
.scout-skill-list { display: flex; flex-wrap: wrap; gap: 5px; }
.scout-skill-list > span { color: #d4e0eb; padding: 4px 7px; border: 1px solid #7c91ac55; background: #1e3047; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.scout-affinities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scout-detail .scout-weak { border-left: 2px solid #d09b99; background: #44334444; }
.scout-detail .scout-resist { border-left: 2px solid #8eacbe; background: #24404e44; }
.scout-detail .scout-weak h3 { color: #f2c8c1; }
.scout-detail .scout-resist h3 { color: #c4deec; }
.scout-element-list { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 5px; min-height: 28px; }
.scout-detail .scout-none { color: #c1cbd9; font-size: 12px; line-height: 1.8; }
.scout-detail .scout-status > div { display: flex; flex-wrap: wrap; gap: 5px 14px; color: #d1d9e5; font-size: 12px; }
.scout-status b { color: #e7d5b6; font-weight: 400; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .prep-panel .scout-chip:hover:not(:disabled) { border-color: #d5b8bc; }
  .prep-panel .preset-load:hover:not(:disabled) { background: #3c536e; }
  .prep-members .member:hover:not(:disabled) { border-color: #d0bb94; }
}
@media (max-width: 640px) {
  .modal.card:has(> .prep-panel), .modal.card:has(> .scout-detail) { padding: 22px 17px; }
  .prep-header h2 { font-size: 24px; }
  .prep-kicker { font-size: 10px; }
  .prep-goal { padding: 7px 8px; gap: 7px; }
  .prep-goal > b { font-size: 12px; }
  .prep-guide { gap: 4px 9px; font-size: 11px; margin-top: 11px; }
  .prep-section { padding-top: 17px; margin-top: 17px; }
  .prep-section-head { gap: 6px 8px; }
  .prep-step { width: 25px; height: 27px; font-size: 11px; }
  .prep-section-head h3 { flex-basis: 160px; font-size: 17px; letter-spacing: .01em; }
  .prep-count { margin-left: auto; font-size: 13px; padding: 2px 6px; }
  .prep-note { font-size: 11px; margin-top: 7px; }
  .prep-panel .scout-row { grid-template-columns: minmax(0, 1fr); }
  .prep-panel .scout-chip { min-height: 64px; padding: 8px 10px; grid-template-columns: 38px minmax(0, 1fr) 10px; }
  .prep-panel .scout-face { width: 38px; height: 42px; }
  .scout-chip-body > b { font-size: 16px; }
  .prep-presets { padding: 10px; }
  .prep-panel .preset-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .prep-panel .preset-slot { grid-template-columns: minmax(0, 1fr) 60px; }
  .prep-panel .preset-slot .btn { min-height: 48px; }
  .prep-panel .preset-load { grid-template-columns: 26px minmax(0, 1fr); gap: 9px; padding: 7px 10px; }
  .preset-label { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
  .preset-label > b { font-size: 15px; }
  .preset-number { font-size: 17px; }
  .preset-state-loaded, .preset-state-empty { font-size: 10px; }
  .prep-panel .preset-last { padding: 7px 10px; }
  .prep-panel .prep-members { grid-template-columns: minmax(0, 1fr); }
  .prep-members .member { min-height: 96px; grid-template-columns: 58px minmax(0, 1fr); }
  .prep-members .member .mpic { width: 58px; height: 78px; }
  .prep-members .member .minfo { padding-left: 12px; padding-bottom: 15px; }
  .prep-members .minfo > b { font-size: 18px; }
  .prep-panel .fpv-wrap { height: 215px; }
  .prep-map-heading { gap: 2px; }
  .prep-panel .prep-supply { grid-template-columns: 40px minmax(0, 1fr); padding: 10px; gap: 4px 10px; }
  .prep-supply .stepper { grid-column: 2; justify-self: end; }
  .prep-panel .prep-actions, .scout-actions { bottom: -22px; margin-bottom: -22px; padding-bottom: 22px; }
  .prep-panel .prep-actions .btn { padding-left: 12px; padding-right: 12px; font-size: 14px; }
  .scout-head { gap: 12px; }
  .scout-head h2 { font-size: 23px; line-height: 1.6; }
  .scout-head .rec-face.big { width: 62px; height: 71px; }
  .scout-meta { gap: 2px 7px; font-size: 10px; }
  .scout-profile > div { padding: 8px; }
  .scout-profile dd { font-size: 14px; }
  .scout-detail .scout-element { font-size: 11px; padding-inline: 5px; }
  .scout-detail .scout-stats { gap: 5px; }
  .scout-detail .scout-stats b { font-size: 21px; }
  .scout-affinities { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .scout-detail .detail-box { padding: 11px; margin-top: 12px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .prep-header h2 { font-size: 24px; }
  .prep-panel .fpv-wrap { height: 190px; }
  .prep-panel .prep-actions, .scout-actions { padding-top: 10px; }
}
