:root {
  color-scheme: light;
  --paper: #fffdfa;
  --paper-soft: #f7f3ed;
  --ink: #172126;
  --muted: #687177;
  --line: rgba(23, 33, 38, 0.13);
  --teal: #0d6f73;
  --teal-soft: #e8f5f3;
  --red: #c92e2a;
  --red-soft: #f9e8e5;
  --gold: #b79a55;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  --safe-top: 66px;
  --safe-bottom: 26px;
  --nav-height: 84px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #dde1df;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.prototype-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: min(390px, 100vw);
  height: min(844px, 100vh);
  min-height: 680px;
  overflow: hidden;
  background: var(--paper);
  border-radius: 34px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.dynamic-island {
  position: absolute;
  z-index: 80;
  top: 12px;
  left: 50%;
  width: 118px;
  height: 35px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #07090a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.capture-canvas {
  display: none;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  background: var(--paper);
}

.screen.active {
  display: block;
}

.safe-header {
  position: relative;
  z-index: 20;
  padding: var(--safe-top) 18px 0;
}

.scan-header,
.route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.content-header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
}

.content-header h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.screen-route .content-header,
.screen-saved .content-header {
  grid-template-columns: auto 1fr;
}

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

.top-actions.compact {
  gap: 6px;
}

.screen-route .top-actions,
.screen-scan .top-actions {
  justify-self: end;
}

.chip,
.round-icon,
.back-btn,
.heart {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(23, 33, 38, 0.12);
  background: rgba(255, 253, 250, 0.88);
  color: var(--ink);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: 0 5px 18px rgba(20, 25, 28, 0.08);
}

.chip {
  padding: 0 12px;
  max-width: 176px;
  font-weight: 680;
  white-space: nowrap;
}

.chip span[aria-hidden="true"] {
  width: 18px;
  flex: 0 0 18px;
  overflow: hidden;
  font-size: 0;
}

.venue-chip span[aria-hidden="true"]::before,
.lang-chip span[aria-hidden="true"]::before {
  display: block;
  font-size: 16px;
  line-height: 1;
}

.venue-chip span[aria-hidden="true"]::before {
  content: "M";
}

.lang-chip span[aria-hidden="true"]::before {
  content: "G";
}

.venue-chip span:nth-child(2),
.lang-chip span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.round-icon,
.back-btn,
.heart {
  width: 40px;
  padding: 0;
  font-size: 0;
}

.round-icon span,
.back-btn,
.heart {
  position: relative;
}

.round-icon::before,
.back-btn::before,
.heart::before,
.trust-btn::before,
.send-button::before {
  font-size: 18px;
  line-height: 1;
}

.round-icon::before {
  content: "o";
  color: var(--teal);
}

.settings-toggle::before {
  content: "S";
}

.settings-toggle.active {
  border-color: rgba(201, 46, 42, 0.28);
  background: rgba(249, 232, 229, 0.92);
}

.settings-toggle.active::before {
  color: var(--red);
}

.trust-btn::before {
  content: "✓";
}

.back-btn::before {
  content: "<";
}

.heart {
  width: auto;
  gap: 6px;
  padding: 0 4px 0 12px;
  color: var(--muted);
  box-shadow: none;
  background: transparent;
  border: 0;
}

.heart::before {
  content: "♡";
  font-size: 24px;
}

.heart.is-saved::before {
  content: "♥";
  color: var(--red);
}

.heart span {
  font-size: 15px;
}

.chevron {
  color: var(--muted);
  font-size: 12px;
}

.camera-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
  background: #111;
}

.camera-live .camera-video {
  display: block;
}

.camera-live .camera-bg {
  display: none;
}

.camera-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.05) 34%, rgba(0, 0, 0, 0.42) 100%),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.2) 72%);
}

.scan-frame {
  position: absolute;
  z-index: 8;
  left: 43px;
  right: 43px;
  top: 222px;
  height: 260px;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, 0.88);
  border-style: solid;
}

