/* QUEST 公式サイト — スポーティ × 知的 (ブルー / シアン / ホワイト) */
:root {
  --sky: #b6dff1;
  --sky-2: #d8eef8;
  --sky-3: #eef8fd;
  --cyan: #1fa6d8;
  --cyan-d: #0b7fae;
  --ink: #1c2a39;
  --ink-2: #4a5b6c;
  --ink-3: #7b8b9a;
  --bg: #ffffff;
  --bg-2: #f6fbfe;
  --card: #ffffff;
  --line: #dcebf3;
  --hero-left: #b6dff1;
  --shadow: 0 10px 30px -12px rgba(31, 120, 160, .25);
  --radius: 18px;
  --ok: #19a974;
  --warn: #e8a317;
  --danger: #d9534f;
  --font: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  --font-en: 'Outfit', var(--font);
  --header-h: 64px;
}
[data-theme='dark'] {
  --sky: #1c4a63;
  --sky-2: #17384b;
  --sky-3: #12293a;
  --cyan: #4cc3ee;
  --cyan-d: #7ad4f4;
  --ink: #e8f2f9;
  --ink-2: #b6c6d3;
  --ink-3: #8497a6;
  --bg: #0d1a25;
  --bg-2: #112231;
  --card: #14293a;
  --line: #22404f;
  --hero-left: #14354a;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.85; letter-spacing: .04em; font-weight: 400; overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--cyan-d); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; letter-spacing: inherit; color: var(--ink); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.en { font-family: var(--font-en); letter-spacing: .08em; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 16px; width: min(1280px, 100% - 32px); }
.brand { flex: none; display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-en); font-weight: 600; font-size: 1.05rem; letter-spacing: .12em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.gnav { display: flex; gap: 0; margin-left: auto; align-items: center; min-width: 0; }
.gnav a { color: var(--ink); font-size: .8rem; padding: 8px 9px; border-bottom: 2px solid transparent; white-space: nowrap; }
.gnav a:hover { text-decoration: none; color: var(--cyan-d); }
.gnav a.active { border-bottom-color: var(--cyan); color: var(--cyan-d); }
.hdr-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sky);
  display: grid; place-items: center; color: var(--ink);
}
.icon-btn:hover { filter: brightness(.96); }
.icon-btn svg { width: 20px; height: 20px; }
.burger { display: none; }
.hdr-search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 0 4px 0 12px; background: var(--bg-2); }
.hdr-search input { border: 0; background: transparent; width: 110px; height: 36px; outline: 0; font-size: .85rem; }
.hdr-search button { border: 0; background: transparent; width: 32px; height: 32px; display: grid; place-items: center; }
.hdr-search svg { width: 18px; height: 18px; }

@media (max-width: 1240px) {
  .burger { display: grid; }
  .gnav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px 20px 20px; gap: 0; margin: 0;
    transform: translateY(-120%); transition: transform .25s ease; max-height: calc(100vh - var(--header-h)); overflow: auto; z-index: 40;
    visibility: hidden;
  }
  .gnav.open { transform: none; visibility: visible; }
  .gnav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: .95rem; }
  .gnav a.active { border-bottom-color: var(--line); }
  .hdr-tools { margin-left: auto; }
  .hdr-search input { width: 80px; }
}
@media (max-width: 520px) { .hdr-search { display: none; } }

