:root {
  color-scheme: dark;
  --ink: #08060f;
  --ink-soft: #0d0916;
  --panel: #151020;
  --panel-strong: #1a1328;
  --panel-soft: rgba(255, 255, 255, .045);
  --purple: #8b5cf6;
  --purple-dark: #5b21b6;
  --purple-light: #c4b5fd;
  --gold: #d7b56d;
  --cream: #f7f0df;
  --text: rgba(255, 255, 255, .78);
  --muted: rgba(255, 255, 255, .56);
  --border: rgba(255, 255, 255, .105);
  --danger: #fca5a5;
  --success: #86efac;
  --content-width: 1160px;
  --reading-width: 820px;
  --page-gutter: clamp(18px, 4vw, 32px);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28), 0 0 55px rgba(139, 92, 246, .08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  color: var(--cream);
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 12% 8%, rgba(111, 67, 181, .18), transparent 29%),
    radial-gradient(circle at 88% 18%, rgba(215, 181, 109, .075), transparent 25%),
    var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .18;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 15%, rgba(215,181,109,.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.5) 0 1px, transparent 1.5px);
  background-size: 180px 180px, 260px 260px, 220px 220px;
}

main {
  width: 100%;
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  max-width: 100%;
  font: inherit;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.shell,
.narrow {
  width: calc(100% - (var(--page-gutter) * 2));
  margin-inline: auto;
}

.shell {
  max-width: var(--content-width);
}

.narrow {
  max-width: var(--reading-width);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: rgba(8, 6, 15, .88);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
  backdrop-filter: blur(20px);
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 600 20px "Yu Mincho", "Hiragino Mincho ProN", serif;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid rgba(215, 181, 109, .35);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(215, 181, 109, .055);
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 3vw, 38px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.desktop-nav a,
.footer-links a {
  transition: color .2s ease;
}

.desktop-nav a:hover,
.footer-links a:hover {
  color: var(--gold);
}

.header-cta {
  justify-self: end;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  transition: transform .2s ease, filter .2s ease, border-color .2s ease;
}

.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.button:focus-visible,
.choice-button:focus-visible,
.answer-button:focus-visible,
.rating-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(196, 181, 253, .42);
  outline-offset: 2px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

.button.primary {
  color: #fff;
  background: linear-gradient(100deg, #8b5cf6, #6025c2);
  box-shadow: 0 15px 40px rgba(91, 33, 182, .24);
}

.button.secondary {
  border-color: rgba(215, 181, 109, .34);
  color: var(--cream);
  background: rgba(215, 181, 109, .055);
}

.button.small {
  min-height: 42px;
  padding: 9px 19px;
  font-size: 13px;
}

.text-button {
  padding: 9px 11px;
  border: 0;
  color: var(--muted);
  background: none;
  cursor: pointer;
}

.text-button:hover {
  color: var(--gold);
}

.card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .024));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.section {
  padding-block: clamp(54px, 7vw, 88px);
}

.page-intro {
  max-width: 720px;
  margin: 0 auto clamp(28px, 4vw, 40px);
  text-align: center;
}

.page-intro .muted {
  max-width: 620px;
  margin-inline: auto;
}

.page-title {
  margin: 12px 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.3;
}

.admin-heading {
  margin-bottom: 26px;
}

.admin-heading .page-title {
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  line-height: 1.6;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 600;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.25;
}

h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.4;
}

h3 {
  font-size: 20px;
}

p {
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
  line-height: 1.9;
}

.gold {
  color: var(--gold);
}

.hero {
  padding: clamp(70px, 9vw, 112px) 0 clamp(66px, 8vw, 96px);
  overflow: hidden;
  text-align: center;
}

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

.hero h1 {
  margin: 22px 0;
}

.hero-copy > .muted {
  max-width: 760px;
  margin-inline: auto;
  font-size: clamp(15px, 1.7vw, 17px);
}

