/*
Theme Name: Echoes of Aincrad Guide
Theme URI: https://aincrad.gcxxblog.com/
Author: GCXX
Description: Echoes of Aincradの構造化攻略データベース
Version: 1.0.0
Text Domain: echoes-guide
*/

:root {
  --ink: #172033;
  --muted: #5d6677;
  --line: #cbd3dd;
  --surface: #ffffff;
  --surface-soft: #f3f6f8;
  --navy: #0f2a44;
  --teal: #087d78;
  --gold: #c6922f;
  --gold-soft: #fff4d9;
  --danger: #9f3b31;
  --shadow: 0 8px 24px rgba(17, 32, 52, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #e9eef2; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", "Meiryo", sans-serif; line-height: 1.75; letter-spacing: 0; }
a { color: #0068a8; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #004b79; }
img, iframe { max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; letter-spacing: 0; }
[hidden] { display: none !important; }

.site-header { position: sticky; top: 0; z-index: 40; background: var(--navy); border-bottom: 3px solid var(--gold); color: #fff; }
.site-header__inner { width: min(1240px, calc(100% - 32px)); min-height: 70px; margin: 0 auto; display: flex; align-items: center; gap: 32px; }
.site-brand { display: flex; flex-direction: column; flex: 0 0 auto; color: #fff; text-decoration: none; line-height: 1.2; }
.site-brand span { color: #dbe6ee; font-size: 12px; }
.site-brand strong { margin-top: 4px; font-size: 20px; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; color: #fff; font-weight: 700; text-decoration: none; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: rgba(255,255,255,.09); border-bottom-color: var(--gold); }
.menu-toggle { display: none; width: 104px; min-height: 42px; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; font-weight: 700; white-space: nowrap; }
.site-shell { min-height: 70vh; background: var(--surface); }

.content-wrap { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }
.hero { position: relative; min-height: clamp(420px, 58vh, 620px); display: flex; align-items: end; background-position: center; background-size: cover; color: #fff; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,28,45,.9) 0%, rgba(12,28,45,.66) 42%, rgba(12,28,45,.08) 78%); }
.hero__content { position: relative; width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0 62px; }
.hero__content h1 { max-width: 720px; margin: 6px 0 14px; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(40px, 5.2vw, 74px); line-height: 1.08; overflow-wrap: anywhere; }
.hero__content > p:not(.eyebrow) { max-width: 650px; margin: 0; font-size: 17px; }
.eyebrow { margin: 0; color: #f1cc76; font-size: 13px; font-weight: 800; }
.hero__actions { display: flex; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 18px; border: 1px solid var(--navy); border-radius: 4px; background: #fff; color: var(--navy); font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--surface-soft); color: var(--navy); }
.button--primary { border-color: var(--gold); background: var(--gold); color: #142030; }
.button--primary:hover { background: #dda941; color: #142030; }
.button:disabled { opacity: .45; cursor: not-allowed; }

.quick-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: -22px 0 34px; position: relative; z-index: 2; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.quick-nav a { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.quick-nav a:last-child { border-right: 0; }
.quick-nav strong, .quick-nav span { display: block; }
.quick-nav strong { color: var(--navy); font-size: 17px; }
.quick-nav span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.quick-nav a:hover { background: var(--gold-soft); }

.section-block { padding: 34px 0 46px; }
.section-block--muted { margin-inline: 0; padding-inline: 0; background: var(--surface-soft); border-block: 1px solid var(--line); box-shadow: 0 0 0 100vmax var(--surface-soft); clip-path: inset(0 -100vmax); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.section-heading span, .page-header > span, .entity-detail__header > div > span { color: var(--teal); font-size: 12px; font-weight: 900; }
.section-heading h2 { margin: 2px 0 0; color: var(--navy); font-size: 27px; line-height: 1.35; }
.section-heading > a { font-weight: 800; }
.section-lead { margin: 14px 0 20px; color: var(--muted); }

.entity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.entity-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.entity-card { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.entity-card__media { display: block; aspect-ratio: 295 / 166; background: #dfe7eb; overflow: hidden; }
.entity-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.entity-card:hover .entity-card__media img { transform: scale(1.025); }
.entity-card__body { padding: 14px 16px 16px; }
.entity-card__heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.entity-card__heading span { color: var(--teal); font-size: 11px; font-weight: 900; }
.entity-card h3 { margin: 1px 0 0; font-size: 20px; line-height: 1.35; }
.entity-card h3 a { color: var(--navy); text-decoration: none; }
.entity-card p { margin: 10px 0; color: var(--muted); font-size: 14px; }
.entity-card__facts { margin: 12px 0; border-top: 1px solid var(--line); }
.entity-card__facts div { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.entity-card__facts dt { color: var(--muted); }
.entity-card__facts dd { margin: 0; font-weight: 700; }
.compare-check { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 13px; font-weight: 700; }
.compare-check input { width: 18px; height: 18px; }
.text-link { font-size: 14px; font-weight: 800; }

.archive-main, .detail-main, .compare-main, .article-main { padding-top: 34px; padding-bottom: 56px; }
.page-header { max-width: 850px; margin-bottom: 24px; }
.page-header h1 { margin: 3px 0 8px; color: var(--navy); font-size: 36px; line-height: 1.25; }
.page-header p { margin: 0; color: var(--muted); }
.filter-bar { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(150px, 1fr)); gap: 12px; padding: 16px; border: 1px solid var(--line); background: var(--surface-soft); }
.filter-bar label { display: flex; flex-direction: column; gap: 4px; color: var(--navy); font-size: 12px; font-weight: 800; }
.filter-bar input, .filter-bar select { width: 100%; min-height: 42px; padding: 7px 10px; border: 1px solid #9aa8b8; border-radius: 3px; background: #fff; color: var(--ink); }
.result-count { margin: 12px 0; color: var(--muted); }
.compare-bar { position: sticky; bottom: 12px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 18px; width: min(680px, calc(100% - 24px)); margin: 24px auto 0; padding: 12px 16px; border: 1px solid var(--gold); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.entity-detail { max-width: 980px; margin: 0 auto; }
.entity-detail__header { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0,1fr); gap: 28px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.entity-detail__header > img { width: 100%; aspect-ratio: 295 / 166; object-fit: cover; border: 1px solid var(--line); }
.entity-detail__header h1 { margin: 2px 0 10px; color: var(--navy); font-size: 36px; line-height: 1.25; }
.entity-detail__header p { color: var(--muted); }
.detail-section { padding: 30px 0; border-bottom: 1px solid var(--line); }
.detail-section h2, .article__content h2 { margin: 0 0 16px; padding-left: 12px; border-left: 4px solid var(--teal); color: var(--navy); font-size: 25px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border: 1px solid var(--line); }
.detail-facts div { display: grid; grid-template-columns: 140px minmax(0,1fr); border-bottom: 1px solid var(--line); }
.detail-facts div:nth-last-child(-n+2) { border-bottom: 0; }
.detail-facts dt, .detail-facts dd { padding: 10px 12px; }
.detail-facts dt { background: var(--surface-soft); font-weight: 800; }
.detail-facts dd { margin: 0; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; padding: 0; list-style: none; }
.feature-list li { padding: 14px; border: 1px solid var(--line); border-top: 3px solid var(--gold); background: #fff; font-weight: 700; }
.caution { padding: 14px 16px; border-left: 4px solid var(--gold); background: var(--gold-soft); }
.responsive-video { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.responsive-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.related-chips { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.related-chips a { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border: 1px solid var(--line); color: var(--navy); font-weight: 800; text-decoration: none; }
.related-chips img { width: 64px; height: 36px; flex: 0 0 auto; object-fit: cover; }
.source-note { margin-top: 28px; padding: 18px 20px; border: 1px solid #aebfd0; border-left: 4px solid var(--teal); background: #f2f7fa; }
.source-note p { margin: 6px 0 10px; }
.source-note a { display: inline-block; margin-right: 18px; font-weight: 800; }

.compare-selector { margin-bottom: 22px; padding: 16px; border: 1px solid var(--line); background: var(--surface-soft); }
.compare-selector fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.compare-selector legend { margin-bottom: 10px; color: var(--navy); font-weight: 900; }
.compare-selector__grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.compare-selector__grid label { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.compare-selector__grid input { width: 18px; height: 18px; flex: 0 0 auto; }
.compare-selector__grid img { width: 72px; height: 41px; object-fit: cover; flex: 0 0 auto; }
.compare-selector__grid span { min-width: 0; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.compare-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); }
.compare-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
.compare-table th, .compare-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table thead th { background: var(--navy); color: #fff; }
.compare-table thead th:first-child { width: 135px; }
.compare-table thead a { display: block; color: #fff; text-decoration: none; }
.compare-table thead img { width: 180px; max-width: 100%; aspect-ratio: 295 / 166; object-fit: cover; display: block; margin-bottom: 7px; }
.compare-table tbody th { background: var(--surface-soft); }
.compare-note { color: var(--muted); font-size: 13px; }

.article { max-width: 900px; margin: 0 auto; }
.article__header { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.article__header time { color: var(--muted); font-size: 13px; }
.article__header h1 { margin: 6px 0 8px; color: var(--navy); font-size: 36px; line-height: 1.35; }
.article__header p { margin: 0; color: var(--muted); }
.article__eyecatch { margin: 24px 0; }
.article__eyecatch img { width: 100%; max-height: 500px; object-fit: cover; }
.article__content { font-size: 16px; }
.article__content h2 { margin-top: 38px; }
.article__content h3 { margin-top: 28px; color: var(--navy); font-size: 20px; }
.article-index { margin: 24px 0; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--surface-soft); }
.article-index strong { display: block; margin-bottom: 6px; color: var(--navy); }
.article-index ol { margin: 0; padding-left: 24px; }
.article__content figure { margin: 20px 0; }
.article__content figure img { width: 100%; border: 1px solid var(--line); }
.article__content figcaption { color: var(--muted); font-size: 13px; }
.article__content table { width: 100%; border-collapse: collapse; }
.article__content th, .article__content td { padding: 9px 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article__content th { background: var(--surface-soft); }
.article__next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.article__next a { padding: 14px; border: 1px solid var(--line); font-weight: 800; text-align: center; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.post-card { min-width: 0; border: 1px solid var(--line); background: #fff; }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card > div { padding: 14px; }
.post-card time { color: var(--muted); font-size: 12px; }
.post-card h2, .post-card h3 { margin: 5px 0 8px; font-size: 18px; line-height: 1.45; }
.post-card h2 a, .post-card h3 a { color: var(--navy); text-decoration: none; }
.post-card p { margin: 0; color: var(--muted); font-size: 14px; }

.ad-slot { min-height: 110px; margin: 28px 0; padding: 8px 0; border-block: 1px solid var(--line); text-align: center; overflow: hidden; }
.ad-slot > span { display: block; color: #7a8492; font-size: 11px; }
.site-footer { background: var(--navy); color: #dce5ec; }
.site-footer__inner { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 12px 0 0; }
.site-footer__notice { color: #b8c5cf; font-size: 12px; }

@media (max-width: 900px) {
  .site-header { position: relative; }
  .site-header__inner { min-height: 62px; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .primary-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; margin: 0; background: var(--navy); border-bottom: 3px solid var(--gold); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); padding: 8px; }
  .primary-nav a { min-height: 46px; border: 1px solid rgba(255,255,255,.16); }
  .quick-nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .quick-nav a:nth-child(2) { border-right: 0; }
  .quick-nav a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .entity-grid, .entity-grid--compact, .post-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .compare-selector__grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .site-header__inner, .content-wrap, .hero__content, .site-footer__inner { width: min(100% - 24px, 1220px); }
  .site-brand strong { font-size: 16px; }
  .site-brand span { font-size: 10px; }
  .menu-toggle { width: 104px; }
  .hero { min-height: 390px; background-position: 39% center; }
  .hero__overlay { background: linear-gradient(0deg, rgba(12,28,45,.92) 0%, rgba(12,28,45,.55) 58%, rgba(12,28,45,.08) 100%); }
  .hero__content { padding: 48px 0 34px; }
  .hero__content h1 { font-size: 36px; }
  .hero__content > p:not(.eyebrow) { font-size: 15px; }
  .hero__actions { flex-wrap: wrap; }
  .hero__actions .button { flex: 1 1 140px; }
  .quick-nav { margin-top: 0; box-shadow: none; }
  .quick-nav a { padding: 13px 12px; }
  .quick-nav strong { font-size: 15px; }
  .section-block { padding: 28px 0 38px; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 23px; }
  .section-heading > a { font-size: 13px; white-space: nowrap; }
  .entity-grid, .entity-grid--compact, .post-grid { grid-template-columns: 1fr; }
  .entity-card { display: grid; grid-template-columns: 124px minmax(0,1fr); }
  .entity-card__media { height: 100%; min-height: 162px; aspect-ratio: auto; }
  .entity-card__body { padding: 11px 12px; }
  .entity-card h3 { font-size: 17px; }
  .entity-card p { display: none; }
  .entity-card__facts { margin: 8px 0; }
  .entity-card__facts div { grid-template-columns: 48px minmax(0,1fr); padding: 4px 0; font-size: 12px; }
  .page-header h1, .article__header h1, .entity-detail__header h1 { font-size: 28px; overflow-wrap: anywhere; }
  .filter-bar { grid-template-columns: 1fr; padding: 12px; }
  .compare-bar { bottom: 8px; }
  .entity-detail__header { grid-template-columns: 118px minmax(0,1fr); gap: 14px; align-items: start; }
  .entity-detail__header > img { margin-top: 5px; }
  .entity-detail__header p { grid-column: 1 / -1; }
  .entity-detail__header .button { grid-column: 1 / -1; width: 100%; }
  .detail-facts { grid-template-columns: 1fr; }
  .detail-facts div, .detail-facts div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .detail-facts div:last-child { border-bottom: 0; }
  .detail-facts div { grid-template-columns: 112px minmax(0,1fr); }
  .feature-list, .related-chips { grid-template-columns: 1fr; }
  .compare-selector__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .compare-selector__grid label { display: grid; grid-template-columns: 18px 52px minmax(0,1fr); }
  .compare-selector__grid img { width: 52px; height: 30px; }
  .compare-table { min-width: 680px; font-size: 13px; }
  .compare-table th, .compare-table td { padding: 8px; }
  .article__content { font-size: 15px; }
  .article__content table { display: block; max-width: 100%; overflow-x: auto; white-space: normal; }
  .article__next { grid-template-columns: 1fr; }
  .site-footer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
}
