:root {
  --ink: #101716;
  --ink-soft: #18211f;
  --ink-lift: #202c29;
  --paper: #e8dfc8;
  --paper-dim: #b8ad93;
  --gold: #d9ad58;
  --gold-bright: #f0cc7a;
  --vermilion: #b84b36;
  --moss: #6f8b69;
  --line: rgba(232, 223, 200, 0.16);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", "Times New Roman", serif;
  --sans: "BIZ UDPGothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 73% -10%, rgba(184, 75, 54, 0.17), transparent 32rem),
    radial-gradient(circle at 9% 120%, rgba(111, 139, 105, 0.15), transparent 38rem),
    linear-gradient(145deg, #0d1312 0%, #141d1b 54%, #0d1413 100%);
  font-family: var(--sans);
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: soft-light;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.035) 0, rgba(0,0,0,.035) 1px, transparent 1px, transparent 5px);
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 18, 17, 0.83);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.identity {
  display: flex;
  align-items: center;
  gap: 15px;
}

.seal {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  font-family: var(--serif);
  font-size: 27px;
  color: #fff1d0;
  background: var(--vermilion);
  border: 1px solid #d8755f;
  box-shadow: inset 0 0 0 4px rgba(75, 12, 7, 0.18), 0 8px 24px rgba(0, 0, 0, .28);
  transform: rotate(-2deg);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.identity h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 600;
  letter-spacing: .09em;
}

.identity h1 span {
  color: var(--paper-dim);
  font-family: var(--sans);
  font-size: .42em;
  font-weight: 500;
  letter-spacing: .14em;
  vertical-align: middle;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.archive-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(184, 75, 54, .46);
  padding: 8px 12px;
  color: #eadcc1;
  background: rgba(184, 75, 54, .08);
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  transition: .18s ease;
}

.archive-link > span[aria-hidden] {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 75, 54, .64);
  color: #e3ac86;
  font-family: var(--serif);
  font-size: 13px;
}

.archive-link:hover,
.archive-link:focus-visible {
  border-color: var(--vermilion);
  color: #fff0d1;
  background: rgba(184, 75, 54, .17);
  outline: none;
}

.view-switch {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  border: 1px solid rgba(232, 223, 200, .16);
  background: rgba(0, 0, 0, .16);
}

.view-switch button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid rgba(232, 223, 200, .12);
  padding: 8px 12px;
  color: #8c968e;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .06em;
  white-space: nowrap;
}

.view-switch button:last-child {
  border-right: 0;
}

.view-switch button:hover,
.view-switch button:focus-visible {
  color: var(--paper);
  outline: none;
}

.view-switch button.active {
  color: #fff0c8;
  background: linear-gradient(135deg, rgba(184, 75, 54, .32), rgba(217, 173, 88, .12));
  box-shadow: inset 0 -2px 0 var(--gold);
}

.progress-block {
  min-width: 180px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 12px;
  align-items: end;
}

.progress-label {
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: .18em;
}

.progress-block strong {
  text-align: right;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 18px;
}

.progress-track {
  grid-column: 1 / -1;
  height: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.1);
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--vermilion), var(--gold-bright));
  box-shadow: 0 0 12px var(--gold);
  transition: width .7s ease;
}

.variant-progress-block {
  min-width: 158px;
}

.variant-track i {
  background: linear-gradient(90deg, var(--moss), var(--gold-bright));
}

.copy-summary-button {
  min-height: 42px;
  border: 1px solid rgba(217, 173, 88, .42);
  padding: 9px 14px;
  color: #f4e8cb;
  background: rgba(217, 173, 88, .08);
  cursor: pointer;
  transition: .18s ease;
}

.copy-summary-button:hover,
.copy-summary-button:focus-visible {
  background: rgba(217, 173, 88, .18);
  border-color: var(--gold);
  outline: none;
}

