:root {
  color-scheme: light;
  font-family: Inter, "Avenir Next", "Segoe UI", "Noto Sans JP", system-ui, sans-serif;
  background: #f4f1eb;
  color: #252a30;
  --bg: #f4f1eb;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-soft: rgba(248, 246, 241, 0.96);
  --line: rgba(45, 50, 56, 0.12);
  --line-strong: rgba(45, 50, 56, 0.22);
  --text: #252a30;
  --muted: #68717b;
  --accent: #98764a;
  --accent-strong: #72532f;
  --warm: #a9875a;
  --danger: #a14f43;
  --shadow: 0 1.5rem 4rem rgba(55, 48, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 12% 10%, rgba(169, 135, 90, 0.12), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(111, 126, 139, 0.08), transparent 30rem),
    linear-gradient(180deg, #faf8f4 0%, #f4f1eb 48%, #eeebe4 100%);
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
model-viewer:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(50, 54, 58, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50, 54, 58, 0.025) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.page-shell {
  width: min(100% - 3rem, 90rem);
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
  padding: 0.65rem 0 1.3rem;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  border: 1px solid rgba(152, 118, 74, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  place-items: center;
}

.company-name,
.company-service,
.delivery-badge,
.hero-eyebrow,
.section-kicker,
.card-kicker,
.site-footer p,
.viewer-help span {
  margin: 0;
}

.company-name {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.company-service {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.045em;
}

.delivery-badge,
.calibration-badge,
.version-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.35rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-content {
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.protected-project-layout {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.4rem);
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.75fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: stretch;
  min-width: 0;
}

.project-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.hero-eyebrow,
.section-kicker,
.card-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-weight: 530;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 18ch;
  margin-top: 0.85rem;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.98;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.12;
}

h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.hero-description {
  max-width: 58rem;
  margin: 1.25rem 0 0;
  color: #505a64;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.hero-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 56rem;
  margin-top: clamp(1.7rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-meta-strip > div {
  min-width: 0;
  padding: 1rem 1rem 1rem 0;
}

.hero-meta-strip > div + div {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.hero-meta-strip span,
.metadata-row dt,
.measurement-controls label {
  display: block;
  color: #7b838c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-meta-strip strong {
  display: block;
  margin-top: 0.38rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 520;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hero-thumbnail {
  position: relative;
  min-height: 19rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background:
    linear-gradient(145deg, rgba(152, 118, 74, 0.10), rgba(111, 126, 139, 0.06)),
    #e8e4dc;
  box-shadow: var(--shadow);
}

.hero-thumbnail::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.thumbnail-empty {
  position: absolute;
  inset: 0;
  display: grid;
  margin: 0;
  color: #7d858d;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  place-items: center;
  text-transform: uppercase;
}

.thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 19rem;
  object-fit: cover;
}

.viewer-panel,
.information-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.viewer-header,
.card-heading-row,
.measurement-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.viewer-header {
  padding: 1.1rem clamp(1rem, 2.5vw, 1.6rem);
  border-bottom: 1px solid var(--line);
}

.viewer-header h2,
.card-heading-row h2,
.delivery-card h2 {
  margin-top: 0.28rem;
}

.viewer-status {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.viewer-status::before {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.48rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0.8rem rgba(152, 118, 74, 0.34);
  content: "";
}

.viewer-stage {
  position: relative;
  min-height: clamp(25rem, 64vw, 49rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(172, 190, 196, 0.12), transparent 28rem),
    linear-gradient(180deg, #273038 0%, #151a1f 100%);
}

.viewer-placeholder {
  display: block;
  width: 100%;
  height: clamp(25rem, 64vw, 49rem);
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: var(--accent);
  --progress-mask: transparent;
}

.viewer-message {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  margin: 0;
  padding: 2rem;
  background: rgba(11, 15, 18, 0.68);
  color: var(--muted);
  font-weight: 600;
  place-items: center;
  text-align: center;
  backdrop-filter: blur(8px);
}

.viewer-help {
  position: absolute;
  right: 1rem;
  bottom: 0.9rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.42rem;
  max-width: calc(100% - 2rem);
  pointer-events: none;
}

.viewer-help span {
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(8, 12, 14, 0.64);
  color: #aeb9bb;
  font-size: 0.66rem;
  backdrop-filter: blur(8px);
}

.measurement-overlay,
.measurement-label-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.measurement-overlay line {
  stroke: #e8d4b4;
  stroke-width: 2;
  stroke-dasharray: 6 4;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.75));
}

.measurement-label {
  position: absolute;
  min-width: max-content;
  transform: translate(-50%, -50%);
  padding: 0.34rem 0.55rem;
  border: 1px solid rgba(232, 212, 180, 0.46);
  border-radius: 999px;
  background: rgba(9, 14, 16, 0.88);
  color: #f6e8d0;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.28);
}

.measurement-hotspot {
  width: 0.78rem;
  height: 0.78rem;
  padding: 0;
  border: 2px solid #f7ffff;
  border-radius: 50%;
  background: #b89562;
  box-shadow: 0 0 0 0.28rem rgba(184, 149, 98, 0.24), 0 0 1rem rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.measurement-hotspot.pending {
  animation: pulse-marker 1.2s ease-in-out infinite;
}

@keyframes pulse-marker {
  50% {
    box-shadow: 0 0 0 0.55rem rgba(184, 149, 98, 0.10), 0 0 1rem rgba(0, 0, 0, 0.7);
  }
}

.viewer-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 23, 28, 0.96);
}

.view-presets,
.command-actions,
.measurement-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-button,
.text-button,
.primary-button,
.view-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tool-button,
.view-button {
  min-height: 2.25rem;
  padding: 0.48rem 0.72rem;
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 620;
}

.tool-button:hover:not(:disabled),
.view-button:hover:not(:disabled),
.tool-button[aria-pressed="true"],
.view-button[aria-current="true"] {
  border-color: rgba(218, 190, 147, 0.62);
  background: rgba(218, 190, 147, 0.16);
  color: var(--accent-strong);
}

.tool-button:active:not(:disabled),
.view-button:active:not(:disabled),
.primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.tool-button:disabled,
.text-button:disabled,
.primary-button:disabled,
.view-button:disabled,
.measurement-unit:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.viewer-command-bar .tool-button,
.viewer-command-bar .view-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #eef2f3;
}

.viewer-command-bar .tool-button:hover:not(:disabled),
.viewer-command-bar .view-button:hover:not(:disabled),
.viewer-command-bar .tool-button[aria-pressed="true"],
.viewer-command-bar .view-button[aria-current="true"] {
  border-color: rgba(232, 212, 180, 0.66);
  background: rgba(232, 212, 180, 0.16);
  color: #f6e8d0;
}

.viewer-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.78fr);
  gap: 0;
}

.viewer-panel.public-demo-measurement-hidden .viewer-support-grid {
  grid-template-columns: minmax(0, 1fr);
}

.viewer-panel.public-demo-measurement-hidden .viewer-guide {
  border-right: 0;
}

.viewer-guide,
.measurement-panel {
  padding: clamp(1.1rem, 3vw, 1.65rem);
}

.viewer-guide {
  border-right: 1px solid var(--line);
}

.viewer-guide h3,
.measurement-panel h3 {
  margin-top: 0.3rem;
}

.viewer-guide p:last-child,
.measurement-status,
.measurement-disclaimer,
.documents-empty,
.files-empty {
  color: var(--muted);
  line-height: 1.65;
}

.viewer-guide p:last-child {
  max-width: 48rem;
  margin: 0.75rem 0 0;
}

.calibration-badge[data-state="verified"] {
  border-color: rgba(76, 139, 104, 0.34);
  color: #3d815b;
}

.calibration-badge[data-state="unverified"] {
  border-color: rgba(161, 79, 67, 0.25);
  color: var(--danger);
}

.measurement-status {
  margin: 0.8rem 0 0;
  font-size: 0.84rem;
}

.measurement-controls {
  margin-top: 0.9rem;
}

.measurement-unit {
  min-height: 2.1rem;
  padding: 0.34rem 1.8rem 0.34rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--text);
}

.text-button {
  min-height: 2.1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
}

.text-button:hover:not(:disabled) {
  border-color: rgba(152, 118, 74, 0.46);
  color: var(--accent-strong);
}

.measurement-empty {
  margin: 1rem 0 0;
  color: #7b838c;
  font-size: 0.8rem;
}

.measurement-list {
  display: grid;
  gap: 0.45rem;
  max-height: 11rem;
  margin: 1rem 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.measurement-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: rgba(248, 246, 241, 0.82);
}

.measurement-index {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
}

.measurement-values {
  min-width: 0;
  color: #4f5963;
  font-size: 0.76rem;
  line-height: 1.45;
}

.measurement-values strong {
  color: var(--text);
}

.measurement-disclaimer {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.69rem;
}

.delivery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 0.85fr);
  gap: 1rem;
}

