@charset "UTF-8";

/* =============================================================
   nAIsou Shindan (内装診断)
   デザインシステム: V3 Soft Brutalist
   （haiyer.work / pyhiroba / haikei-touka 準拠）
   ============================================================= */

:root {
  /* ブランドカラー */
  --accent: #028dae;
  --accent-rgb: 2, 141, 174;
  --accent-dk: #01617a;
  --accent-soft: #e3f3f7;
  --accent-border: #c8e8ef;

  /* インク（テキスト） */
  --ink: #101418;
  --ink-2: #2b3138;
  --ink-3: #5b636c;
  --ink-4: #8a929b;

  /* 背景・サーフェス */
  --bg: #f9fbfc;
  --paper: #ffffff;
  --bg-2: #eef3f5;

  /* ボーダー */
  --line: #dfe7ea;
  --line-2: #eaf0f2;

  /* 情報系の注意書き */
  --notice-bg: #e8f4f8;
  --notice-border: #bfdfe9;
  --notice-ink: #0a5568;

  /* ステータス */
  --color-red: #e74c3c;

  /* 角丸 */
  --radius-sm: 4px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* シャドウ */
  --shadow: 0 1px 0 rgba(16, 20, 24, 0.04), 0 8px 28px -12px rgba(16, 20, 24, 0.1);
  --shadow-sm: 0 1px 0 rgba(16, 20, 24, 0.04), 0 4px 12px -6px rgba(16, 20, 24, 0.08);

  /* フォント */
  --font-ui: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;

  /* レイアウト */
  --shell-max: 540px;
}

/* ---------- リセット ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  /* 白格子背景（アクセント4% / 28px方眼） */
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

img {
  max-width: 100%;
}

button {
  font-family: inherit;
}

a {
  color: inherit;
}

/* ---------- アイコン（Lucide 系ストローク） ---------- */
.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--bold {
  stroke-width: 2.4;
}

/* ---------- レイアウト ---------- */
.shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 不具合報告チップ ---------- */
.topbar {
  display: flex;
  justify-content: flex-end;
  margin: 16px 0 10px;
}

.bug-report {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  color: var(--ink-4);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.bug-report:hover {
  border-color: var(--accent-border);
  color: var(--accent-dk);
  background: var(--accent-soft);
}

.bug-report .icon {
  width: 12px;
  height: 12px;
}

/* ---------- ブランド ---------- */
.brand {
  margin: 0 0 16px 2px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--accent);
}

/* ---------- パネル（カード） ---------- */
.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 27px;
  /* Zen Kaku Gothic New の実在ウェイトは 300/400/500/700/900。
     中間値を書いても 700 に丸められるので、効く値をそのまま書く。 */
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--ink);
}

.badge {
  padding: 3px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dk);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.card__hero {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--bg-2);
}

/* ---------- テキスト ---------- */
.lead {
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.85;
  color: var(--ink-2);
}

.lead--last {
  margin-bottom: 22px;
}

.lead strong {
  font-weight: 800;
  color: var(--ink);
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--ink-2);
}

.check-line--last {
  margin-bottom: 22px;
}

.check-line .icon {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--accent);
}

/* 見出し行 */
.section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.section:not(:first-child) {
  margin-top: 8px;
}

.section .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.section__label {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
}

/* 12項目リスト */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-2);
}

.feature-list .n {
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dk);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