.atlas-shell {
  width: min(1900px, 100%);
  min-height: calc(100vh - 125px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(560px, 1fr) minmax(330px, 410px);
}

.area-rail,
.detail-panel {
  background: rgba(14, 21, 20, .77);
}

.area-rail {
  border-right: 1px solid var(--line);
  padding: 22px 14px;
}

.rail-heading,
.strip-heading,
.review-heading,
.location-id-row,
.panel-navigation,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rail-heading {
  padding: 0 8px 14px;
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: .16em;
}

.rail-heading strong {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 19px;
}

.area-list {
  display: grid;
  gap: 3px;
}

.area-button {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 8px;
  text-align: left;
  color: #9c9f95;
  background: transparent;
  cursor: default;
}

.area-button.active {
  color: var(--paper);
  border-color: rgba(217, 173, 88, .32);
  background: linear-gradient(90deg, rgba(184, 75, 54, .18), rgba(217, 173, 88, .04));
}

.area-number {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 16px;
}

.area-name {
  font-size: 12px;
  line-height: 1.35;
}

.area-count {
  font-size: 10px;
  color: #727b74;
}

.area-button.active .area-count {
  color: var(--gold-bright);
}

body[data-view-mode="variants"] .area-count,
body[data-view-mode="variants"] .location-card-review {
  color: #9fc19a;
}

.review-guide {
  margin: 24px 6px 0;
  padding: 16px 14px 13px;
  border-left: 2px solid var(--vermilion);
  background: rgba(255,255,255,.025);
}

.guide-kicker {
  margin-bottom: 9px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
}

.review-guide ol {
  margin: 0;
  padding-left: 1.25em;
  color: var(--paper-dim);
  font-size: 11px;
  line-height: 1.9;
}

.map-column {
  min-width: 0;
  padding: 24px;
}

.map-header {
  min-height: 55px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.map-header h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 38px);
  font-weight: 500;
  letter-spacing: .06em;
}

.map-legend {
  display: flex;
  gap: 14px;
  color: var(--paper-dim);
  font-size: 10px;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
}

.legend-dot.complete {
  background: var(--gold);
  box-shadow: 0 0 9px rgba(217, 173, 88, .6);
}

.legend-dot.queued {
  border: 1px solid #626d67;
}

.map-stage {
  min-height: 500px;
  height: min(61vh, 710px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(232, 223, 200, .18);
  box-shadow: var(--shadow);
  isolation: isolate;
  background-color: #26312d;
  background-size: cover;
  background-position: center;
}

.map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(8,13,12,.24), rgba(8,13,12,.72));
}

.map-stage::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(240, 204, 122, .24);
  box-shadow: inset 0 0 70px rgba(0,0,0,.28);
}

.map-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(13,20,18,.65), transparent 30%, transparent 70%, rgba(13,20,18,.55)),
    radial-gradient(circle at 50% 40%, transparent 0 25%, rgba(9,14,13,.32) 80%);
}

.route-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.route-line polyline {
  fill: none;
  stroke: rgba(240, 204, 122, .62);
  stroke-width: .55;
  stroke-dasharray: 1.2 1.8;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(217,173,88,.45));
}

.map-hotspot {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 240, 199, .65);
  border-radius: 50%;
  color: #fff4d7;
  background: rgba(15, 23, 21, .82);
  box-shadow: 0 8px 22px rgba(0,0,0,.32);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 13px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.map-hotspot::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  width: max-content;
  max-width: 132px;
  transform: translateX(-50%);
  padding: 4px 7px;
  color: #f1e7cd;
  background: rgba(10, 16, 15, .84);
  border: 1px solid rgba(232, 223, 200, .12);
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.3;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.map-hotspot:hover,
.map-hotspot:focus-visible,
.map-hotspot.active {
  transform: translate(-50%, -50%) scale(1.13);
  background: var(--vermilion);
  border-color: #f0c8a2;
  box-shadow: 0 0 0 5px rgba(184, 75, 54, .2), 0 12px 28px rgba(0,0,0,.42);
  outline: none;
}

.map-hotspot:hover::after,
.map-hotspot:focus-visible::after,
.map-hotspot.active::after {
  opacity: 1;
}

.map-hotspot.master {
  --size: 47px;
  background: #9d3d2d;
}

.map-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 21px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(244, 232, 203, .78);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .13em;
  pointer-events: none;
}

.map-caption i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(232,223,200,.2), rgba(217,173,88,.72), rgba(232,223,200,.2));
}

.location-strip-wrap {
  margin-top: 16px;
}

.strip-heading {
  margin-bottom: 8px;
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: .14em;
}

.strip-heading strong {
  color: var(--gold);
  font-weight: 600;
}

.location-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.location-card {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
  text-align: left;
  color: var(--paper);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.location-card:hover,
.location-card:focus-visible,
.location-card.active {
  transform: translateY(-2px);
  border-color: rgba(217, 173, 88, .72);
  background: rgba(217, 173, 88, .08);
  outline: none;
}

.location-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: #29342f;
}

.location-card-copy {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  gap: 2px 8px;
  padding: 7px 8px;
}