.information-card {
  padding: clamp(1.1rem, 3vw, 1.65rem);
}

.version-chip {
  color: var(--accent);
}

.project-metadata {
  margin: 1rem 0 0;
}

.metadata-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8rem) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--line);
}

.metadata-row:last-child {
  border-bottom: 0;
}

.metadata-row dd {
  min-width: 0;
  margin: 0;
  color: #3d454d;
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.documents-empty,
.files-empty {
  margin: 1rem 0 0;
  font-size: 0.84rem;
}

.delivery-list {
  display: grid;
  gap: 0.62rem;
  margin-top: 1rem;
}

.delivery-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.72rem;
  align-items: center;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: rgba(248, 246, 241, 0.82);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.delivery-item:hover {
  border-color: rgba(152, 118, 74, 0.34);
  background: rgba(152, 118, 74, 0.08);
  transform: translateY(-1px);
}

.delivery-item-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: rgba(152, 118, 74, 0.10);
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 700;
  place-items: center;
}

.delivery-item-name {
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.delivery-item-action {
  color: var(--muted);
  font-size: 0.7rem;
}

.access-card {
  width: min(100%, 34rem);
  margin: clamp(2rem, 8vh, 6rem) auto;
  padding: clamp(1.4rem, 5vw, 2.5rem);
}

.access-heading {
  max-width: 12ch;
  margin-top: 0.65rem;
  font-size: clamp(2rem, 7vw, 3.6rem);
}

.access-description {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.access-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.access-label {
  color: #505a64;
  font-size: 0.78rem;
  font-weight: 650;
}

.access-input {
  width: 100%;
  min-width: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.65rem;
  background: #ffffff;
  color: var(--text);
}

.access-input:focus-visible {
  border-color: rgba(152, 118, 74, 0.58);
}

.access-turnstile {
  min-height: 65px;
  max-width: 100%;
  overflow: hidden;
}

.primary-button {
  justify-self: start;
  min-height: 2.65rem;
  padding: 0.7rem 1rem;
  border-radius: 0.62rem;
  background: #72532f;
  color: #ffffff;
  font-weight: 750;
}

.primary-button:hover:not(:disabled) {
  background: #5f4528;
}

.access-message {
  min-height: 1.5rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  color: #78818a;
  font-size: 0.7rem;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1100px) {
  .project-hero {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.58fr);
  }

  .delivery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-information-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 1.5rem, 90rem);
  }

  .project-hero,
  .viewer-support-grid,
  .delivery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-thumbnail {
    min-height: 15rem;
  }

  .thumbnail-image {
    min-height: 15rem;
    max-height: 26rem;
  }

  .viewer-guide {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .viewer-command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .view-presets,
  .command-actions {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 1rem, 90rem);
    padding-top: 0.75rem;
  }

  .site-header {
    align-items: flex-start;
  }

  .delivery-badge {
    display: none;
  }

  .page-content {
    padding: 1.6rem 0 2.4rem;
  }

  h1 {
    font-size: clamp(2.3rem, 13vw, 4.2rem);
  }

  .hero-meta-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-meta-strip > div,
  .hero-meta-strip > div + div {
    padding: 0.78rem 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-meta-strip > div:last-child {
    border-bottom: 0;
  }

  .viewer-stage,
  .viewer-placeholder {
    min-height: 24rem;
    height: 70vh;
    max-height: 42rem;
  }

  .viewer-help {
    display: none;
  }

  .view-presets,
  .command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-button,
  .view-button {
    width: 100%;
  }

  .measurement-panel-heading,
  .card-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .metadata-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .site-footer {
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}

/* ==========================================================================
   Readability profile — local business and senior-friendly client delivery
   ========================================================================== */

html {
  font-size: 17px;
}

body {
  font-size: 1rem;
  line-height: 1.7;
}

.company-name {
  font-size: 0.94rem;
  letter-spacing: 0.11em;
}

.company-service {
  font-size: 0.9rem;
  line-height: 1.55;
}

.delivery-badge,
.calibration-badge,
.version-chip {
  min-height: 2.45rem;
  padding: 0.48rem 0.85rem;
  font-size: 0.84rem;
  letter-spacing: 0.035em;
  text-transform: none;
}

.hero-eyebrow,
.section-kicker,
.card-kicker {
  font-size: 0.86rem;
  letter-spacing: 0.1em;
}

h3 {
  font-size: 1.16rem;
  line-height: 1.5;
}

.hero-description,
.viewer-guide p:last-child,
.access-description,
.measurement-status,
.documents-empty,
.files-empty,
.access-message {
  font-size: 1rem;
}

.hero-meta-strip span,
.metadata-row dt,
.measurement-controls label {
  font-size: 0.84rem;
  letter-spacing: 0.065em;
  text-transform: none;
}

.hero-meta-strip strong {
  font-size: 1rem;
  line-height: 1.6;
}

.viewer-status {
  font-size: 0.94rem;
}

.viewer-help span {
  padding: 0.48rem 0.72rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

.measurement-label {
  padding: 0.48rem 0.72rem;
  font-size: 0.92rem;
}

.tool-button,
.view-button {
  min-height: 3rem;
  padding: 0.72rem 0.95rem;
  font-size: 1rem;
  line-height: 1.25;
}

.measurement-unit,
.text-button {
  min-height: 2.85rem;
  font-size: 0.96rem;
}

.measurement-unit {
  padding: 0.55rem 2rem 0.55rem 0.7rem;
}

.text-button {
  padding: 0.58rem 0.75rem;
}

.measurement-empty,
.measurement-values {
  font-size: 0.95rem;
  line-height: 1.65;
}

.measurement-index {
  font-size: 0.88rem;
}

.measurement-list li {
  padding: 0.78rem 0.85rem;
}

.measurement-disclaimer {
  font-size: 0.88rem;
  line-height: 1.7;
}

.metadata-row {
  padding: 0.95rem 0;
}

.metadata-row dd {
  font-size: 1rem;
  line-height: 1.65;
}

.delivery-item {
  min-height: 3.3rem;
  padding: 0.78rem 0.85rem;
}

.delivery-item-icon {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.82rem;
}

.delivery-item-name {
  font-size: 1rem;
  line-height: 1.55;
}

.delivery-item-action {
  font-size: 0.9rem;
}

.access-label {
  font-size: 1rem;
}

.access-input {
  min-height: 3.2rem;
  font-size: 1rem;
}

.primary-button {
  min-height: 3.15rem;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
}

.site-footer {
  font-size: 0.9rem;
  line-height: 1.7;
}

@media (max-width: 620px) {
  html {
    font-size: 17px;
  }

  .tool-button,
  .view-button,
  .text-button,
  .primary-button,
  .measurement-unit {
    min-height: 3.2rem;
  }

  .viewer-status {
    white-space: normal;
  }
}


/* ==========================================================================
   R6 visual refinement — bright studio viewer and larger local-business UI
   ========================================================================== */

html {
  font-size: 18px;
}

.page-shell {
  width: min(100% - 3rem, 86rem);
}

.company-name {
  font-size: 1rem;
}

.company-service {
  font-size: 0.98rem;
  line-height: 1.65;
}

.delivery-badge,
.calibration-badge,
.version-chip {
  font-size: 0.9rem;
}

.hero-eyebrow,
.section-kicker,
.card-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.085em;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
}

h3 {
  font-size: 1.28rem;
  line-height: 1.5;
}

.hero-description,
.viewer-guide p:last-child,
.access-description,
.measurement-status,
.documents-empty,
.files-empty,
.access-message {
  font-size: 1.06rem;
  line-height: 1.75;
}

.hero-meta-strip span,
.metadata-row dt,
.measurement-controls label {
  font-size: 0.94rem;
  letter-spacing: 0.045em;
}

.hero-meta-strip strong {
  font-size: 1.08rem;
  line-height: 1.65;
}

.thumbnail-empty {
  font-size: 0.96rem;
  text-transform: none;
}

.viewer-status {
  font-size: 1rem;
}

.viewer-stage {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96) 0%, rgba(239, 243, 245, 0.88) 34%, transparent 65%),
    linear-gradient(180deg, #dfe5e8 0%, #c8d1d6 58%, #b9c4ca 100%);
}

