:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --ink: #17201d;
  --muted: #617069;
  --soft: #eef2eb;
  --line: #dfe6dd;
  --panel: #ffffff;
  --page: #f5f7f2;
  --green: #18a957;
  --green-soft: #e5f7eb;
  --purple: #7a07e6;
  --purple-soft: #f0e6ff;
  --amber: #c47a00;
  --amber-soft: #fff3d8;
  --blue: #2f6fdd;
  --blue-soft: #e8f0ff;
  --red: #c63f32;
  --red-soft: #ffe6e1;
  --shadow: 0 24px 80px rgba(23, 32, 29, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--page);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
[role="dialog"]:focus-visible {
  outline: 3px solid rgba(47, 111, 221, 0.72);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

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

.prototype-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right))
    calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));
}

.desktop-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(540px, 1.3fr);
  gap: 20px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto 22px;
}

.desktop-toolbar h1,
.reference-block h2,
.app-header h2,
.section-title h3,
.surface-section h3,
.rating-card h3,
.club-card h3,
.profile-head h3,
.lesson-card h3,
.tournament-head h3,
.bottom-sheet h2,
.locked-state h3 {
  margin: 0;
  letter-spacing: 0;
}

.desktop-toolbar h1 {
  font-size: 28px;
  line-height: 1.12;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.role-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.role-button {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 4px 8px;
  min-height: 68px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-button svg {
  grid-row: span 2;
  align-self: start;
  color: var(--muted);
}

.role-button span {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
}

.role-button small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.role-button.active {
  border-color: rgba(122, 7, 230, 0.55);
  background: var(--purple-soft);
}

.role-button.active svg {
  color: var(--purple);
}

.prototype-stage {
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) 430px minmax(230px, 0.75fr);
  gap: 24px;
  align-items: start;
  justify-content: center;
  max-width: 1280px;
  margin: 0 auto;
}

.reference-panel,
.state-panel {
  display: grid;
  gap: 12px;
}

.reference-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.reference-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.reference-block {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reference-block p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.route-code {
  display: block;
  padding: 8px;
  overflow-wrap: anywhere;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  background: var(--purple-soft);
  border-radius: 8px;
}

.reference-block.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend,
.badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.legend.green,
.badge.green {
  color: #0b6f37;
  background: var(--green-soft);
}

.legend.purple,
.badge.purple {
  color: var(--purple);
  background: var(--purple-soft);
}

.legend.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.check-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.check-list svg {
  color: var(--green);
}

.phone-frame {
  width: 430px;
  padding: 18px;
  background: #101513;
  border-radius: 44px;
  box-shadow: var(--shadow);
}

.phone-hardware {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 390px;
  height: 844px;
  overflow: hidden;
  background: var(--page);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 36px;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  padding: calc(9px + var(--safe-top)) 24px 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.signal {
  position: relative;
  padding-right: 28px;
}

.signal::after {
  position: absolute;
  top: 1px;
  right: 0;
  width: 22px;
  height: 10px;
  content: "";
  border: 2px solid currentColor;
  border-radius: 3px;
}

.app-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 18px 10px;
  background: rgba(245, 247, 242, 0.96);
  border-bottom: 1px solid var(--line);
}

.app-header h2 {
  font-size: 22px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.icon-button.small {
  width: 32px;
  height: 32px;
}

.app-body {
  flex: 1;
  min-height: 0;
  padding: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.screen-stack {
  display: grid;
  gap: 12px;
}

.sport-hero {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 8px;
  background: #25342e;
}

.sport-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sport-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.65));
}

.hero-copy {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
}

.hero-copy p,
.hero-copy span {
  margin: 0;
  font-size: 12px;
  opacity: 0.86;
}

.hero-copy h3 {
  margin: 4px 0;
  font-size: 22px;
  line-height: 1.08;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-actions button,
.primary-action,
.secondary-action,
.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 800;
  border-radius: 8px;
}

.quick-actions button,
.primary-action {
  color: #ffffff;
  background: var(--green);
  border: 1px solid var(--green);
}

.quick-actions button:nth-child(2),
.secondary-action {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
}

.danger-action {
  color: #ffffff;
  background: var(--red);
  border: 1px solid var(--red);
}

.surface-section,
.rating-card,
.lesson-card,
.game-card,
.club-card,
.profile-head,
.locked-state {
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title > div {
  min-width: 0;
}

.section-title h3,
.status-row h3,
.lesson-card h3,
.club-card h3,
.profile-head h3 {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.18;
}

.section-title p,
.section-copy,
.status-row p,
.lesson-card p,
.club-card p,
.tournament-head p,
.locked-state p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.rating-card {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 12px;
  align-items: center;
}

.rating-card h3 {
  font-size: 26px;
}

.rating-card span {
  color: var(--muted);
  font-size: 12px;
}

.rating-ring {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  background:
    radial-gradient(circle at center, var(--panel) 54%, transparent 56%),
    conic-gradient(var(--green) 0 78%, var(--soft) 78% 100%);
  border-radius: 999px;
}

.rating-ring span {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.rating-bars {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.progress-row {
  display: grid;
  grid-template-columns: 84px 1fr 28px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.progress-row span {
  color: var(--muted);
}

.progress-row strong {
  text-align: right;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: var(--soft);
  border-radius: 6px;
}

.progress-track div {
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.status-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.status-row.green {
  background: var(--green-soft);
  border-color: rgba(24, 169, 87, 0.18);
}

.status-row.green svg {
  color: var(--green);
}

.status-row.purple {
  background: var(--purple-soft);
  border-color: rgba(122, 7, 230, 0.18);
}

.status-row.purple svg {
  color: var(--purple);
}

.status-row.amber {
  background: var(--amber-soft);
  border-color: rgba(196, 122, 0, 0.2);
}

.status-row.amber svg {
  color: var(--amber);
}

.status-row.red {
  background: var(--red-soft);
  border-color: rgba(198, 63, 50, 0.2);
}

.status-row.red svg {
  color: var(--red);
}

.edge-state-list {
  display: grid;
  gap: 8px;
}

.inline-success {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  color: #0b6f37;
  font-size: 13px;
  font-weight: 800;
  background: var(--green-soft);
  border-radius: 8px;
}

.game-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: end;
  padding: 10px;
  background: var(--soft);
  border-radius: 8px;
}

.game-meter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.game-meter span:last-child {
  grid-column: 1 / -1;
}

.game-meter strong {
  font-size: 28px;
  line-height: 1;
}

.game-card {
  display: grid;
  gap: 10px;
}

.game-card.selected {
  border-color: rgba(24, 169, 87, 0.42);
  box-shadow: inset 0 0 0 1px rgba(24, 169, 87, 0.12);
}

.game-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.game-meta span {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.game-meta svg {
  flex: 0 0 auto;
  color: var(--purple);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--soft);
  border-radius: 8px;
}

.segmented button,
.filter-row button,
.date-strip button,
.slot-row button,
.chat-contexts button {
  min-height: 34px;
  color: var(--muted);
  font-weight: 800;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.segmented button.active,
.filter-row button.active,
.date-strip button.active,
.chat-contexts button.active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(23, 32, 29, 0.08);
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.date-strip button {
  display: grid;
  min-width: 0;
  padding: 6px 2px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.date-strip span {
  font-size: 10px;
}

.date-strip strong {
  font-size: 15px;
}

.filter-row,
.slot-row,
.chat-contexts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-row button,
.slot-row button {
  flex: 0 0 auto;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.slot-row button.selected {
  color: #0b6f37;
  background: var(--green-soft);
  border-color: rgba(24, 169, 87, 0.4);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr 34px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-item time {
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.timeline-item h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}

.timeline-item > div {
  min-width: 0;
}

.timeline-item p {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.status-chip.training {
  color: #0b6f37;
  background: var(--green-soft);
}

.status-chip.game {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-chip.tournament {
  color: var(--purple);
  background: var(--purple-soft);
}

.search-shell {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.club-card {
  display: grid;
  gap: 10px;
  padding: 0;
  overflow: hidden;
}

.club-card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
}

.club-card-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.video-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 174px;
  margin: -12px -12px 12px;
  overflow: hidden;
  color: #ffffff;
  background: #25342e;
  border-radius: 8px 8px 0 0;
}

.video-thumb.compact-thumb {
  min-height: 150px;
}

.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.32);
}

.video-thumb svg {
  position: relative;
  z-index: 1;
}

.tournament-head {
  display: grid;
  gap: 10px;
}

.tournament-head h3 {
  overflow-wrap: anywhere;
}

.bracket {
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bracket-round {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bracket-round h3 {
  margin: 0;
  color: var(--purple);
  font-size: 13px;
}

.bracket-pair {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 6px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  background: var(--soft);
  border-radius: 8px;
}

.bracket-pair span {
  overflow-wrap: anywhere;
}

.consolation {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  background: var(--amber-soft);
  border-radius: 8px;
}

.score-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.score-card span,
.score-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.score-card strong {
  display: block;
  margin: 3px 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.2;
}

.score-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  gap: 6px;
}

.score-board span {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  background: var(--purple);
  border-radius: 8px;
}

.chat-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 10px;
}

.chat-contexts button {
  flex: 0 0 auto;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.chat-bubbles {
  display: grid;
  align-content: start;
  flex: 1;
  gap: 8px;
  min-height: 220px;
}

.bubble {
  width: min(86%, 284px);
  padding: 9px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bubble.mine {
  justify-self: end;
  color: #ffffff;
  background: var(--purple);
  border-color: var(--purple);
}

.bubble span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 900;
  opacity: 0.76;
}

.bubble p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chat-composer input {
  min-width: 0;
  border: 0;
  outline: 0;
}

.chat-composer button {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: #ffffff;
  background: var(--purple);
  border: 0;
  border-radius: 8px;
}

.empty-state-preview {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  color: var(--muted);
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.empty-state-preview svg {
  color: var(--purple);
}

.empty-state-preview h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.empty-state-preview p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.3;
}

.profile-head {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #ffffff;
  font-weight: 900;
  background: var(--purple);
  border-radius: 8px;
}

.formula-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

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

.formula-row span {
  color: var(--muted);
  font-size: 13px;
}

.formula-row strong {
  font-size: 13px;
}

.locked-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 186px;
  text-align: center;
}

.locked-state svg {
  color: var(--purple);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.metric-tile {
  display: grid;
  gap: 2px;
  min-height: 62px;
  padding: 10px;
  background: var(--soft);
  border-radius: 8px;
}

.metric-tile strong {
  font-size: 22px;
  line-height: 1;
}

.metric-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bottom-nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  min-height: 76px;
  padding: 8px 8px calc(14px + var(--safe-bottom));
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px rgba(23, 32, 29, 0.08);
}

.nav-item {
  display: grid;
  gap: 3px;
  place-items: center;
  min-width: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.nav-item span {
  width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active {
  color: var(--purple);
  background: var(--purple-soft);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 32, 29, 0.34);
}

.bottom-sheet {
  width: min(390px, calc(100vw - 32px));
  padding: 10px 14px 14px;
  background: var(--panel);
  border-radius: 18px 18px 8px 8px;
  box-shadow: var(--shadow);
}

.sheet-grabber {
  width: 48px;
  height: 5px;
  margin: 0 auto 12px;
  background: var(--line);
  border-radius: 999px;
}

.sheet-header {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.sheet-header h2 {
  font-size: 20px;
}

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

.sheet-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.payment-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 46px;
  padding: 10px;
  margin: 10px 0;
  background: var(--soft);
  border-radius: 8px;
}

.payment-line span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.payment-line strong {
  font-size: 18px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .desktop-toolbar {
    grid-template-columns: 1fr;
  }

  .prototype-stage {
    grid-template-columns: 1fr 430px;
  }

  .state-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .prototype-shell {
    padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right))
      calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
  }

  .role-switcher,
  .prototype-stage,
  .state-panel {
    grid-template-columns: 1fr;
  }

  .reference-panel,
  .state-panel {
    display: none;
  }

  .phone-frame {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 10px;
  }

  .phone-hardware {
    width: 100%;
    height: min(844px, calc(100vh - 154px));
    min-height: 620px;
  }
}