.location-card-number {
  grid-row: 1 / 3;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 17px;
}

.location-card-name {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-card-review {
  color: #7f8d84;
  font-size: 8px;
  letter-spacing: .08em;
}

.location-card-review.approved { color: #8fc08c; }
.location-card-review.revise { color: #e07863; }
.location-card-review.hold { color: #d4b568; }

.detail-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 24px 20px 18px;
  position: sticky;
  top: 88px;
  height: calc(100vh - 88px);
  overflow-y: auto;
}

.detail-image-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(232, 223, 200, .18);
  background: #26312d;
  cursor: zoom-in;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}

.detail-image-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.detail-image-button img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  transition: transform .35s ease;
}

.detail-image-button:hover img {
  transform: scale(1.025);
}

.zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  color: #fff4d7;
  background: rgba(10,16,15,.78);
  font-size: 9px;
}

.detail-copy {
  padding: 20px 2px 16px;
  border-bottom: 1px solid var(--line);
}

.location-id-row {
  gap: 12px;
  margin-bottom: 10px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .1em;
}

.status-chip {
  padding: 3px 6px;
  color: #9db299;
  border: 1px solid rgba(111,139,105,.35);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .08em;
}

.detail-copy h2 {
  margin-bottom: 9px;
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: .04em;
}

.detail-copy > p {
  margin-bottom: 16px;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 1.75;
}

.variant-plan-box {
  padding: 18px 2px 4px;
  border-bottom: 1px solid var(--line);
}

.variant-plan-heading,
.variant-profile-row,
.variant-recipe-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.variant-plan-heading {
  align-items: flex-end;
  margin-bottom: 10px;
}

.variant-plan-heading .eyebrow {
  margin-bottom: 5px;
}

.variant-plan-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .04em;
}

.variant-plan-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.variant-plan-actions > strong {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.variant-plan-actions button {
  min-height: 28px;
  padding: 5px 9px;
  color: #ded5bd;
  border: 1px solid rgba(217, 173, 88, .28);
  background: rgba(217, 173, 88, .08);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.variant-plan-actions button:disabled {
  color: #777b72;
  border-color: rgba(232, 223, 200, .1);
  background: rgba(255,255,255,.02);
  cursor: default;
}

.variant-profile-row {
  margin-bottom: 10px;
  padding: 8px 9px;
  border-left: 2px solid var(--moss);
  background: rgba(111, 139, 105, .09);
  color: #b8c9b3;
  font-size: 9px;
  line-height: 1.4;
}

.variant-profile-row span:first-child {
  color: #e3dcc6;
  font-family: var(--serif);
  font-size: 12px;
}

.variant-guardrails {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.variant-guardrails p {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  margin: 0;
  color: #8f998f;
  font-size: 9px;
  line-height: 1.55;
}

.variant-guardrails b {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .08em;
}

.variant-coverage {
  margin-bottom: 12px;
  padding: 9px;
  border: 1px solid rgba(111, 139, 105, .2);
  background: rgba(111, 139, 105, .055);
}

.variant-coverage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #9cac9f;
  font-size: 9px;
  letter-spacing: .06em;
}

.variant-coverage-heading strong {
  color: #b9d4b4;
  font-family: var(--serif);
  font-size: 11px;
}

.variant-coverage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.variant-coverage-list span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  color: #b7c6b4;
  border: 1px solid rgba(125, 165, 120, .2);
  background: rgba(111, 139, 105, .09);
  font-size: 8px;
  white-space: nowrap;
}

.variant-coverage-list i {
  color: #8fc08c;
  font-style: normal;
}

.variant-coverage-list .missing {
  color: #f0b7a8;
  border-color: rgba(184, 75, 54, .35);
  background: rgba(184, 75, 54, .11);
}

.variant-coverage-list .missing i {
  color: #e07863;
}

.variant-recipe-list {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
}

.variant-recipe-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(232, 223, 200, .13);
  border-left: 3px solid #7e8a82;
  padding: 11px;
  background:
    linear-gradient(130deg, rgba(255,255,255,.035), transparent 70%),
    rgba(5, 10, 9, .18);
}

.variant-recipe-card.priority-a {
  border-left-color: var(--vermilion);
}

.variant-recipe-card.priority-b {
  border-left-color: var(--gold);
}

.variant-recipe-card.priority-c {
  border-left-color: #6f8177;
}

.variant-recipe-card.complete {
  border-color: rgba(125, 165, 120, .28);
  border-left-color: #8fb784;
}