.viewer-stage::after {
  position: absolute;
  inset: auto 8% 0;
  height: 28%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(66, 79, 88, 0.16), transparent 68%);
  content: \"\";
  pointer-events: none;
  filter: blur(1.2rem);
}

.viewer-placeholder {
  position: relative;
  z-index: 1;
}

.viewer-message {
  background: rgba(236, 241, 243, 0.90);
  color: #46525c;
}

.viewer-help {
  z-index: 5;
}

.viewer-help span {
  padding: 0.55rem 0.78rem;
  border-color: rgba(61, 73, 81, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #37424a;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 0.35rem 1rem rgba(57, 68, 76, 0.10);
}

.measurement-overlay line {
  stroke: #8e6838;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.92));
}

.measurement-label {
  border-color: rgba(126, 91, 48, 0.34);
  background: rgba(255, 255, 255, 0.96);
  color: #5d431f;
  font-size: 1rem;
  box-shadow: 0 0.55rem 1.4rem rgba(62, 72, 80, 0.18);
}

.measurement-hotspot {
  border-color: #ffffff;
  background: #9a7140;
  box-shadow: 0 0 0 0.28rem rgba(154, 113, 64, 0.22), 0 0 1rem rgba(61, 72, 80, 0.35);
}

.viewer-command-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(252, 252, 250, 0.98), rgba(238, 241, 242, 0.98));
}