/* ---------- ヒーロー ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: min(calc(100svh - var(--header-h)), 760px); position: relative; }
.hero-left {
  background: var(--hero-left); position: relative; display: grid; place-items: center; overflow: hidden;
  background-image: radial-gradient(circle at 50% 50%, color-mix(in srgb, #fff 45%, transparent) 0, transparent 55%);
}
.hero-right { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 24px 64px; background: var(--bg); position: relative; }
.hero-copy { display: grid; grid-template-columns: auto 1fr; gap: 16px 28px; align-items: start; max-width: 560px; }
.hero-sq { width: 78px; height: 78px; background: var(--sky); position: relative; margin-top: 4px; }
.hero-sq::after { content: ''; position: absolute; inset: 14px; background: var(--bg); }
.hero-title { margin: 0; font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.85; letter-spacing: .16em; white-space: pre-line; }
.hero-sub { grid-column: 1 / -1; color: var(--ink-2); font-size: .84rem; line-height: 1.9; margin: 6px 0 0; }
.hero-cta { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.hero-news {
  background: var(--sky); color: var(--ink); padding: 20px 26px; align-self: stretch; max-width: 560px; margin-inline: auto; width: 100%;
  font-size: .88rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-news:hover { text-decoration: none; filter: brightness(.97); }
.hero-news b { font-family: var(--font-en); margin-right: 8px; }
.scroll-down { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; font-family: var(--font-en); font-size: .7rem; color: var(--ink-2); z-index: 2; background: transparent; border: 0; }
.scroll-down i { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; box-shadow: var(--shadow); font-style: normal; }

/* ヒーロー左: 端末モックとフローティングアイコン */
.phone {
  width: min(250px, 52%); aspect-ratio: 9 / 15.5; background: #f7f9fa; border-radius: 34px; box-shadow: 0 24px 50px -16px rgba(20, 90, 130, .45), inset 0 0 0 5px #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #1c2a39; position: relative;
}
.phone .cap { font-size: .62rem; border-bottom: 1px solid #cfd8de; padding: 0 8px 6px; margin-bottom: 14px; letter-spacing: .1em; }
.phone img { width: 62%; margin-bottom: 14px; }
.phone .big { font-family: var(--font-en); font-size: 2.1rem; font-weight: 500; line-height: 1.1; letter-spacing: .02em; }
.phone .big small { display: block; font-size: .7rem; font-family: var(--font); font-weight: 400; color: #51606d; margin-top: 6px; letter-spacing: .1em; }
.phone .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--sky); margin-top: 16px; }
.float { position: absolute; width: 46px; height: 46px; color: #fff; animation: bob 6s ease-in-out infinite; }
.float svg { width: 100%; height: 100%; }
.f1 { left: 22%; top: 20%; } .f2 { right: 20%; top: 18%; animation-delay: -1s; } .f3 { left: 12%; top: 52%; animation-delay: -2s; }
.f4 { right: 12%; top: 50%; animation-delay: -3s; } .f5 { left: 22%; bottom: 14%; animation-delay: -4s; } .f6 { right: 22%; bottom: 14%; animation-delay: -5s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-left { min-height: 360px; }
  .hero-right { padding: 40px 20px 40px; gap: 28px; }
  .hero-copy { grid-template-columns: 1fr; gap: 14px; }
  .hero-sq { width: 54px; height: 54px; }
  .hero-sq::after { inset: 10px; }
  .hero-title { letter-spacing: .12em; line-height: 1.9; }
  .hero-news { max-width: none; white-space: normal; }
  .scroll-down { display: none; }
  .float { width: 34px; height: 34px; }
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 26px;
  background: var(--sky); color: var(--ink); border: 1px solid transparent; font-size: .9rem; font-weight: 500; text-decoration: none;
  transition: transform .15s, filter .15s, background .15s; min-height: 46px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(.97); }
.btn.line { background: transparent; border-color: var(--sky); }
.btn.line:hover { background: var(--sky-3); }
.btn.solid { background: var(--cyan-d); color: #fff; }
[data-theme='dark'] .btn.solid { background: var(--cyan); color: #06222f; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.sm { padding: 6px 16px; font-size: .8rem; min-height: 36px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- セクション ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-2); }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-head .en { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 500; line-height: 1; margin: 0; letter-spacing: .1em; }
.sec-head .ja { color: var(--ink-2); font-size: .9rem; }
.sec-head .more { margin-left: auto; font-size: .85rem; }
.page-head { background: var(--sky-2); padding: 56px 0 44px; }
[data-theme='dark'] .page-head { background: var(--sky-3); }
.page-head h1 { margin: 0; font-weight: 300; font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: .16em; }
.page-head .en { display: block; font-size: .8rem; color: var(--cyan-d); margin-bottom: 8px; }
.page-head p { margin: 10px 0 0; color: var(--ink-2); font-size: .9rem; }
.page-body { padding: 48px 0 96px; min-height: 50vh; }
.crumb { font-size: .78rem; color: var(--ink-3); margin-bottom: 14px; }

/* ---------- カード・リスト ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s; color: inherit;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.card .thumb { aspect-ratio: 16 / 9; background: var(--sky-2) center / cover no-repeat; display: grid; place-items: center; }
.card .thumb img { width: 34%; opacity: .55; }
[data-theme='dark'] .card .thumb img { filter: invert(1); opacity: .35; }
.card .cb { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 1rem; font-weight: 500; line-height: 1.6; }
.card p { margin: 0; color: var(--ink-2); font-size: .84rem; line-height: 1.8; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .76rem; color: var(--ink-3); font-family: var(--font-en); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .72rem; background: var(--sky-3); color: var(--cyan-d); border-radius: 999px; padding: 1px 10px; border: 1px solid var(--line); cursor: pointer; font-family: var(--font); text-decoration: none; }
.tag:hover { background: var(--sky-2); text-decoration: none; }
.badge { display: inline-block; font-size: .72rem; padding: 1px 12px; border-radius: 999px; background: var(--sky); color: var(--ink); font-family: var(--font); line-height: 1.7; }
.badge.imp { background: #ffd9d6; color: #9b2c25; }
.badge.evt { background: #d6f2e3; color: #17644a; }
[data-theme='dark'] .badge.imp { background: #5a2623; color: #ffd9d6; }
[data-theme='dark'] .badge.evt { background: #174634; color: #d6f2e3; }
.badge.ok { background: #d6f2e3; color: #17644a; } .badge.wait { background: #fff0cc; color: #7a5500; } .badge.ng { background: #ffd9d6; color: #9b2c25; } .badge.rest { background: #e5e8ec; color: #4a5560; }
[data-theme='dark'] .badge.ok { background: #174634; color: #d6f2e3; } [data-theme='dark'] .badge.wait { background: #4d3b0c; color: #fff0cc; }
[data-theme='dark'] .badge.ng { background: #5a2623; color: #ffd9d6; } [data-theme='dark'] .badge.rest { background: #2a333c; color: #cfd6dd; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li a, .list li > div.row {
  display: grid; grid-template-columns: 110px 96px 1fr auto; gap: 14px; align-items: center; padding: 18px 8px; border-bottom: 1px solid var(--line); color: inherit;
}
.list li a:hover { background: var(--sky-3); text-decoration: none; }
.list .d { font-family: var(--font-en); color: var(--ink-3); font-size: .85rem; }
.list .t { font-size: .95rem; }
.list .pin { color: var(--cyan-d); font-size: .8rem; }
@media (max-width: 640px) {
  .list li a { grid-template-columns: auto 1fr; gap: 6px 12px; }
  .list li a .t { grid-column: 1 / -1; }
  .list li a .pin { display: none; }
}

/* ---------- 記事本文 ---------- */
.article { max-width: 780px; margin-inline: auto; }
.article h1 { font-weight: 500; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.6; margin: 10px 0 16px; letter-spacing: .08em; }
.cover { width: 100%; border-radius: var(--radius); margin: 18px 0 8px; }
.prose { font-size: 1rem; line-height: 2.05; overflow-wrap: anywhere; }
.prose h2 { font-size: 1.35rem; font-weight: 500; margin: 2.2em 0 .7em; padding-left: 14px; border-left: 4px solid var(--cyan); }
.prose h3 { font-size: 1.12rem; font-weight: 500; margin: 1.8em 0 .5em; }
.prose h4 { font-size: 1rem; margin: 1.5em 0 .4em; }
.prose p { margin: 0 0 1.2em; }
.prose img { border-radius: 12px; cursor: zoom-in; display: block; margin: 1.2em auto; }
.prose blockquote { margin: 1.4em 0; padding: 10px 20px; background: var(--sky-3); border-left: 4px solid var(--sky); color: var(--ink-2); }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; }
.prose th { background: var(--sky-3); }
.prose pre, .prose code { background: var(--sky-3); border-radius: 6px; font-size: .9em; }
.prose code { padding: 1px 6px; } .prose pre { padding: 12px 16px; overflow-x: auto; }
.prose a { text-decoration: underline; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* ---------- フォーム ---------- */
.form { display: grid; gap: 20px; max-width: 720px; }
.field label, .field .lbl { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--ink-2); }
.field .req { color: var(--danger); font-size: .75rem; margin-left: 6px; }
.field .hint { font-size: .75rem; color: var(--ink-3); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-height: 46px;
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid color-mix(in srgb, var(--cyan) 40%, transparent); border-color: var(--cyan); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .88rem; color: var(--ink); background: var(--bg); }
.seg input:checked + label { background: var(--sky); border-color: var(--cyan); }
.seg input:focus-visible + label { outline: 3px solid var(--cyan); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 12px; background: var(--sky-3); border: 1px solid var(--line); font-size: .88rem; }
.alert.err { background: #fff0ef; border-color: #f2b8b5; color: #8d2a24; }
[data-theme='dark'] .alert.err { background: #3a1d1b; border-color: #7a3430; color: #ffd0cc; }
.alert.warn { background: #fff8e6; border-color: #f0d890; color: #6f4e00; }
[data-theme='dark'] .alert.warn { background: #3a2f10; border-color: #6b5518; color: #ffe6a8; }
.receipt-box { text-align: center; padding: 36px 20px; border: 2px dashed var(--cyan); border-radius: var(--radius); background: var(--sky-3); }
.receipt-no { font-family: var(--font-en); font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 600; letter-spacing: .08em; word-break: break-all; margin: 8px 0 18px; user-select: all; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 28px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 12px 20px; border-bottom: 3px solid transparent; font-size: .92rem; color: var(--ink-2); }
.tabs button[aria-selected='true'] { border-bottom-color: var(--cyan); color: var(--ink); font-weight: 500; }

/* ---------- 情報テーブル ---------- */
.dl { display: grid; grid-template-columns: 160px 1fr; border-top: 1px solid var(--line); }
.dl dt, .dl dd { margin: 0; padding: 16px 8px; border-bottom: 1px solid var(--line); }
.dl dt { color: var(--ink-2); font-size: .86rem; }
.dl dd { white-space: pre-line; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl dt { border-bottom: 0; padding-bottom: 0; } }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 22px; border-radius: 999px; font-weight: 500; font-size: 1.05rem; }
.status-pill i { width: 12px; height: 12px; border-radius: 50%; background: currentColor; display: block; animation: pulse 2s infinite; }
.status-pill.ok { background: #d6f2e3; color: #17644a; } .status-pill.wait { background: #fff0cc; color: #7a5500; }
.status-pill.ng { background: #ffd9d6; color: #9b2c25; } .status-pill.rest { background: #e5e8ec; color: #4a5560; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- カレンダー(レスポンシブ枠) ---------- */
.cal-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 760px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.cal-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .cal-wrap { aspect-ratio: auto; height: 520px; } }

/* ---------- 実績 ---------- */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--sky); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 30px 28px; }
.timeline li::before { content: ''; position: absolute; left: -9px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--cyan); }
.timeline .res { font-weight: 500; color: var(--cyan-d); font-size: 1.05rem; }
.timeline h3 { margin: 4px 0; font-weight: 500; font-size: 1rem; }

/* ---------- 資料・ファイル ---------- */
.files { display: grid; gap: 10px; }
.file { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.file .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--sky); display: grid; place-items: center; font-family: var(--font-en); font-size: .68rem; font-weight: 600; flex: none; }
.file .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .btn { flex: none; }
@media (max-width: 560px) {
  .file { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
  .file .nm { flex: 1 1 calc(100% - 60px); white-space: normal; overflow-wrap: anywhere; }
  .file .sz { margin-left: 52px; }
  .file .btn { margin-left: auto; }
}
.file .sz { color: var(--ink-3); font-size: .78rem; font-family: var(--font-en); }
.doc-cat { font-size: 1rem; font-weight: 500; margin: 34px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--sky); display: inline-block; }

/* PDFインラインビューア */
.pdfv { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); margin: 16px 0; }
.pdfv-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: .85rem; }
.pdfv-bar .sp { flex: 1; }
.pdfv-pages { max-height: 78vh; overflow: auto; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; -webkit-overflow-scrolling: touch; }
.pdfv-pages canvas { max-width: 100%; height: auto; box-shadow: 0 4px 16px rgba(0, 0, 0, .15); background: #fff; }
.pdfv-msg { padding: 40px 20px; text-align: center; color: var(--ink-2); }

/* ライトボックス */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(8, 18, 28, .92); display: flex; align-items: center; justify-content: center; }
.lb img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lb .lb-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #cfe3ef; font-size: .85rem; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; display: grid; place-items: center; }
.lb button:hover { background: rgba(255, 255, 255, .28); }
.lb .x { top: 14px; right: 14px; } .lb .pv { left: 14px; top: 50%; } .lb .nx { right: 14px; top: 50%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.gallery button { padding: 0; border: 0; background: var(--sky-2); border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.05); }