.variant-recipe-card.active {
  box-shadow: inset 0 0 0 1px rgba(217, 173, 88, .55);
  background:
    linear-gradient(130deg, rgba(217,173,88,.09), transparent 70%),
    rgba(5, 10, 9, .24);
}

.variant-recipe-meta {
  justify-content: flex-start;
  margin-bottom: 7px;
  color: #748077;
  font-size: 8px;
  letter-spacing: .06em;
}

.priority-badge {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  color: #fff0d0;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(184,75,54,.32);
  font-family: var(--serif);
  font-size: 11px;
}

.priority-b .priority-badge {
  color: #f6dfa5;
  background: rgba(217,173,88,.18);
}

.priority-c .priority-badge {
  color: #c6d0c8;
  background: rgba(111,139,105,.16);
}

.variant-id {
  color: #a6a995;
}

.variant-status {
  margin-left: auto;
  color: #72906f;
}

.variant-recipe-card.complete .variant-status {
  color: #a9d39e;
}

.variant-recipe-card h4 {
  margin: 0 0 9px;
  color: #eee2c6;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.variant-preview-button {
  width: 100%;
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 9px;
  margin: 0 0 9px;
  padding: 5px;
  color: #d9d1bb;
  border: 1px solid rgba(232, 223, 200, .12);
  background: rgba(0, 0, 0, .18);
  font: inherit;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}

.variant-preview-button:hover,
.variant-preview-button:focus-visible,
.variant-preview-button[aria-pressed="true"] {
  color: #fff0d0;
  border-color: rgba(217, 173, 88, .55);
  background: rgba(217, 173, 88, .1);
  outline: none;
}

.variant-preview-button img {
  width: 118px;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.12);
}

.variant-axis-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 9px;
}

.variant-axis-list span {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px;
  padding: 4px 5px;
  color: #bcb6a4;
  border: 1px solid rgba(232,223,200,.08);
  background: rgba(255,255,255,.018);
  font-size: 8px;
  line-height: 1.35;
}

.variant-axis-list b {
  color: #7e8b81;
  font-weight: 500;
}

.variant-direction,
.variant-use {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 7px;
  margin: 0;
  color: #ada995;
  font-size: 9px;
  line-height: 1.55;
}

.variant-direction {
  margin-bottom: 4px;
}

.variant-direction b,
.variant-use b {
  color: var(--gold);
  font-weight: 600;
}

body[data-view-mode="base"] .variant-plan-box,
body[data-view-mode="variants"] .base-review-only {
  display: none;
}

.check-focus {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px;
  background: rgba(184,75,54,.08);
  border-left: 2px solid var(--vermilion);
}

.check-focus span {
  color: var(--vermilion);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.check-focus p {
  margin: 0;
  color: #d8cfb8;
  font-size: 11px;
  line-height: 1.7;
}

.review-box {
  padding: 17px 2px;
  border-bottom: 1px solid var(--line);
}

.review-heading {
  gap: 12px;
  margin-bottom: 11px;
}

.review-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.review-heading span {
  color: #6f7972;
  font-size: 8px;
}

.review-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.review-actions button {
  min-height: 38px;
  border: 1px solid rgba(232,223,200,.16);
  color: #c7c0ad;
  background: rgba(255,255,255,.025);
  cursor: pointer;
}

.review-actions button:hover,
.review-actions button:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.review-actions button.active[data-review="approved"] {
  color: #dff0d7;
  border-color: #7fa47a;
  background: rgba(111,139,105,.24);
}

.review-actions button.active[data-review="revise"] {
  color: #ffd8ce;
  border-color: #c8634c;
  background: rgba(184,75,54,.24);
}

.review-actions button.active[data-review="hold"] {
  color: #f8e8ba;
  border-color: #c4a24f;
  background: rgba(217,173,88,.18);
}

.note-label {
  display: block;
  margin: 13px 0 6px;
  color: var(--paper-dim);
  font-size: 9px;
  letter-spacing: .08em;
}

#review-note {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(232,223,200,.15);
  padding: 10px;
  color: var(--paper);
  background: rgba(0,0,0,.18);
  font-size: 11px;
  line-height: 1.6;
}

#review-note:focus {
  border-color: var(--gold);
  outline: none;
}

.panel-navigation {
  gap: 8px;
  padding-top: 14px;
}

.panel-navigation button,
.viewer-actions button {
  min-height: 36px;
  border: 1px solid rgba(232,223,200,.14);
  padding: 7px 10px;
  color: var(--paper-dim);
  background: transparent;
  cursor: pointer;
}