.gradient-text {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, var(--purple-light), var(--cream), var(--gold));
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 24px;
  color: rgba(255, 255, 255, .46);
  font-size: 12px;
}

.trust-row span::before {
  content: "✓";
  margin-right: 6px;
  color: var(--gold);
}

.sample-card {
  max-width: 900px;
  margin: clamp(42px, 6vw, 62px) auto 0;
  padding: clamp(24px, 4vw, 38px);
  text-align: left;
}

.sample-grid,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(26px, 5vw, 48px);
}

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

.feature-grid {
  margin-top: 28px;
}

.feature-card,
.link-card {
  height: 100%;
  padding: clamp(22px, 3vw, 30px);
}

.feature-card h2,
.feature-card h3,
.link-card h2 {
  margin: 18px 0 10px;
}

.link-card {
  transition: transform .2s ease, border-color .2s ease;
}

a.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(215, 181, 109, .3);
}

.icon-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(139, 92, 246, .32);
  border-radius: 15px;
  color: var(--purple-light);
  background: rgba(139, 92, 246, .11);
  font-weight: 800;
}

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

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid rgba(215, 181, 109, .2);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(215, 181, 109, .055);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.centered-chips {
  justify-content: center;
}

.form-card {
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
}

.form-header {
  margin-bottom: 28px;
}

.form-header h2 {
  margin: 8px 0 7px;
}

.stack {
  display: grid;
  gap: 20px;
}

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

label,
fieldset {
  min-width: 0;
}

label > span,
legend {
  display: block;
  margin-bottom: 9px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  outline: none;
  color: #fff;
  background: rgba(0, 0, 0, .28);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, .3);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--purple);
  background: rgba(0, 0, 0, .38);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .16);
}

input[type="date"],
input[type="time"] {
  color-scheme: dark;
}

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

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.choice-button {
  min-height: 48px;
  padding: 10px 7px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(0, 0, 0, .2);
  cursor: pointer;
  font-weight: 700;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.choice-button:hover,
.choice-button.active {
  color: var(--gold);
  border-color: rgba(215, 181, 109, .55);
  background: rgba(215, 181, 109, .1);
}

.steps {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 30px;
}

.step {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 255, 255, .28);
  font-size: 12px;
  white-space: nowrap;
}

.step::before {
  content: attr(data-step);
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.step::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.step:last-child::after {
  display: none;
}

.step.active {
  color: var(--cream);
}

.step.active::before {
  border-color: rgba(215, 181, 109, .5);
  color: var(--gold);
  background: rgba(215, 181, 109, .08);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.form-actions .button {
  min-width: 128px;
}

.confirm-list {
  display: grid;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(0, 0, 0, .16);
}

.confirm-list > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.confirm-list > div:last-child {
  border-bottom: 0;
}

.confirm-list dt {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.confirm-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.notice {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  font-size: 14px;
  line-height: 1.7;
}

.notice.error {
  color: var(--danger);
  border-color: rgba(248, 113, 113, .3);
  background: rgba(248, 113, 113, .08);
}

.notice.success {
  color: var(--success);
  border-color: rgba(74, 222, 128, .3);
  background: rgba(74, 222, 128, .08);
}

.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .06);
}

.question-progress {
  margin-bottom: 24px;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--gold));
}

.question-card {
  overflow: hidden;
}

.question-header,
.question-footer {
  padding: clamp(22px, 4vw, 30px);
  border-bottom: 1px solid var(--border);
}

.question-header .question-page-title {
  margin: 9px 0 5px;
  font-size: clamp(25px, 4vw, 32px);
}

.question-header .muted {
  margin-bottom: 0;
}

.question-footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.question-footer .form-actions {
  margin-top: 0;
}

.question-item {
  padding: clamp(22px, 4vw, 30px);
  border-bottom: 1px solid var(--border);
}

.question-title {
  color: var(--cream);
  line-height: 1.8;
  font-weight: 700;
}