@media (max-width: 400px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

/* 補足（インフォメーションボックス） */
/* 補足。あくまで注釈なので、箱で囲わず控えめに置く */
.note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.note .icon {
  width: 13px;
  height: 13px;
  margin-top: 3px;
  color: var(--ink-4);
  stroke-width: 2.2;
}

.note__text {
  flex: 1;
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

/* 注釈の中で目を留めてほしい箇所 */
.note__mark {
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.note--tight {
  margin-bottom: 6px;
}

/* ---------- フォーム ---------- */
.field {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.req {
  margin-left: 2px;
  color: var(--color-red);
}

.text-input,
.select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.text-input::placeholder {
  color: var(--ink-4);
}

.text-input:hover,
.select:hover {
  border-color: var(--accent-border);
}

.text-input:focus,
.select:focus {
  outline: 0;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.text-input[aria-invalid="true"],
.select[aria-invalid="true"] {
  border-color: var(--color-red);
}

/*
 * ネイティブ select。通常は dropdown.js が自前のUIに差し替えるので表には出ないが、
 * JS が動かない環境ではこれがそのまま使われる。
 */
.select {
  appearance: none;
  height: 52px;
  padding-right: 52px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 32px 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%23E3F3F7' stroke='%23C8E8EF'/%3E%3Cpath d='M11 14l5 5 5-5' fill='none' stroke='%2301617A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: border-color 0.15s, background-color 0.15s;
}

.select:hover,
.select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%23028DAE'/%3E%3Cpath d='M11 14l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 未選択のときは控えめに */
.select[data-empty="true"] {
  color: var(--ink-4);
  font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%23EEF3F5' stroke='%23DFE7EA'/%3E%3Cpath d='M11 14l5 5 5-5' fill='none' stroke='%235B636C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.select option {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- カスタムドロップダウン ---------- */
.dd {
  position: relative;
}

.dd__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 52px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  font-family: var(--font-ui);
  font-feature-settings: "palt";
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dd[data-empty="true"] .dd__button {
  color: var(--ink-4);
  font-weight: 500;
}

.dd__button:hover {
  border-color: var(--accent-border);
}

.dd__button:focus-visible,
.dd[data-open="true"] .dd__button {
  outline: 0;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.dd__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dd__chevron {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  transition: background 0.15s, border-color 0.15s, transform 0.2s;
}

.dd__chevron svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent-dk);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dd[data-empty="true"] .dd__chevron {
  border-color: var(--line);
  background: var(--bg-2);
}

.dd[data-empty="true"] .dd__chevron svg {
  stroke: var(--ink-3);
}

.dd__button:hover .dd__chevron,
.dd[data-open="true"] .dd__chevron {
  border-color: var(--accent);
  background: var(--accent);
}

.dd__button:hover .dd__chevron svg,
.dd[data-open="true"] .dd__chevron svg {
  stroke: #fff;
}

.dd[data-open="true"] .dd__chevron {
  transform: rotate(180deg);
}

/* 選択肢リスト */
.dd__list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 264px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow);
  animation: ddIn 0.14s ease-out;
}

@keyframes ddIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.dd__option {
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-2);
  cursor: pointer;
}

.dd__option + .dd__option {
  margin-top: 2px;
}

.dd__option:hover,
.dd__option.is-active {
  background: var(--bg-2);
}

.dd__option[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--ink);
}

.dd__option--placeholder {
  color: var(--ink-4);
  font-weight: 500;
}

/* チェックボックス */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.check-row span {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

/* 任意機能のオプトイン（熱中症対策診断など） */
.check-row--feature {
  align-items: flex-start;
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.check-row--feature input[type="checkbox"] {
  margin-top: 2px;
}

.check-row__body {
  display: block;
}

.check-row__body strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-dk);
}

.check-row__body em {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.7;
  color: var(--notice-ink);
}

/* 見出し脇の季節バッジ */
.badge--season {
  margin-left: auto;
  border-color: #f0c9a8;
  background: #fdf0e4;
  color: #a9541a;
}

/* 写真アップローダー */
.uploader {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 160px;
  padding: 16px;
  border: 1.5px dashed var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.uploader:hover,
.uploader:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dk);
}

.uploader[aria-invalid="true"] {
  border-color: var(--color-red);
}

.uploader .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.uploader input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.uploader__preview {
  display: none;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.uploader[data-filled="true"] {
  border-style: solid;
  border-color: var(--line);
  background: var(--paper);
  padding: 8px;
}

.uploader[data-filled="true"] .uploader__placeholder,
.uploader[data-filled="true"] .icon {
  display: none;
}

.uploader[data-filled="true"] .uploader__preview {
  display: block;
}

.field--photo {
  margin-bottom: 18px;
}

/* サブ画像 */
.sub-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.sub-images__slot {
  position: relative;
  flex: 1 1 calc(50% - 6px);
  min-width: calc(50% - 6px);
}

.sub-images__slot[hidden] {
  display: none;
}

.sub-images__slot .uploader {
  min-height: 128px;
  height: 100%;
  font-size: 13px;
}

.sub-images__slot .uploader .icon {
  width: 20px;
  height: 20px;
}

.sub-images__remove {
  position: absolute;
  top: -8px;
  right: -8px;
  display: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.sub-images__remove:hover {
  color: var(--color-red);
  border-color: var(--color-red);
}

.sub-images__remove .icon {
  width: 15px;
  height: 15px;
}

.sub-images__slot[data-filled="true"] .sub-images__remove {
  display: grid;
}

/*
 * サブ画像は data-filled が .sub-images__slot に付く（メイン写真は .uploader 自身に付く）。
 * .uploader[data-filled] だけを見ているとサムネイルが表示されないため、
 * スロット側の状態からも同じ見た目になるようにしておく。
 */
.sub-images__slot[data-filled="true"] .uploader {
  border-style: solid;
  border-color: var(--line);
  background: var(--paper);
  padding: 8px;
}

.sub-images__slot[data-filled="true"] .uploader__placeholder,
.sub-images__slot[data-filled="true"] .uploader > .icon {
  display: none;
}

.sub-images__slot[data-filled="true"] .uploader__preview {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
}

/* ---------- 熱中症対策診断の案内（ns_1） ---------- */
.heat-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.heat-intro__bear {
  flex: none;
  width: 52px;
  height: auto;
}

/* くまの吹き出し。左向きの小さな三角を付ける。 */
.heat-intro__line {
  position: relative;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink-2);
}

.heat-intro__line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transform: rotate(45deg);
}

/* ---------- 熱中症対策診断の設問 ---------- */
.heat-form {
  margin-top: 14px;
  padding: 16px 14px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-2);
}

.heat-form[hidden] {
  display: none;
}

/*
 * 補足テキスト。--ink-4 (#8a929b) は白地でのコントラストが 3.0:1 しかなく、
 * 読ませる文字には足りない（AA は 4.5:1）。読ませたいものは --ink-3 以上にする。
 */
.field-hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.text-area {
  height: auto;
  padding: 12px 14px;
  line-height: 1.7;
  resize: vertical;
}

.char-count {
  margin: 6px 0 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  text-align: right;
}

/* ---------- 熱中症対策診断について（ns_3） ----------
 * 他のカード内の見出し・注釈をそのまま使い、中身は「項目名 …… 値」の
 * 素直な行に留める。色分けは見出しの点だけにして、本文は本文の色で読ませる。
 */
.basis {
  margin: 2px 0 18px;
  padding: 18px 16px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.basis[hidden] {
  display: none;
}

.basis .section {
  margin-bottom: 12px;
}

.basis .note {
  margin-bottom: 18px;
}

.basis__group + .basis__group {
  margin-top: 18px;
}

.basis__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

.basis__heading::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ink-4);
}