.corner-tl {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 18px;
}

.corner-tr {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 18px;
}

.corner-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 18px;
}

.corner-br {
  right: 0;
  bottom: 0;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 18px;
}

.scan-targets {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: 242px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 252px;
  padding: 7px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(33, 36, 35, 0.6);
  backdrop-filter: blur(18px);
}

.target {
  min-height: 48px;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.target.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.camera-hint {
  position: absolute;
  z-index: 12;
  bottom: 214px;
  left: 18px;
  right: 18px;
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 680;
  text-align: center;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.38);
}

.camera-permission {
  position: absolute;
  z-index: 12;
  left: 32px;
  right: 32px;
  top: 118px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(25, 27, 27, 0.38);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 640;
  text-align: center;
  backdrop-filter: blur(12px);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.42);
}

.camera-controls {
  position: absolute;
  z-index: 15;
  left: 28px;
  right: 28px;
  bottom: 124px;
  display: grid;
  grid-template-columns: 82px 1fr 82px;
  align-items: center;
  gap: 22px;
}

.shutter {
  justify-self: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.95),
    inset 0 0 0 9px var(--teal),
    0 14px 34px rgba(0, 0, 0, 0.25);
}

.secondary-camera-action {
  display: grid;
  justify-items: center;
  gap: 8px;
  background: transparent;
  color: #fff;
  font-weight: 720;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.icon-dot {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 13px;
  text-shadow: none;
}

.mic-icon svg,
.mic-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offline-note {
  position: absolute;
  z-index: 12;
  left: 20px;
  right: 20px;
  bottom: 96px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.source-pill:focus-visible,
.question-grid button:focus-visible,
.step-actions button:focus-visible,
.bottom-nav button:focus-visible,
.chip:focus-visible,
.round-icon:focus-visible,
.shutter:focus-visible {
  outline: 3px solid rgba(13, 111, 115, 0.35);
  outline-offset: 2px;
}

.scroll-area {
  position: absolute;
  inset: 0 0 calc(var(--nav-height) + var(--safe-bottom)) 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(var(--safe-top) + 62px) 20px 20px;
  scrollbar-width: none;
}

.screen-guide .scroll-area {
  bottom: 86px;
  padding-bottom: 22px;
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

.guide-scroll {
  padding-top: calc(var(--safe-top) + 62px);
}

.artwork {
  width: 100%;
  aspect-ratio: 1.62;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.artwork[hidden] {
  display: none;
}

.art-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 8px;
}

.art-meta h2,
.page-title h1,
.route-plan h2 {
  margin: 0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  color: #111b20;
}

.art-meta h2 {
  font-size: 26px;
  line-height: 1.05;
}

.art-meta p {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 17px;
}

.art-meta .muted,
.muted {
  color: var(--muted);
  font-size: 14px;
}

.source-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.confidence-warning {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #efc7bd;
  border-radius: 8px;
  background: #fff0eb;
  color: #8a3e2b;
  font-size: 13px;
  line-height: 1.35;
}

.confidence-warning[hidden] {
  display: none;
}

.source-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.source-pill {
  min-height: 64px;
  padding: 10px 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.source-pill strong,
.source-pill span {
  display: block;
}

.source-pill strong {
  color: var(--teal);
  font-size: 12px;
  line-height: 1.2;
}

.source-pill span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.source-pill.ai strong {
  color: #6c609f;
}

.player {
  display: grid;
  grid-template-columns: 60px 1fr 54px;
  align-items: center;
  gap: 12px;
  padding: 24px 0 16px;
}

.play-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 0;
}

.play-btn::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 22px;
  border-left: 5px solid #fff;
  border-right: 5px solid #fff;
}

.play-btn:not(.playing)::before {
  width: 0;
  height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 0;
}

.player-main {
  display: grid;
  gap: 7px;
}

.wave {
  width: 34px;
  height: 20px;
  border-left: 4px solid var(--ink);
  border-right: 4px solid var(--ink);
  opacity: 0.75;
  border-radius: 8px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #dedad5;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.player-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.player-main .now {
  color: var(--red);
}

.speed-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 760;
}

.transcript {
  padding: 4px 0 22px;
}

.playing-label {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 14px;
  font-weight: 760;
}

.transcript [data-transcript] {
  margin: 0;
  max-width: 34ch;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.42;
}

.guide-disclaimer {
  margin: 12px 0 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.question-suggestions {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.question-suggestions p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.question-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.question-grid button {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 680;
  text-align: left;
}

.ask-bar {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 54px 1fr 44px;
  gap: 10px;
  align-items: center;
  padding: 12px 18px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.94);
  backdrop-filter: blur(20px);
}

.mic-button,
.send-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 0;
}

.mic-button {
  background: var(--red);
  color: #fff;
}

.mic-button::before {
  content: none;
}

.send-button {
  width: 44px;
  height: 44px;
  background: #d6d5d3;
  color: var(--ink);
}

.send-button::before {
  content: "↑";
}

.ask-bar input {
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.page-title {
  padding-top: 2px;
}

.page-title h1 {
  font-size: 40px;
  line-height: 1;
}

.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.segmented button {
  min-height: 46px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 740;
}

.segmented .active {
  background: var(--teal);
  color: #fff;
}

.interest-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.interest-row::-webkit-scrollbar {
  display: none;
}

.interest-row button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 680;
}

.interest-row .active {
  border-color: rgba(13, 111, 115, 0.35);
  background: var(--teal-soft);
  color: var(--teal);
}

.toggle {
  flex: 0 0 154px;
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.toggle input {
  appearance: none;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: var(--teal);
  position: relative;
}

.toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}

.route-plan {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.route-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-title-row h2 {
  font-size: 26px;
  line-height: 1.05;
}

.text-action {
  min-height: 40px;
  background: transparent;
  color: var(--teal);
  font-weight: 780;
  white-space: nowrap;
}

.mini-map {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.floor {
  color: var(--teal);
  font-weight: 820;
  font-size: 20px;
}

.map-line {
  position: relative;
  height: 46px;
  border: 1px solid #e1ded8;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 20%, rgba(23, 33, 38, 0.08) 20% 21%, transparent 21% 54%, rgba(23, 33, 38, 0.08) 54% 55%, transparent 55%);
}

.map-line::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 15%;
  top: 50%;
  border-top: 2px dashed var(--red);
}

.stop {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
}

.stop.one {
  left: 16%;
}

.stop.two {
  left: 54%;
}

.stop.three {
  right: 13%;
}

.entrance {
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 0 0 18px;
}

.timeline li + li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.step-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 19px;
  font-weight: 820;
}

.timeline li:first-child .step-num {
  background: var(--red);
  color: #fff;
}

.step-content h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.step-content h3 span {
  color: var(--red);
  font-size: 14px;
  font-weight: 760;
}

.step-content p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.step-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-light,
.secondary-light {
  min-height: 44px;
  border-radius: 11px;
  font-weight: 780;
}

.primary-light {
  background: var(--red-soft);
  color: var(--red);
}

.secondary-light {
  border: 1px solid rgba(13, 111, 115, 0.35);
  background: #fff;
  color: var(--teal);
}

.saved-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.saved-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.saved-row img,
.saved-icon {
  width: 74px;
  height: 62px;
  border-radius: 10px;
}

.saved-row img {
  object-fit: cover;
}

.saved-icon {
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 22px;
  font-weight: 820;
}

.saved-row strong,
.saved-row em {
  display: block;
}

.saved-row strong {
  font-size: 16px;
}

.saved-row em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.bottom-nav {
  position: absolute;
  z-index: 35;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 10px 18px var(--safe-bottom);
  border-top: 1px solid rgba(23, 33, 38, 0.09);
  border-radius: 22px 22px 0 0;
  background: rgba(255, 253, 250, 0.94);
  backdrop-filter: blur(20px);
}

.screen-guide.active ~ .bottom-nav {
  display: none;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
}

.bottom-nav button span {
  width: 20px;
  height: 20px;
  font-size: 0;
  line-height: 1;
}

.bottom-nav button span::before {
  display: block;
  font-size: 14px;
  font-weight: 820;
}

.bottom-nav button[data-nav="scan"] span::before {
  content: "S";
}

.bottom-nav button[data-nav="route"] span::before {
  content: "R";
}

.bottom-nav button[data-nav="saved"] span::before {
  content: "B";
}

.bottom-nav button strong {
  font-size: 13px;
  font-weight: 760;
}

.bottom-nav button.active {
  color: var(--teal);
}

.scan-status,
.sheet {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: none;
}

.scan-status.active,
.sheet.active {
  display: block;
}

.scan-status {
  background: rgba(5, 8, 8, 0.2);
  backdrop-filter: blur(4px);
}

.status-card {
  position: absolute;
  left: 32px;
  right: 32px;
  top: 50%;
  padding: 22px;
  border-radius: 18px;
  transform: translateY(-50%);
  background: rgba(255, 253, 250, 0.96);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.spinner {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border: 3px solid #dcd6cd;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.status-card strong {
  display: block;
  font-size: 17px;
}

.status-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 21, 0.32);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 20px calc(20px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -22px 70px rgba(0, 0, 0, 0.2);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #d8d4cd;
}

.sheet h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.sheet-list {
  display: grid;
  gap: 10px;
}

.sheet-list button,
.sheet-number-form button {
  min-height: 50px;
  padding: 0 14px;
  border-radius: 13px;
  background: var(--paper-soft);
  color: var(--ink);
  text-align: left;
  font-weight: 720;
}

.sheet-list button.active {
  background: var(--teal-soft);
  color: var(--teal);
}

.sheet-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.setting-list {
  display: grid;
  gap: 10px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.setting-row.active {
  border-color: rgba(7, 127, 128, 0.45);
  background: var(--teal-soft);
}

.setting-row strong,
.setting-row small {
  display: block;
}

.setting-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.setting-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.setting-row em {
  color: var(--teal);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.setting-label {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.length-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.length-options button {
  text-align: center;
}

.candidate-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.candidate-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.candidate-row.active {
  border-color: rgba(7, 127, 128, 0.45);
  background: var(--teal-soft);
}

.candidate-row img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.candidate-copy {
  min-width: 0;
}

.candidate-copy strong,
.candidate-copy em,
.candidate-copy small {
  display: block;
}

.candidate-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-copy em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.candidate-copy small {
  margin-top: 4px;
  color: var(--teal);
  font-size: 11px;
  line-height: 1.25;
}

.confidence-score {
  min-width: 38px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  text-align: right;
}

.sheet-fallbacks {
  grid-template-columns: 1fr 1fr;
}

.sheet-number-form {
  display: grid;
  gap: 12px;
}

.sheet-number-form input {
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  outline: none;
}

.sheet-number-form button {
  text-align: center;
  background: var(--teal);
  color: #fff;
}

.toast {
  position: absolute;
  z-index: 100;
  left: 22px;
  right: 22px;
  bottom: calc(24px + var(--safe-bottom));
  min-height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(23, 33, 38, 0.9);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(16px);
}

.toast.active {
  display: flex;
}

@media (max-width: 640px) {
  .prototype-stage {
    padding: 0;
    background: var(--paper);
    justify-content: flex-start;
  }

  .app-shell {
    width: min(390px, 100vw);
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 760px) {
  :root {
    --safe-top: 58px;
    --nav-height: 76px;
  }

  .page-title h1 {
    font-size: 34px;
  }

  .scan-targets {
    bottom: 222px;
  }

  .camera-hint {
    bottom: 196px;
  }

  .camera-controls {
    bottom: 114px;
  }
}
