/* HP採点ツール 画面スタイル — Dark × Neon */
:root {
  --bg: #070A12;
  --bg-2: #0B1020;
  --card: rgba(17, 24, 42, 0.78);
  --card-solid: #111829;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #E6EAF2;
  --text-sub: #A3ADC2;
  --text-muted: #7C879E;
  --cyan: #22D3EE;
  --violet: #A78BFA;
  --pink: #F472B6;
  --amber: #FBBF24;
  --green: #34D399;
  --danger: #FB7185;
  --ok-bg: rgba(52, 211, 153, 0.14);
  --ok-fg: #6EE7B7;
  --ng-bg: rgba(251, 113, 133, 0.14);
  --ng-fg: #FDA4AF;
  --na-bg: rgba(148, 163, 184, 0.12);
  --na-fg: #A3ADC2;
  --radius: 16px;
  --font: "Noto Sans JP", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(167, 139, 250, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
}
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
main { position: relative; min-height: 100vh; }
a { color: var(--cyan); }
a:hover { color: #67E8F9; }
.mono { font-family: var(--font-mono); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); border: 0;
}
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex-shrink: 0; box-shadow: 0 0 10px currentColor; }
.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--cyan);
}
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ===== 入力画面 ===== */
.input-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 64px 16px;
}
.hero { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, #FFFFFF 10%, var(--cyan) 45%, var(--violet) 75%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(34, 211, 238, 0.25));
}
.hero-lead { margin: 0; max-width: 620px; font-size: 15px; line-height: 1.8; color: var(--text-sub); }

.input-card {
  width: 720px;
  max-width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.06), 0 30px 80px -30px rgba(34, 211, 238, 0.35);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .auth-details > summary { font-size: 13px; font-weight: 700; color: var(--text); }
.url-row { display: flex; gap: 10px; }
.url-row input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.7);
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-mono);
}
.url-row input::placeholder, .auth-body textarea::placeholder { color: #5B6680; }
.url-row input:focus, .auth-body input:focus, .auth-body textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2), 0 0 24px rgba(34, 211, 238, 0.25);
}
.primary-button {
  height: 56px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  color: #05070D;
  font-size: 16px;
  font-weight: 900;
  font-family: var(--font);
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 30px -8px rgba(34, 211, 238, 0.6);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 36px -8px rgba(167, 139, 250, 0.7); }
.primary-button:disabled { opacity: .55; cursor: progress; transform: none; }

.auth-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--text-sub);
}
.auth-details > summary::-webkit-details-marker { display: none; }
.auth-details > summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--text-sub);
  border-bottom: 1.5px solid var(--text-sub);
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform .15s;
}
.auth-details[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.auth-body { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.auth-body textarea, .auth-body input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(7, 10, 18, 0.7);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  resize: none;
}
.auth-body input { height: 44px; }
.help { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.basic-auth { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.basic-title { font-size: 13px; font-weight: 700; color: var(--text); }
.basic-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.basic-fields label { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 4px; }
.note { margin: 0; font-size: 12px; color: var(--text-muted); text-align: center; }

.progress { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; color: var(--text-sub); }
.progress-bar { width: 100%; height: 4px; border-radius: 999px; background: rgba(148, 163, 184, 0.15); overflow: hidden; }
.progress-bar span {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  animation: scan 1.4s ease-in-out infinite;
}
@keyframes scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.25); border-top-color: var(--cyan);
  animation: spin .8s linear infinite; display: inline-block; flex-shrink: 0; vertical-align: -2px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.feature-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
}
.feature-row li { display: inline-flex; align-items: center; gap: 8px; }

/* ===== 結果画面 ===== */
.result-view { padding: 48px 32px 64px; }
.result { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.result-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.result-title h1 { margin: 0; font-family: var(--font-display); font-size: 32px; font-weight: 900; letter-spacing: 0.02em; }
.result-url { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-sub); overflow-wrap: anywhere; }
.again-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap;
  transition: border-color .15s, box-shadow .15s;
}
.again-link:hover { color: var(--text); border-color: var(--cyan); box-shadow: 0 0 20px rgba(34, 211, 238, 0.25); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.section { display: flex; flex-direction: column; gap: 12px; }
.section-title {
  margin: 0;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px;
  font-size: 17px; font-weight: 700;
}
.section-index { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.1em; }
.section-sub { font-size: 12px; font-weight: 400; color: var(--text-muted); }

.error-card { padding: 24px; border-color: rgba(251, 113, 133, 0.4); box-shadow: 0 0 40px -12px rgba(251, 113, 133, 0.4); }
.error-card h2 { margin: 0 0 8px; font-size: 16px; color: var(--danger); }
.error-card p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--text-sub); }
.timeout-card { padding: 16px 20px; font-size: 13px; line-height: 1.8; color: var(--text-sub); border-color: rgba(251, 191, 36, 0.45); }
.timeout-card strong { color: var(--amber); }

