@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');

:root {
  --bg: #07090c;
  --bg2: #0c0f14;
  --panel: #111520;
  --panel2: #161c28;
  --line: #1e2736;
  --line2: #2a3548;
  --text: #eaf0f8;
  --soft: #b8c8d8;
  --muted: #667788;
  --muted2: #3a4a5a;
  --gold: #f5b941;
  --gold-bg: rgba(245,185,65,.10);
  --gold-line: rgba(245,185,65,.28);
  --ok: #3fc87a;
  --ok-bg: rgba(63,200,122,.10);
  --ok-line: rgba(63,200,122,.30);
  --ng: #ff6262;
  --ng-bg: rgba(255,98,98,.10);
  --ng-line: rgba(255,98,98,.30);
  --wrap: min(680px, calc(100% - 24px));
  --radius: 12px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7,9,12,.92);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.brand { display: block; flex-shrink: 0; }
.brand img { height: 44px; width: auto; display: block; max-width: 240px; object-fit: contain; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.header-nav a { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.header-nav a:hover { color: var(--soft); }
.header-nav a[aria-current="page"] { color: var(--soft); pointer-events: none; }
.header-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.header-link:hover { color: var(--soft); }

.header-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.header-search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted2);
  pointer-events: none;
}
.header-search-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px 6px 24px;
  color: var(--text);
  font-size: 13px;
}
.header-search-input::placeholder { color: var(--muted2); }
.header-search-input:focus { outline: none; border-color: var(--gold); }
.header-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  z-index: 100;
  overflow: hidden;
  display: none;
  min-width: 200px;
}
.header-dropdown.show { display: block; }
.dropdown-item,
.header-dropdown-item {
  display: block;
  padding: 9px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.dropdown-item:last-child,
.header-dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover,
.header-dropdown-item:hover { background: var(--panel2); color: var(--gold); }
.dropdown-empty { padding: 9px 12px; color: var(--muted); font-size: 13px; }

/* MAIN */
.site-main {
  width: var(--wrap);
  margin: 0 auto;
  padding: 0 0 60px;
}

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); }
.site-footer-inner {
  width: var(--wrap);
  margin: 0 auto;
  padding: 20px 0 32px;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 10px;
}
.footer-links a { color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--soft); }
.footer-copy { color: var(--muted2); font-size: 12px; }
.eyebrow-link { color: var(--muted); text-decoration: none; }
.eyebrow-link:hover { color: var(--soft); }
.article-hero--compact { border-bottom: none; padding-bottom: 12px; }
.hero-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-settei--wide { flex: 1; justify-content: center; }
.btn-show-all--center { display: block; text-align: center; }
.btn-show-all--muted { color: var(--muted); }
.compact-note { margin-bottom: 12px; }
.landscape-hint-box {
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.landscape-hint-icon { font-size: 18px; flex-shrink: 0; color: var(--gold); }
.landscape-hint-text { font-size: 12px; color: var(--gold); margin: 0; line-height: 1.7; font-weight: 700; }

/* INDEX PAGE */
.index-toolbar { padding: 14px 0; }
.machine-list {
  display: flex;
  flex-direction: column;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--bg2); }
