:root {
  --white: #ffffff;
  --ink: #1b1b1b;
  --night: #2e2739;
  --plum: #402446;
  --magenta: #c11b91;
  --line: rgba(64, 36, 70, 0.12);
  --soft: #f7f4f8;
  --muted: #6d6274;
  --shadow: 0 18px 50px rgba(27, 27, 27, 0.22);
  --radius: 22px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(900px 280px at 100% -10%, rgba(193, 27, 145, 0.38), transparent 55%),
    radial-gradient(700px 260px at 0% 110%, rgba(64, 36, 70, 0.55), transparent 50%),
    linear-gradient(155deg, #1b1b1b 0%, #2e2739 48%, #402446 100%);
}

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.public, .app-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 84px;
  padding: 16px 28px 18px;
  color: var(--white);
}

.brand { display: flex; flex-direction: column; gap: 2px; min-width: 220px; }

.brand-mark {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
}

.brand-title {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.tabs { display: flex; gap: 8px; }

.tab {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--white);
  border-radius: 999px;
  padding: 10px 18px;
}

.tab.active {
  background: var(--white);
  color: var(--plum);
  border-color: var(--white);
}

.top-actions { margin-left: auto; display: flex; gap: 8px; }

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  padding: 0 16px 16px;
}

.pane {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 0;
  overflow: auto;
}

.list-pane {
  display: flex;
  flex-direction: column;
  padding: 22px 18px 12px;
  overflow: hidden;
}

.pane-head { padding: 0 6px 12px; }

.pane-head h1, .detail-pane h2, .login-card h1, .password-dialog h2 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.pane-head h1 { font-size: 28px; color: var(--plum); }

.row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.muted { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.search, .filter, .field { display: flex; flex-direction: column; gap: 6px; }

.search input, .filter select, .field input, .field select, .field textarea, .login-card input, .password-dialog input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
}

.search input:focus, .filter select:focus, .field input:focus, .field select:focus, .field textarea:focus, .login-card input:focus, .password-dialog input:focus {
  border-color: var(--magenta);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(193, 27, 145, 0.15);
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.checks { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }

.filters .filter select { padding: 8px 10px; }

.filters .filter:last-child { grid-column: 1 / -1; }

.filter span, .field span, .login-card label, .password-dialog label {
  color: var(--plum);
  font-size: 13px;
  font-weight: 650;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 8px;
}

.item {
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 12px 12px 12px 14px;
}

.item:hover { background: var(--soft); }

.item.active {
  background: linear-gradient(90deg, rgba(193, 27, 145, 0.14), rgba(193, 27, 145, 0));
  border-left-color: var(--magenta);
}

.tree-label {
  padding: 12px 8px 4px;
  color: var(--plum);
  font-weight: 750;
}

.tree-label.depth-0 {
  color: var(--magenta);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-label.depth-1 { padding-left: 8px; }

.item.depth-1 { margin-left: 8px; width: calc(100% - 8px); }
.item.depth-2,
.item.depth-3,
.item.depth-4 {
  width: calc(100% - 18px);
  margin-left: 18px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.item.depth-3,
.item.depth-4 { margin-left: 34px; width: calc(100% - 34px); }

.detail-title { display: flex; gap: 16px; align-items: center; }

.logo, .preview.logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--white);
}

.certificate {
  display: block;
  width: min(100%, 440px);
  padding: 8px;
  background: #fbf6ee;
  border: 1px solid #e4d3bc;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(64, 36, 70, 0.1);
}

.certificate img, .preview.certificate {
  display: block;
  width: min(100%, 440px);
  background: #fbf6ee;
}

.item.sub {
  width: calc(100% - 22px);
  margin-left: 22px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.item.sub .item-title { font-size: 15px; }

.item-title { display: block; font-weight: 700; font-size: 16px; }

.item-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }

.item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.detail-pane { padding: 32px 40px 28px; }

.detail-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--magenta);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-pane h2 { font-size: 36px; line-height: 1.1; }