/* スコア */
.score-hero {
  padding: 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  box-shadow: 0 30px 80px -40px rgba(167, 139, 250, 0.45);
  overflow: hidden; /* ランクのハンコが押される瞬間(拡大表示)に画面外へはみ出さないように */
}
.gauges { display: flex; gap: 20px; }
.gauge { position: relative; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gauge svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(148, 163, 184, 0.14); stroke-width: 9; }
.gauge-value {
  fill: none;
  stroke: var(--gauge-color);
  stroke-width: 9;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--gauge-color));
  transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .2, 1);
}
.gauge-center {
  position: absolute; top: 0; left: 0; right: 0; height: 132px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge-score { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; color: #fff; text-shadow: 0 0 18px var(--gauge-color); }
.gauge-pending { color: var(--text-muted); text-shadow: none; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.gauge-max { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.gauge-label { font-size: 13px; font-weight: 700; color: var(--text); }
.gauge-sub { font-family: var(--font-mono); font-size: 11px; color: var(--gauge-color); }

.bars { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bar-row { display: flex; align-items: center; gap: 14px; }
.bar-label { width: 200px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text); }
.bar-track { flex-grow: 1; height: 8px; background: rgba(148, 163, 184, 0.12); border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar-color) 45%, transparent), var(--bar-color));
  box-shadow: 0 0 12px var(--bar-color);
}
.bar-fill.is-pending {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bar-color) 60%, transparent), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  box-shadow: none;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.bar-score { width: 64px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.bar-score b, .acc-score b, .item-score b { color: var(--text); font-weight: 600; }
.bars-note { margin: 0; font-size: 12px; color: var(--text-muted); }

/* 基本情報 */
.basic-grid { padding: 20px 24px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.basic-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.basic-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-muted); }
.basic-value { font-size: 15px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.basic-sub { font-size: 11px; color: var(--text-muted); overflow-wrap: anywhere; }

/* アコーディオン */
.accordion { overflow: hidden; }
.design-summary { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--border); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }
.acc-item > summary {
  list-style: none;
  padding: 16px 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px;
  transition: background .15s;
}
.acc-item > summary::-webkit-details-marker { display: none; }
.acc-item > summary:hover { background: rgba(148, 163, 184, 0.06); }
.acc-item[open] > summary { background: linear-gradient(90deg, color-mix(in srgb, var(--cat-color) 12%, transparent), transparent 60%); }
.acc-title { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.acc-right { display: flex; align-items: center; gap: 14px; color: var(--text-muted); }
.acc-score { font-size: 13px; white-space: nowrap; }
.chevron { transition: transform .2s; }
.acc-item[open] .chevron { transform: rotate(180deg); }
.acc-body { padding: 6px 24px 22px 44px; display: flex; flex-direction: column; gap: 12px; }
.acc-note { margin: 0; font-size: 12px; color: var(--text-muted); }
.item-row { display: grid; grid-template-columns: 220px 76px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.item-name { font-size: 13px; color: var(--text); }
.item-score { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.item-note { font-size: 13px; color: var(--text-sub); overflow-wrap: anywhere; }
.item-row.is-error .item-note { color: var(--ng-fg); }
.item-issues {
  margin: -4px 0 4px 312px;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.item-issues li::marker { color: var(--cat-color, var(--cyan)); }

/* SEO表 */
.seo-card { padding: 8px 20px 12px; }
.seo-table-wrap { overflow-x: auto; }
.seo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.seo-table th {
  text-align: left; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-muted); padding: 12px 12px 10px 0; white-space: nowrap;
}
.seo-table td { padding: 9px 12px 9px 0; border-top: 1px solid var(--border); vertical-align: middle; }
.seo-table tbody tr:hover td { background: rgba(148, 163, 184, 0.04); }
.seo-table th:first-child, .seo-table td:first-child { width: 34%; }
.seo-url { font-family: var(--font-mono); font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.seo-row-note { display: block; font-family: var(--font); font-size: 11px; color: var(--text-muted); }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: rgba(52, 211, 153, 0.3); }
.badge-ng, .badge-fail { background: var(--ng-bg); color: var(--ng-fg); border-color: rgba(251, 113, 133, 0.3); }
.badge-na { background: var(--na-bg); color: var(--na-fg); }

/* AIコメント */
.ai-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.ai-head { display: flex; align-items: center; gap: 10px; }
.ai-head h2, .ai-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.dot-ai { background: var(--amber); color: var(--amber); }
.ai-status { margin: 0; font-size: 13px; color: var(--text-sub); line-height: 1.8; }
.ai-error { color: var(--ng-fg); }
.ai-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ai-section {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.45);
}
.ai-section-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--amber); }
.ai-section-body { font-size: 13px; line-height: 1.85; color: var(--text-sub); }
.ai-section-body p { margin: 0 0 6px; }
.ai-section-body ul { margin: 0 0 6px; padding-left: 20px; }
.ai-section-body strong { color: var(--text); }
.ai-section-body code { font-family: var(--font-mono); font-size: 12px; background: rgba(148, 163, 184, 0.14); padding: 1px 5px; border-radius: 4px; }
.ai-model { margin: 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* 実行ログ */
.log-card {
  background: #04060B;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.log-card h2 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--text-muted); }
.log-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 10px var(--green); }
.log-lines { font-family: var(--font-mono); font-size: 12px; line-height: 1.9; color: #7EE7C2; overflow-wrap: anywhere; }
.log-time { color: #4B5A76; }
.log-notice { color: #C9D1E0; }
.log-error { color: var(--danger); }

/* ===== タブレット・スマートフォン ===== */
@media (max-width: 980px) {
  .score-hero { grid-template-columns: 1fr; }
  .gauges { justify-content: center; }
  .basic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .input-view { padding: 40px 16px; justify-content: flex-start; }
  .input-card { padding: 20px 16px; }
  .url-row { flex-direction: column; }
  .primary-button { width: 100%; }
  .basic-fields { grid-template-columns: 1fr; }
  .result-view { padding: 28px 16px 48px; }
  .result-head { flex-direction: column; align-items: flex-start; }
  .result-title h1 { font-size: 26px; }
  .score-hero { padding: 20px 16px; gap: 24px; }
  .gauges { gap: 4px; justify-content: space-between; }
  .gauge { width: 33%; }
  .gauge svg { width: 96px; height: 96px; }
  .gauge-center { height: 96px; }
  .gauge-score { font-size: 28px; }
  .gauge-max { font-size: 10px; margin-top: 2px; }
  .gauge-label { font-size: 12px; }
  .gauge-sub { font-size: 10px; text-align: center; }
  .bar-label { width: 124px; font-size: 12px; }
  .basic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
  .acc-item > summary { padding: 14px 16px; }
  .acc-body { padding: 6px 16px 18px 16px; }
  .design-summary { padding: 16px; }
  .item-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .item-name { font-weight: 700; }
  .item-note { grid-column: 1 / -1; }
  .item-issues { margin-left: 0; }
  .seo-card { padding: 4px 12px 8px; }
  .seo-table { min-width: 680px; }
  .seo-table th:first-child, .seo-table td:first-child { width: 180px; }
  .ai-card { padding: 18px 16px; }
  .ai-sections { grid-template-columns: 1fr; }
}

/* ===== 診断中ローディング・結果発表の演出(ドパガキ仕様) ===== */
body.fx-lock { overflow: hidden; }
.fx-loader {
  --fx-hue: 0;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(167, 139, 250, 0.35), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.25), transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(244, 114, 182, 0.25), transparent 50%),
    rgba(4, 6, 12, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  animation: fx-bg 3s linear infinite;
}
@keyframes fx-bg { to { filter: hue-rotate(360deg); } }
.fx-loader.is-shake { animation: fx-bg 3s linear infinite, fx-shake .4s linear; }
@keyframes fx-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 4px); }
  40% { transform: translate(7px, -5px); }
  60% { transform: translate(-5px, -3px); }
  80% { transform: translate(4px, 5px); }
}
.fx-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 4px);
  animation: fx-scanmove 6s linear infinite;
}
@keyframes fx-scanmove { to { background-position: 0 200px; } }