.empty-card {
  display: none;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* ARTICLE PAGE */
.article-hero {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .2em;
  margin: 0 0 6px;
  font-family: 'Share Tech Mono', monospace;
}
.page-title {
  margin: 0 0 6px;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.3;
}
.hero-sub { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.article-section-wrap { display: grid; }
.article-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.article-block:last-child { border-bottom: none; }
.block-label {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .15em;
  font-weight: 700;
  margin: 0 0 12px;
  font-family: 'Share Tech Mono', monospace;
}

/* CHECKER */
.checker-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.checker-card--guide {
  padding: 20px;
}
.is-hidden { display: none !important; }
.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.mode-toggle input { display: none; }
.mode-toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.mode-toggle input:checked + label {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}
.game-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}
.game-input:focus { outline: none; border-color: var(--gold); }
.checker-result {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.checker-result--guide {
  padding: 18px 20px;
  margin-bottom: 0;
}
.result-wait { background: var(--bg2); border: 1px solid var(--line); }
.result-ok { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.result-ng { background: var(--ng-bg); border: 1px solid var(--ng-line); }
.result-label { margin: 0 0 3px; font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.result-ok .result-label { color: var(--ok); }
.result-ng .result-label { color: var(--ng); }
.result-text { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }
.hint-text { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.checker-result--guide .result-label {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: .14em;
}
.checker-result--guide .result-text {
  font-size: clamp(20px, 4.8vw, 28px);
  line-height: 1.5;
}
.hint-text--guide {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.9;
}

.setting-dummy-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  border: 1px dashed var(--line2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* SUMMARY */
.summary-grid { width: 100%; table-layout: fixed; border-collapse: collapse; border: 1px solid var(--line2); }
.summary-grid td { border: 1px solid var(--line2); padding: 11px 13px; vertical-align: top; width: 50%; }
.summary-grid td.full { width: 100%; }
.s-label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .08em; margin-bottom: 4px; }
.s-value { color: var(--text); font-size: 13px; font-weight: 800; line-height: 1.5; }

/* INFO TABLE */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--line); }
.info-table tr:last-child { border-bottom: none; }
.info-table th { color: var(--muted); font-size: 11px; font-weight: 700; padding: 10px 12px 10px 0; text-align: left; width: 110px; vertical-align: top; border-right: 1px solid var(--line2); }
.info-table td { color: var(--text); font-size: 13px; font-weight: 700; padding: 10px 0 10px 12px; line-height: 1.5; white-space: pre-wrap; }

/* ARTICLE SECTIONS */
.article-item { padding-left: 12px; border-left: 2px solid var(--line2); margin-bottom: 20px; }
.article-item:last-child { margin-bottom: 0; }
.article-title { color: var(--gold); font-size: 13px; font-weight: 800; margin: 0 0 8px; }
.article-body { color: var(--soft); font-size: 13px; line-height: 1.85; margin: 0 0 10px; }
.article-body:last-child { margin-bottom: 0; }

/* SETTEI TABLE */
.settei-sub-label { color: var(--muted); font-size: 10px; letter-spacing: .1em; font-weight: 700; margin: 16px 0 8px; }
.article-item .settei-sub-label:first-of-type { margin-top: 4px; }
.settei-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line2); margin-bottom: 4px; table-layout: fixed; }
.settei-table th:last-child { width: 90px; }
.settei-table--wide th:last-child { width: 118px; }
.settei-table th { background: var(--panel); color: var(--muted); font-size: 10px; font-weight: 700; padding: 7px 8px; border: 1px solid var(--line2); text-align: left; }
.settei-table td { color: var(--text); font-size: 12px; font-weight: 700; padding: 6px 8px; border: 1px solid var(--line2); line-height: 1.5; vertical-align: middle; }
.settei-table td:last-child { text-align: center; padding: 3px; }
.settei-note { font-size: 11px; color: var(--muted); margin: 4px 0 0; }
.settei-badge { display: block; width: 100%; box-sizing: border-box; padding: 3px 2px; border-radius: 3px; font-size: 10px; font-weight: 700; text-align: center; line-height: 1.3; white-space: normal; overflow: visible; }
.settei-hint { display: block; color: var(--muted); font-size: 10px; font-weight: 400; text-align: center; }
.settei-weak { background: rgba(245,185,65,.12); color: var(--gold); border: 1px solid var(--gold-line); }
.settei-mid { background: rgba(245,185,65,.22); color: var(--gold); border: 1px solid var(--gold-line); }
.settei-strong { background: rgba(245,185,65,.42); color: #f5d041; border: 1px solid rgba(245,185,65,.65); }
.settei-ok { background: rgba(63,200,122,.18); color: var(--ok); border: 1px solid rgba(63,200,122,.45); }
.settei-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; padding: 8px 10px; background: var(--bg2); border-radius: var(--radius-sm); }
.settei-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.settei-legend-badge { display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: 10px; font-weight: 700; line-height: 1.4; }

/* SURU COUNTER */
.suru-wrap { margin-bottom: 10px; }
.suru-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.suru-val { min-width: 40px; text-align: center; font-size: 20px; font-weight: 700; color: var(--gold); }

/* CAUTION BOX (ポチポチくん) */
.caution-box { background: rgba(255,98,98,.06); border: 1px solid rgba(255,98,98,.2); border-radius: var(--radius-sm); padding: 11px 13px; margin-top: 10px; }
.caution-text { font-size: 11px; color: #ff9090; line-height: 1.7; margin: 0; }

/* CHECKER CARD VARIANTS */
.checker-card--mt { margin-top: 12px; }

/* RESULT TEXT VARIANTS */
.result-text--comment { font-size: 13px; font-weight: 700; color: var(--soft); }

/* HEADER CENTER (トップページ用) */
.header-inner--center { justify-content: center; }

/* SEARCH INPUT (トップページ用・site.css.appendの#fff上書き) */
.toolbar { padding-top: 28px; }
.search-input {
  background: var(--bg2);
  border: 1px solid var(--gold-line);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  width: 100%;
  outline: none;
}
.search-input::placeholder { color: var(--muted2); }
.search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,185,65,.12); }

