:root {
  --bg: #f5f5f7;
  --panel: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --ok: #248a3d;
  --err: #d70015;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --site-env-ribbon-h: 36px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

html[data-site-env] body {
  padding-top: var(--site-env-ribbon-h);
}

body:has(.site-env-ribbon) {
  padding-top: var(--site-env-ribbon-h);
}

.site-env-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  min-height: var(--site-env-ribbon-h);
  padding: 6px 12px;
  box-sizing: border-box;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgb(0 0 0 / 12%);
}

.site-env-ribbon--lab {
  background: #f5a623;
  color: #1a1200;
}

.site-env-ribbon--prod {
  background: #1b4332;
  color: #f0fff4;
}

.site-env-ribbon-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.site-env-ribbon--lab .site-env-ribbon-badge {
  background: rgb(0 0 0 / 18%);
}

.site-env-ribbon--prod .site-env-ribbon-badge {
  background: rgb(255 255 255 / 18%);
}

.site-env-ribbon-text {
  font-weight: 500;
}

.site-env-ribbon-link {
  color: inherit;
  opacity: 0.92;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.site-env-ribbon-link:hover {
  opacity: 1;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

nav a {
  margin-left: 16px;
  text-decoration: none;
  font-size: 0.95rem;
}

nav .nav-user-email {
  margin-left: 16px;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--accent);
}

nav .nav-user-email:hover {
  text-decoration: underline;
}

nav a:hover {
  text-decoration: underline;
}

.hero {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4vw, 2rem);
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.pill {
  display: inline-block;
  background: #e8f4ff;
  color: #004085;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

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

.btn-secondary {
  background: #e8e8ed;
  color: var(--text);
}

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

@media (max-width: 820px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 6%);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pricing {
  margin-top: 32px;
}

.pricing-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.pricing-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 52rem;
}

.pricing .price {
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0 4px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-grid--single {
  grid-template-columns: minmax(0, 420px);
}

.plan-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgb(0 0 0 / 8%);
  background: var(--panel);
  box-shadow: 0 1px 3px rgb(0 0 0 / 6%);
}

.plan-card--featured {
  border-color: #f5b800;
  background: #fffdf5;
}

.plan-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.plan-detail {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.plan-note {
  flex: 1 1 auto;
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  min-height: 2.9em;
}

.plan-card .btn {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

.why {
  margin-top: 32px;
  text-align: left;
}

.why-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.why-official {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgb(0 0 0 / 8%);
  font-size: 0.92rem;
  color: var(--muted);
}

.why-official a {
  font-weight: 600;
}

.hero .lead a,
.why a,
.grid-3 a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero .lead a:hover,
.why a:hover,
.grid-3 a:hover {
  color: var(--text);
}

.sys-hint {
  color: var(--muted);
  font-size: 0.92em;
}

.why p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.why p:last-child {
  margin-bottom: 0;
}

.why-list {
  margin: 0 0 12px;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.why-list li {
  margin-bottom: 8px;
}

.why-list li:last-child {
  margin-bottom: 0;
}

.pricing-cta {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

footer.site {
  margin-top: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* App page */
.app-panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

#pro-badge {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: #eee;
}

#pro-badge[data-active="1"] {
  background: #d4edda;
  color: var(--ok);
}

.app-label-format {
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #f0f7ff;
  border: 1px solid rgb(0 113 227 / 18%);
  font-size: 0.92rem;
  line-height: 1.45;
}

.app-label-format-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.app-label-format-value {
  display: block;
  color: var(--text);
}

.app-label-format-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.88rem;
}

#drop-zone {
  border: 2px dashed #c7c7cc;
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  margin: 16px 0;
  transition: border-color 0.15s, background 0.15s;
}

#drop-zone.drag,
#drop-zone:hover {
  border-color: var(--accent);
  background: #f0f7ff;
}

#status {
  min-height: 1.5em;
  font-weight: 500;
}

#status[data-kind="ok"] {
  color: var(--ok);
}

#status[data-kind="err"] {
  color: var(--err);
}

#status[data-kind="busy"] {
  color: var(--muted);
}

.lab-banner {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.lab-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 500;
}