.panel-navigation button:hover,
.panel-navigation button:focus-visible,
.viewer-actions button:hover,
.viewer-actions button:focus-visible {
  color: var(--gold-bright);
  border-color: var(--gold);
  outline: none;
}

#detail-position {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
}

.footer {
  min-height: 37px;
  padding: 8px 28px;
  border-top: 1px solid var(--line);
  color: #657069;
  background: #0b1110;
  font-size: 9px;
  letter-spacing: .12em;
}

.footer a {
  color: #7d867f;
  text-decoration: none;
  transition: color .18s ease;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--gold);
  outline: none;
}

.image-viewer {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--paper);
  background: #080d0c;
}

.image-viewer::backdrop {
  background: rgba(0,0,0,.92);
}

.viewer-chrome {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #0d1413;
}

.viewer-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.viewer-title span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  white-space: nowrap;
}

.viewer-title strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.viewer-actions span {
  min-width: 48px;
  color: var(--paper-dim);
  text-align: center;
  font-size: 10px;
}

.viewer-canvas {
  height: calc(100vh - 62px);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.015) 25%, transparent 25% 75%, rgba(255,255,255,.015) 75%),
    linear-gradient(45deg, rgba(255,255,255,.015) 25%, transparent 25% 75%, rgba(255,255,255,.015) 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
}

.viewer-canvas img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  transform: translate(-50%, 18px);
  padding: 10px 15px;
  color: #142016;
  background: #e7d49c;
  box-shadow: 0 12px 36px rgba(0,0,0,.42);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 1280px) {
  .atlas-shell {
    grid-template-columns: 190px minmax(500px, 1fr) 340px;
  }

  .area-name {
    font-size: 11px;
  }

  .map-column {
    padding: 18px;
  }

  .location-strip {
    grid-template-columns: repeat(5, minmax(105px, 1fr));
  }

  .variant-progress-block {
    display: none;
  }
}

@media (max-width: 1040px) {
  .topbar {
    position: relative;
  }

  .atlas-shell {
    display: block;
  }

  .area-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 18px;
  }

  .rail-heading,
  .review-guide {
    display: none;
  }

  .area-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .area-button {
    min-width: 178px;
  }

  .map-stage {
    height: 62vw;
    min-height: 430px;
    max-height: 650px;
  }

  .detail-panel {
    position: relative;
    top: auto;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(260px, .8fr) 1fr;
    gap: 18px;
  }

  .variant-plan-box {
    align-self: start;
  }

  .detail-image-button {
    grid-row: 1 / 4;
  }
}

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .seal {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 22px;
  }

  .identity h1 span,
  .progress-block {
    display: none;
  }

  .topbar-actions {
    gap: 7px;
  }

  .archive-link {
    min-width: 42px;
    padding: 8px;
  }

  .archive-link > span:last-child {
    display: none;
  }

  .view-switch button {
    min-height: 40px;
    padding-inline: 9px;
    font-size: 9px;
  }

  .view-switch button:first-child {
    min-width: 58px;
  }

  .view-switch button:last-child {
    min-width: 52px;
  }

  .copy-summary-button {
    min-width: 42px;
    padding: 8px 10px;
    font-size: 0;
  }

  .copy-summary-button > span[aria-hidden] {
    font-size: 18px;
  }

  .copy-summary-button .copy-label {
    display: none;
  }

  .map-column {
    padding: 15px 12px;
  }

  .map-header {
    align-items: start;
  }

  .map-legend {
    display: none;
  }

  .map-stage {
    height: 78vw;
    min-height: 410px;
  }

  .map-hotspot {
    --size: 36px;
  }

  .map-hotspot.master {
    --size: 42px;
  }

  .map-hotspot::after {
    display: none;
  }

  .location-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }

  .location-card {
    min-width: 154px;
    scroll-snap-align: start;
  }

  .detail-panel {
    display: block;
    padding: 18px 14px;
  }

  .detail-copy h2 {
    font-size: 24px;
  }

  .variant-axis-list {
    grid-template-columns: 1fr;
  }

  .variant-profile-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .footer {
    padding-inline: 14px;
  }

  .viewer-chrome {
    align-items: flex-start;
    padding: 9px 10px;
  }

  .viewer-title {
    display: grid;
    gap: 2px;
  }

  .viewer-title strong {
    max-width: 40vw;
    font-size: 13px;
  }

  #viewer-position {
    display: none;
  }

  .viewer-canvas {
    padding: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

