:root {
  --bg: #05060e;
  --panel: #0d1020;
  --panel-2: #131831;
  --text: #f4f7ff;
  --muted: #9ea7c8;
  --line: #272f55;
  --accent: #79f5ff;
  --accent-2: #af7bff;
  --danger: #ff7d90;
  --success: #77f2bb;
}

* {
  box-sizing: border-box;
}

button {
  text-align: center;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: radial-gradient(circle at 20% 20%, #1b2452 0%, var(--bg) 36%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ambient-glow {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  background: radial-gradient(circle at 70% 20%, rgba(121, 245, 255, 0.2), transparent 40%),
    radial-gradient(circle at 20% 70%, rgba(175, 123, 255, 0.22), transparent 35%);
  filter: blur(30px);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.hub-shell {
  max-width: 980px;
}

.topbar {
  background: rgba(13, 16, 32, 0.86);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

h1 {
  margin: 0.1rem 0 0;
  font-size: 1.3rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  gap: 0.75rem;
}

.hub-subtitle {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hub-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.hub-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 16, 32, 0.86);
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
  display: grid;
  gap: 0.45rem;
}

.hub-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.hub-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hub-card:hover {
  border-color: var(--accent);
}

.journey-layout {
  grid-template-columns: 280px 1fr;
}

.back-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.buyer-shell {
  --buyer-frame-height: min(100dvh, 900px);
  width: min(100%, 430px);
  max-width: 430px;
  min-height: var(--buyer-frame-height);
  height: var(--buyer-frame-height);
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  padding-bottom: 0;
  border: 1px solid #1c2450;
  border-radius: 18px;
  background: linear-gradient(180deg, #0a1026 0%, #060914 55%, #04060f 100%);
  overflow: hidden;
}

body[data-role-page="buyer"] {
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a1026;
  overflow: hidden;
  display: grid;
  place-items: center;
}

body[data-role-page="buyer"] .app-shell {
  height: var(--buyer-frame-height);
  padding-top: 0.4rem;
  padding-bottom: 0.2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body[data-role-page="buyer"] .ambient-glow {
  display: none;
}

.buyer-main {
  margin-top: 0.2rem;
  display: block;
  gap: 0.55rem;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.buyer-app-surface {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 16, 32, 0.86);
  padding: 0;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.buyer-app-surface::-webkit-scrollbar {
  display: none;
}

.app-back-arrow {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #324072;
  background: #111737;
  color: #edf2ff;
  text-decoration: none;
  font-size: 1.15rem;
  margin-left: 0.2rem;
}

.buyer-page {
  display: grid;
  gap: 0.75rem;
  padding: 0.55rem;
  transition: opacity 0.14s ease, transform 0.14s ease;
  position: relative;
}

.buyer-page.is-switching {
  opacity: 0.25;
  transform: translateY(6px);
}

.buyer-page-header h2 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
}

.buyer-page-header p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  background: #131831;
  border-radius: 12px;
  padding: 0.55rem;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 16px rgba(5, 8, 22, 0.72);
}

.app-topbar-title {
  flex: 1;
  min-width: 0;
}

.app-topbar-title strong {
  display: block;
  font-size: 0.9rem;
}

.app-topbar-end {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.app-topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #3b477f;
  background: #111736;
  display: grid;
  place-items: center;
}

.app-topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-topbar-avatar-placeholder {
  color: #5c6589;
  background: rgba(18, 25, 55, 0.95);
}

.app-topbar-avatar-placeholder svg {
  width: 22px;
  height: 22px;
  display: block;
}

.icon-btn-kebab {
  font-size: 1.25rem;
  line-height: 0.85;
  padding-bottom: 2px;
  letter-spacing: 0;
}

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

.profile-avatar-picker {
  width: 112px;
  height: 112px;
  border-radius: 12px;
  border: 1px dashed rgba(122, 132, 180, 0.65);
  background: rgba(10, 14, 36, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.profile-avatar-picker:hover,
.profile-avatar-picker:focus-visible {
  outline: none;
  border-color: rgba(121, 245, 255, 0.55);
  background: rgba(15, 20, 48, 0.85);
}

.profile-avatar-silhouette {
  color: #5c6589;
  display: grid;
  place-items: center;
  line-height: 0;
}

.profile-avatar-silhouette svg {
  width: 44px;
  height: 44px;
  display: block;
}

.profile-avatar-cta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.profile-avatar-picker-filled {
  padding: 0;
  border-style: solid;
  border-color: #3b477f;
}

.profile-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.profile-avatar-hint {
  margin: -0.15rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
}

.icon-btn {
  border: 1px solid #334071;
  background: #111736;
  color: #dce3ff;
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  cursor: pointer;
}

.app-menu {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
  z-index: 999;
}

.buyer-main.menu-open .app-menu {
  pointer-events: auto;
  opacity: 1;
}

.app-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 24, 0.55);
  border: 0;
}

.app-menu-panel {
  position: absolute;
  right: 0.45rem;
  top: 0.45rem;
  width: min(84vw, 320px);
  background: #0b1028;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  height: auto;
  max-height: calc(100dvh - 0.9rem);
  transform: translateX(108%);
  transition: transform 0.18s ease;
}

.buyer-main.menu-open .app-menu-panel {
  transform: translateX(0);
}

.app-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.app-menu-list {
  display: grid;
  gap: 0.35rem;
  overflow: auto;
  align-content: start;
  grid-auto-rows: min-content;
  max-height: none;
  scrollbar-width: none;
}

.app-menu-list::-webkit-scrollbar {
  display: none;
}

.app-menu-item {
  border: 1px solid #2b3463;
  background: #151c3e;
  color: #dce3ff;
  border-radius: 9px;
  min-height: 0;
  padding: 0.48rem 0.68rem;
  text-align: left;
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 500;
  cursor: pointer;
}

.app-menu-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(121, 245, 255, 0.3);
}

.logout-item {
  border-color: rgba(255, 125, 144, 0.55);
  color: #ffc7d0;
}

.secondary-btn {
  border: 1px solid #3a467d;
  background: #101738;
  color: #e5ebff;
  font-weight: 600;
  border-radius: 10px;
  min-height: 44px;
  padding: 0.56rem 0.78rem;
  cursor: pointer;
}

.disabled-btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.mock-section,
.mock-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 0.78rem;
}

.home-hero {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, #16204a 0%, #11183a 60%, #101736 100%);
  padding: 0.85rem;
  display: grid;
  gap: 0.62rem;
}

.home-hero h3 {
  margin: 0;
  font-size: 1.07rem;
}

.home-search {
  border: 1px solid #3c4a87;
  background: #131c3d;
  border-radius: 12px;
  min-height: 50px;
  padding: 0.6rem 0.75rem;
  color: #b9c3e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.home-search-cta {
  border: 1px solid rgba(121, 245, 255, 0.45);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
}

.home-chip-row .mock-chip {
  background: #18224b;
}

.home-quick-grid {
  display: grid;
  gap: 0.55rem;
}

.quick-card {
  border: 1px solid var(--line);
  background: #12193a;
  border-radius: 12px;
  padding: 0.78rem;
  text-align: left;
  color: var(--text);
  display: grid;
  gap: 0.32rem;
}

.quick-card strong {
  font-size: 1.02rem;
}

.quick-card p {
  margin: 0;
  color: var(--muted);
}

.quick-card span {
  color: var(--accent);
  font-size: 0.78rem;
}

.mock-section h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.mock-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.52rem;
}