.question-number {
  margin-right: 7px;
  color: var(--gold);
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.answer-button {
  min-height: 76px;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(0, 0, 0, .2);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.answer-button:hover,
.answer-button.active {
  color: var(--gold);
  border-color: rgba(215, 181, 109, .55);
  background: rgba(215, 181, 109, .1);
}

.answer-button strong {
  display: block;
  color: inherit;
  font-size: 20px;
}

.answer-button small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.35;
}

.result-stack {
  display: grid;
  gap: 20px;
}

.result-stack > * {
  min-width: 0;
}

.result-hero {
  padding: clamp(30px, 5vw, 46px);
  text-align: center;
  background: linear-gradient(135deg, rgba(91, 33, 182, .32), rgba(215, 181, 109, .035));
  border-bottom: 1px solid rgba(215, 181, 109, .15);
}

.result-hero h1 {
  margin: 15px 0 22px;
  font-size: clamp(30px, 5vw, 50px);
}

.result-section {
  padding: clamp(24px, 4vw, 34px);
}

.result-section p {
  margin: 0;
  color: var(--text);
  line-height: 2.05;
}

.result-section h2 {
  margin-bottom: 16px;
  font-size: clamp(23px, 3.4vw, 28px);
}

.result-card-soft {
  background: rgba(215, 181, 109, .04);
}

.message-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(215, 181, 109, .09), rgba(91, 33, 182, .15));
}

.message-card .message-text {
  color: var(--cream);
  font: 600 clamp(16px, 2.3vw, 19px) / 2 "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.feedback-fields {
  margin-top: 22px;
}

.result-note {
  margin: 0;
  text-align: center;
  font-size: 11px;
}

.score-row {
  margin-bottom: 14px;
}

.score-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.score-label strong {
  color: var(--gold);
}

.score-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .06);
}

.score-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--gold));
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 20px;
}

.element-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.element-item {
  min-width: 0;
  padding: 15px 6px;
  text-align: center;
  border: 1px solid rgba(215, 181, 109, .15);
  border-radius: 16px;
  background: rgba(215, 181, 109, .04);
  font-size: 13px;
}

.element-item strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: clamp(17px, 3vw, 21px);
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.rating-button {
  min-width: 0;
  padding: 15px 5px;
  border: 1px solid var(--border);
  border-radius: 15px;
  color: var(--muted);
  background: rgba(0, 0, 0, .2);
  cursor: pointer;
}

.rating-button:hover,
.rating-button.active {
  color: var(--gold);
  border-color: rgba(215, 181, 109, .55);
  background: rgba(215, 181, 109, .1);
}

.rating-button strong {
  display: block;
  font-size: 21px;
}

.rating-button small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.35;
}

.compatibility-form {
  gap: 24px;
}

.compatibility-result {
  margin-top: 4px;
  background: rgba(215, 181, 109, .035);
}

.compatibility-score,
.daily-score {
  color: var(--gold);
  font: 600 clamp(36px, 6vw, 50px) "Yu Mincho", serif;
}

.daily-grid {
  margin-top: 30px;
}

.daily-card .eyebrow {
  min-height: 38px;
}

.daily-score-row {
  margin-top: 15px;
}

.prose-card h1 {
  margin: 10px 0 30px;
  font-size: clamp(30px, 5vw, 44px);
}

.prose-card h2 {
  margin: 30px 0 10px;
  font-size: clamp(21px, 3vw, 26px);
}

.prose-card p {
  color: var(--text);
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  padding: 10px;
  border-radius: 18px;
}

.admin-links {
  min-width: 0;
  display: flex;
  gap: 3px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.admin-links a {
  flex: none;
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-links a:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, .055);
}