.tool-button,
.view-button {
  min-height: 3.15rem;
  padding: 0.78rem 1rem;
  font-size: 1.04rem;
}

.viewer-command-bar .tool-button,
.viewer-command-bar .view-button {
  border-color: rgba(55, 66, 74, 0.20);
  background: rgba(255, 255, 255, 0.88);
  color: #2f3941;
  box-shadow: 0 0.22rem 0.7rem rgba(61, 72, 80, 0.06);
}

.viewer-command-bar .tool-button:hover:not(:disabled),
.viewer-command-bar .view-button:hover:not(:disabled),
.viewer-command-bar .tool-button[aria-pressed=\"true\"],
.viewer-command-bar .view-button[aria-current=\"true\"] {
  border-color: rgba(152, 118, 74, 0.48);
  background: rgba(246, 239, 228, 0.94);
  color: #684b29;
}

.measurement-unit,
.text-button {
  min-height: 3rem;
  font-size: 1rem;
}

.measurement-empty,
.measurement-values {
  font-size: 1rem;
}

.measurement-index {
  font-size: 0.95rem;
}

.measurement-disclaimer {
  font-size: 0.95rem;
  line-height: 1.75;
}

.metadata-row dd {
  font-size: 1.08rem;
  line-height: 1.7;
}

.delivery-item {
  min-height: 3.7rem;
  padding: 0.9rem;
}

.delivery-item-icon {
  width: 2.55rem;
  height: 2.55rem;
  font-size: 0.88rem;
}

.delivery-item-name {
  font-size: 1.06rem;
  line-height: 1.6;
}

.delivery-item-action {
  font-size: 0.95rem;
}

.access-label,
.access-input,
.primary-button {
  font-size: 1.05rem;
}

.site-footer {
  font-size: 0.95rem;
}

@media (max-width: 620px) {
  html {
    font-size: 17px;
  }

  .page-shell {
    width: min(100% - 1rem, 86rem);
  }
}

/* Batch 2: project-level multi-scene navigation */
.scene-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem clamp(1rem, 2.5vw, 1.6rem);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(242, 239, 232, 0.92));
}