.lab-field input[type="number"] {
  max-width: 12rem;
  padding: 8px 10px;
  border: 1px solid #c7c7cc;
  border-radius: 8px;
  font: inherit;
}

.lab-field-hint {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

.lab-report {
  margin: 12px 0;
  padding: 12px 14px;
  background: #f6f7f9;
  border-radius: 8px;
  font-size: 0.95rem;
}

.lab-report p {
  margin: 0 0 8px;
}

.lab-report p:last-child {
  margin-bottom: 0;
}

.lab-report-label {
  display: inline-block;
  min-width: 11rem;
  color: var(--muted);
}

.lab-report-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.lab-match[data-ok="unknown"] {
  color: var(--muted);
  font-weight: 400;
}

.lab-match[data-ok="yes"] {
  color: var(--ok);
  font-weight: 600;
}

.lab-match[data-ok="no"] {
  color: var(--err);
  font-weight: 600;
}

.lab-fieldset {
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 16px 0;
}

.lab-fieldset legend {
  padding: 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.lab-fieldset-intro {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.lab-fieldset label.lab-choice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  font-weight: 400;
  font-size: 0.9rem;
}

.lab-fieldset label.lab-choice input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.lab-choice-hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.lab-extra {
  margin-top: 12px;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 8px;
}

.lab-extra summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
}

.lab-extra-body {
  padding: 0 14px 14px;
}

.lab-extra-body .download-file-row {
  margin-top: 10px;
}

.lab-choice--inline {
  margin: 8px 0 0;
}

.download-file-meta strong.lab-file-title {
  font-family: inherit;
  font-size: 0.95rem;
}

.lab-field select {
  width: 100%;
  max-width: 28rem;
  padding: 8px 10px;
  border: 1px solid #c7c7cc;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
  background: #fff;
}

.lab-cz-limits {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.lab-cz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lab-cz-progress {
  margin-top: 12px;
}

.lab-cz-progress-text {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.lab-cz-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgb(0 0 0 / 8%);
  overflow: hidden;
}

.lab-cz-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.25s ease-out;
}

.lab-cz-progress[hidden] {
  display: none !important;
}

.lab-cz-results-wrap {
  margin-top: 12px;
  overflow: visible;
}

.lab-cz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.lab-cz-table th,
.lab-cz-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgb(0 0 0 / 8%);
  text-align: left;
  vertical-align: top;
}

.lab-cz-table th {
  font-weight: 600;
  color: var(--muted);
}

.lab-cz-th-status {
  vertical-align: top;
}

.lab-cz-th-label {
  margin-right: 4px;
  white-space: nowrap;
}

.lab-cz-help-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.lab-cz-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid rgb(0 0 0 / 18%);
  border-radius: 50%;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  background: #fff;
  cursor: help;
}

.lab-cz-help:hover,
.lab-cz-help:focus-visible {
  color: var(--text);
  border-color: rgb(0 0 0 / 28%);
  outline: 2px solid rgb(37 99 235 / 35%);
  outline-offset: 1px;
}