.checkout-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.52rem;
}

.mock-input {
  border: 1px dashed #3a4476;
  border-radius: 10px;
  min-height: 42px;
  padding: 0.62rem;
  color: #c7cdee;
  font-size: 0.82rem;
}

.mock-alert {
  margin-top: 0.6rem;
  border: 1px solid rgba(121, 245, 255, 0.35);
  background: rgba(121, 245, 255, 0.1);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  color: #ccf9ff;
  font-size: 0.8rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mock-chip {
  border: 1px solid #3b477f;
  background: #161d3f;
  border-radius: 999px;
  padding: 0.33rem 0.6rem;
  font-size: 0.75rem;
}

.chip-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(121, 245, 255, 0.35);
}

.field-caption {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stars-row {
  display: flex;
  gap: 0.35rem;
}

.star-btn {
  border: 1px solid #374279;
  background: #121a3d;
  color: #6e78a8;
  border-radius: 8px;
  min-width: 34px;
  min-height: 34px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.star-btn.active {
  color: #ffd76b;
  border-color: #ffd76b;
  background: #2a2540;
}

.recording-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #11183a;
  padding: 0.65rem;
  display: grid;
  gap: 0.55rem;
}

.video-frame {
  border: 1px solid #3d4a82;
  border-radius: 10px;
  min-height: 170px;
  background: radial-gradient(circle at 20% 20%, #273772 0%, #141b3c 60%);
  position: relative;
  overflow: hidden;
}

.video-overlay {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.6rem;
  border: 1px solid rgba(121, 245, 255, 0.35);
  border-radius: 8px;
  background: rgba(4, 10, 29, 0.72);
  color: #d8efff;
  font-size: 0.8rem;
  padding: 0.48rem 0.6rem;
}

.expert-list {
  display: grid;
  gap: 0.5rem;
}

.history-list {
  display: grid;
  gap: 0.55rem;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #121a3c;
  padding: 0.7rem;
  display: grid;
  gap: 0.38rem;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.history-head p,
.history-item p {
  margin: 0;
}

.status-tag {
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  font-size: 0.68rem;
  border: 1px solid var(--line);
}

.status-tag.success {
  color: #8ff0c7;
  border-color: rgba(143, 240, 199, 0.4);
  background: rgba(143, 240, 199, 0.1);
}

.status-tag.warn {
  color: #ffd18f;
  border-color: rgba(255, 209, 143, 0.4);
  background: rgba(255, 209, 143, 0.1);
}

.mock-card strong {
  display: block;
  margin-bottom: 0.22rem;
}

.mock-tap {
  cursor: pointer;
}

button.mock-card {
  text-align: left;
  color: var(--text);
}

.row-action-card {
  width: 100%;
}

.row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.row-link {
  font-size: 0.76rem;
  color: var(--accent);
  border: 1px solid rgba(121, 245, 255, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

button.mock-chip {
  color: #dfe6ff;
}

.mock-card p,
.mock-muted {
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.session-countdown-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(18, 25, 58, 0.98), rgba(12, 16, 40, 0.92));
  padding: 0.9rem 1rem 1rem;
  display: grid;
  gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.session-countdown-head {
  display: grid;
  gap: 0.35rem;
}

.session-countdown-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.session-countdown-when {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.session-countdown-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.countdown-units {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  justify-content: space-between;
}

.countdown-unit {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  text-align: center;
  padding: 0.5rem 0.25rem 0.45rem;
  border-radius: 11px;
  background: rgba(6, 10, 32, 0.72);
  border: 1px solid #2f3a6e;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.countdown-unit.is-dim {
  opacity: 0.38;
}

.countdown-value {
  display: block;
  font-size: 1.18rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: #f0f4ff;
}

.countdown-label {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 420px) {
  .countdown-units {
    gap: 0.25rem;
  }

  .countdown-unit {
    padding: 0.42rem 0.15rem 0.38rem;
    border-radius: 9px;
  }

  .countdown-value {
    font-size: 1.02rem;
  }

  .countdown-label {
    font-size: 0.56rem;
    letter-spacing: 0.02em;
  }
}

.countdown-sentence {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(121, 245, 255, 0.08);
  border: 1px solid rgba(121, 245, 255, 0.22);
  font-size: 0.88rem;
  line-height: 1.45;
  color: #dce4ff;
  font-weight: 500;
}

.countdown-reached {
  padding: 0.65rem 0.75rem;
  border-radius: 11px;
  border: 1px solid rgba(119, 242, 187, 0.45);
  background: rgba(119, 242, 187, 0.08);
}

.countdown-reached strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--success);
  font-size: 0.92rem;
}

.countdown-reached .mock-muted {
  margin: 0;
  font-size: 0.8rem;
}

.mock-live {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.live-main {
  border: 1px solid #3a467d;
  border-radius: 12px;
  min-height: 220px;
  background: radial-gradient(circle at 25% 20%, #202d63, #121732);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.live-side {
  display: grid;
  gap: 0.55rem;
}

.icon-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
}

.icon-action {
  border: 1px solid #3a467d;
  background: #12193a;
  color: #e9efff;
  border-radius: 10px;
  min-height: 40px;
  font-size: 1.05rem;
  cursor: pointer;
}

.buyer-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.app-page {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.app-page h3 {
  margin: 0;
  font-size: 1.02rem;
}

.auth-page {
  background: radial-gradient(circle at 20% 0%, #1c2858, #141935);
}

.center-text {
  text-align: center;
}

.auth-hero p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.buyer-account-heading {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.auth-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.auth-actions-stack {
  flex-direction: column;
  align-items: stretch;
}

.auth-actions-stack .primary-btn,
.auth-actions-stack .secondary-btn {
  width: 100%;
}

.auth-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.app-form {
  display: grid;
  gap: 0.62rem;
}

.field-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.field-input {
  width: 100%;
  border: 1px solid #334071;
  border-radius: 10px;
  background: #111736;
  color: #f4f7ff;
  min-height: 42px;
  padding: 0.62rem 0.7rem;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
}

.field-textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
}

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

.prep-upload-trigger {
  text-align: left;
  cursor: pointer;
}

.prep-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.prep-upload-thumb {
  position: relative;
  border: 1px solid #334071;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #0f1635;
}

.prep-upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prep-upload-remove {
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(9, 12, 28, 0.82);
  color: #f4f7ff;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.payment-card-minimal-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(122, 132, 180, 0.42);
  padding: 0.15rem 0 0.45rem;
  margin-top: 0.05rem;
  transition: border-color 0.15s ease;
}

.payment-card-minimal-row:focus-within {
  border-bottom-color: rgba(121, 245, 255, 0.45);
}

.payment-card-minimal-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #f4f7ff;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.45;
  padding: 0.4rem 0;
  min-height: 38px;
  outline: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.payment-reveal-icon {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0.2rem;
  margin: 0;
  cursor: pointer;
  color: #7d86a8;
  display: grid;
  place-items: center;
  line-height: 0;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.payment-reveal-icon:hover,
.payment-reveal-icon:focus-visible {
  color: #aeb6d4;
  outline: none;
  background: rgba(121, 245, 255, 0.06);
}

.payment-eye-svg {
  display: block;
}

.payment-field-hint {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
}

/* Global field combobox: fixed popover + 1rem options (native select mis-anchors in buyer scroll shell). */
.field-combobox {
  display: block;
  position: relative;
}

.field-combobox-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.field-combobox-chevron {
  flex-shrink: 0;
  opacity: 0.75;
  font-size: 0.85rem;
  line-height: 1;
}

.field-combobox-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.field-combobox-popover {
  position: fixed;
  z-index: 10050;
  margin: 0;
  padding: 0.4rem;
  box-sizing: border-box;
  background: #111736;
  border: 1px solid #334071;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  max-height: min(50dvh, 300px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.field-combobox-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.62rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.0;
  font-family: inherit;
  font-weight: 500;
  color: #f4f7ff;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.field-combobox-option:hover,
.field-combobox-option:focus-visible {
  outline: none;
  background: rgba(121, 245, 255, 0.14);
}

.field-combobox-option.is-selected {
  background: rgba(121, 245, 255, 0.26);
  font-weight: 500;
}

.inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.inline-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.choice-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #12193a;
  padding: 0.7rem;
  display: grid;
  gap: 0.4rem;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.consent-list {
  display: grid;
  gap: 0.42rem;
}

.consent-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.mode-btn {
  border: 1px solid #3b477f;
  background: #12193a;
  color: #cfd6f2;
  min-height: 40px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn.active {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(121, 245, 255, 0.35);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(19, 24, 49, 0.85);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.ghost-btn:hover {
  border-color: var(--accent);
}

.layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 1rem;
}

.sidebar,
.screen-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 16, 32, 0.86);
}

.sidebar {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.55rem;
}

.role-tabs {
  display: grid;
  gap: 0.45rem;
}

.role-tab,
.screen-link {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.role-tab.active,
.screen-link.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(121, 245, 255, 0.35);
}

.screen-nav {
  display: grid;
  gap: 0.4rem;
  max-height: calc(100vh - 280px);
  overflow: auto;
  padding-right: 0.2rem;
}

.screen-link p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}

.screen-link span {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  margin-top: 0.2rem;
  line-height: 1.25;
}

.pill {
  background: rgba(121, 245, 255, 0.13);
  color: var(--accent);
  border: 1px solid rgba(121, 245, 255, 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
}

.screen-panel {
  padding: 1.1rem;
}

.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.screen-header h2 {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
}

.screen-header p {
  color: var(--muted);
  margin: 0.5rem 0 0;
  line-height: 1.45;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.73rem;
  border: 1px solid var(--line);
}

.status-ready {
  color: var(--success);
  border-color: rgba(119, 242, 187, 0.4);
  background: rgba(119, 242, 187, 0.12);
}

.status-review {
  color: #ffc281;
  border-color: rgba(255, 194, 129, 0.4);
  background: rgba(255, 194, 129, 0.12);
}

.status-critical {
  color: var(--danger);
  border-color: rgba(255, 125, 144, 0.4);
  background: rgba(255, 125, 144, 0.12);
}

.panel-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--panel-2);
}

.card h3 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.3;
}

.card p {
  color: var(--muted);
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.flow-list,
.actions-list {
  margin: 0.6rem 0 0;
  padding-left: 1rem;
  color: var(--text);
}

.flow-list li,
.actions-list li {
  margin: 0.3rem 0;
  font-size: 0.82rem;
}

.meta {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.meta .card strong {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.footer-note {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.journey-strip {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}

.journey-strip::-webkit-scrollbar,
.role-tabs::-webkit-scrollbar,
.screen-nav::-webkit-scrollbar {
  display: none;
}

.journey-step {
  min-width: 130px;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 10px;
  padding: 0.45rem;
  color: var(--text);
  display: grid;
  gap: 0.22rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.journey-step:active {
  transform: scale(0.99);
}

.journey-step span {
  color: var(--accent);
  font-size: 0.72rem;
}

.journey-step small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.journey-step.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(121, 245, 255, 0.35);
}

.prototype-box {
  margin-top: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 0.85rem;
}

.prototype-header h3 {
  margin: 0;
  font-size: 0.92rem;
}

.prototype-header p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.prototype-actions {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.primary-btn {
  border: 1px solid transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #071018;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.56rem 0.78rem;
  min-height: 42px;
  cursor: pointer;
  line-height: 1.2;
  font-size: 0.88rem;
}

.full-width-btn {
  width: 100%;
}

.dispute-history-actions {
  display: flex;
  justify-content: flex-end;
}

.dispute-history-chip {
  border: 1px solid #3b477f;
  background: #161d3f;
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  font-size: 0.74rem;
  line-height: 1.1;
  color: #dfe6ff;
  cursor: pointer;
}

.dispute-history-chip:hover,
.dispute-history-chip:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(121, 245, 255, 0.3);
}

.tiny-btn {
  min-height: 40px;
  padding: 0.48rem 0.64rem;
  font-size: 0.8rem;
}

.no-actions {
  color: var(--muted);
  font-size: 0.78rem;
  align-self: center;
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .screen-nav {
    max-height: 260px;
  }

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

@media (max-width: 768px) {
  body[data-role-page="buyer"] {
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }

  .buyer-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    height: auto;
    border-radius: 0;
    border: none;
    background: #0a1026;
    padding: 0;
  }

  body[data-role-page="buyer"] .app-shell {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
    padding: 0;
  }

  .buyer-main {
    margin: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }

  .buyer-app-surface {
    min-height: 0;
    height: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .buyer-page {
    padding: 0.75rem 0.7rem 1rem;
  }

  .app-shell {
    padding: 0.45rem 0.35rem 1rem;
  }

  .buyer-shell {
    padding: 0;
  }

  .layout {
    gap: 0.75rem;
  }

  .topbar {
    border-radius: 14px;
    padding: 0.85rem;
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 1.05rem;
    line-height: 1.35;
  }

  .topbar-actions {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .topbar-actions .ghost-btn {
    min-height: 44px;
    font-size: 0.82rem;
    flex: 1 1 150px;
  }

  .sidebar {
    position: static;
    padding: 0.7rem;
    gap: 0.7rem;
  }

  .role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    overflow: visible;
    padding-bottom: 0;
  }

  .role-tab {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 0.52rem 0.58rem;
  }

  .role-tab p,
  .screen-link p {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .role-tab span {
    display: none;
  }

  .screen-link {
    min-height: 44px;
    padding: 0.52rem 0.58rem;
  }

  .screen-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    overflow-x: visible;
    overflow-y: visible;
    max-height: none;
    padding: 0;
  }

  .screen-link {
    min-width: 0;
    width: 100%;
  }

  .screen-link span {
    display: none;
  }

  .screen-panel {
    padding: 0.9rem;
    border-radius: 14px;
  }

  .screen-header {
    flex-direction: column;
    gap: 0.6rem;
    padding-bottom: 0.8rem;
  }

  .screen-header h2 {
    font-size: 1.15rem;
  }

  .meta {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 0.62rem;
  }

  .card {
    padding: 0.72rem;
  }

  .journey-step {
    min-width: 0;
    width: 100%;
  }

  .journey-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    overflow: visible;
  }

  .prototype-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
  }

  .primary-btn,
  .tiny-btn {
    width: 100%;
    min-height: 44px;
  }

  .flow-list li,
  .actions-list li,
  .card p {
    font-size: 0.8rem;
  }

  .buyer-app-surface {
    padding: 0.4rem;
  }

  .mock-grid-2,
  .mock-live {
    grid-template-columns: 1fr;
  }

  .choice-grid,
  .inline-grid {
    grid-template-columns: 1fr;
  }

  .inline-row,
  .auth-actions {
    flex-direction: column;
  }

  .secondary-btn {
    width: 100%;
  }

  .mode-switch {
    grid-template-columns: 1fr;
  }
}

/* Force full-screen mobile app layout on real touch devices,
   even if browser reports a desktop-like viewport width. */
@media (hover: none) and (pointer: coarse) {
  body[data-role-page="buyer"] {
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }

  .buyer-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    height: auto;
    border: none;
    border-radius: 0;
    background: #0a1026;
    padding: 0;
  }

  body[data-role-page="buyer"] .app-shell {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
    padding: 0;
  }

  .buyer-main {
    margin: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }

  .buyer-app-surface {
    min-height: 0;
    height: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 0.35rem 0.15rem 0.7rem;
  }

  body[data-role-page="buyer"] .app-shell {
    padding-bottom: 0.25rem;
  }

  .topbar {
    padding: 0.72rem;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .role-tabs,
  .screen-nav,
  .journey-strip {
    grid-template-columns: 1fr;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  .pill {
    font-size: 0.7rem;
  }

}

/* Final mobile lock: force full-screen app on actual phones. */
@media only screen and (max-device-width: 1024px) {
  html,
  body[data-role-page="buyer"] {
    width: 100% !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    display: block !important;
    background: #0a1026 !important;
  }

  body[data-role-page="buyer"] .app-shell,
  body[data-role-page="buyer"] .buyer-shell {
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #0a1026 !important;
  }

  body[data-role-page="buyer"] .buyer-main {
    width: 100% !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  body[data-role-page="buyer"] .buyer-app-surface {
    width: 100% !important;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    position: relative !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body[data-role-page="buyer"] .buyer-page {
    width: 100% !important;
    max-width: none !important;
    padding: 0.75rem 0.7rem 1rem !important;
  }

  body[data-role-page="buyer"] .app-topbar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: max(env(safe-area-inset-top), 0px) !important;
    z-index: 30 !important;
  }
}