.scene-navigation[hidden] {
  display: none;
}

.scene-navigation .section-kicker {
  margin: 0;
}

.scene-navigation-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.scene-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.scene-tab {
  min-width: 7.5rem;
  min-height: 3.25rem;
  padding: 0.72rem 1.25rem;
  border: 1px solid #c9c5bd;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #38414a;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: 0.03em;
  box-shadow: 0 0.35rem 1rem rgba(58, 63, 68, 0.06);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.scene-tab:hover {
  border-color: rgba(152, 118, 74, 0.62);
  color: #72532f;
  transform: translateY(-1px);
}

.scene-tab[aria-selected="true"] {
  border-color: #8f7046;
  background: #72532f;
  color: #ffffff;
  box-shadow: 0 0.55rem 1.4rem rgba(114, 83, 47, 0.2);
}

.scene-tab:focus-visible {
  outline: 3px solid rgba(152, 118, 74, 0.28);
  outline-offset: 3px;
}

.viewer-panel[data-scene-loading="true"] .scene-tab {
  cursor: wait;
}

.model-credit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: #606a74;
  font-size: 0.9rem;
  line-height: 1.55;
}

.model-credit[hidden] {
  display: none;
}

.model-credit-label {
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(152, 118, 74, 0.28);
  border-radius: 999px;
  color: #795b36;
  font-size: 0.82rem;
  font-weight: 760;
}