.lab-cz-tooltip {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: min(36rem, calc(100vw - 20px));
  max-width: min(36rem, calc(100vw - 20px));
  padding: 8px 11px;
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.lab-cz-tooltip p,
.lab-cz-tooltip dl,
.lab-cz-tooltip dt,
.lab-cz-tooltip dd {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lab-cz-tooltip code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lab-cz-tooltip.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.lab-cz-tooltip-intro {
  margin: 0 0 6px;
  color: var(--muted);
}

.lab-cz-tooltip-list {
  margin: 0 0 6px;
}

.lab-cz-tooltip-list dt {
  margin: 4px 0 1px;
  font-weight: 600;
  font-size: 0.95em;
  color: var(--text);
}

.lab-cz-tooltip-list dt code {
  font-size: 0.9em;
  font-weight: 500;
}

.lab-cz-tooltip-list dd {
  margin: 0 0 2px 0.45rem;
  color: var(--muted);
}

.lab-cz-tooltip-foot {
  margin: 0;
  font-size: 0.92em;
  line-height: 1.35;
  color: var(--muted);
}

.lab-cz-table tr[data-kind="ok"] td:nth-child(3) {
  color: #0a6b2d;
}

.lab-cz-table tr[data-kind="warn"] td:nth-child(3) {
  color: #9a6700;
}

.lab-cz-table tr[data-kind="err"] td {
  color: #b42318;
}

.download-files {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgb(0 0 0 / 8%);
}

.download-files-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.download-file-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid rgb(0 0 0 / 6%);
}

.download-file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.download-file-meta strong {
  font-size: 0.92rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.download-file-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.download-files > .btn-primary {
  width: 100%;
  text-align: center;
}

.download-file-meta a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cabinet-settings {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgb(0 0 0 / 8%);
}

.cabinet-settings-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.cabinet-settings-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cabinet-settings-detail {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.label-custom-size {
  margin-top: 4px;
}

.label-custom-size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.label-custom-size-row .account-field {
  flex: 1 1 140px;
  margin-bottom: 0;
}

.label-layout-preview {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgb(0 0 0 / 8%);
  background: var(--bg);
}

.label-layout-preview-svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 1px 4px rgb(0 0 0 / 10%);
}

.label-layout-preview-caption {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.cabinet-save-status {
  font-size: 0.9rem;
  color: var(--muted);
  align-self: center;
}

.cabinet-save-status:not(:empty) {
  color: var(--ok);
}

.cabinet-save-status[data-kind="err"] {
  color: var(--err);
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-lead {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.admin-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgb(0 0 0 / 8%);
}

.admin-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 16px;
}

.admin-section-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.admin-dl dd a {
  word-break: break-all;
}

.license-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.license-row input {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid #c7c7cc;
  border-radius: 8px;
  font-family: monospace;
}

.prose {
  background: var(--panel);
  padding: 36px 32px;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

.prose h1 {
  margin-top: 0;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.15rem;
}

.prose ul {
  padding-left: 1.2em;
}

.field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c7c7cc;
  border-radius: 8px;
  font-size: 1rem;
}

.profile-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 20px 0;
}

.profile-dl dt {
  color: var(--muted);
  margin: 0;
}

.profile-dl dd {
  margin: 0;
  font-weight: 500;
}

html.cabinet-loading #cabinet-panel,
html.cabinet-loading header.site nav {
  visibility: hidden;
}

html.cabinet-ready #cabinet-panel,
html.cabinet-ready header.site nav {
  visibility: visible;
}

html.app-loading #app-main,
html.app-loading header.site {
  visibility: hidden;
}

html.app-ready #app-main,
html.app-ready header.site {
  visibility: visible;
}

html.login-checking .account-login-wrap {
  visibility: hidden;
}

#login-msg[data-kind="err"],
#register-msg[data-kind="err"],
#forgot-msg[data-kind="err"],
#reset-msg[data-kind="err"],
#contact-msg[data-kind="err"] {
  color: var(--err);
}

#login-msg[data-kind="ok"],
#register-msg[data-kind="ok"],
#forgot-msg[data-kind="ok"],
#reset-msg[data-kind="ok"],
#contact-msg[data-kind="ok"] {
  color: var(--ok);
}

textarea.field-input {
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
}

/* Account auth — как Saybel /account */
.account-auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.account-auth-page .account-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 48px;
}

.account-card {
  width: 100%;
  max-width: 420px;
  padding: 24px 22px;
  border-radius: var(--radius);
  border: 1px solid rgb(0 0 0 / 8%);
  background: var(--panel);
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

.account-card h1 {
  margin: 16px 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
}

.account-card .muted {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.account-auth-form[hidden] {
  display: none !important;
}

.account-logo {
  display: block;
  margin-bottom: 4px;
}

.account-logo img {
  height: 40px;
  width: auto;
}

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

.account-tabs button {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgb(0 0 0 / 10%);
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.account-tabs button.active {
  border-color: #f5b800;
  background: #fff8e1;
  color: var(--text);
  font-weight: 600;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--muted);
}

.account-field input {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgb(0 0 0 / 12%);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.account-field input:focus {
  outline: 2px solid rgb(245 184 0 / 45%);
  outline-offset: 1px;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
  background: rgb(0 0 0 / 5%);
}

.password-toggle:focus-visible {
  outline: 2px solid rgb(245 184 0 / 45%);
  outline-offset: 1px;
}

.account-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  min-height: 3.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}

.account-terms-check:has(input:disabled) {
  cursor: default;
}

.account-terms-check input:disabled {
  cursor: default;
}

.account-terms-check[hidden] {
  display: none !important;
}

.account-terms-check input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: #f5b800;
}

.account-terms-check a {
  color: var(--accent);
}

.account-btn-full {
  width: 100%;
  margin-top: 4px;
}

.account-text-link {
  display: block;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
}

.account-text-link:hover {
  text-decoration: underline;
}

.account-text-link--invisible {
  visibility: hidden;
  pointer-events: none;
}

.account-text-link:not([hidden]) + .account-back {
  margin-top: 12px;
}

.account-back {
  display: block;
  margin-top: 40px;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
}

.account-back:hover {
  color: var(--text);
}

.account-text-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.account-ok {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--ok);
}