.basis__group--answered .basis__heading::before {
  background: var(--accent);
}

.basis__group--good .basis__heading::before {
  background: #1f9254;
}

.basis__group--caution .basis__heading::before {
  background: #d97706;
}

.basis__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.basis__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
  line-height: 1.6;
}

.basis__row:last-child {
  border-bottom: 0;
}

.basis__name {
  color: var(--ink-3);
}

.basis__value {
  flex: none;
  max-width: 52%;
  font-weight: 700;
  color: var(--ink-2);
  text-align: right;
}

.basis__plain {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-3);
}

/* 点数の見かた。数字の向きを最初に伝える。 */
.scale {
  margin: 0 0 18px;
  padding: 14px 16px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.scale__heading {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.scale__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.scale__end {
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--ink-2);
}

/* 左から右へ、備えが増えていくことを線で示す */
.scale__arrow {
  flex: 1;
  min-width: 20px;
  height: 2px;
  background: linear-gradient(to right, var(--line-2), var(--accent));
}

.scale__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
}

.scale__now {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink);
}

/* これから試せること。診断の締めなので、少し色を持たせて区切る。 */
.advice {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.advice__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.advice__heading::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.advice__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.advice__bear {
  flex: none;
  width: 56px;
  height: auto;
  margin-top: 2px;
}

.advice__body {
  flex: 1;
  min-width: 0;
}

.advice__lead {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink-2);
}

.advice__list {
  margin: 0;
  padding-left: 1.35em;
}