.model-credit a {
  color: #72532f;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

@media (max-width: 820px) {
  .scene-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .scene-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .scene-navigation {
    padding: 0.9rem 1rem;
  }

  .scene-tab {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
    min-height: 3.2rem;
    padding-inline: 0.8rem;
  }

  .scene-navigation-note,
  .model-credit {
    font-size: 0.94rem;
  }
}

/* Local camera calibration panel (visible only on localhost with calibrate=1). */
.camera-calibration-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 2.4vw, 1.75rem);
  border-top: 1px solid rgba(138, 105, 59, 0.18);
  background: #fffaf1;
}

.camera-calibration-panel[hidden] {
  display: none;
}

.camera-calibration-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.camera-calibration-heading h3 {
  margin: 0.25rem 0 0;
  color: #222b33;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.calibration-scene-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(138, 105, 59, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: #725127;
  font-size: 0.95rem;
  font-weight: 700;
}

.camera-calibration-note,
.camera-calibration-status {
  margin: 0;
  color: #5f6870;
  font-size: 1rem;
  line-height: 1.7;
}

.camera-calibration-note code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  background: rgba(138, 105, 59, 0.1);
  color: #66471f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.camera-calibration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.camera-calibration-output {
  width: 100%;
  min-height: 13rem;
  resize: vertical;
  padding: 1rem;
  border: 1px solid #d5d0c7;
  border-radius: 0.85rem;
  background: #1f252b;
  color: #f7f2e8;
  font: 0.95rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.camera-calibration-output:focus-visible {
  outline: 3px solid rgba(138, 105, 59, 0.26);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .camera-calibration-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .calibration-scene-chip {
    align-self: flex-start;
  }

  .camera-calibration-actions > * {
    width: 100%;
  }
}

/* MVP B2B contextual measurement guidance */
.measurement-list li.is-editing {
  border-color: rgba(152, 118, 74, 0.34);
  background: rgba(250, 247, 240, 0.96);
}

.measurement-edit-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.measurement-edit-guide {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.7rem;
  margin-top: 0.1rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(152, 118, 74, 0.22);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
}

.measurement-edit-guide-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.measurement-edit-guide-heading strong {
  color: var(--text);
  font-size: 0.82rem;
}

.measurement-edit-guide-heading span {
  color: var(--muted);
  font-size: 0.7rem;
}

.measurement-edit-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.measurement-confirm-button {
  border-color: rgba(152, 118, 74, 0.54);
  background: rgba(218, 190, 147, 0.18);
  color: var(--accent-strong);
}

.measurement-edit-help {
  color: var(--muted);
  font-size: 0.72rem;
}

.measurement-edit-help summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 650;
}

