* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #07100d; --panel: #0d1914; --panel-2: #12251d; --line: #416553;
  --green: #68e09d; --green-2: #b4ffd2; --amber: #ffd36a; --red: #ff8b86;
  --text: #edf7f0; --muted: #a9c2b2;
}
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
html, body { overflow-x: hidden; }
body {
  min-height: 100vh; padding: 18px 18px 72px; color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: linear-gradient(rgba(104,224,157,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(104,224,157,.03) 1px, transparent 1px), radial-gradient(circle at 75% 0%, #163f2c 0, transparent 35%), var(--bg);
  background-size: 24px 24px, 24px 24px, auto, auto;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.wrap, .breadcrumb { width: min(1180px, 100%); margin-inline: auto; }
.breadcrumb { margin-bottom: 12px; padding-right: 72px; color: var(--muted); font-size: .8rem; }
.breadcrumb a { display: inline-flex; min-height: 44px; align-items: center; color: var(--green); text-decoration: none; }
.breadcrumb span { margin: 0 7px; }
.hero { position: relative; margin-bottom: 18px; padding: 30px 26px; overflow: hidden; border: 1px solid #78ad90; border-radius: 4px; background: linear-gradient(130deg, rgba(18,50,35,.96), rgba(4,11,8,.98)); box-shadow: 0 16px 40px rgba(0,0,0,.35), inset 0 0 30px rgba(104,224,157,.07); }
.hero::after { content: "EDF 6"; position: absolute; right: 20px; top: 8px; color: rgba(180,255,210,.08); font-weight: 900; font-size: clamp(3rem, 10vw, 7rem); letter-spacing: .06em; }
.hero-kicker { position: relative; z-index: 1; margin-bottom: 8px; color: var(--green); font: 800 .74rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
h1 { position: relative; z-index: 1; max-width: 800px; font-size: clamp(1.85rem, 6vw, 3.3rem); line-height: 1.12; letter-spacing: .02em; }
.hero-lead { position: relative; z-index: 1; max-width: 760px; margin-top: 12px; color: #d8e8dd; font-size: .92rem; line-height: 1.8; }
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.layout > * { min-width: 0; }
.side { position: sticky; top: 16px; display: grid; gap: 12px; }
.panel, .search-panel, .weapon-lookup-panel, .usage-editor, .saved-weapon-card, .result-card, .notice { border: 1px solid var(--line); border-radius: 4px; background: rgba(10,23,17,.96); box-shadow: 0 10px 24px rgba(0,0,0,.24); }
.panel { padding: 15px; }
.panel-title { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--green); font-size: .76rem; font-weight: 900; letter-spacing: .08em; }
.quick-links, .source-list { display: grid; gap: 7px; }
.quick-links a, .source-list a { display: flex; min-height: 44px; align-items: center; padding: 9px 10px; overflow-wrap: anywhere; border: 1px solid #345542; border-radius: 3px; background: #0a130f; color: #d8e8dd; text-decoration: none; font-size: .8rem; line-height: 1.45; }
.quick-links a:hover, .source-list a:hover { border-color: var(--green); color: var(--green-2); }
.side-note { color: var(--muted); font-size: .75rem; line-height: 1.65; }
.section-title { display: flex; align-items: center; gap: 9px; margin: 4px 0 10px; font-size: 1.1rem; }
.section-title::before { content: ""; width: 4px; height: 22px; background: var(--green); box-shadow: 0 0 12px rgba(104,224,157,.75); }
.section-lead { margin-bottom: 12px; color: var(--muted); font-size: .84rem; line-height: 1.7; }
.weapon-lookup-panel { padding: 16px; }
.weapon-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.weapon-search-row input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid #527b65; border-radius: 3px; background: #06100b; color: #fff; font-size: 16px; }
.weapon-search-row input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.weapon-collection-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.collection-filter { min-height: 44px; padding: 7px 11px; border: 1px solid #4a6f5b; border-radius: 3px; background: #09130e; color: #d7e9dc; font-size: .76rem; font-weight: 750; cursor: pointer; }
.collection-filter.active { border-color: var(--green); background: #245f43; color: #fff; box-shadow: inset 0 -2px var(--green); }
.collection-filter:focus-visible, .status-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.weapon-status { min-height: 1.5em; margin: 10px 0 8px; color: var(--green-2); font-size: .76rem; font-weight: 800; }
.weapon-matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.weapon-matches > .no-results { grid-column: 1 / -1; }
.weapon-card { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #355744; border-radius: 4px; background: #09130e; }
.weapon-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.weapon-class, .registered-badge, .favorite-badge, .acquired-badge { padding: 2px 6px; border: 1px solid #527b65; border-radius: 99px; color: var(--green-2); font-weight: 850; }
.registered-badge { border-color: #8b7134; color: var(--amber); }
.favorite-badge { border-color: #9a7d32; color: #ffe281; }
.acquired-badge { border-color: #4e8fca; color: #a9d8ff; }
.weapon-card h3 { margin-top: 7px; overflow-wrap: anywhere; font-size: .94rem; line-height: 1.45; }
.weapon-level { margin-top: 4px; color: var(--amber); font-size: .88rem; font-weight: 900; }
.weapon-card-main > p { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.weapon-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.weapon-card-actions button { width: 100%; padding-inline: 8px; font-size: .74rem; }
.status-btn { min-height: 44px; padding: 7px 10px; border: 1px solid #587363; border-radius: 3px; background: #101b15; color: #dbe9df; font-size: .72rem; font-weight: 800; cursor: pointer; }
.favorite-btn.active { border-color: #c49a32; background: #4b3a12; color: #ffe281; }
.acquired-btn.active { border-color: #4e8fca; background: #163852; color: #c8e8ff; }
.saved-weapons-section { margin-top: 18px; }
.saved-weapons-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.saved-count { color: var(--green-2); font-size: .78rem; font-weight: 850; }
.usage-editor { margin-bottom: 12px; padding: 15px; border-color: var(--green); }
.usage-editor-head, .saved-weapon-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.usage-editor-head .panel-title { display: inline-block; margin: 0 0 5px; }
.usage-editor-head h3 { overflow-wrap: anywhere; font-size: 1rem; line-height: 1.45; }
.icon-btn { flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid #527b65; border-radius: 3px; background: #09130e; color: #fff; font-size: 1.4rem; cursor: pointer; }
.usage-farm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 13px; }
.usage-farm-row select { width: 100%; min-height: 48px; padding: 10px 38px 10px 11px; border: 1px solid #527b65; border-radius: 3px; background: #06100b; color: #fff; font-size: 16px; }
.use-farm-chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 44px; margin: 9px 0 13px; padding: 8px; border: 1px dashed #446c57; border-radius: 3px; }
.use-farm-chip { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; padding-left: 10px; border: 1px solid #527b65; border-radius: 99px; background: #163b2a; color: #fff; font-size: .72rem; font-weight: 750; }
.use-farm-chip button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #08120d; color: #fff; cursor: pointer; }
.usage-editor textarea { width: 100%; min-height: 88px; resize: vertical; padding: 10px 11px; border: 1px solid #527b65; border-radius: 3px; background: #06100b; color: #fff; font-size: 16px; line-height: 1.6; }
.usage-editor textarea:focus, .usage-farm-row select:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.usage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-weapons { display: grid; gap: 10px; }
.saved-weapon-card { padding: 14px; }
.saved-weapon-card h3 { margin-top: 6px; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.45; }
.saved-weapon-card h3 span { color: var(--amber); font-size: .8rem; }
.saved-weapon-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.saved-weapon-actions button { min-height: 44px; padding: 7px 10px; font-size: .72rem; }
.delete-btn { min-height: 44px; padding: 7px 11px; border: 1px solid #8c4e4c; border-radius: 3px; background: #2c1515; color: #ffd4d1; font-weight: 800; cursor: pointer; }
.saved-farms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.saved-farm-tag { padding: 5px 8px; border: 1px solid #527b65; border-radius: 99px; color: var(--green-2); font-size: .7rem; line-height: 1.4; }
.saved-note { margin-top: 10px; padding: 9px 10px; border-left: 3px solid var(--amber); background: #151c14; color: #e9e0c2; font-size: .76rem; line-height: 1.65; }
.search-panel { padding: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; }
.field { min-width: 0; }
.field-label, legend { display: block; margin-bottom: 7px; color: var(--green-2); font-size: .76rem; font-weight: 800; }
fieldset { min-width: 0; border: 0; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.segmented.packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: grid; min-height: 44px; place-items: center; padding: 8px 7px; border: 1px solid #4d725e; border-radius: 3px; background: #09130e; color: #d2e5d8; font-size: .8rem; font-weight: 750; text-align: center; cursor: pointer; }
.choice input:checked + span { border-color: var(--green); background: #1b4b34; color: #fff; box-shadow: inset 0 -2px var(--green); }
.choice input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.level-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.level-row input { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid #527b65; border-radius: 3px; background: #06100b; color: #fff; font-size: 16px; }
.level-row input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.add-btn, .clear-btn { min-height: 44px; padding: 8px 14px; border: 1px solid var(--green); border-radius: 3px; background: #1b4b34; color: #fff; font-weight: 850; cursor: pointer; }
.clear-btn { border-color: #688276; background: #17231d; font-size: .78rem; }
.level-help { margin-top: 6px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.warning { min-height: 1.45em; margin-top: 6px; color: var(--red); font-size: .76rem; font-weight: 700; }
.level-chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 42px; margin-top: 10px; padding: 8px; border: 1px dashed #446c57; border-radius: 3px; }
.level-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 3px 4px 3px 11px; border: 1px solid var(--green); border-radius: 99px; background: #163b2a; color: #fff; font-size: .8rem; font-weight: 800; }
.level-chip button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #08120d; color: #fff; cursor: pointer; }
.empty-chip { align-self: center; color: #769181; font-size: .75rem; }
.farm-filter { margin-top: 13px; }
.farm-filter select { width: 100%; min-height: 48px; padding: 10px 38px 10px 11px; border: 1px solid #527b65; border-radius: 3px; background: #06100b; color: #fff; font-size: 16px; cursor: pointer; }
.farm-filter select:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.farm-filter select:disabled { color: var(--muted); cursor: wait; opacity: .7; }
.mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #294737; }
.mode-row .field-label { margin: 0 4px 0 0; }
.mode-btn { min-height: 44px; padding: 7px 11px; border: 1px solid #4a6f5b; border-radius: 3px; background: #09130e; color: #d7e9dc; cursor: pointer; }
.mode-btn.active { border-color: var(--green); background: #245f43; color: #fff; font-weight: 850; }
.clear-btn { margin-left: auto; }
.notice { margin: 14px 0 18px; padding: 13px 14px; border-left: 4px solid var(--amber); color: #e9e0c2; font-size: .78rem; line-height: 1.65; }
.results-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.result-count { color: var(--muted); font-size: .78rem; text-align: right; }
.results { display: grid; gap: 11px; }
.result-card { padding: 14px; }
.result-top { display: flex; justify-content: space-between; gap: 10px; }
.mission-pack { color: var(--green); font: 800 .7rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .07em; }
.mission-name { margin-top: 3px; font-size: 1rem; line-height: 1.45; }
.wiki-link { display: inline-flex; min-height: 44px; flex: 0 0 auto; align-self: center; align-items: center; padding: 8px 10px; border: 1px solid var(--green); border-radius: 3px; color: var(--green-2); text-decoration: none; font-size: .75rem; font-weight: 800; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; margin-top: 11px; }
.match-item { padding: 9px; border: 1px solid #355744; background: #09130e; }
.match-label { color: var(--muted); font-size: .66rem; }
.match-value { margin-top: 3px; color: #fff; font-size: .82rem; font-weight: 850; line-height: 1.4; }
.difficulty { color: var(--amber); }
.farm-box { margin-top: 10px; padding: 10px; border-left: 3px solid var(--green); background: #11291e; color: #d7e9dc; font-size: .75rem; line-height: 1.65; }
.farm-badge { display: inline-block; margin: 0 6px 5px 0; padding: 3px 7px; border: 1px solid var(--green); border-radius: 99px; color: var(--green-2); font-weight: 850; }
.farm-method + .farm-method { margin-top: 8px; padding-top: 8px; border-top: 1px solid #355744; }
.no-results { padding: 28px 16px; border: 1px dashed #456a57; color: var(--muted); text-align: center; line-height: 1.8; }
.nav-overlay { position: fixed; z-index: 999; inset: 0; visibility: hidden; background: rgba(0,0,0,.68); opacity: 0; transition: opacity .2s, visibility .2s; }
.nav-overlay.active { visibility: visible; opacity: 1; }
.hamburger-btn { position: fixed; z-index: 1001; top: 12px; right: 12px; display: flex; width: 48px; height: 48px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--green); border-radius: 3px; background: #07110c; cursor: pointer; }
.hamburger-btn span { display: block; width: 23px; height: 2px; border-radius: 2px; background: #fff; transition: transform .18s, opacity .18s; }
.hamburger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-panel { position: fixed; z-index: 1000; top: 0; right: -310px; width: 300px; height: 100vh; padding: 76px 18px 24px; overflow-y: auto; border-left: 2px solid var(--green); background: #050c08; box-shadow: -4px 0 20px rgba(0,0,0,.5); transition: right .22s ease; }
.nav-panel.active { right: 0; }
.nav-panel-title { margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #355944; color: var(--green); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.nav-section-label { margin: 18px 0 8px; padding-top: 11px; border-top: 1px solid #294737; color: var(--muted); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
.nav-link { display: block; min-height: 44px; margin-bottom: 2px; padding: 11px 12px; border-radius: 4px; color: #dcebe1; text-decoration: none; font-size: .86rem; line-height: 1.45; transition: background .18s, color .18s; }
.nav-link:hover { background: #102019; color: var(--green-2); }
.nav-link.current { border-left: 3px solid var(--green); background: rgba(104,224,157,.14); color: var(--green-2); font-weight: 900; }
.nav-link-desc { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.nav-accordion { margin: 4px 0; overflow: hidden; border-radius: 4px; }
.nav-accordion-header { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #355944; border-radius: 4px; background: #0a130f; color: #dcebe1; font-size: .86rem; font-weight: 900; line-height: 1.4; text-align: left; cursor: pointer; }
.nav-accordion-chevron { transition: transform .2s; }
.nav-accordion[data-open="true"] > .nav-accordion-header .nav-accordion-chevron { transform: rotate(180deg); }
.nav-accordion-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.nav-accordion[data-open="true"] > .nav-accordion-body { max-height: 1000px; }
.nav-accordion-body-inner { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 4px 10px; }
.nav-accordion:not([data-current-game="true"]) { opacity: .58; transition: opacity .18s; }
.nav-accordion:not([data-current-game="true"]):hover, .nav-accordion:not([data-current-game="true"])[data-open="true"] { opacity: 1; }
.nav-accordion[data-current-game="true"] { margin-left: 0; padding: 4px 4px 6px 8px; border-left: 4px solid var(--green); border-radius: 0 4px 4px 0; background: rgba(104,224,157,.07); }
.nav-accordion[data-current-game="true"] > .nav-accordion-header { border-color: var(--green); background: #173525; }
/* ゲーム識別色 */
.nav-accordion[data-game="fl"] > .nav-accordion-header { color: #ffd700; background: #16213e; border-color: #1e2a4a; }
.nav-accordion[data-game="fl"] .nav-link:hover, .nav-accordion[data-game="fl"] .nav-link.current { color: #ffd700; background: #1e2a4a; border-left-color: #ffd700; }
.nav-accordion[data-game="p5r"] > .nav-accordion-header { color: #ff6b6b; background: #2d0808; border-color: #5a1414; }
.nav-accordion[data-game="p5r"] .nav-link:hover, .nav-accordion[data-game="p5r"] .nav-link.current { color: #ff6b6b; background: #5a1414; border-left-color: #e60012; }
.nav-accordion[data-game="hogwartslegacy"] > .nav-accordion-header { color: #f1d890; background: #17130f; border-color: #5f4928; }
.nav-accordion[data-game="hogwartslegacy"] .nav-link:hover, .nav-accordion[data-game="hogwartslegacy"] .nav-link.current { color: #f1d890; background: #241c14; border-left-color: #d8b56a; }
.nav-accordion[data-game="dq10"] > .nav-accordion-header { color: #ffd245; background: #031841; border-color: #fff8dc; }
.nav-accordion[data-game="dq10"] .nav-link:hover, .nav-accordion[data-game="dq10"] .nav-link.current { color: #ffd245; background: #05245d; border-left-color: #ffd245; }
.nav-accordion[data-game="mc"] > .nav-accordion-header { color: #7cb342; background: #14180f; border-color: #4a5d32; }
.nav-accordion[data-game="mc"] .nav-link:hover, .nav-accordion[data-game="mc"] .nav-link.current { color: #a5d66b; background: #1e2415; border-left-color: #7cb342; }
.nav-accordion[data-game="ronin"] > .nav-accordion-header { color: #e8836f; background: #161210; border-color: #57403a; }
.nav-accordion[data-game="ronin"] .nav-link:hover, .nav-accordion[data-game="ronin"] .nav-link.current { color: #e8836f; background: #241c18; border-left-color: #d14836; }
.nav-accordion[data-game="edf6"] > .nav-accordion-header { color: var(--green-2); background: #10261a; border-color: var(--green); }
.nav-accordion[data-game="edf6"] .nav-link:hover, .nav-accordion[data-game="edf6"] .nav-link.current { color: var(--green-2); background: #173525; border-left-color: var(--green); }
@media (min-width: 768px) {
  body { padding-left: 296px; }
  .hamburger-btn, .nav-overlay { display: none !important; }
  .nav-panel { left: 0; right: auto; width: 280px; height: 100vh; padding: 24px 16px; border-right: 2px solid var(--green); border-left: 0; box-shadow: 4px 0 20px rgba(0,0,0,.38); }
  .nav-panel > .nav-link, .nav-panel > .nav-accordion, .nav-accordion-body-inner .nav-link { display: block; width: 100%; }
  .nav-accordion-body-inner { padding: 8px 0 4px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 767px) {
  body { padding: 14px 14px 60px; }
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .weapon-matches { grid-template-columns: 1fr; }
  .usage-farm-row { grid-template-columns: 1fr; }
  .usage-farm-row .add-btn { width: 100%; }
  .saved-weapon-top { flex-direction: column; }
  .saved-weapon-actions { width: 100%; justify-content: flex-start; }
  .hero { padding: 27px 19px 23px; }
}
@media (max-width: 480px) {
  .segmented.packs { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr 1fr; }
  .match-grid .match-item:last-child { grid-column: 1 / -1; }
  .result-top { align-items: flex-start; }
  .wiki-link { padding: 8px; }
  .results-head { align-items: flex-start; flex-direction: column; }
  .result-count { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