.developer { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.supported { background: var(--plum); color: var(--white); }
.badge.pilot { background: var(--magenta); color: var(--white); }
.badge.on_request { background: var(--night); color: var(--white); }
.badge.draft { background: var(--soft); color: var(--plum); }
.badge.live { background: rgba(64, 36, 70, 0.08); color: var(--plum); }

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--soft);
  color: var(--plum);
  font-size: 12px;
  font-weight: 650;
}

.chip.strong { background: var(--plum); color: var(--white); }

.meta {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  margin: 22px 0 0;
}

.meta dt, .meta dd {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.meta dt { color: var(--plum); font-weight: 650; }

.block { margin-top: 26px; }

.block h3 {
  margin: 0 0 12px;
  color: var(--magenta);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-card > h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--plum);
}

.ops { display: flex; flex-wrap: wrap; gap: 8px; }

.op {
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #fff, var(--soft));
  border: 1px solid var(--line);
  color: var(--plum);
  font-weight: 650;
}

.prose { margin: 0; white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }

.guide-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 4px 0;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.guide-table th {
  background: var(--soft);
  color: var(--plum);
  font-weight: 700;
}

.edit-table th,
.edit-table td { position: relative; padding: 6px 8px 10px; }

.edit-table textarea {
  display: block;
  width: 100%;
  min-height: 36px;
  border: 0;
  resize: none;
  overflow: hidden;
  background: transparent;
  padding: 2px 0;
  font: inherit;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.col-resize,
.row-resize {
  position: absolute;
  z-index: 2;
}

.col-resize {
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
}

.row-resize {
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 10px;
  cursor: row-resize;
}

.guide-links { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-links.stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  flex: 1;
  gap: 8px;
}
.instruction-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 28px;
  align-items: stretch;
}
.instruction-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.instruction-side.brief h3 { margin-top: 0; }
.instruction-split + .notice { margin: 16px 0 0; }
.btn.download {
  align-self: flex-start;
  gap: 8px;
  margin-top: 16px;
  color: var(--white);
  background: linear-gradient(135deg, #402446 0%, #6a245c 70%, #8d2278 100%);
}
.btn.download:hover { filter: brightness(1.08); }
.download-icon { display: inline-flex; }
.instruction-block { display: flex; flex-direction: column; align-items: flex-start; }
.instruction-block > .instruction-split,
.instruction-block > .notice { width: 100%; }
.guide-links.stack .btn {
  width: 100%;
  flex: 0 0 auto;
  min-height: 52px;
  box-sizing: border-box;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}
.workspace.reading { grid-template-columns: minmax(0, 1fr); }

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: 28px;
  padding-bottom: 12px;
}

.step-nav-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.next-step, .back-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
}

.next-step { margin-left: auto; align-items: flex-end; text-align: right; }

.next-step-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--magenta);
}

.next-step-sub, .back-step-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.back-step-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--plum);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.btn.primary {
  background: linear-gradient(135deg, #402446 0%, #6a245c 70%, #8d2278 100%);
  color: var(--white);
}

.btn.primary:hover { filter: brightness(1.08); }

.btn.ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.detail-pane .btn.ghost, .password-dialog .btn.ghost, .row-actions .btn.ghost {
  color: var(--plum);
  border-color: var(--line);
  background: var(--white);
}

.btn.danger { background: transparent; color: #8d2048; border: 1px solid rgba(141, 32, 72, 0.25); }

.empty {
  margin: 12px 6px;
  padding: 22px;
  border-radius: 16px;
  background: var(--soft);
  color: var(--muted);
  line-height: 1.5;
}

.step-list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }

.step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
}

.step-no {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plum);
  color: var(--white);
  font-weight: 750;
}

.step-body {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, #fff, #fcfafc);
}

.step-body h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--ink); }

.flow { display: flex; flex-direction: column; gap: 16px; }

.shot {
  display: flex;
  margin: 0;
  max-width: 100%;
}

.shot.align-left { justify-content: flex-start; }
.shot.align-center { justify-content: center; }
.shot.align-right { justify-content: flex-end; }

