:root {
  color-scheme: light;
  --ink: #26312f;
  --muted: #6d7774;
  --line: #eadfd8;
  --paper: #ffffff;
  --soft: #fff8f3;
  --accent: #7c4963;
  --accent-strong: #66384f;
  --sage: #e9f2ec;
  --peach: #fff0e6;
  --cream: #fffaf2;
  --page-start: #fffaf6;
  --page-end: #f6f4ed;
  --glow: rgba(255, 231, 214, 0.7);
  --hero-overlay: linear-gradient(100deg, rgba(255, 250, 246, 0.98) 0%, rgba(255, 250, 246, 0.9) 47%, rgba(255, 250, 246, 0.3) 100%);
  --hero-image: url("./assets/hero-japanese-home-check.png");
  --card-gradient: linear-gradient(180deg, #ffffff 0%, #fffaf7 100%);
  --warn: #a96a23;
  --danger: #b84a55;
  --blue: #426a87;
}

body[data-theme="mint"] {
  --ink: #20332d;
  --muted: #64756e;
  --line: #d7e8df;
  --soft: #f4fbf6;
  --accent: #2d7664;
  --accent-strong: #215f50;
  --sage: #e4f3eb;
  --peach: #eef8f1;
  --cream: #fbfff8;
  --page-start: #f8fff9;
  --page-end: #edf6ef;
  --glow: rgba(196, 232, 211, 0.76);
  --hero-overlay: linear-gradient(100deg, rgba(250, 255, 251, 0.98) 0%, rgba(250, 255, 251, 0.9) 48%, rgba(250, 255, 251, 0.28) 100%);
  --card-gradient: linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
}

body[data-theme="navy"] {
  --ink: #1f2d3a;
  --muted: #657280;
  --line: #d6e0ea;
  --soft: #f5f8fb;
  --accent: #315f8c;
  --accent-strong: #254d73;
  --sage: #e8f0f7;
  --peach: #eef5fb;
  --cream: #fbfdff;
  --page-start: #f7fbff;
  --page-end: #edf2f6;
  --glow: rgba(200, 220, 239, 0.78);
  --hero-overlay: linear-gradient(100deg, rgba(247, 251, 255, 0.98) 0%, rgba(247, 251, 255, 0.9) 48%, rgba(247, 251, 255, 0.26) 100%);
  --card-gradient: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body[data-theme="lavender"] {
  --ink: #302a3c;
  --muted: #746e82;
  --line: #e3ddea;
  --soft: #fbf7ff;
  --accent: #73579a;
  --accent-strong: #5d467f;
  --sage: #f0eaf7;
  --peach: #f8f0ff;
  --cream: #fffaff;
  --page-start: #fffaff;
  --page-end: #f2eef7;
  --glow: rgba(224, 207, 238, 0.76);
  --hero-overlay: linear-gradient(100deg, rgba(255, 250, 255, 0.98) 0%, rgba(255, 250, 255, 0.9) 48%, rgba(255, 250, 255, 0.28) 100%);
  --card-gradient: linear-gradient(180deg, #ffffff 0%, #fcf8ff 100%);
}

body[data-theme="terracotta"] {
  --ink: #352b24;
  --muted: #786c64;
  --line: #ead9ce;
  --soft: #fff8f3;
  --accent: #a65f43;
  --accent-strong: #874b34;
  --sage: #f3eadf;
  --peach: #fff0e7;
  --cream: #fffaf2;
  --page-start: #fff9f3;
  --page-end: #f5eee7;
  --glow: rgba(238, 204, 181, 0.76);
  --hero-overlay: linear-gradient(100deg, rgba(255, 249, 243, 0.98) 0%, rgba(255, 249, 243, 0.9) 48%, rgba(255, 249, 243, 0.28) 100%);
  --card-gradient: linear-gradient(180deg, #ffffff 0%, #fff8f2 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 4%, var(--glow), transparent 32%),
    linear-gradient(180deg, var(--page-start) 0%, var(--page-end) 100%);
  color: var(--ink);
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(234, 223, 216, 0.76);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-family: Georgia, serif;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-weight: 900;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.site-header nav {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 800;
}

.site-header nav a {
  color: #4f625d;
  text-decoration: none;
}

.site-header nav a:last-child {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
}

.theme-switcher {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid var(--line);
}

.theme-switcher h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.theme-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.theme-button {
  width: auto;
  min-height: 38px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.theme-button:hover,
.theme-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -2px;
}

.swatch.rose {
  background: #7c4963;
}

.swatch.mint {
  background: #2d7664;
}

.swatch.navy {
  background: #315f8c;
}

.swatch.lavender {
  background: #73579a;
}

.swatch.terracotta {
  background: #a65f43;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: center;
  padding: 62px clamp(18px, 5vw, 72px) 42px;
  background:
    var(--hero-overlay),
    var(--hero-image);
  background-size: cover;
  background-position: right center;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.step-label,
.result-kicker,
.panel-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 760px;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: 0;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-weight: 900;
}

h2 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-weight: 800;
}

.lead {
  max-width: 620px;
  margin-bottom: 22px;
  font-size: 18px;
  line-height: 1.8;
  color: #4f5d59;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-bottom: 22px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(45, 118, 100, 0.22);
}

.primary-link:hover {
  background: var(--accent-strong);
}

.hero-actions span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.area-pill {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  border: 1px solid rgba(45, 118, 100, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.assurance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 780px;
}

.assurance-grid div {
  border: 1px solid rgba(45, 118, 100, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 22px rgba(81, 61, 52, 0.08);
}

.assurance-grid strong,
.assurance-grid span {
  display: block;
}

.assurance-grid strong {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  color: var(--accent);
  font-size: 17px;
}

.assurance-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.summary-panel,
.hero-photo-card {
  border: 1px solid rgba(124, 73, 99, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 42px rgba(81, 61, 52, 0.12);
  backdrop-filter: blur(8px);
}

.hero-photo-card {
  overflow: hidden;
}

.hero-photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-photo-card div {
  padding: 18px;
}

.hero-photo-card strong,
.hero-photo-card span {
  display: block;
}

.hero-photo-card strong {
  margin-bottom: 6px;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 20px;
  line-height: 1.35;
}

.hero-photo-card span {
  color: var(--muted);
  line-height: 1.6;
}

.summary-panel {
  padding: 20px;
}

.summary-panel ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

.visual-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px) 0;
}

.guide-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(81, 61, 52, 0.08);
}

.guide-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-card div {
  padding: 18px;
}

.guide-card span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.guide-card h2 {
  margin-top: 12px;
  margin-bottom: 8px;
  font-size: 20px;
}

.guide-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-green {
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf5 100%);
}

.guide-blue {
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fc 100%);
}

.guide-rose {
  background: linear-gradient(180deg, #ffffff 0%, #fff6f5 100%);
}

.guide-green span {
  background: #2d7664;
}

.guide-blue span {
  background: #315f8c;
}

.guide-rose span {
  background: #b86473;
}

.tool-band {
  display: grid;
  grid-template-columns: minmax(0, 1040px);
  justify-content: center;
  gap: 24px;
  align-items: start;
  padding: 42px clamp(18px, 5vw, 72px) 42px;
}

.tool-band.has-result {
  grid-template-columns: minmax(0, 880px);
  justify-content: center;
}

.checker-card,
.result-card,
.conversion-band,
.faq-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(81, 61, 52, 0.08);
}

.checker-card {
  padding: 34px;
  background: var(--card-gradient);
}

.form-header {
  max-width: 760px;
  margin-bottom: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

label,
legend {
  color: #2c3935;
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  border: 1px solid #dfd2ca;
  border-radius: 6px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

select {
  padding-right: 36px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(45, 118, 100, 0.16);
}

textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.7;
}

fieldset {
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(215, 232, 223, 0.88);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  font-weight: 600;
}

.check-grid input {
  flex: 0 0 auto;
  width: auto;
  min-height: auto;
  margin: 0;
}

button,
.ghost-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button {
  width: min(360px, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-top: 24px;
}

button:hover,
.ghost-button:hover {
  background: var(--accent-strong);
}

.notice {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-card {
  min-height: auto;
  padding: 26px;
  position: static;
}

.result-edit-button {
  margin: 0 0 18px;
}

.empty-state {
  display: grid;
  min-height: 440px;
  align-content: center;
  color: var(--muted);
}

.score-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  font-weight: 800;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
}

.result-card > h2 {
  font-size: 28px;
}

.result-card > p {
  line-height: 1.8;
  color: #4f5d59;
}

.result-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 6px;
}

.result-snapshot div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--cream);
}

.result-snapshot span,
.result-snapshot strong {
  display: block;
}

.result-snapshot span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-snapshot strong {
  margin-top: 4px;
  color: var(--accent-strong);
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 18px;
  line-height: 1.25;
}

.score-high {
  background: var(--danger);
}

.score-mid {
  background: var(--warn);
}

.score-low {
  background: var(--blue);
}

.result-card ul {
  padding-left: 20px;
  line-height: 1.8;
}

.result-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.soft-heading {
  border-radius: 8px;
  padding: 16px;
  background: var(--sage);
}

.soft-heading h3 {
  margin: 0 0 8px;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 20px;
}

.soft-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.mini-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.mini-form button {
  margin-top: 4px;
}

.form-secondary-link {
  width: 100%;
  margin-top: 2px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-strong);
}