.admin-nav form {
  flex: none;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  color: rgba(255, 255, 255, .42);
  font-size: 11px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font: 600 clamp(27px, 4vw, 34px) "Yu Mincho", serif;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

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

.table-card {
  min-width: 0;
  overflow: hidden;
  padding-top: 20px;
}

.table-card h2 {
  padding-inline: 20px;
  font-size: 19px;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 13px 18px;
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

th {
  color: rgba(255, 255, 255, .4);
  background: rgba(0, 0, 0, .18);
  font-size: 11px;
}

td {
  color: var(--muted);
}

td:first-child {
  color: var(--cream);
}

.empty {
  padding: 30px;
  color: rgba(255, 255, 255, .35) !important;
  text-align: center;
}

.feedback-card {
  padding: 22px;
}

.feedback-card.low-rating {
  border-color: rgba(248, 113, 113, .3);
}

.feedback-summary,
.template-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.feedback-rating {
  color: var(--gold);
  font-size: 24px;
}

.feedback-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
  font-size: 13px;
}

.feedback-columns strong {
  color: var(--gold);
}

.template-card {
  padding: 22px;
}

.template-card textarea {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.template-body-field {
  display: block;
  margin-top: 18px;
}

.template-condition-field {
  display: block;
  margin-top: 14px;
}

.template-condition-field textarea {
  min-height: 72px;
}

.template-actions {
  margin-top: 15px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-label input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
}

.login-shell {
  max-width: 540px;
}

.site-footer {
  width: 100%;
  margin-top: clamp(16px, 4vw, 42px);
  padding: 38px 0;
  border-top: 1px solid var(--border);
  color: rgba(255, 255, 255, .43);
  background: rgba(3, 2, 8, .24);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
}

.footer-inner p {
  margin: 9px 0 0;
}

.footer-brand {
  color: var(--cream);
  font-family: "Yu Mincho", serif;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 20px;
  align-items: center;
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .sample-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

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

  .feature-grid > :last-child:nth-child(odd),
  .link-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 680px) {
  :root {
    --page-gutter: 16px;
    --radius-lg: 22px;
  }

  .site-header {
    height: 64px;
  }

  .header-inner {
    gap: 12px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .header-cta {
    min-height: 40px;
    padding-inline: 15px;
  }

  .section {
    padding-block: 48px;
  }

  .page-intro {
    margin-bottom: 26px;
  }

  .hero {
    padding-top: 62px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .sample-card {
    margin-top: 40px;
  }

  .feature-grid,
  .link-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid > :last-child:nth-child(odd),
  .link-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }

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

  .steps {
    gap: 4px;
  }

  .step {
    gap: 5px;
    font-size: 10px;
  }

  .step::before {
    width: 28px;
    height: 28px;
  }

  .confirm-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .question-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .question-item {
    padding-inline: 18px;
  }

  .answer-grid {
    gap: 6px;
  }

  .answer-button {
    min-height: 60px;
    border-radius: 12px;
  }

  .answer-button small {
    display: none;
  }

  .question-footer .form-actions,
  .form-actions {
    align-items: stretch;
  }

  .form-actions .button {
    min-width: 0;
    flex: 1;
    padding-inline: 13px;
  }

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

  .result-hero,
  .result-section {
    padding-inline: 20px;
  }

  .element-grid {
    gap: 5px;
  }

  .element-item {
    padding-inline: 2px;
    border-radius: 12px;
  }

  .rating-grid {
    gap: 5px;
  }

  .rating-button {
    padding-inline: 2px;
    border-radius: 12px;
  }

  .rating-button small {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 18px 15px;
  }

  .admin-nav {
    align-items: stretch;
    flex-direction: column;
    padding: 8px;
  }

  .admin-links {
    width: 100%;
  }

  .admin-nav form {
    align-self: flex-end;
  }

  .feedback-columns {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 400px) {
  .brand {
    gap: 8px;
    font-size: 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .header-cta {
    padding-inline: 12px;
    font-size: 12px;
  }

  .form-card {
    padding-inline: 18px;
  }

  .step {
    font-size: 0;
  }

  .step::before {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