/* リンク集 */
.link-card { flex-direction: row; align-items: center; gap: 16px; padding: 18px 20px; }
.link-card .lg { width: 56px; height: 56px; border-radius: 14px; background: var(--sky-2) center / cover no-repeat; flex: none; display: grid; place-items: center; font-family: var(--font-en); font-weight: 600; color: var(--cyan-d); font-size: 1.2rem; }

/* 検索・タグ */
.search-box { display: flex; gap: 10px; margin-bottom: 18px; max-width: 640px; }
.search-box .input { flex: 1; }
.tagcloud { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tagcloud .tag { font-size: .8rem; padding: 3px 14px; }
.tagcloud .tag.on { background: var(--cyan-d); color: #fff; border-color: var(--cyan-d); }
[data-theme='dark'] .tagcloud .tag.on { background: var(--cyan); color: #06222f; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--ink-3); padding: 48px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--sky); border-top-color: var(--cyan); animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ホーム: 数字 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.stat { text-align: center; padding: 26px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-family: var(--font-en); font-size: 2.4rem; font-weight: 500; color: var(--cyan-d); line-height: 1.2; }
.stat span { font-size: .82rem; color: var(--ink-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 24px; } .section { padding: 60px 0; } }

/* ---------- フッター ---------- */
.site-footer { background: var(--sky-2); padding: 56px 0 28px; margin-top: 0; font-size: .85rem; }
[data-theme='dark'] .site-footer { background: var(--sky-3); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 2fr; gap: 40px; }
.foot-logo { width: 190px; }
[data-theme='dark'] .foot-logo, [data-theme='dark'] .logo-inv { filter: invert(1); }
.foot-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 20px; }
.foot-links a { color: var(--ink); padding: 4px 0; }
.copy { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .75rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* トースト */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: .88rem; box-shadow: var(--shadow); animation: up .25s ease; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 管理画面 ---------- */
.adm { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; background: var(--bg-2); }
.adm-side { background: var(--card); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.adm-side .brand { padding: 4px 8px 16px; }
.adm-side nav { display: grid; gap: 2px; }
.adm-side nav a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-size: .88rem; }
.adm-side nav a:hover { background: var(--sky-3); text-decoration: none; }
.adm-side nav a.active { background: var(--sky); font-weight: 500; }
.adm-side .sep { height: 1px; background: var(--line); margin: 10px 4px; }
.adm-side .who { padding: 12px 14px; font-size: .78rem; color: var(--ink-2); }
.adm-main { padding: 28px clamp(16px, 3vw, 40px) 80px; min-width: 0; }
.adm-main h1 { font-size: 1.4rem; font-weight: 500; margin: 0 0 22px; letter-spacing: .1em; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adm-main h1 .btn { margin-left: auto; }
.adm-top { display: none; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.panel h2 { font-size: 1.02rem; font-weight: 500; margin: 0 0 14px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 560px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { background: var(--sky-3); font-weight: 500; color: var(--ink-2); font-size: .78rem; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td .act { display: flex; gap: 6px; justify-content: flex-end; }
.tbl td.ttl { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: block; color: inherit; }
a.kpi:hover { text-decoration: none; box-shadow: var(--shadow); }
.kpi b { display: block; font-family: var(--font-en); font-size: 1.9rem; font-weight: 500; line-height: 1.2; color: var(--cyan-d); }
.kpi span { font-size: .78rem; color: var(--ink-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--cyan-d); }
.upl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upl img.pv { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.upl-files { display: grid; gap: 8px; margin-top: 10px; }
.upl-files .file { padding: 8px 12px; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-height: 46px; align-items: center; }
.tag-input input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 110px; padding: 6px; }
.tag-input .tag button { border: 0; background: transparent; padding: 0 0 0 6px; font-size: .9rem; line-height: 1; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* リッチエディタ */
.rte { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--sky-3); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.rte-bar button, .rte-bar select, .rte-bar input[type='color'] { height: 36px; min-width: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 0 8px; }
.rte-bar input[type='color'] { padding: 2px; width: 40px; }
.rte-bar button:hover { background: var(--sky); }
.rte-bar button.on { background: var(--sky); border-color: var(--cyan); }
.rte-area { min-height: 320px; max-height: 70vh; overflow: auto; padding: 16px 18px; outline: 0; }
.rte-area:empty::before { content: attr(data-ph); color: var(--ink-3); }
.rte-area img { cursor: default; }
.rte-src { width: 100%; min-height: 320px; border: 0; padding: 14px; font-family: ui-monospace, monospace; font-size: .82rem; background: var(--bg); outline: 0; display: none; }

/* ログイン */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--sky-2); padding: 20px; }
.login-card { background: var(--card); padding: 36px 30px; border-radius: 24px; width: min(420px, 100%); box-shadow: var(--shadow); }
.login-card img { width: 64px; display: block; margin: 0 auto 10px; border-radius: 16px; }
.login-card h1 { text-align: center; font-weight: 500; font-size: 1.2rem; letter-spacing: .12em; margin: 0 0 22px; }

.modal { position: fixed; inset: 0; background: rgba(8, 18, 28, .55); z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); border-radius: 20px; width: min(640px, 100%); max-height: 92vh; overflow: auto; padding: 26px; }
.modal-card h2 { margin: 0 0 14px; font-weight: 500; font-size: 1.1rem; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; font-size: .88rem; margin-bottom: 14px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bodybox { white-space: pre-wrap; background: var(--sky-3); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; overflow-wrap: anywhere; font-size: .9rem; }

@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 120; transform: translateX(-102%); transition: transform .25s; height: auto; }
  .adm-side.open { transform: none; box-shadow: var(--shadow); }
  .adm-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
}

@media print { .site-header, .site-footer, .scroll-down, .hero-news { display: none !important; } }