.fx-core { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.fx-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: var(--violet);
  filter: drop-shadow(0 0 10px var(--cyan));
  animation: spin 1.1s linear infinite;
}
.fx-rings span:nth-child(2) { inset: 18px; border-top-color: var(--pink); border-right-color: var(--amber); animation-duration: .8s; animation-direction: reverse; filter: drop-shadow(0 0 10px var(--pink)); }
.fx-rings span:nth-child(3) { inset: 36px; border-top-color: var(--green); border-right-color: var(--cyan); animation-duration: 1.6s; filter: drop-shadow(0 0 10px var(--green)); }
.fx-percent {
  position: relative;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 12px var(--cyan), 0 0 28px var(--violet), 0 0 48px var(--pink);
  animation: fx-pulse .5s ease-in-out infinite alternate;
}
.fx-percent small { font-size: 24px; margin-left: 2px; }
@keyframes fx-pulse { from { transform: scale(1); } to { transform: scale(1.07); } }
.fx-label { margin: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.5em; color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
.fx-msg { margin: 0; min-height: 1.6em; font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 0.04em; }
.fx-msg.is-glitch { animation: fx-glitch .35s steps(2) 1; }
@keyframes fx-glitch {
  0% { text-shadow: 3px 0 var(--pink), -3px 0 var(--cyan); transform: translateX(2px) skewX(-8deg); }
  50% { text-shadow: -3px 0 var(--pink), 3px 0 var(--cyan); transform: translateX(-2px) skewX(6deg); }
  100% { text-shadow: none; transform: none; }
}
.fx-bar { width: min(520px, 90vw); height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.fx-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22D3EE, #A78BFA, #F472B6, #FBBF24, #34D399, #22D3EE);
  background-size: 200% 100%;
  box-shadow: 0 0 16px rgba(244, 114, 182, 0.8);
  animation: fx-rainbow 1s linear infinite;
  transition: width .2s ease-out;
}
@keyframes fx-rainbow { to { background-position: -200% 0; } }
.fx-combo { margin: 0; min-height: 1.4em; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--amber); text-shadow: 0 0 12px var(--amber); }
.fx-combo.is-pop { animation: fx-pop .35s cubic-bezier(.2, 2, .4, 1); }
@keyframes fx-pop { from { transform: scale(1.8); opacity: .3; } to { transform: scale(1); opacity: 1; } }