.account-err {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--err);
}

/* Guide / selling page */

.guide-hero {
  margin-bottom: 24px;
}

.guide-hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(1.55rem, 4vw, 1.95rem);
  line-height: 1.25;
}

.guide-lead {
  margin: 0;
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.65;
}

.guide-disclosure-hint {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.guide-block {
  margin-top: 20px;
  text-align: left;
}

.guide-disclosure {
  border: none;
}

.guide-disclosure__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  margin: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.guide-disclosure__summary::-webkit-details-marker {
  display: none;
}

.guide-disclosure__summary::marker {
  content: "";
}

.guide-disclosure__summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  margin-top: -3px;
}

.guide-disclosure[open] > .guide-disclosure__summary::after {
  transform: rotate(45deg);
  margin-top: 3px;
}

.guide-disclosure__summary:hover .guide-disclosure__title {
  color: var(--accent);
}

.guide-disclosure__summary:focus {
  outline: none;
}

.guide-disclosure__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.guide-disclosure__title {
  display: block;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  transition: color 0.15s ease;
}

.guide-disclosure__body {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid rgb(0 0 0 / 8%);
}

.guide-disclosure__body > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.guide-disclosure__body > p + p {
  margin-top: 12px;
}

.guide-disclosure__body .guide-shot {
  margin-top: 16px;
}

.guide-block h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.guide-after-lead {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.guide-filename {
  margin: 0 0 12px;
}

.guide-filename code {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid rgb(0 0 0 / 8%);
  font-size: 0.72rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text);
}