.advice__item {
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.advice__item::marker {
  font-weight: 800;
  color: var(--accent);
}

.advice__close {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--paper);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-3);
}

/*
 * 人間確認。追加の操作が要るときだけ中身が現れるので、普段は高さを持たない。
 * 幅を明示しないと、カードの縦並び（flex）の中で幅0に潰れて
 * チェック画面が枠からはみ出す。
 *
 * 中身は Cloudflare 側のウィジェットで幅300px固定。カードの内容幅より
 * 広いので、枠や余白を足すと収まらなくなる。中央に置くだけにして、
 * はみ出す分はカード自身の余白で受ける。見た目（明暗）はウィジェット側の
 * theme 指定で合わせている（ns_2.js）。
 */
.turnstile:not(:empty) {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 16px;
}

/*
 * 確認を待っているあいだ。
 * ここでチェックを求められることがあるので、押した直後に画面を切り替えず、
 * ボタンの見た目だけ変えて「待っている」ことを伝える。
 */
.btn[data-busy="true"] {
  opacity: 1;
  cursor: progress;
}

.btn[data-busy="true"] .icon {
  display: none;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-feature-settings: "palt";
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s, border-color 0.15s;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), 0.5);
}

.btn-ghost {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent-border);
  color: var(--accent-dk);
  background: var(--accent-soft);
}

/* 主要CTA */
.btn-accent {
  align-self: stretch;
  height: 56px;
  padding: 0 32px;
  margin-top: 4px;
  background: var(--accent);
  border-color: var(--accent-dk);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.btn-accent:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), 0.5);
}

.consent-hint {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink-3);
  text-align: center;
}

.backrow {
  display: flex;
  margin: 16px 0 40px;
}

/* ---------- 規約 ---------- */
.terms {
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink-2);
}

.terms a,
.inline-link {
  color: var(--accent-dk);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-border);
  padding-bottom: 1px;
}

.terms a:hover,
.inline-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- ns_3 本文 ---------- */
.body-text {
  margin-bottom: 18px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.85;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.card__image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
}

.card__image--mail {
  width: 62%;
  margin-inline: auto;
}

/* ---------- 利用規約・プライバシーポリシー ---------- */
.legal-lead {
  margin-bottom: 20px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.95;
  color: var(--ink-2);
}

.legal-sec {
  margin-bottom: 22px;
}

.legal-sec h3 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--accent-border);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.legal-sec p {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.95;
  color: var(--ink-2);
}

.legal-sec ol {
  margin: 6px 0 8px;
  padding-left: 1.5em;
}

.legal-sec li {
  margin-bottom: 5px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.95;
  color: var(--ink-2);
}

.legal-note {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--notice-border);
  border-radius: var(--radius-md);
  background: var(--notice-bg);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--notice-ink);
}

.legal-meta {
  margin: 4px 0 26px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink-3);
}

/* ---------- ns_3 診断結果 ---------- */
.result-space {
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink-2);
}

.result-space:empty {
  display: none;
}

/* 診断結果を開くボタン群 */
.deck-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 18px;
}

.deck-actions__status {
  margin: 0;
  padding: 26px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-3);
  text-align: center;
}

.deck-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--accent-dk);
  border-radius: var(--radius-lg);
  background: var(--accent);
  font-family: var(--font-ui);
  font-feature-settings: "palt";
  text-align: left;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.deck-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -12px rgba(var(--accent-rgb), 0.6);
}

.deck-btn--heat {
  border-color: #b45309;
  background: #d97706;
}

.deck-btn--heat:hover {
  box-shadow: 0 12px 26px -12px rgba(217, 119, 6, 0.6);
}

.deck-btn__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.deck-btn__icon .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.deck-btn__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.deck-btn__body strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.deck-btn__body em {
  font-size: 11.5px;
  font-style: normal;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- スライド全画面ビューア ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  background: #0b1014;
  animation: viewerIn 0.2s ease-out;
}

.viewer[hidden] {
  display: none;
}

@keyframes viewerIn {
  from {
    opacity: 0;
  }
}

.viewer__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 54px;
  padding: 0 10px 0 18px;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.viewer__title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.viewer__count {
  margin: 0 auto 0 0;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
}

