:root {
  color-scheme: dark;
  font: 16px/1.65 "Meiryo", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --ink: #edf1f7;
  --muted: #b2c1d4;
  --line: #41546c;
  --accent: #e7ca8c;
}
* { box-sizing: border-box }
body { margin: 0; background: #101f32; color: var(--ink) }
[hidden] { display: none !important }
.shell { width: min(100% - 32px, 1024px); margin-inline: auto }
header { color: #fff; background: #0a1627 }
.header-inner, nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 22px }
.header-inner { padding-block: 15px }
header a { color: inherit; text-decoration: none }
.brand { font-weight: 750 }
nav a { font-size: .92rem; padding-block: 3px; border-bottom: 2px solid transparent }
nav a[aria-current="page"] { border-color: #dec185 }
main { padding-block: 24px 44px }
h1, h2, h3, h4, p { margin: 0 0 .55em }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.2 }
h2 { font-size: 1.3rem }
h3 { font-size: 1.12rem }
h4 { margin-top: 14px }
.muted { color: var(--muted) }
.notice { color: #c2cfe0; background: #13283e; padding: 8px 13px; border-radius: 7px; margin-bottom: 18px; font-size: .9rem }
.panel { background: #102036; border: 1px solid #81714e; border-radius: 5px; padding: clamp(12px, 3vw, 24px); margin-top: 14px }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0 }
fieldset + fieldset { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 10px }
legend { padding: 0 8px 0 0; font-weight: 700 }
.fields { display: flex; flex-wrap: wrap; gap: 8px 12px }
.fields label { flex: 1 1 145px }
label { display: grid; min-width: 0; gap: 4px; font-size: .9rem }
input, select, button, .button { font: inherit; color: inherit; background: #152b43; border: 1px solid #6b819a; border-radius: 6px; padding: 6px 9px }
input, select { min-width: 0; width: 100% }
button, .button { cursor: pointer; color: var(--accent); font-weight: 650; text-decoration: none }
button:hover, .button:hover { background: #243c54 }
:focus-visible { outline: 3px solid #8bdcf1; outline-offset: 2px }
.picker-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; align-items: center }
.picker-row select { flex: 1 1 225px }
.small { padding: 4px 8px; font-size: .82rem }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px }
.tags label { display: flex; align-items: center }
.tags input { width: auto; accent-color: var(--accent) }
.result-list { margin: 0; padding: 0; list-style: none }
.result-list li { border-top: 1px solid var(--line); padding: 12px 0; display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px }
.result-list p { margin: 0; font-size: .9rem }
.badge { font-size: .79rem; margin-left: 8px; padding: 2px 7px; color: #b9ebf1; background: #1b4354; border-radius: 5px; white-space: nowrap }
.badge.partial { background: #473b26; color: #f3d293 }
.missing { color: #f2c78d }
.comparison-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px }
.weapon { padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere }
.catalog-filters { margin-bottom: 12px }
@media (max-width: 560px) {
  .comparison-grid { grid-template-columns: 1fr }
  .result-list li { overflow-wrap: anywhere }
}

.skill-search { border-top: 1px solid var(--line); padding-top: 12px; margin-block: 16px }
.skill-options { max-height: 240px; overflow-y: auto; padding: 8px 3px; margin-bottom: 12px; gap: 8px 16px }
.skill-options label { min-height: 32px }
.skill-details { margin-block: 12px }
summary { cursor: pointer; font-weight: 650 }
.skill-details .fields { margin-top: 10px }
.matched-skill { padding: 8px 10px; background: #101f32; border-radius: 6px; margin-top: 8px; max-width: 780px }
.matched-skill summary { font-size: .9rem }

.skill-effect-row { display:flex; align-items:end; gap:8px; margin-block:10px }
.skill-effect-row label { flex:1; margin:0; max-width:480px }
.skill-picker > button { margin:8px 8px 12px 0 }
.skill-picker > label { max-width:480px }
.skill-picker details { margin-block:10px }

.weapon-skill-entry { padding-block:10px; border-bottom:1px solid var(--line); overflow-wrap:anywhere }
.weapon-skill-entry:last-child { border-bottom:0 }

/* Midnight archive: ornamental details stay outside the reading surface. */
body { background: radial-gradient(ellipse at 90% 0%,#1d3954 0,transparent 48%),radial-gradient(ellipse at 5% 100%,#18334b 0,transparent 45%),#0a1424; min-height:100vh }
header { position:relative; overflow:hidden; border-bottom:1px solid #9a8251; box-shadow:0 5px 28px #0004 }
header::before { content:""; position:absolute; right:-75px; top:-170px; width:390px; height:390px; border:1px solid #a58b514d; border-radius:50%; background:repeating-conic-gradient(from 17deg,transparent 0deg 29.7deg,#b79a5a30 29.7deg 30deg); pointer-events:none }
header::after { content:""; position:absolute; right:12px; top:-100px; width:235px; height:235px; border:1px solid #a58b5155; border-radius:50%; pointer-events:none }
.header-inner { position:relative; z-index:1; min-height:88px }
.brand { color:#efd49b; letter-spacing:.035em; font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-weight:700 }
.brand::before { content:"✧"; display:inline-block; margin-right:10px; font-family:serif; font-size:1.5rem; color:#e5c987 }
nav a { padding:9px 3px; color:#d0deec }
nav a[aria-current="page"] { color:#fff0c6; box-shadow:0 5px 9px -7px #ffe1a1 }
main { padding-top:26px }
h1 { font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-weight:700; color:#f4efe4; padding-bottom:13px; border-bottom:1px solid #a68b53; letter-spacing:.05em }
h2,legend { color:#ecd19b }
a { color:#a9deef }
.notice { border:1px solid #405771; font-size:.875rem; border-radius:3px }
.panel { box-shadow:0 10px 32px #0002 }
input::placeholder { color:#a7b8cd; opacity:1 }
input,select { min-height:42px }
button,.button { border-color:#a08b5e; min-height:40px; background:#182a3e }
button:disabled { opacity:.5; cursor:default }
option { background:#152b43; color:#edf1f7 }
.result-list li { margin-top:13px; padding:17px; border:1px solid #9b8453; border-radius:3px; background:linear-gradient(110deg,#152b42,#101f32) }
.result-list li strong { color:#f3ebdb }
.result-list li > div { min-width:0; flex:1 1 460px }
.result-list .button { flex:0 0 auto }
.result-list .matched-skill { background:#0c1c2e; border:1px solid #3e536c; padding:10px 12px }
.result-list .matched-skill summary { color:#e9cf98 }
.weapon { background:#11243a; border-color:#7c704f }
.guide { margin-block:16px 24px; padding:13px 17px; border:1px solid #ad9259; outline:1px solid #ad925933; outline-offset:-5px; border-radius:3px; background:linear-gradient(110deg,#1c344b,#102137) }
.guide > summary { color:#efd395; min-height:28px }
.guide > summary::marker { color:#b9e9f4 }
.guide-body { border-top:1px solid #657454; margin-top:12px; padding-top:12px; color:#d7e2ed }
.guide-body p { margin-bottom:10px }
.guide-body strong { color:#f2d8a4 }
.archive-footer { border-top:1px solid #796743; margin-top:36px; padding:20px 0 28px; text-align:center; color:#b8c7d9; font-size:.875rem }
.archive-footer::before { content:"✧"; display:block; color:#dabd7d; margin-bottom:8px; font-size:1.3rem }
@media (max-width:560px) {
 .header-inner { padding-block:14px; gap:10px }
 .brand { font-size:1rem }
 nav { width:100%; justify-content:flex-start; gap:22px }
 .result-list li { padding:13px }
 .result-list li > div { flex-basis:100% }
 .fields label { flex-basis:100% }
 .skill-effect-row label { max-width:none }
 .guide { padding:12px }
}

.about-site { text-align:left; max-width:900px; margin-inline:auto; color:#b8c7d9; font-size:.8125rem; line-height:1.6 }
.about-site h2 { font:inherit; font-weight:700; font-size:.875rem; color:#d8c599; margin-bottom:4px }
.about-site p { margin:0; overflow-wrap:anywhere }

.policy-link { margin:18px 0 0; font-size:.875rem }
.policy-page { max-width:900px }
.policy-page h1 { font-size:clamp(1.4rem,4vw,2rem); line-height:1.6; overflow-wrap:anywhere }
.policy-page article section { margin-bottom:28px }
.policy-page article p { line-height:1.95; overflow-wrap:anywhere }
.policy-page article > .button { display:inline-block; margin-top:8px }

.contact-site { margin-top:14px }
.contact-site p + p { margin-top:4px }