.form-secondary-link:hover {
  background: var(--soft);
}

.required,
.optional {
  display: inline-flex;
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 1px;
}

.required {
  background: var(--accent);
  color: #fff;
}

.optional {
  background: var(--peach);
  color: var(--accent-strong);
}

.email-preview {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.email-meta {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: var(--cream);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.email-body {
  padding: 18px;
  line-height: 1.8;
}

.email-section {
  margin: 14px 0;
  border-left: 4px solid var(--accent);
  padding: 4px 0 4px 14px;
}

.email-section strong {
  display: block;
  margin-bottom: 4px;
}

.compact-fieldset {
  margin: 0;
}

.radio-stack {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.radio-stack label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.radio-stack input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.consent-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  line-height: 1.7;
}

.consent-line input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.form-message {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
  color: var(--ink);
}

.form-message p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.conversion-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin: 0 clamp(18px, 5vw, 72px) 48px;
  padding: 24px;
}

.conversion-band p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.faq-band {
  margin: 0 clamp(18px, 5vw, 72px) 48px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(228, 243, 235, 0.76), rgba(255, 255, 255, 0.96) 48%, rgba(255, 246, 245, 0.72));
}

.section-intro {
  max-width: 760px;
  margin-bottom: 18px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.faq-grid article {
  border: 1px solid rgba(45, 118, 100, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.faq-grid h3 {
  margin: 0 0 8px;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 18px;
}

.faq-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.operator-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin: 0 clamp(18px, 5vw, 72px) 56px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.operator-band p {
  color: var(--muted);
  line-height: 1.8;
}

.operator-note {
  border-radius: 8px;
  padding: 18px;
  background: var(--sage);
}

.operator-note strong {
  display: block;
  margin-bottom: 8px;
}

.operator-note a {
  display: inline-flex;
  margin: 6px 8px 0 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.floating-theme-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(56, 42, 36, 0.18);
  backdrop-filter: blur(12px);
}

.floating-theme-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
}

.floating-theme-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.floating-theme-panel .theme-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.admin-page,
.legal-page,
.login-page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.admin-header,
.admin-section,
.legal-card,
.login-card,
.stats-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(81, 61, 52, 0.08);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-actions button {
  width: auto;
  margin: 0;
}

.admin-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-toggle input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-card {
  width: min(520px, 100%);
  padding: 28px;
}

.login-card h1 {
  margin-bottom: 12px;
  font-size: 40px;
}

.login-card > p {
  color: var(--muted);
  line-height: 1.8;
}

.login-card .ghost-button {
  width: 100%;
  margin-top: 14px;
}

.stats-grid,
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.stats-grid article,
.event-grid article {
  padding: 18px;
}

.stats-grid span,
.event-grid span {
  display: block;
  color: var(--accent);
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 32px;
  font-weight: 900;
}

.stats-grid p,
.event-grid p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-section {
  margin-top: 18px;
  padding: 22px;
}

.action-board {
  background: #fffaf2;
}

.action-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.action-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}

.action-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.action-card-good {
  border-color: #95c7b0;
}

.action-card-focus {
  border-color: #f0b96c;
  background: #fff8ed;
}

.action-card-danger {
  border-color: #d9828b;
  background: #fff1f2;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.section-heading button {
  width: auto;
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
}

.admin-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--sage);
  color: var(--accent-strong);
  font-weight: 800;
}