.viewer__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.viewer__icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.viewer__icon:disabled {
  opacity: 0.4;
  cursor: progress;
}

.viewer__icon .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* スライドを横一列に並べ、track ごと移動させる */
.viewer__stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
}

/*
 * 移動量は JS が px で書き込む。transform の値を var() 経由にすると
 * Chrome が transition を進めてくれないため、ここでは指定しない。
 */
.viewer__track {
  display: flex;
  height: 100%;
  transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.viewer__track.is-dragging {
  transition: none;
}

.viewer__slide {
  display: grid;
  place-items: center;
  flex: 0 0 100%;
  padding: 12px;
}

/* スライドは正方形。高さ側の余白を差し引いて収める。 */
.viewer__frame {
  position: relative;
  width: min(100%, max(160px, calc(100svh - 190px)));
  max-width: 720px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  user-select: none;
}

.viewer__frame svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* スライド内の「続きはこちら」パネル。left/top はスライドごとに JS が入れる。 */
.viewer__more {
  position: absolute;
  right: 0;
  bottom: 0;
  border: 0;
  /* パネル角の丸みに合わせる。%指定なので表示サイズが変わっても比率を保つ。 */
  border-radius: 20% 0 0 0 / 36% 0 0 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.viewer__more::after {
  content: "";
  position: absolute;
  inset: 4px 4px 0 4px;
  border-radius: 20% 0 0 0 / 36% 0 0 0;
  background: rgba(var(--accent-rgb), 0.16);
  animation: morePulse 2.4s ease-in-out infinite;
}

.viewer__more:active::after {
  background: rgba(var(--accent-rgb), 0.3);
  animation: none;
}

@keyframes morePulse {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .viewer__track {
    transition: none;
  }
  .viewer__more::after {
    animation: none;
    opacity: 0.5;
  }
}

/* 下部のページ送り */
.viewer__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: none;
  height: 62px;
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
}

.viewer__step {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.viewer__step:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.viewer__step:disabled {
  opacity: 0.25;
  cursor: default;
}

.viewer__step .icon {
  width: 20px;
  height: 20px;
}

.viewer__dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.viewer__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}

.viewer__dot[aria-current="true"] {
  width: 20px;
  background: var(--accent);
}

.viewer__dots:empty {
  display: none;
}

/* 保存結果の通知 */
.viewer__toast {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
}

/* ---------- 診断結果に添える「今の暑さ」 ---------- */
.heat-now {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-2);
}

.heat-now__place {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-3);
}

.heat-now__row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.heat-now__value {
  margin: 0;
  line-height: 1;
  color: var(--ink);
}

.heat-now__number {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.heat-now__unit {
  margin-left: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-3);
}

.heat-now__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.heat-now__level {
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--level-color, var(--ink-3));
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.heat-now__when {
  font-size: 12px;
  color: var(--ink-3);
}

.heat-now__headline {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
}