.guide-filename-list {
  margin: 0 0 14px;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.guide-filename-list li {
  margin-bottom: 8px;
}

.guide-filename-list li:last-child {
  margin-bottom: 0;
}

.guide-output-files {
  margin: 14px 0 16px;
  padding: 0;
  list-style: none;
}

.guide-output-files > li {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid rgb(0 0 0 / 8%);
}

.guide-output-files > li:last-child {
  margin-bottom: 0;
}

.guide-output-name {
  margin: 0 0 8px;
}

.guide-output-name code {
  font-size: 0.82rem;
  word-break: break-all;
}

.guide-output-note {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.guide-output-files p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.guide-chapter[data-guide-chapter="0"] .guide-disclosure__title::before {
  content: "0. ";
}

.guide-chapter[data-guide-chapter="1"] .guide-disclosure__title::before {
  content: "1. ";
}

.guide-chapter[data-guide-chapter="2"] .guide-disclosure__title::before {
  content: "2. ";
}

.guide-chapter[data-guide-chapter="3"] .guide-disclosure__title::before {
  content: "3. ";
}

.guide-chapter[data-guide-chapter="4"] .guide-disclosure__title::before {
  content: "4. ";
}

.guide-chapter[data-guide-chapter="5"] .guide-disclosure__title::before {
  content: "5. ";
}

.guide-chapter[data-guide-chapter="6"] .guide-disclosure__title::before {
  content: "6. ";
}

.guide-chapter[data-guide-chapter="7"] .guide-disclosure__title::before {
  content: "7. ";
}

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

.guide-chapter[data-guide-chapter="1"],
.guide-chapter[data-guide-chapter="2"],
.guide-chapter[data-guide-chapter="3"],
.guide-chapter[data-guide-chapter="4"],
.guide-chapter[data-guide-chapter="5"],
.guide-chapter[data-guide-chapter="6"],
.guide-chapter[data-guide-chapter="7"] {
  counter-reset: guide-sub;
}

.guide-step {
  position: relative;
  padding: 0 0 20px 3.35rem;
  border-left: 2px solid rgb(0 0 0 / 8%);
  margin-left: 0.85rem;
  counter-increment: guide-sub;
}

.guide-chapter .guide-step:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.guide-chapter[data-guide-chapter="1"] .guide-step::before {
  content: "1." counter(guide-sub);
}

.guide-chapter[data-guide-chapter="2"] .guide-step::before {
  content: "2." counter(guide-sub);
}

.guide-chapter[data-guide-chapter="3"] .guide-step::before {
  content: "3." counter(guide-sub);
}

.guide-chapter[data-guide-chapter="4"] .guide-step::before {
  content: "4." counter(guide-sub);
}

.guide-chapter[data-guide-chapter="5"] .guide-step::before {
  content: "5." counter(guide-sub);
}

.guide-chapter[data-guide-chapter="6"] .guide-step::before {
  content: "6." counter(guide-sub);
}

.guide-chapter[data-guide-chapter="7"] .guide-step::before {
  content: "7." counter(guide-sub);
}

.guide-inline-code {
  font-size: 0.88em;
  word-break: break-all;
}

.guide-step::before {
  position: absolute;
  left: -0.85rem;
  transform: translateX(-50%);
  min-width: 2.35rem;
  height: 1.75rem;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 2px solid #f5b800;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.55rem;
  text-align: center;
  color: var(--text);
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
  white-space: nowrap;
}

.guide-step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.guide-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.guide-step .guide-shot {
  margin-top: 14px;
}

.guide-step .guide-shot + .guide-shot {
  margin-top: 10px;
}

.guide-step--znakmark {
  border-left-color: rgb(0 113 227 / 25%);
}

.guide-step--znakmark::before {
  border-color: var(--accent);
  background: #e8f4ff;
}

.guide-milestone p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.guide-disclosure__body .guide-milestone {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgb(0 0 0 / 8%);
}

.guide-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92em;
}

.guide-status--ok {
  background: #e8f5ec;
  color: var(--ok);
}

.guide-status--wait {
  background: transparent;
  color: #9aa0a6;
  font-weight: 500;
  padding: 0;
}

.guide-status--wait::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.35em;
  vertical-align: -0.12em;
  background: currentColor;
  opacity: 0.92;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.25' fill='none' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M8 4.25V8l2.75 2.75' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.25' fill='none' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M8 4.25V8l2.75 2.75' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
}

.guide-permit-help {
  border: 1px solid rgb(245 184 0 / 45%);
  background: linear-gradient(135deg, #fffef8 0%, var(--panel) 55%);
}

.guide-permit-help__title {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.guide-permit-help .guide-disclosure__body > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.guide-permit-help .guide-disclosure__body > p:last-of-type {
  margin-bottom: 0;
}

.guide-permit-help__contact {
  font-size: 0.95rem;
}

.guide-permit-help__contact a {
  font-weight: 600;
}

.guide-closing-list {
  margin-bottom: 18px;
}

.guide-closing-list a {
  font-weight: 600;
}

.guide-shot {
  margin: 8px 0 0;
}

.guide-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgb(0 0 0 / 10%);
  box-shadow: 0 4px 20px rgb(0 0 0 / 8%);
}

.zoomable-thumb {
  cursor: zoom-in;
}

.image-lightbox {
  margin: auto;
  padding: 0;
  border: none;
  max-width: min(96vw, 1400px);
  max-height: 96vh;
  width: max-content;
  background: transparent;
  overflow: visible;
}

.image-lightbox::backdrop {
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(4px);
}

.image-lightbox-img {
  display: block;
  max-width: 96vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgb(0 0 0 / 45%);
}

.image-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgb(255 255 255 / 92%);
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgb(0 0 0 / 25%);
}

.image-lightbox-close:hover {
  background: #fff;
}

.guide-shot figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.guide-closing p {
  color: var(--muted);
  line-height: 1.6;
}