.admin-badge-hot {
  background: #b84a55;
  color: #fff;
}

.admin-badge-good {
  background: #d6efe2;
  color: #23624f;
}

.admin-badge-focus {
  background: #fff0c9;
  color: #7a5718;
}

.admin-badge-danger {
  background: #b84a55;
  color: #fff;
}

.admin-badge-neutral {
  background: #eef1ef;
  color: #56635f;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button {
  width: auto;
  margin: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.priority-section {
  border-color: rgba(45, 118, 100, 0.3);
  background:
    linear-gradient(135deg, rgba(228, 243, 235, 0.9), rgba(255, 255, 255, 0.96) 54%, rgba(255, 246, 245, 0.7));
}

.priority-section .section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.legal-card {
  padding: 28px;
  line-height: 1.85;
}

.legal-card h2 {
  margin-top: 28px;
  color: var(--accent);
}

.legal-card ul {
  padding-left: 22px;
}

.review-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.launch-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.review-link {
  display: block;
  border: 1px solid rgba(45, 118, 100, 0.18);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
  color: var(--ink);
  text-decoration: none;
}

.review-link:hover {
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(45, 118, 100, 0.1);
}

.review-link strong,
.review-link span {
  display: block;
}

.review-link strong {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 18px;
}

.review-link span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.campaign-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.campaign-output {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.campaign-output textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  font: 14px/1.6 Consolas, "Noto Sans JP", monospace;
}

.campaign-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.campaign-actions .ghost-button {
  width: auto;
  min-width: 160px;
}

.campaign-preset {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.campaign-presets {
  margin-top: 28px;
}

.ad-copy-table {
  min-width: 880px;
}

.test-plan-table {
  min-width: 900px;
}

.daily-ops-table {
  min-width: 920px;
}

.daily-report-table {
  min-width: 760px;
}

.improvement-table {
  min-width: 920px;
}

.launch-board-table {
  min-width: 880px;
}

.handoff-table {
  min-width: 860px;
}

.first-week-table {
  min-width: 960px;
}

.ad-decision-table {
  min-width: 940px;
}

.lead-quality-table {
  min-width: 920px;
}

.compliance-table {
  min-width: 860px;
}

.incident-table {
  min-width: 920px;
}

.reply-template {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--soft);
}

.reply-template h3 {
  margin: 14px 0 8px;
  color: var(--accent);
}

.reply-template h3:first-child {
  margin-top: 0;
}

.reply-template pre {
  white-space: pre-wrap;
  overflow-x: auto;
  margin: 0;
  border: 1px solid rgba(45, 118, 100, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  font: 14px/1.8 "Noto Sans JP", "Yu Gothic", sans-serif;
}

.ad-copy-table td {
  vertical-align: top;
}

.ad-copy-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.ad-copy-columns section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}

.ad-copy-columns h3 {
  margin-top: 0;
  color: var(--accent);
}

.pattern-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr);
  gap: 26px;
  align-items: start;
  padding: 34px clamp(18px, 5vw, 72px);
}