.heat-now__advice {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.heat-now__more {
  font-size: 12.5px;
}

.heat-now__off {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

/* ---------- 暑さ指数（WBGT） ---------- */
.wbgt-now {
  margin: 6px 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.wbgt-now__place {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
}

.wbgt-now__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.wbgt-now__value {
  margin: 0;
  line-height: 1;
  color: var(--ink);
}

.wbgt-now__number {
  font-size: 42px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.wbgt-now__unit {
  margin-left: 2px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-3);
}

.wbgt-now__level {
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--level-color, var(--ink-3));
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.wbgt-now__when {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.wbgt-now__headline {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
}

.wbgt-now__guidance,
.wbgt-now__space,
.wbgt-now__peak {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.wbgt-now__peak {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-weight: 700;
}

.wbgt-now__off {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

/* 今日これから */
.wbgt-hours {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.wbgt-hour {
  flex: none;
  width: 76px;
  padding: 11px 5px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--level-color, var(--line));
  border-radius: var(--radius-sm);
  text-align: center;
}

.wbgt-hour__time {
  margin: 0 0 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.wbgt-hour__value {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.wbgt-hour__level {
  margin: 3px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
}

/* 週の推移 */
.wbgt-trend {
  margin: 10px 0 22px;
}

.wbgt-day {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}

.wbgt-day:last-child {
  border-bottom: 0;
}

.wbgt-day--today .wbgt-day__name {
  font-weight: 800;
  color: var(--ink);
}

.wbgt-day__name {
  flex: none;
  width: 5.5em;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.wbgt-day__weekday {
  margin-left: 3px;
  font-size: 12.5px;
}

.wbgt-day__track {
  flex: 1 1 auto;
  min-width: 0;
  height: 12px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
}

.wbgt-day__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

/* 予測は縞にして、実測と見分けられるようにする */
.wbgt-day__fill--forecast {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.45) 0 4px,
    transparent 4px 8px
  );
}

.wbgt-day__value {
  flex: none;
  min-width: 5.8em;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
}

.wbgt-day__tag {
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}

/* 区分の凡例 */
.wbgt-legend {
  margin-bottom: 18px;
}

.wbgt-legend__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}

.wbgt-legend__row:last-child {
  border-bottom: 0;
}

.wbgt-legend__chip {
  flex: none;
  width: 5.4em;
  padding: 4px 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-align: center;
}

.wbgt-legend__range {
  flex: none;
  width: 5.2em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.wbgt-legend__text {
  color: var(--ink-2);
  line-height: 1.6;
}

.wbgt-source {
  margin: 0 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-3);
}

/* ---------- フッター ---------- */
.site-footer {
  margin: 26px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 12px;
}

.site-footer__links a {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--accent-dk);
}

.site-footer__meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-3);
}

/* 管理者向けなので、探せば見つかる程度に留める */
.site-footer__admin {
  font-size: 10.5px;
  color: var(--ink-4);
  opacity: 0.65;
  text-decoration: none;
}

.site-footer__admin:hover {
  opacity: 1;
  color: var(--ink-3);
}

/* ---------- 管理画面 ---------- */
.shell--wide {
  max-width: 860px;
}

.admin-viewer {
  margin: -8px 0 18px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-2);
}

.stat__label {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
}

.stat__value {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat__note {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.tabs__btn {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-3);
  cursor: pointer;
}

.tabs__btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* 期間別の並び */
.series {
  margin-bottom: 22px;
}

.series__row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}

.series__row:last-child {
  border-bottom: 0;
}

.series__bucket {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

/* 横棒 */
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  font-size: 12px;
}

.bar__name {
  flex: none;
  width: 7.5em;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar__track {
  flex: 1 1 auto;
  height: 10px;
  min-width: 0;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
}

.bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.bar__value {
  flex: none;
  min-width: 8em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: right;
}

/* 分布 */
.dist {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.dist__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dist__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.dist__even {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.dist__even--warn {
  background: #fdf1e3;
  color: #a75c08;
}

.dist__empty {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ---------- ポップアップ ---------- */
.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 25, 30, 0.55);
  backdrop-filter: blur(2px);
}

.popup-backdrop[data-open="true"] {
  display: grid;
}

.popup {
  width: min(400px, 100%);
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.popup__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border: 1px solid var(--notice-border);
  border-radius: 999px;
  background: var(--notice-bg);
  color: var(--accent);
}

.popup__icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

.popup__title {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.popup__text {
  margin-bottom: 6px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
}

.popup__note {
  margin-bottom: 20px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.popup .btn {
  width: 100%;
}

.popup .btn + .btn {
  margin-top: 10px;
}

/* ---------- 生成中 ---------- */
.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 48px 0 40px;
}

.loading-row__text {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent-dk);
}

.ripple {
  position: relative;
  flex: none;
  width: 96px;
  height: 96px;
}

.ripple span {
  position: absolute;
  border: 4px solid var(--accent);
  border-radius: 50%;
  opacity: 1;
  animation: ripple 1.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.ripple span:nth-child(2) {
  animation-delay: -0.7s;
}

@keyframes ripple {
  0%,
  4.9% {
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    opacity: 0;
  }
  5% {
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
  }
}

.wait-note {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--notice-border);
  border-radius: var(--radius-md);
  background: var(--notice-bg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.85;
  color: var(--notice-ink);
  white-space: pre-wrap;
}

/* ---------- 汎用 ---------- */
.error-text {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-red);
}

.error-text:empty {
  display: none;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ripple span {
    animation-duration: 4s;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