.shot-frame {
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: var(--shot-width, 70%);
}

.shot img {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
}

.rich { white-space: normal; line-height: 1.55; overflow-wrap: anywhere; }
.rich b, .rich strong { font-weight: 700; }
.rich i, .rich em { font-style: italic; }
.rich u { text-decoration: underline; }

.rich-edit {
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--white);
  outline: none;
  line-height: 1.55;
}

.rich-edit:focus {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(193, 27, 145, 0.15);
}

.format-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.format-bar select, .format-bar input[type="color"] {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  height: 34px;
}

.format-bar .btn { padding: 6px 10px; }

.shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  line-height: 1.4;
}

.block-edit {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-tools { display: flex; flex-wrap: wrap; gap: 8px; }

.section-card + .section-card { margin-top: 28px; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card, .password-dialog form {
  width: min(440px, 100%);
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card h1 { font-size: 32px; color: var(--plum); }

.login-card .brand-mark { color: var(--magenta); }

.form-error { margin: 0; color: #8d2048; font-weight: 650; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.span-2 { grid-column: 1 / -1; }

.checks.inline { flex-direction: row; flex-wrap: wrap; margin: 0; }

.op-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.op-group {
  margin: 0;
  min-width: 0;
  padding: 8px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.op-group legend {
  padding: 0 6px;
  color: var(--magenta);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.op-group .checks { margin: 0; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--plum);
  font-weight: 650;
}

.check input { accent-color: var(--magenta); }

.savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 18px -40px -28px;
  padding: 14px 40px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}

.row-actions { display: flex; gap: 8px; }

.hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.notice {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(193, 27, 145, 0.1);
  color: var(--plum);
  line-height: 1.45;
}

.support-check {
  width: 100%;
  border-radius: 14px;
  align-items: flex-start;
  line-height: 1.4;
}

.rating-bar { margin: 0 0 18px; }

.rating-label {
  margin: 0 0 4px;
  color: var(--magenta);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.star-btn {
  border: 0;
  background: transparent;
  color: #d5ceda;
  font-size: 30px;
  line-height: 1;
  padding: 0 2px;
  min-width: 40px;
  min-height: 44px;
}

.star-btn.on { color: var(--magenta); }

.stars:hover .star-btn { color: #d5ceda; }

.stars .star-btn:hover,
.stars .star-btn:hover ~ .star-btn { color: var(--magenta); }

.rating-summary { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.comment-line, .reply {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.reply {
  margin: 12px 0 0 18px;
  padding-left: 12px;
  border-left: 2px solid rgba(193, 27, 145, 0.45);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  background: var(--soft);
  color: var(--plum);
  font-weight: 750;
}

.avatar.staff {
  background: var(--plum);
  color: var(--white);
  font-size: 14px;
}

.comment-body { min-width: 0; flex: 1; }

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.comment-meta strong { color: var(--ink); }

.comment > .row-actions { margin: 10px 0 0 48px; }

.reply-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 10px 0 0 48px;
}

.reply-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}

.reply-form textarea:focus {
  border-color: var(--magenta);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(193, 27, 145, 0.15);
}

.comment-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 10px;
  margin-top: 14px;
}
.comment-form .name-field { width: 50%; }
.comment-form .text-field { width: 100%; }
.comment-form .btn { align-self: flex-start; }

.guide-editor .section-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

.step-edit {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thumb {
  max-width: 280px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.password-dialog { border: 0; padding: 0; background: transparent; }
.password-dialog::backdrop { background: rgba(27, 27, 27, 0.55); }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 300px minmax(0, 1fr); }
  .detail-pane { padding: 24px; }
  .savebar { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .top-actions { gap: 6px; }
}

.mobile-back { display: none; }

@media (max-width: 820px) {
  html { -webkit-text-size-adjust: 100%; }

  input, select, textarea { font-size: 16px; }

  .topbar {
    flex-wrap: wrap;
    gap: 10px 12px;
    min-height: 0;
    padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
  }

  .brand { min-width: 0; gap: 0; }
  .brand-title { font-size: 18px; }
  .public .brand { flex: 1 1 auto; }
  .public .tabs { margin-left: auto; }

  .app-screen .brand,
  .app-screen .tabs,
  .app-screen .top-actions { flex: 1 1 100%; }
  .app-screen .tabs { width: 100%; }
  .app-screen .tab { flex: 1; text-align: center; }
  .app-screen .top-actions { margin-left: 0; flex-wrap: wrap; }
  .app-screen .top-actions .btn {
    flex: 1 1 calc(50% - 8px);
    padding: 10px 8px;
    font-size: 14px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .public #catalogView .detail-pane,
  .app-screen .workspace .detail-pane { display: none; }

  .public #catalogView.mobile-detail .list-pane,
  .app-screen .workspace.mobile-open .list-pane { display: none; }

  .public #catalogView.mobile-detail .detail-pane,
  .app-screen .workspace.mobile-open .detail-pane,
  .public .workspace.reading .detail-pane { display: block; }

  .list-pane { padding: 16px 12px 10px; }
  .pane-head { padding: 0 2px 10px; }
  .pane-head h1 { font-size: 24px; }
  .row-head { align-items: center; }
  .row-head .btn { flex: 0 0 auto; }

  .item {
    position: relative;
    min-height: 48px;
    padding-right: 28px;
  }

  .public .item::after,
  .app-screen .item::after {
    content: "›";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
  }

  .item-title, .detail-pane h2, .step-body h3 { overflow-wrap: anywhere; }

  .detail-pane { padding: 0 16px 24px; }
  .detail-pane h2 { font-size: 28px; }
  .detail-top { flex-direction: column; align-items: flex-start; }
  .detail-title { align-items: flex-start; }
  .logo, .preview.logo { width: 64px; height: 64px; }

  .mobile-back {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 3;
    width: calc(100% + 32px);
    margin: 0 -16px 14px;
    padding: 14px 16px;
    border: 0;
    border-radius: 22px 22px 0 0;
    background: var(--white);
    box-shadow: 0 1px 0 var(--line);
    color: var(--plum);
    font-weight: 750;
    justify-content: flex-start;
  }

  .meta { grid-template-columns: 1fr; }
  .meta dt { padding: 12px 0 0; border-bottom: 0; }
  .meta dd { padding: 2px 0 12px; }

  .instruction-split { grid-template-columns: 1fr; }
  .comment-form .name-field { width: 50%; }

  .step { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .step-no { width: 32px; height: 32px; font-size: 14px; }
  .step-body { padding: 12px 12px 14px; overflow-x: auto; }
  .shot-frame { width: 100%; max-width: 100%; }
  .rich img, .step-body img { max-width: 100%; height: auto; }

  .step-nav { flex-direction: column; align-items: stretch; gap: 18px; }
  .step-nav-side { gap: 12px; }
  .next-step { margin-left: 0; align-items: flex-start; text-align: left; }
  .next-step-title { font-size: 22px; letter-spacing: 0.08em; }
  .back-step, .next-step { max-width: 100%; }
  .back-step-sub, .next-step-sub { overflow-wrap: anywhere; }

  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .checks.inline .check { min-height: 44px; }

  .savebar {
    position: static;
    flex-wrap: wrap;
    margin: 18px -16px 0;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  .savebar .btn, .row-actions .btn { min-height: 44px; }
  .row-actions { flex-wrap: wrap; }

  .login-screen { padding: 16px; align-items: start; padding-top: max(24px, env(safe-area-inset-top)); }
  .login-card, .password-dialog form { padding: 22px 18px; border-radius: 18px; }
  .login-card h1 { font-size: 28px; }
  .password-dialog { width: min(440px, calc(100% - 24px)); max-width: calc(100% - 24px); }
  .password-dialog .row-actions { width: 100%; }
  .password-dialog .row-actions .btn { flex: 1; }

  .format-bar .btn { min-height: 36px; }
  .thumb, .preview.certificate, .certificate, .certificate img { max-width: 100%; }
}
