.page-intro,
.legal-heading,
.guide-heading,
.dashboard-header,
.form-header {
  padding: 40px 0 24px;
  display: grid;
  gap: 16px;
}

.page-intro p,
.legal-heading p,
.guide-heading p,
.dashboard-header p,
.form-header p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.page-frame {
  padding-bottom: 54px;
}

.legal-layout {
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  align-items: start;
}

.legal-nav,
.guide-nav {
  position: sticky;
  top: 96px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--surface) 86%, white 14%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.legal-nav h2,
.guide-nav h2 {
  margin: 0 0 12px;
  font-size: 0.96rem;
}

.legal-nav ol,
.guide-nav ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.legal-card,
.guide-card,
.form-card,
.dashboard-card {
  padding: 28px;
}

.legal-card + .legal-card,
.guide-card + .guide-card {
  margin-top: 18px;
}

.legal-card ul,
.guide-card ul,
.guide-card ol {
  padding-left: 20px;
  margin: 12px 0 0;
}

.legal-banner,
.guide-banner,
.notice,
.tip,
.warning {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text);
}

.legal-banner {
  background: color-mix(in oklab, var(--warn) 12%, white 88%);
  border-color: color-mix(in oklab, var(--warn) 20%, white 80%);
}

.guide-banner {
  background: color-mix(in oklab, var(--accent-soft) 76%, white 24%);
  border-color: color-mix(in oklab, var(--accent) 12%, white 88%);
}

.tip {
  background: color-mix(in oklab, var(--success) 12%, white 88%);
  border-color: color-mix(in oklab, var(--success) 18%, white 82%);
}

.warning {
  background: color-mix(in oklab, var(--danger) 10%, white 90%);
  border-color: color-mix(in oklab, var(--danger) 18%, white 82%);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 54px;
}

.guide-stack {
  display: grid;
  gap: 18px;
}

.process-list {
  display: grid;
  gap: 14px;
}

.process-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.process-step__num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-soft), white);
  color: var(--accent);
  font-weight: 800;
}

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

.screenshot-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 18px;
}

.screenshot-card {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.screenshot-card a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--surface-muted) 84%, white 16%), var(--surface-strong));
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.screenshot-card figcaption {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.screenshot-card--mob a {
  padding: 14px;
}

.screenshot-card--mob img {
  max-width: 240px;
  margin-inline: auto;
}

.screenshot-card--web img {
  max-height: min(56vh, 420px);
  width: auto;
  max-width: 100%;
}

.screen-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--surface-muted) 80%, white 20%), var(--surface-strong));
  border: 1px solid var(--line);
}

.screen-card__frame {
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--accent-soft) 28%, white 72%), white 60%),
    repeating-linear-gradient(180deg, transparent 0 24px, color-mix(in oklab, var(--line) 45%, transparent) 24px 25px);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 6px color-mix(in oklab, var(--text) 4%, white 96%);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.screen-card__bar,
.qr-placeholder__bar {
  width: 34%;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--text) 18%, white 82%);
  justify-self: center;
}

.screen-card__block,
.placeholder-line {
  height: 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--text) 10%, white 90%);
}

.screen-card__block.is-short,
.placeholder-line.is-short {
  width: 60%;
}

.screen-card__block.is-button {
  height: 42px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--accent) 16%, white 84%);
}

.form-shell {
  max-width: 760px;
  padding-bottom: 56px;
}

.form-card {
  display: grid;
  gap: 22px;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.field small,
.field .field-hint {
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--accent) 42%, white 58%);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 10%, white 90%);
}

.choice-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.qr-placeholder {
  width: min(280px, 100%);
  aspect-ratio: 1;
  border-radius: 28px;
  background:
    linear-gradient(45deg, color-mix(in oklab, var(--text) 12%, white 88%) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(-45deg, color-mix(in oklab, var(--text) 12%, white 88%) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(white, white);
  border: 1px solid var(--line);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.qr-placeholder__code {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.result-card,
.auth-card {
  display: grid;
  gap: 18px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.result-card[hidden],
.conditional[hidden],
.modal[hidden] {
  display: none !important;
}

.dashboard-shell {
  padding-bottom: 56px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

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

.summary-list,
.settings-list {
  display: grid;
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

td {
  font-size: 0.96rem;
}

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

.text-mono {
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in oklab, var(--text) 28%, transparent);
  backdrop-filter: blur(8px);
}

.modal__dialog {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 32px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 18px;
}

.modal__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.modal__head h2,
.modal__dialog h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 20px;
  background: color-mix(in oklab, var(--text) 34%, transparent);
  backdrop-filter: blur(10px);
}

.screenshot-lightbox.is-open {
  display: grid;
}

.screenshot-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface-strong) 82%, white 18%);
  color: var(--text);
  font-size: 1.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.screenshot-lightbox__img {
  display: block;
  max-width: min(94vw, 1400px);
  max-height: 90vh;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.feedback-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-rating label {
  flex: 1 1 140px;
}

.hidden-mobile {
  display: inline;
}

@media (max-width: 1080px) {
  .dashboard-grid,
  .legal-layout,
  .guide-layout {
    grid-template-columns: 1fr;
  }

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

  .legal-nav,
  .guide-nav {
    position: static;
  }
}

@media (max-width: 760px) {
  .legal-card,
  .guide-card,
  .dashboard-card,
  .form-card {
    padding: 22px;
    border-radius: 28px;
  }

  .page-intro h1,
  .legal-heading h1,
  .guide-heading h1,
  .dashboard-header h1 {
    font-size: clamp(2.1rem, 11vw, 3.4rem);
  }

  .dashboard-tile-grid,
  .screen-card-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .hidden-mobile {
    display: none;
  }

  .screenshot-card a {
    min-height: 0;
  }

  .screenshot-lightbox {
    padding: 14px;
  }

  .screenshot-lightbox__close {
    top: 12px;
    right: 12px;
  }

  .screenshot-lightbox__img {
    max-width: 100%;
    max-height: 84vh;
    border-radius: 18px;
  }
}
