:root {
  color-scheme: light;
  --bg: #efe7d3;
  --bg-strong: #d9c8a3;
  --panel: rgba(255, 252, 245, 0.78);
  --line: rgba(67, 50, 24, 0.14);
  --text: #2d2618;
  --muted: #665941;
  --accent: #8a5b24;
  --accent-2: #d7a42c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.68), transparent 32%),
    linear-gradient(150deg, var(--bg), var(--bg-strong));
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

body {
  min-height: 100vh;
}

.shell,
.viewer-shell {
  min-height: 100vh;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero,
.panel,
.viewer-meta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 54px rgba(51, 39, 18, 0.12);
}

.hero,
.panel {
  padding: 24px;
}

.hero {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

h1,
h2 {
  margin: 0;
}

.lede,
.muted,
.panel-head p,
.card p,
.meta-list div {
  color: var(--muted);
}

.card-actions,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.button,
.button-secondary,
.icon-button {
  text-decoration: none;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.button {
  background: linear-gradient(135deg, #c28e2f, #8a5b24);
  color: #fff8ef;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.viewer-shell {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.viewer-meta {
  padding: 22px;
  align-self: stretch;
}

.viewer-stage {
  position: relative;
  min-height: calc(100vh - 36px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.72), transparent 32%),
    linear-gradient(160deg, #eef2f8, #d9e1ed 58%, #c2cddb);
}

#viewer-canvas {
  width: 100%;
  height: min(72vh, 880px);
  min-height: 56vh;
}

.technical-sheet {
  padding: 22px;
  background: rgba(255, 248, 236, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.technical-head {
  margin-bottom: 14px;
}

.technical-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 16px;
}

.technical-grid.technical-grid-single {
  grid-template-columns: 1fr;
}

.drawing-card {
  margin: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fffefc;
  padding: 14px;
}

.drawing-card img {
  width: 100%;
  display: block;
}

.dimensions-table {
  display: grid;
  gap: 12px;
}

.dimensions-table div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(67, 50, 24, 0.18);
  color: var(--muted);
}

.dimensions-table strong {
  color: var(--text);
}

.dimensions-table span {
  white-space: nowrap;
  flex: 0 0 auto;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.viewer-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.viewer-title-row h1 {
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 0.95;
}

.icon-button {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #c28e2f, #8a5b24);
  color: #fff8ef;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@media (max-width: 860px) {
  .viewer-shell {
    grid-template-columns: 1fr;
  }

  #viewer-canvas {
    min-height: 50vh;
  }

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