:root {
  --paper: #f4efe6;
  --paper-deep: #ebe4d8;
  --surface: #faf7f1;
  --surface-2: #fffdf9;
  --ink: #1d2430;
  --ink-soft: #3a4554;
  --muted: #6b7380;
  --line: #d7d0c4;
  --line-strong: #b9b0a2;
  --header: #1a2332;
  --navy: #243447;
  --accent: #d97706;
  --accent-strong: #c2410c;
  --accent-soft: #f8e7d0;
  --success: #1f7a4d;
  --success-bg: #e7f4ec;
  --warning: #a16207;
  --warning-bg: #f8efd8;
  --error: #b42318;
  --error-bg: #f8e8e6;
  --info: #355c7d;
  --info-bg: #e8eef4;
  --stamp: rgba(53, 92, 125, 0.18);
  --radius: 3px;
  --radius-lg: 6px;
  --header-h: 58px;
  --shadow-soft: 0 10px 30px rgba(29, 36, 48, 0.08);
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --space-1: 0.35rem;
  --space-2: 0.6rem;
  --space-3: 0.9rem;
  --space-4: 1.25rem;
}

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

html,
body {
  height: 100%;
}

body.app-body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(217, 119, 6, 0.05), transparent 28%),
    linear-gradient(180deg, #f7f2ea 0%, var(--paper) 48%, #efe8dc 100%);
}

body.entry-active {
  overflow: auto;
}

body:not(.entry-active) {
  overflow: hidden;
}

/* ===== Brand ===== */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-lockup-compact .brand-primary {
  font-size: 1.05rem;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  border-top: 1.5px solid currentColor;
  transform: rotate(-18deg);
}

.brand-primary {
  font-family: var(--font-serif);
  font-weight: 650;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-secondary {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.12rem;
}

.trace-note {
  font-family: var(--font-serif);
  font-style: italic;
  color: #5d6f86;
  font-size: 0.86rem;
}

.section-index {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.tech-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* ===== Product entry — full approved hero board ===== */
.product-entry {
  min-height: 100vh;
  height: 100vh;
  box-sizing: border-box;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 119, 6, 0.04), transparent 30%),
    linear-gradient(180deg, #f4efe6 0%, var(--paper) 45%, #ebe4d8 100%);
}

.entry-mobile-intro {
  display: none;
}

.entry-hero {
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.entry-hero-stage {
  position: relative;
  display: inline-block;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  line-height: 0;
  box-shadow: 0 18px 48px rgba(36, 52, 71, 0.12);
  border: 1px solid rgba(36, 52, 71, 0.08);
  background: #f3eee4;
}

.entry-hero-img {
  display: block;
  /* Grow to the largest size that still fits both viewport axes */
  width: min(calc(100vw - 80px), calc((100vh - 80px) * 1672 / 941));
  height: auto;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  object-fit: contain;
  vertical-align: top;
}

/* Hotspot aligned to orange CTA on approved image (1672×941) */
.entry-cta-hotspot {
  position: absolute;
  left: 3.2%;
  top: 56.2%;
  width: 13%;
  height: 5.4%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.entry-cta-hotspot:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  background: rgba(234, 88, 12, 0.12);
}

.entry-kicker {
  margin: 0 0 0.8rem;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entry-title {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-weight: 650;
  font-size: clamp(1.55rem, 5.2vw, 2.1rem);
  line-height: 1.18;
  color: var(--ink);
}

.entry-lead {
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ===== App shell / header ===== */
.app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  background: var(--header);
  color: #f4efe6;
  border-bottom: 1px solid #101722;
}

.app-header .brand-secondary {
  color: rgba(244, 239, 230, 0.62);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

/* ===== Workspace ===== */
.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1.08fr) minmax(0, 1.12fr);
  background: transparent;
  gap: 0;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(250, 247, 241, 0.96);
  border-right: 1px solid var(--line);
}

.panel-left {
  background: rgba(241, 234, 222, 0.98);
}

.panel-center {
  box-shadow: inset -1px 0 0 rgba(185, 176, 162, 0.35);
}

.panel-right {
  border-right: none;
  background: rgba(255, 252, 246, 0.99);
  box-shadow: inset 8px 0 18px -16px rgba(36, 52, 71, 0.18);
}

.panel-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.7rem 0.8rem 0.85rem;
  min-height: 0;
}

.panel-header-sticky,
.panel-footer {
  flex: 0 0 auto;
  padding: 0.55rem 0.8rem;
  border-color: var(--line);
  background: inherit;
}

.panel-block {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.panel-header-sticky {
  border-bottom: 1px solid var(--line);
}

.panel-footer {
  border-top: 1px solid var(--line);
}

.sticky-footer {
  background: rgba(255, 253, 249, 0.98);
}

.panel-history {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-bottom: none;
}

.panel-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.panel-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-end;
  margin-bottom: 0.85rem;
}

.panel-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.45rem;
}