.fx-cutin {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin: 0;
  padding: 18px 0;
  transform: translateY(-50%);
  font-size: clamp(44px, 10vw, 110px);
  font-weight: 900;
  letter-spacing: 0.06em;
  font-style: italic;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
  border-top: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}
.fx-cutin.is-show { animation: fx-cutin 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fx-cutin {
  0% { transform: translate(-120%, -50%) skewX(-20deg); opacity: 0; }
  18% { transform: translate(0, -50%) skewX(-10deg); opacity: 1; }
  75% { transform: translate(4%, -50%) skewX(-10deg); opacity: 1; }
  100% { transform: translate(120%, -50%) skewX(-20deg); opacity: 0; }
}
.cutin-red { color: #FF3B5C; text-shadow: 0 0 20px #FF3B5C, 0 0 60px #FF3B5C; }
.cutin-gold { color: #FFD43B; text-shadow: 0 0 20px #FFB800, 0 0 60px #FF8A00; }
.cutin-blue { color: #38BDF8; text-shadow: 0 0 20px #38BDF8, 0 0 60px #6366F1; }
.cutin-rainbow {
  color: #fff;
  background-image: linear-gradient(90deg, #FF3B5C, #FFD43B, #34D399, #22D3EE, #A78BFA, #F472B6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.7));
}

.fx-loader.is-done { animation: fx-flash .65s ease-out forwards; }
.fx-loader.is-done .fx-percent { color: #fff; text-shadow: 0 0 20px #FFD43B, 0 0 60px #FF8A00; animation: none; transform: scale(1.3); transition: transform .3s; }
@keyframes fx-flash {
  0% { background-color: rgba(255, 255, 255, 0.9); }
  30% { background-color: rgba(4, 6, 12, 0.94); }
  100% { opacity: 0; }
}
.fx-loader.is-fail { animation: none; }
.fx-loader.is-fail .fx-percent { color: var(--danger); text-shadow: 0 0 20px var(--danger); animation: none; }
.fx-canvas { position: fixed; inset: 0; z-index: 110; pointer-events: none; width: 100vw; height: 100vh; }

/* 結果発表: ゲージのスロット回転とランクのハンコ */
.gauge.is-rolling .gauge-score { color: var(--gauge-color); animation: fx-pulse .12s ease-in-out infinite alternate; }
.bar-fill { transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.rank-stamp {
  position: absolute;
  top: -6px;
  right: 2px;
  min-width: 44px;
  padding: 2px 8px;
  border: 3px solid currentColor;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  transform: rotate(-14deg);
  background: rgba(4, 6, 12, 0.85);
  animation: fx-stamp .45s cubic-bezier(.2, 2.2, .4, 1) both;
  pointer-events: none;
}
@keyframes fx-stamp { from { transform: rotate(-14deg) scale(3); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: 1; } }
.rank-S {
  color: #FFD43B;
  text-shadow: 0 0 12px #FFB800;
  box-shadow: 0 0 24px rgba(255, 212, 59, 0.8);
  background-image: linear-gradient(90deg, rgba(255, 59, 92, .35), rgba(255, 212, 59, .35), rgba(52, 211, 153, .35), rgba(34, 211, 238, .35), rgba(167, 139, 250, .35));
  animation: fx-stamp .45s cubic-bezier(.2, 2.2, .4, 1) both, fx-bg 2s linear .45s infinite;
}
.rank-A { color: #F472B6; text-shadow: 0 0 10px #F472B6; }
.rank-B { color: #22D3EE; text-shadow: 0 0 10px #22D3EE; }
.rank-C { color: #A3ADC2; }
.rank-D { color: #7C879E; }
@media (max-width: 720px) {
  .fx-core { width: 170px; height: 170px; }
  .fx-percent { font-size: 48px; }
  .fx-msg { font-size: 17px; }
  .rank-stamp { font-size: 16px; min-width: 32px; top: -8px; right: -2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