.measurement-edit-help ul {
  display: grid;
  gap: 0.3rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.measurement-edit-help li {
  display: grid;
  grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.measurement-edit-help li span:first-child {
  color: var(--text);
  font-weight: 620;
}

@media (min-width: 821px) {
  .measurement-edit-guide {
    gap: 0.85rem;
    padding: 0.9rem 0.95rem;
  }

  .measurement-edit-guide-heading strong {
    font-size: 1rem;
  }

  .measurement-edit-guide-heading span,
  .measurement-edit-help {
    font-size: 0.88rem;
  }

  .measurement-edit-help li {
    grid-template-columns: minmax(9rem, auto) minmax(0, 1fr);
  }
}

/* MVP B3A professional measurement result clarity */
.measurement-values {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.measurement-metric {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: baseline;
}

.measurement-metric-label {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.measurement-metric-value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.measurement-metric.is-primary .measurement-metric-label,
.measurement-metric.is-primary .measurement-metric-value {
  color: var(--accent-strong);
  font-weight: 700;
}

.measurement-result-help {
  margin: 0.45rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.measurement-result-help summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 650;
}

.measurement-result-help dl {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
  gap: 0.42rem 0.75rem;
  margin: 0.65rem 0 0;
}

.measurement-result-help dt {
  color: var(--text);
  font-weight: 650;
}

.measurement-result-help dd {
  margin: 0;
}

.measurement-clear-cancel[hidden] {
  display: none;
}

.text-button.is-confirming {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (min-width: 821px) {
  .measurement-metric-label,
  .measurement-result-help {
    font-size: 0.86rem;
  }

  .measurement-result-help dl {
    grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr);
  }
}

/* MVP B4C1 guided opening measurement */
.opening-measurement-button[hidden],
.opening-measurement-card[hidden] {
  display: none;
}

.opening-measurement-card {
  margin: 0.85rem 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
}

.opening-measurement-card-heading {
  display: grid;
  gap: 0.18rem;
  margin-bottom: 0.7rem;
}

.opening-measurement-card-heading h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.opening-measurement-body {
  display: grid;
  gap: 0.7rem;
}

.opening-measurement-intro {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.opening-measurement-steps {
  display: grid;
  gap: 0.38rem;
  margin: 0;
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.opening-measurement-steps li[data-state="done"] {
  color: var(--text);
}

.opening-measurement-steps li[data-state="current"] {
  color: var(--accent-strong);
  font-weight: 700;
}

.opening-measurement-values {
  display: grid;
  gap: 0.42rem;
  margin: 0;
}

.opening-measurement-metric {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) auto;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.opening-measurement-metric:last-child {
  border-bottom: 0;
}

.opening-measurement-metric dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.opening-measurement-metric dd {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.opening-measurement-qc {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: var(--surface-soft, var(--surface));
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.opening-measurement-qc strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.opening-measurement-qc ul {
  margin: 0;
  padding-left: 1.2rem;
}

.opening-measurement-qc.has-warning {
  border: 1px solid var(--line);
}

.opening-measurement-hotspot {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--surface);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--accent-strong);
}

.opening-measurement-line {
  stroke: var(--accent-strong);
  stroke-width: 2;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.opening-measurement-label {
  font-weight: 750;
}

@media (min-width: 821px) {
  .opening-measurement-card {
    padding: 1rem;
  }

  .opening-measurement-card-heading h4 {
    font-size: 1.05rem;
  }

  .opening-measurement-intro,
  .opening-measurement-steps,
  .opening-measurement-metric dt,
  .opening-measurement-qc {
    font-size: 0.86rem;
  }

  .opening-measurement-metric dd {
    font-size: 1.08rem;
  }
}

/* MVP B4C2 opening measurement correction and retry */
.opening-measurement-progress {
  margin: -0.15rem 0 0;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.opening-measurement-step-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
}

.opening-measurement-step-row > span {
  min-width: 0;
}

.opening-measurement-steps li[data-state="attention"] {
  color: var(--text);
  font-weight: 700;
}

.opening-measurement-point-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  padding-top: 0.15rem;
}

.opening-measurement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.opening-measurement-inline-warning {
  display: grid;
  gap: 0.4rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface-soft, var(--surface));
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.opening-measurement-inline-warning strong {
  color: var(--text);
}

.opening-measurement-inline-warning .opening-point-edit-button {
  justify-self: start;
}

.opening-measurement-edit-guide {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface-soft, var(--surface));
}

.opening-measurement-edit-guide strong {
  color: var(--text);
  font-size: 0.82rem;
}

.opening-measurement-edit-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.opening-measurement-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.opening-point-edit-button[aria-pressed="true"] {
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

@media (min-width: 821px) {
  .opening-measurement-progress,
  .opening-measurement-inline-warning,
  .opening-measurement-edit-guide p {
    font-size: 0.84rem;
  }

  .opening-measurement-edit-guide strong {
    font-size: 0.9rem;
  }
}

/* Homepage Building DX Embed Mode */
html[data-reiwa-embed="true"],
html[data-reiwa-embed="true"] body {
  min-height: 100%;
}

html[data-reiwa-embed="true"] body {
  margin: 0;
  overflow-x: hidden;
}

html[data-reiwa-embed="true"] .site-header,
html[data-reiwa-embed="true"] .project-hero,
html[data-reiwa-embed="true"] .delivery-grid,
html[data-reiwa-embed="true"] .site-footer {
  display: none !important;
}

html[data-reiwa-embed="true"] main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

html[data-reiwa-embed="true"] .viewer-panel {
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  border-radius: 0;
}

html[data-reiwa-embed="true"] .scene-navigation-note,
html[data-reiwa-embed="true"] .viewer-guide {
  display: none;
}

html[data-reiwa-embed="true"] .camera-calibration-panel {
  display: none !important;
}

html[data-reiwa-embed="true"] .viewer-stage,
html[data-reiwa-embed="true"] .viewer-placeholder {
  min-height: 28rem;
  height: min(68vh, 46rem);
  max-height: none;
}

html[data-reiwa-embed="true"] .viewer-support-grid {
  grid-template-columns: minmax(0, 1fr);
}

html[data-reiwa-embed="true"] .embed-measurement-disclaimer {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid currentColor;
  font-size: 0.78rem;
  line-height: 1.65;
  opacity: 0.72;
}

/*
 * Fullscreen intentionally keeps .viewer-panel as
 * the fullscreen root. This preserves measurement,
 * view presets, reset and other Viewer controls.
 */
html[data-reiwa-embed="true"] .viewer-panel:fullscreen {
  display: grid;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(18rem, 24rem);
  grid-template-rows:
    auto
    auto
    minmax(0, 1fr)
    auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-header {
  grid-column: 1 / -1;
  grid-row: 1;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen .scene-navigation {
  grid-column: 1 / -1;
  grid-row: 2;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-stage {
  grid-column: 1;
  grid-row: 3;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-placeholder {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen model-viewer {
  width: 100%;
  height: 100%;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-command-bar {
  grid-column: 1;
  grid-row: 4;
  min-width: 0;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-support-grid {
  display: block;
  grid-column: 2;
  grid-row: 3 / 5;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-left: 1px solid currentColor;
}

html[data-reiwa-embed="true"] .viewer-panel:fullscreen .measurement-panel {
  min-height: 100%;
}

@media (max-width: 900px) {
  html[data-reiwa-embed="true"] .viewer-stage,
  html[data-reiwa-embed="true"] .viewer-placeholder {
    min-height: 24rem;
    height: 64vh;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows:
      auto
      auto
      minmax(0, 1fr)
      auto
      minmax(9rem, 32vh);
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-header {
    grid-column: 1;
    grid-row: 1;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .scene-navigation {
    grid-column: 1;
    grid-row: 2;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-stage {
    grid-column: 1;
    grid-row: 3;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-command-bar {
    grid-column: 1;
    grid-row: 4;
    overflow-x: auto;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-support-grid {
    grid-column: 1;
    grid-row: 5;
    max-height: 32vh;
    border-top: 1px solid currentColor;
    border-left: 0;
  }
}

/*
 * Short landscape screens such as 844 x 390:
 * keep the model large and move measurement to
 * the right instead of consuming vertical space.
 */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 640px) {
  html[data-reiwa-embed="true"] .viewer-panel:fullscreen {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(17rem, 22rem);
    grid-template-rows:
      auto
      minmax(0, 1fr)
      auto;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-header {
    display: none;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .scene-navigation {
    grid-column: 1;
    grid-row: 1;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-stage {
    grid-column: 1;
    grid-row: 2;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-command-bar {
    grid-column: 1;
    grid-row: 3;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .view-presets,
  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .command-actions {
    display: flex;
    width: max-content;
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .tool-button,
  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .view-button {
    width: auto;
    min-width: max-content;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    flex: 0 0 auto;
  }

  html[data-reiwa-embed="true"] .viewer-panel:fullscreen .viewer-support-grid {
    grid-column: 2;
    grid-row: 1 / 4;
    max-height: none;
    border-top: 0;
    border-left: 1px solid currentColor;
  }

  html[data-reiwa-embed="true"] .scene-navigation-note {
    display: none;
  }
}

/* Only an uncalibrated public demo omits the otherwise empty measurement area. */
html[data-reiwa-embed="true"] .viewer-panel.public-demo-measurement-hidden .viewer-support-grid {
  display: none;
}

html[data-reiwa-embed="true"] .viewer-panel.public-demo-measurement-hidden:fullscreen {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

html[data-reiwa-embed="true"] .viewer-panel.public-demo-measurement-hidden:fullscreen .scene-navigation {
  grid-column: 1;
  grid-row: 2;
}

html[data-reiwa-embed="true"] .viewer-panel.public-demo-measurement-hidden:fullscreen .viewer-stage {
  grid-column: 1;
  grid-row: 3;
}

html[data-reiwa-embed="true"] .viewer-panel.public-demo-measurement-hidden:fullscreen .viewer-command-bar {
  grid-column: 1;
  grid-row: 4;
}