.history-note {
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

/* ===== Forms ===== */
.field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 0.28rem;
  letter-spacing: 0.02em;
}

select,
input[type="text"],
input[type="date"],
input[type="time"],
textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fffdf9;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 6rem;
  line-height: 1.45;
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: #9a7b4f;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.18);
}

.readonly-field {
  padding: 0.45rem 0.55rem;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 2.15rem;
  display: flex;
  align-items: center;
}

.inline-field {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.inline-field input {
  flex: 1 1 auto;
  min-width: 0;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.65rem;
  margin-bottom: 0.9rem;
}

.meta-span {
  grid-column: 1 / -1;
}

.object-info-card {
  margin: 0.55rem 0;
  padding: 0.65rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.object-info-card .oi-client {
  font-family: var(--font-serif);
  font-weight: 650;
  margin-bottom: 0.2rem;
}

.object-info-card .oi-address,
.object-info-card .oi-equipment {
  color: var(--muted);
  font-size: 0.82rem;
}

.work-surface {
  margin: 0.25rem 0 0.75rem;
  padding: 0.7rem 0.75rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.work-surface-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.work-surface-tag {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
}

.help-text {
  margin: 0.35rem 0 0.55rem;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}

.voice-row,
.demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0;
}

.photos-block {
  margin-top: 0.35rem;
}

.photos-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.photo-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

input[type="file"] {
  display: block;
  margin: 0.25rem 0 0.45rem;
  font-size: 0.8rem;
}

.photo-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.photo-item {
  flex: 0 0 auto;
  width: 72px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.photo-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.photo-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.85rem;
  font: inherit;
  font-weight: 650;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-block {
  width: 100%;
}

.btn-compact {
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

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

.btn-record:hover:not(:disabled) {
  background: var(--accent-strong);
}

.btn-ghost {
  background: #fffdf9;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--paper-deep);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 2px solid rgba(217, 119, 6, 0.55);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* ===== History ===== */
.history-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}

.history-item {
  padding: 0.55rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.history-item:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.3rem;
}

.history-date {
  font-weight: 700;
  font-size: 0.84rem;
}

.history-id {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.history-reason {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.status-badge {
  display: inline-block;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.2;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-done {
  background: var(--success-bg);
  color: var(--success);
}

.status-continue {
  background: #fef3c7;
  color: #92400e;
}

.status-workshop {
  background: #e8e7f8;
  color: #4338ca;
}

.status-returned {
  background: #e7f3ef;
  color: #0f766e;
}

.status-default {
  background: var(--paper-deep);
  color: var(--muted);
}

/* ===== Result / act document ===== */
.result-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.empty-state {
  padding: 0;
  border: none;
  background: transparent;
}

.empty-doc {
  position: relative;
  min-height: 320px;
  padding: 1.15rem 1.05rem 1.2rem;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, #fffdf8 0%, #f7f1e6 100%);
  box-shadow: var(--shadow-soft);
}

.empty-doc-marks span {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(36, 52, 71, 0.22);
}

.empty-doc-marks span:nth-child(1) { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.empty-doc-marks span:nth-child(2) { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.empty-doc-marks span:nth-child(3) { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.empty-doc-marks span:nth-child(4) { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.empty-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.empty-doc-label {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 650;
}

.empty-doc-meta {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty-skeleton {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
  opacity: 0.55;
}

.empty-skel-block {
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(185, 176, 162, 0.55);
}

.empty-skel-cap {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.empty-skel-line {
  height: 8px;
  width: 92%;
  background: rgba(185, 176, 162, 0.35);
  border-radius: 1px;
  margin-bottom: 0.28rem;
}

.empty-skel-line.short {
  width: 58%;
}

.empty-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 650;
}

.empty-text {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  max-width: 34ch;
}

.result-fields.act-document {
  position: relative;
  padding: 1.05rem 1rem 1.15rem;
  background:
    linear-gradient(180deg, #fffdf8 0%, #faf6ee 100%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.act-doc-banner {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  width: 7.2rem;
  height: 7.2rem;
  border: 2px solid rgba(31, 122, 77, 0.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: rgba(31, 122, 77, 0.38);
  white-space: normal;
  pointer-events: none;
  z-index: 0;
}

.act-doc-head {
  position: relative;
  z-index: 1;
  margin-bottom: 0.55rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line-strong);
}

.act-doc-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.act-doc-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.2;
}

.act-doc-sub {
  margin-top: 0.28rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.act-section {
  position: relative;
  z-index: 1;
  padding: 0.55rem 0 0.45rem;
  border-bottom: 1px solid rgba(185, 176, 162, 0.55);
}

.act-section:last-child {
  border-bottom: none;
}

.result-fields .field-label {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

#result-fields.act-document textarea,
.result-fields.act-document textarea {
  min-height: 2.35rem;
  margin-bottom: 0;
  padding: 0.15rem 0;
  border: none;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  resize: vertical;
  box-shadow: none;
}

#result-fields.act-document textarea:hover,
.result-fields.act-document textarea:hover {
  border-bottom-color: rgba(185, 176, 162, 0.85);
  background: rgba(255, 253, 249, 0.35);
}

#result-fields.act-document textarea:focus,
.result-fields.act-document textarea:focus {
  outline: none;
  border-bottom-color: #9a7b4f;
  background: rgba(255, 253, 249, 0.7);
  box-shadow: none;
}

.ready-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
  background: transparent;
  border: 1.5px solid rgba(31, 122, 77, 0.45);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  letter-spacing: 0.03em;
}

/* ===== Status lines ===== */
.status-line {
  margin: 0.4rem 0;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--info);
  background: var(--info-bg);
  color: var(--info);
  font-size: 0.82rem;
  white-space: pre-line;
}

.status-line.success {
  border-left-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.status-line.info {
  border-left-color: var(--info);
  background: var(--info-bg);
  color: var(--info);
}

.status-line.warning {
  border-left-color: var(--warning);
  background: var(--warning-bg);
  color: var(--warning);
}

.status-line.error {
  border-left-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
}

.hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.25rem 0;
}

.hint.error {
  color: var(--error);
}

.ai-message {
  margin: 0.4rem 0;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--warning);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 0.82rem;
  white-space: pre-line;
}

.ai-message.error {
  border-left-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
}

.voice-status {
  margin: 0.35rem 0;
}

.voice-status.error {
  border-left-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
}

/* ===== Dialogs ===== */
.app-dialog {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: min(720px, 94vw);
  width: 100%;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.22);
}

.app-dialog::backdrop {
  background: rgba(26, 35, 50, 0.48);
}

.act-dialog {
  max-width: min(860px, 96vw);
  max-height: 90vh;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  padding: 0.95rem 1rem 1rem;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.dialog-header h3,
.dialog-body > h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.dialog-header h3 {
  margin: 0;
}

.dialog-body input {
  margin-bottom: 0.55rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.act-view-content {
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  font-size: 0.88rem;
}

.act-view-content h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.act-view-content p {
  margin: 0.2rem 0;
}

.act-view-content ul {
  margin: 0.2rem 0 0.4rem;
  padding-left: 1.1rem;
}

.act-view-content .photo-strip {
  margin-top: 0.35rem;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  body:not(.entry-active) {
    overflow: auto;
  }

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

  .workspace {
    height: auto;
    min-height: calc(100vh - var(--header-h));
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .panel-left {
    grid-row: 1 / span 2;
    max-height: calc(100vh - var(--header-h));
  }

  .panel-center,
  .panel-right {
    min-height: 520px;
  }
}

@media (max-width: 800px) {
  body:not(.entry-active) {
    overflow: auto;
  }

  .product-entry {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 1rem 0.85rem 1.4rem;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1.1rem;
  }

  .entry-mobile-intro {
    display: block;
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .entry-mobile-top {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
  }

  .entry-hero {
    width: 100%;
    max-width: none;
    max-height: none;
  }

  .entry-hero-stage {
    display: block;
    width: 100%;
    max-width: none;
    max-height: none;
    box-shadow: 0 10px 28px rgba(36, 52, 71, 0.1);
  }

  .entry-hero-img {
    width: 100%;
    max-width: 100%;
    max-height: none;
    height: auto;
  }

  /* Keep hotspot usable when image is smaller */
  .entry-cta-hotspot {
    left: 2.8%;
    top: 55.6%;
    width: 14%;
    height: 6.2%;
  }

  .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .panel,
  .panel-left {
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .panel-scroll,
  .history-list {
    overflow: visible;
  }

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