.pattern-control,
.pattern-result {
  position: sticky;
  top: 92px;
}

.pattern-control h1 {
  margin: 0;
  font-size: 30px;
}

.pattern-control .form-header p {
  margin-bottom: 0;
}

.pattern-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preset-panel {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.preset-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-actions button {
  width: auto;
  margin: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

.pattern-result {
  min-height: auto;
}

.pattern-snapshot {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pattern-snapshot strong {
  font-size: 16px;
}

.pattern-matrix {
  margin-top: 0;
}

.pattern-table-wrap {
  overflow-x: auto;
}

.pattern-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pattern-table th,
.pattern-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.pattern-table th {
  background: var(--sage);
  color: var(--accent-strong);
}

.pattern-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .hero,
  .tool-band,
  .tool-band.has-result,
  .operator-band,
  .faq-grid,
  .review-link-grid,
  .launch-board-grid,
  .campaign-builder-grid,
  .ad-copy-columns,
  .pattern-workspace,
  .visual-guide {
    grid-template-columns: 1fr;
  }

  .summary-panel,
  .result-card,
  .pattern-control,
  .pattern-result {
    position: static;
  }

  .result-card {
    min-height: auto;
  }

  h1 {
    font-size: 44px;
  }
}

@media (min-width: 901px) and (max-width: 1080px) {
  .tool-band {
    grid-template-columns: minmax(0, 820px);
  }

  .tool-band.has-result {
    grid-template-columns: minmax(0, 820px);
    justify-content: center;
  }

  .field-grid,
  .tool-band.has-result .field-grid,
  .check-grid,
  .tool-band.has-result .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    position: static;
  }

  .site-header nav {
    display: none;
  }

  .theme-switcher {
    display: block;
  }

  .theme-buttons {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .hero {
    padding-top: 38px;
    background-position: 64% center;
  }

  h1 {
    font-size: 36px;
  }

  .assurance-grid {
    grid-template-columns: 1fr;
  }

  .result-snapshot {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .check-grid,
  .pattern-field-grid,
  .pattern-snapshot {
    grid-template-columns: 1fr;
  }

  .checker-card,
  .result-card,
  .conversion-band,
  .faq-band {
    padding: 18px;
  }

  .conversion-band {
    display: block;
  }

  .ghost-button {
    width: 100%;
    margin-top: 18px;
  }

  .admin-header,
  .section-heading {
    display: block;
  }

  .admin-actions {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .floating-theme-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .floating-theme-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .floating-theme-panel .theme-button {
    padding: 7px 5px;
    font-size: 11px;
  }

  .floating-theme-panel .swatch {
    margin-right: 3px;
  }
}