/* LIST HEADER */
.list-header { padding: 16px 0 8px; }
.list-header-title { color: var(--text); font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.list-header-sub { color: var(--muted); font-size: 11px; margin: 0; }

/* SHOW ALL BUTTON */
.show-all-wrap { text-align: center; padding: 16px 0 8px; }
.show-all-wrap--top { padding-top: 12px; padding-bottom: 0; }
.btn-show-all {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  width: 100%;
}
.btn-show-all:hover { border-color: var(--gold); }

/* HERO CATCH */
.hero-catch { font-size: 28px; font-weight: 900; font-family: "Orbitron", sans-serif; color: var(--text); letter-spacing: .04em; line-height: 1.1; margin: 0 0 6px; }
.hero-catch-sub { font-size: 16px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 0 0 20px; }
.hero-desc { border-left: 2px solid var(--line2); padding: 12px 14px; }
.hero-desc-lead { font-size: 13px; color: var(--soft); line-height: 1.7; margin: 0 0 10px; }
.hero-desc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.hero-desc-list li { font-size: 12px; color: var(--muted); line-height: 1.6; }
.hero-desc-list li::before { content: "— "; }

/* SETTING JUDGE */
.setting-input-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.setting-input-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.setting-input-item:last-child { border-bottom: none; }
.setting-input-label-wrap { display: flex; flex-direction: column; gap: 3px; }
.setting-input-label { font-size: 13px; color: var(--text); font-weight: 700; line-height: 1.4; }
.setting-input-sub { font-size: 12px; color: var(--muted); line-height: 1.3; }
.setting-counter-wrap { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.setting-cnt-btn { width: 48px; height: 48px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius-sm); color: var(--muted); font-size: 22px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; touch-action: manipulation; }
.setting-cnt-btn:active { background: var(--line2); }
.setting-num-input { width: 84px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 0 4px; height: 48px; color: var(--text); font-size: 15px; font-weight: 800; text-align: center; }
.setting-num-input:focus { outline: none; border-color: var(--gold); }
.setting-num-input::-webkit-inner-spin-button, .setting-num-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.setting-num-input { -moz-appearance: textfield; }
.setting-result-wrap { display: flex; flex-direction: column; gap: 8px; }
.setting-result-row { display: flex; align-items: center; gap: 10px; }
.setting-result-name { font-size: 12px; font-weight: 800; color: var(--muted); min-width: 36px; }
.setting-bar-wrap { flex: 1; background: var(--panel); border-radius: 999px; height: 10px; overflow: hidden; }
.setting-bar { height: 100%; border-radius: 999px; background: var(--muted2); transition: width .3s; }
.setting-result-pct { font-size: 12px; font-weight: 800; min-width: 42px; text-align: right; }
.setting-reset-btn { width: 100%; margin-top: 12px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 10px; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.setting-reset-btn:hover { border-color: var(--ng); color: #ff9090; }

/* TOP LIST BUTTONS */
.list-row-main { flex: 1; display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-width: 0; }
.machine-name { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.3; }
.machine-strategy { font-size: 12px; color: var(--muted); font-weight: 500; }
.btn-settei { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--gold-bg); border: 1px solid var(--gold-line); border-radius: var(--radius-sm); color: var(--gold); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; flex-shrink: 0; }
.btn-settei:hover { background: rgba(245,185,65,.18); }

/* RATE TOGGLE SHARED */
.rate-toggle-shared { margin: 0 0 12px; }

/* EV TABLE */
.ev-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.ev-table thead th { padding: 6px 10px; background: var(--panel2); color: var(--muted); font-size: 11px; text-align: left; border-bottom: 1px solid var(--line2); }
.ev-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.ev-row-great td:first-child { font-weight: 700; }
.ev-row-great td:last-child { color: var(--ok); font-weight: 700; }
.ev-row-ok td:last-child { color: var(--ok); }
.ev-row-wait td:last-child { color: var(--gold); }
.ev-row-ng td:last-child { color: var(--muted); }
.ev-mode-toggle { margin-bottom: 8px; }

.is-landscape .site-header { position: static; }
.is-landscape .setting-input-grid { grid-template-columns: 1fr 1fr 1fr; gap: 6px 16px; }
.is-landscape .setting-input-item { padding: 6px 0; gap: 6px; border-bottom: 1px solid var(--line); }
.is-landscape .setting-input-label-wrap { flex: 1; min-width: 0; }
.is-landscape .setting-input-label { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-landscape .setting-input-sub { display: none; }
.is-landscape .setting-counter-wrap { gap: 5px; flex-shrink: 0; }
.is-landscape .setting-num-input { width: 58px; height: 46px; font-size: 17px; padding: 0 4px; }
.is-landscape .setting-cnt-btn { width: 46px; height: 46px; font-size: 22px; }
.is-landscape .setting-current-val { display: none; }
.is-landscape .hint-text { display: none; }
.setting-current-val { display: none; }

@media (max-width: 520px) {
  .header-inner { gap: 8px; flex-wrap: wrap; }
  .brand img { height: 36px; max-width: 180px; }
  .header-nav {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 2px;
  }
}

/* CONTACT FORM (Google Forms iframe dark mode) */
.contact-form-wrap iframe {
  filter: invert(.92) saturate(0) brightness(0.55);
  border-radius: var(--radius-sm);
}
