:root {
  --ink: #0b0c0d;
  --ink-2: #111315;
  --panel: #17191b;
  --panel-2: #1e2124;
  --panel-3: #25292d;
  --chalk: #f4f1e8;
  --muted: #a8a8a3;
  --faint: #909398;
  --line: rgba(255, 255, 255, 0.09);
  --orange: #ff5a16;
  --orange-2: #ff7a35;
  --lime: #a8ef37;
  --danger: #ff4e62;
  --blue: #5da7ff;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--chalk);
  background: #050607;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #050607;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(255, 90, 22, 0.08), transparent 30rem),
    #050607;
}

.skip-link {
  position: fixed;
  top: calc(8px + var(--safe-top));
  left: 50%;
  z-index: 300;
  min-height: 44px;
  padding: 11px 18px;
  border: 2px solid var(--lime);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--chalk);
  font-weight: 900;
  transform: translate(-50%, -150%);
  transition: transform .16s ease-out;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

[role="dialog"]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -4px;
}

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

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: clip;
  background: var(--ink);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.72);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  min-height: calc(60px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 16px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: rgba(11, 12, 13, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.offline-banner {
  position: sticky;
  top: calc(60px + var(--safe-top));
  z-index: 34;
  min-height: 44px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255, 90, 22, .45);
  background: #2b160e;
  color: var(--chalk);
  font-size: 11px;
}

.offline-banner b {
  flex: 0 0 auto;
  color: var(--orange-2);
}

.offline-banner span {
  color: #d8c9c1;
}

.cloud-sync-banner {
  position: sticky;
  top: calc(60px + var(--safe-top));
  z-index: 34;
  min-height: 50px;
  padding: 7px 12px 7px 16px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(25, 27, 29, .97);
  backdrop-filter: blur(16px);
}

.cloud-sync-banner.ready { border-bottom-color: rgba(168, 239, 55, .35); }
.cloud-sync-banner.working { border-bottom-color: rgba(255, 90, 22, .45); }
.cloud-sync-banner.error,
.cloud-sync-banner.offline,
.cloud-sync-banner.local { border-bottom-color: rgba(255, 90, 22, .35); }

.cloud-sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #777a7d;
  box-shadow: 0 0 0 4px rgba(119, 122, 125, .12);
}

.cloud-sync-banner.ready .cloud-sync-dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(168, 239, 55, .12); }
.cloud-sync-banner.working .cloud-sync-dot { background: var(--orange); animation: cloud-pulse 1.2s ease-in-out infinite; }
.cloud-sync-banner.error .cloud-sync-dot,
.cloud-sync-banner.offline .cloud-sync-dot { background: #ff735f; }

@keyframes cloud-pulse {
  50% { opacity: .35; transform: scale(.78); }
}

.cloud-sync-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.cloud-sync-copy b,
.cloud-sync-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cloud-sync-copy b { color: var(--chalk); font-size: 12px; }
.cloud-sync-copy small { color: var(--muted); font-size: 10px; }
.cloud-sync-banner.ready .cloud-sync-copy b { color: var(--lime); }
.cloud-sync-banner.working .cloud-sync-copy b { color: var(--orange-2); }

.brand {
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 48px;
  min-height: 44px;
  display: inline-grid;
  place-items: center start;
  color: var(--chalk);
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.08em;
  cursor: pointer;
}

.gym-switcher {
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--chalk);
  cursor: pointer;
}

.gym-switcher strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}

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

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--chalk);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
}

.icon-button:active {
  background: var(--panel-2);
}

.page {
  padding: 14px 14px calc(100px + var(--safe-bottom));
  min-height: calc(100dvh - 60px);
}

.page-head {
  margin: 6px 2px 16px;
}

.page-head.has-back {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.page-head-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.page-head.has-back .page-kicker {
  line-height: 1.2;
}

.page-head.has-back h1,
.page-head.has-back p {
  margin: 0;
}

.page-back-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--chalk);
  cursor: pointer;
}

.page-back-button:active {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateX(-1px);
}

.page-back-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-kicker {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-head h1 {
  margin: 6px 0 4px;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-pad {
  padding: 16px;
}

.card-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.card-head small {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.live-dot,
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06);
}

.live-dot.active,
.status-dot.active {
  background: var(--lime);
}

.workout-card {
  padding: 18px;
  background:
    linear-gradient(120deg, rgba(255, 90, 22, 0.12), transparent 45%),
    var(--panel);
}

.workout-card h2 {
  margin: 12px 0 2px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.workout-card .timer {
  margin: 8px 0 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(34px, 11vw, 52px);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--panel-2);
  color: var(--chalk);
  font-weight: 800;
  cursor: pointer;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn.primary {
  border-color: var(--orange);
  background: var(--orange);
  color: #130800;
}

.btn.primary:active {
  background: var(--orange-2);
}

.btn.outline {
  border-color: var(--orange);
  color: var(--orange);
  background: transparent;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn.small {
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
}

.btn.block {
  width: 100%;
}

.attendance-card {
  padding: 14px;
}

.attendance-meta {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.avatar-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 8px;
}

.avatar-person {
  min-width: 0;
  text-align: center;
}

.avatar-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 5px;
  position: relative;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.16);
  background: var(--avatar, #34383d);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
}

.avatar-person .status-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
}

.avatar-name {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #d5d4cf;
  font-size: 11px;
}

.avatar-list.compact {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0 6px;
  scrollbar-width: none;
}

.avatar-list.compact[data-horizontal-scroll],
.badge-row[data-horizontal-scroll] {
  padding-right: 44px;
}

.avatar-list.compact::-webkit-scrollbar {
  display: none;
}

.avatar-list.compact .avatar-person {
  flex: 0 0 58px;
}

.avatar-list.compact .avatar-wrap {
  width: 42px;
  height: 42px;
}

.horizontal-rail {
  min-width: 0;
  position: relative;
}

.horizontal-rail [data-horizontal-scroll] {
  scroll-behavior: smooth;
}

.scroll-edge-cue {
  position: absolute;
  top: 50%;
  right: 4px;
  z-index: 4;
  min-height: 32px;
  padding: 5px 7px 5px 9px;
  border: 1px solid rgba(255, 90, 22, .45);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 3px;
  transform: translateY(-50%);
  background: rgba(11, 12, 13, .92);
  color: var(--orange);
  box-shadow: -10px 0 22px rgba(11, 12, 13, .88);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease-out;
}

.scroll-edge-cue span {
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.scroll-edge-cue b {
  font-size: 18px;
  line-height: 1;
}

.horizontal-rail.has-overflow:not(.at-end) .scroll-edge-cue {
  opacity: 1;
}

.horizontal-rail.has-overflow.at-start:not(.at-end) [data-horizontal-scroll] {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 42px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 42px), transparent 100%);
}

.horizontal-rail.has-overflow:not(.at-start):not(.at-end) [data-horizontal-scroll] {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 42px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 42px), transparent 100%);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-card {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: pointer;
}

.mini-card strong {
  display: block;
  margin: 12px 0 4px;
  font-size: 25px;
}

.mini-card small {
  color: var(--muted);
  line-height: 1.4;
}

.rank-rise {
  color: var(--orange);
  font-size: 14px;
}

.progress {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #34373a;
}

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

.project-feature {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.route-art {
  min-height: 150px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 18% 82%, var(--hold, #ff5a16) 0 8px, transparent 9px),
    radial-gradient(ellipse at 48% 67%, var(--hold, #ff5a16) 0 13px, transparent 14px),
    radial-gradient(ellipse at 66% 43%, var(--hold, #ff5a16) 0 11px, transparent 12px),
    radial-gradient(ellipse at 38% 26%, var(--hold, #ff5a16) 0 12px, transparent 13px),
    radial-gradient(ellipse at 74% 14%, var(--hold, #ff5a16) 0 8px, transparent 9px),
    radial-gradient(circle at 14% 22%, #436b89 0 6px, transparent 7px),
    radial-gradient(circle at 82% 72%, #a33b6d 0 7px, transparent 8px),
    linear-gradient(105deg, #777a7c 0%, #4b4d4e 100%);
}

.route-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.22) .6px, transparent .8px);
  background-size: 7px 7px;
  opacity: .6;
  z-index: -1;
}

.route-art .wall-label {
  position: absolute;
  left: 9px;
  bottom: 9px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(0,0,0,.72);
  font-size: 10px;
  font-weight: 800;
}

.project-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-copy h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.route-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.grade {
  display: inline-flex;
  min-width: 38px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--orange);
  border-radius: 9px;
  color: var(--chalk);
  font-weight: 900;
}

.color-chip {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  background: var(--chip, var(--orange));
}

.route-card {
  padding: 12px;
}

.route-summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding-bottom: 12px;
}

.route-summary .route-art {
  min-height: 100px;
}

.route-summary h3 {
  margin: 4px 0 7px;
  font-size: 18px;
}

.route-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.route-actions .btn {
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
}

.grade-gate {
  min-height: 50px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  gap: 3px;
  background: rgba(255, 255, 255, .025);
}

.grade-gate span {
  color: var(--muted);
  font-size: 10px;
}

.grade-gate b {
  font-size: 11px;
  line-height: 1.45;
}

.grade-gate.locked {
  border-color: rgba(255, 90, 22, .46);
  background: rgba(255, 90, 22, .055);
}

.grade-gate.locked b {
  color: var(--orange);
}

.grade-gate.unlocked {
  border-color: rgba(168, 239, 55, .42);
  background: rgba(168, 239, 55, .055);
}

.strong-approval-card,
.highest-grade-progress {
  border-color: color-mix(in srgb, var(--orange) 42%, var(--line));
}

.strong-approval-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.strong-approval-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--orange) 5%, var(--surface));
}

.highest-grade-progress .progress {
  margin-top: 12px;
}

.highest-grade-progress p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.grade-progress-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
}

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

.grade-progress-footer b {
  color: var(--lime);
  white-space: nowrap;
}

.grade-gate.unlocked b {
  color: var(--lime);
}

.route-style-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.route-style-list span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(168, 239, 55, .34);
  border-radius: 8px;
  color: var(--lime);
  background: rgba(168, 239, 55, .06);
  font-size: 11px;
  font-weight: 800;
}

.route-rating-row {
  width: 100%;
  min-height: 48px;
  margin-top: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  color: var(--chalk);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.route-rating-row span {
  display: grid;
  gap: 2px;
}

.route-rating-row small {
  color: var(--muted);
}

.route-rating-row i {
  color: var(--orange);
  font-style: normal;
  font-size: 22px;
}

.social-section {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  overflow: hidden;
}

.social-toggle {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--chalk);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.social-toggle strong {
  font-size: 14px;
}

.social-body {
  padding: 0 10px 12px;
  border-top: 1px solid var(--line);
}

.social-body[hidden] {
  display: none;
}

.social-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
  padding: 12px 4px;
}

.stat-item {
  min-width: 0;
  padding: 2px 8px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: 0;
}

.stat-item strong {
  display: block;
  margin-top: 5px;
  font-size: 25px;
}

.stat-item small {
  color: var(--muted);
  font-size: 10px;
}

.scanner-stage {
  padding: 0;
}

.scanner-flow {
  display: grid;
  gap: 12px;
}

.scanner-stepper {
  position: relative;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.scanner-stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 17%;
  right: 17%;
  height: 2px;
  background: var(--line);
}

.scanner-stepper li {
  position: relative;
  z-index: 1;
}

.scanner-stepper button {
  width: 100%;
  min-height: 58px;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  align-content: start;
  gap: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.scanner-stepper button:disabled {
  cursor: default;
  opacity: .55;
}

.scanner-stepper button span {
  width: 36px;
  height: 36px;
  border: 2px solid #666a6e;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.scanner-stepper button b {
  font-size: 11px;
}

.scanner-stepper .active button,
.scanner-stepper .done button {
  color: var(--orange);
}

.scanner-stepper .active button span {
  border-color: var(--orange);
  background: var(--orange);
  color: #1c0a00;
  box-shadow: 0 0 0 4px rgba(255, 90, 22, .12);
}

.scanner-stepper .done button span {
  border-color: var(--lime);
  background: var(--lime);
  color: #183000;
}

.scanner-step-card,
.scanner-ready-card {
  padding: 16px;
}

.scanner-step-card {
  display: grid;
  gap: 12px;
}

.scanner-step-card .scan-result {
  margin-bottom: 0;
}

.canvas-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #303235;
}

#route-canvas {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: crosshair;
  touch-action: manipulation;
}

.scanner-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  pointer-events: none;
}

.scanner-empty strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.scanner-empty span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.scanner-panel {
  padding: 14px;
}

.scanner-edit-card {
  display: grid;
  gap: 12px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 13px;
  background: var(--panel-3);
}

.mode-tab {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.mode-tab.active {
  background: var(--orange);
  color: #130800;
}

.swatches {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 44px 10px 2px;
  scrollbar-width: none;
}

.swatch {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 3px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
}

.swatch.active {
  border-color: var(--chalk);
  box-shadow: 0 0 0 3px var(--orange);
}

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

.scan-result strong {
  font-size: 20px;
}

.confidence {
  color: var(--lime);
  font-weight: 900;
}

.sam-segmentation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px 12px;
  padding: 12px;
  border: 1px solid rgba(168, 239, 55, .24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 239, 55, .07), rgba(255, 255, 255, .025));
}

.sam-segmentation-panel.complete {
  border-color: rgba(168, 239, 55, .62);
  box-shadow: inset 0 0 0 1px rgba(168, 239, 55, .08);
}

.sam-segmentation-panel.error {
  border-color: rgba(255, 90, 22, .44);
  background: rgba(255, 90, 22, .055);
}

.sam-segmentation-panel.loading .btn,
.sam-segmentation-panel.running .btn {
  border-color: rgba(255, 90, 22, .72);
  color: var(--orange);
}

.sam-segmentation-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sam-segmentation-copy > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sam-segmentation-copy strong {
  color: var(--chalk);
  font-size: 14px;
}

.sam-segmentation-copy small {
  color: var(--lime);
  font-size: 12px;
  font-weight: 850;
}

.sam-local-badge {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(168, 239, 55, .13);
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
}

.sam-segmentation-panel .btn {
  min-height: 46px;
  padding-inline: 12px;
  font-size: 12px;
  white-space: nowrap;
}

.sam-segmentation-panel .btn:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.sam-segmentation-panel p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.sam-segmentation-panel progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--lime);
}

.range-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.range-row label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.range-row output {
  color: var(--orange);
  font-size: 17px;
  font-weight: 950;
}

input[type="range"] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--orange);
}

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

.scanner-tools .btn {
  padding: 0 8px;
  font-size: 12px;
}

.scanner-tools .btn:disabled,
.scanner-selection-bar button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.scanner-selection-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
}

.scanner-selection-bar strong {
  color: var(--chalk);
  font-size: 13px;
}

.scanner-focus-indicator {
  position: absolute;
  top: auto;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(244, 241, 232, .24);
  border-radius: 999px;
  background: rgba(11, 12, 13, .80);
  color: var(--chalk);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.scanner-focus-indicator span {
  color: var(--orange);
  font-size: 18px;
}

.scanner-focus-indicator b {
  font-size: 12px;
}

.scanner-focus-indicator small {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.scanner-focus-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.scanner-focus-panel.active {
  border-color: rgba(255, 90, 22, .72);
  background: rgba(255, 90, 22, .08);
  box-shadow: inset 0 0 0 1px rgba(244, 241, 232, .05);
}

.scanner-focus-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.scanner-focus-panel strong {
  color: var(--chalk);
  font-size: 14px;
}

.scanner-focus-panel small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.scanner-focus-actions .btn {
  min-height: 46px;
  padding-inline: 8px;
  font-size: 12px;
}

.scanner-focus-actions .btn:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.text-action {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--orange);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.endpoint-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.endpoint-tools .btn {
  font-size: 12px;
}

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

.scanner-ready-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.scanner-ready-color {
  width: 50px;
  height: 50px;
  border: 3px solid var(--chalk);
  border-radius: 50%;
  background: var(--ready-color, var(--orange));
  box-shadow: 0 0 0 3px var(--orange);
}

.scanner-ready-card small,
.scanner-ready-card strong,
.scanner-ready-card span {
  display: block;
}

.scanner-ready-card small,
.scanner-ready-card span {
  color: var(--muted);
  font-size: 11px;
}

.scanner-ready-card strong {
  margin: 3px 0;
  font-size: 18px;
}

.scanner-sticky {
  position: sticky;
  bottom: calc(84px + var(--safe-bottom));
  z-index: 10;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17,19,21,.94);
  backdrop-filter: blur(16px);
}

.community-form {
  padding: 16px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--chalk);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.custom-wall-zone-field {
  padding: 12px;
  border: 1px solid rgba(255, 90, 22, .55);
  border-radius: 14px;
  background: rgba(255, 90, 22, .06);
}

.custom-wall-zone-field[hidden] {
  display: none;
}

.custom-wall-zone-field input {
  border-color: rgba(255, 90, 22, .5);
}

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

.route-style-chip {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.route-style-chip.active {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255, 90, 22, .09);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 22, .35);
}

.route-rating-field {
  margin: 14px 0 18px;
}

.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0;
  padding: 0 44px 4px 14px;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar,
.swatches::-webkit-scrollbar,
.badge-row::-webkit-scrollbar {
  display: none;
}

.filter-rail {
  margin: 0 -14px 12px;
}

.filter-chip {
  min-height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
}

.filter-chip.active {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255, 90, 22, .08);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table th,
.rank-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.rank-table th {
  color: var(--muted);
  font-size: 11px;
}

.rank-table td {
  font-size: 13px;
}

.rank-table tr.me {
  background: rgba(255,90,22,.09);
}

.rank-table .rank-no {
  width: 44px;
  font-weight: 950;
  color: var(--orange);
}

.climber-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.climber-cell .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.profile-hero {
  padding: 20px;
  text-align: center;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  margin: 0 auto 12px;
  border: 3px solid var(--orange);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--avatar, #3d4954);
  font-size: 25px;
  font-weight: 950;
}

.cloud-identity-card {
  border-color: rgba(255, 90, 22, .28);
  background: linear-gradient(145deg, rgba(255, 90, 22, .08), var(--panel));
}

.cloud-identity-card.ready {
  border-color: rgba(168, 239, 55, .28);
  background: linear-gradient(145deg, rgba(168, 239, 55, .07), var(--panel));
}

.cloud-identity-card .card-head > span {
  color: var(--orange-2);
  font-size: 12px;
  font-weight: 900;
}

.cloud-identity-card.ready .card-head > span { color: var(--lime); }
.cloud-identity-card p { margin: 10px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.public-video-section {
  margin: 12px 0;
  border: 1px solid rgba(229, 171, 57, .32);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(229, 171, 57, .05);
}

.public-video-section summary {
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--chalk);
  cursor: pointer;
  list-style: none;
  font-weight: 850;
}

.public-video-section summary::-webkit-details-marker { display: none; }
.public-video-section summary b { color: #e5ab39; font-size: 12px; }
.public-video-list { display: grid; border-top: 1px solid rgba(229, 171, 57, .2); }

.public-video-list a {
  min-height: 58px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--chalk);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.public-video-list a:last-child { border-bottom: 0; }
.public-video-list .avatar { width: 36px; height: 36px; }
.public-video-list a > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.public-video-list b,
.public-video-list small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.public-video-list small { color: var(--muted); font-size: 10px; }
.public-video-list i { color: #e5ab39; font-size: 11px; font-style: normal; }

.profile-hero h2 {
  margin: 0 0 4px;
}

.profile-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.badge-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.badge {
  min-width: 104px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  text-align: center;
}

.badge .badge-icon {
  display: block;
  font-size: 26px;
}

.badge strong {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: min(100%, 480px);
  min-height: calc(72px + var(--safe-bottom));
  transform: translateX(-50%);
  padding: 8px 5px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(10, 11, 12, 0.96);
  border-top: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(20px);
}

.nav-item {
  min-width: 0;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: #8c8e92;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  cursor: pointer;
}

.nav-item .nav-icon {
  font-size: 21px;
  line-height: 1;
}

.nav-item .nav-label {
  font-size: 10px;
}

.nav-item.active {
  color: var(--orange);
}

.nav-item.scan {
  position: relative;
  top: -24px;
}

.nav-item.scan .nav-icon {
  width: 62px;
  height: 62px;
  border: 4px solid #242628;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(255, 90, 22, .36);
  font-size: 25px;
}

.nav-item.scan .nav-label {
  margin-top: -1px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.68);
}

.bottom-sheet {
  width: min(100%, 480px);
  max-height: 83dvh;
  overflow-y: auto;
  padding: 10px 16px calc(18px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--panel-2);
  box-shadow: 0 -18px 50px rgba(0,0,0,.5);
  animation: sheet-in .2s ease-out;
}

@keyframes sheet-in {
  from { transform: translateY(20px); opacity: .3; }
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: #777a7d;
}

.sheet-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 19px;
}

.invite-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
  margin: 14px 0 18px;
}

.invite-choice {
  position: relative;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--chalk);
  text-align: center;
}

.invite-choice .avatar {
  width: 52px;
  height: 52px;
  margin: 0 auto 5px;
}

.invite-choice .check {
  position: absolute;
  top: -3px;
  right: calc(50% - 31px);
  width: 21px;
  height: 21px;
  border: 2px solid #a3a5a8;
  border-radius: 50%;
  background: var(--panel-2);
  display: grid;
  place-items: center;
  font-size: 11px;
}

.invite-choice.selected .check {
  border-color: var(--orange);
  background: var(--orange);
  color: #130800;
}

.invite-choice span:last-child {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.location-state {
  margin: 12px 0;
  padding: 14px;
  border-radius: 14px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.location-state.good {
  color: var(--lime);
}

.location-state.bad {
  color: #ff9b9b;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 120;
  width: min(calc(100% - 32px), 420px);
  transform: translateX(-50%);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #292d31;
  color: var(--chalk);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 13px;
  animation: toast-in .18s ease-out;
}

.update-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 75;
  width: min(calc(100% - 28px), 440px);
  transform: translateX(-50%);
  padding: 13px;
  border: 1px solid rgba(255, 90, 22, .62);
  border-radius: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: rgba(23, 25, 27, .98);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .55);
  backdrop-filter: blur(18px);
}

.update-prompt b,
.update-prompt span {
  display: block;
}

.update-prompt b {
  color: var(--orange);
  font-size: 14px;
}

.update-prompt span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.update-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

@keyframes toast-in {
  from { transform: translate(-50%, 10px); opacity: 0; }
}

.trust-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.trust-tag.muted,
.muted {
  color: var(--muted);
}

.orange {
  color: var(--orange);
}

.lime {
  color: var(--lime);
}

.gold,
.trust-tag.gold {
  color: #e5ab39;
}

.route-confidence-rail {
  margin: 2px 0 14px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 9px;
  white-space: nowrap;
}

.route-confidence-rail i {
  height: 1px;
  background: var(--line);
}

.route-confidence-rail .active {
  color: var(--orange);
  font-weight: 900;
}

.observation-sheet {
  max-height: 92dvh;
}

.observation-summary {
  min-height: 48px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--panel-3);
}

.observation-summary span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.match-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.match-candidate {
  width: 100%;
  min-height: 92px;
  padding: 8px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--chalk);
  text-align: left;
}

.match-candidate.selected {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--lime);
}

.match-thumb .route-art {
  min-height: 72px;
  border-radius: 10px;
}

.match-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.match-copy b,
.match-copy small,
.match-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.match-copy small {
  color: var(--muted);
}

.match-copy strong {
  color: var(--lime);
  font-size: 12px;
}

.match-check {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--muted);
  border-radius: 50%;
}

.selected .match-check {
  border-color: var(--lime);
  background: var(--lime);
  color: #102000;
  font-weight: 900;
}

.claim-summary {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.verification-backdrop {
  background: rgba(0, 0, 0, .8);
}

.verification-sheet {
  height: min(94dvh, 860px);
  max-height: 94dvh;
}

.dual-confidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 6px 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.dual-confidence > div {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 3px;
}

.dual-confidence > div + div {
  border-left: 1px solid var(--line);
}

.dual-confidence small,
.dual-confidence span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.verification-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 2px 0 16px;
}

.verification-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 10px;
}

.verification-step::before,
.verification-step::after {
  content: "";
  position: absolute;
  top: 13px;
  height: 2px;
  width: 50%;
  background: var(--line);
}

.verification-step::before {
  left: 0;
}

.verification-step::after {
  right: 0;
}

.verification-step:first-child::before,
.verification-step:last-child::after {
  display: none;
}

.verification-step span {
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--faint);
  border-radius: 50%;
  background: var(--panel-2);
  font-weight: 900;
}

.verification-step.reached {
  color: var(--verify);
}

.verification-step.reached span {
  border-color: var(--verify);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--verify) 18%, transparent);
}

.ranking-impact {
  margin-bottom: 12px;
  padding: 13px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
}

.ranking-impact.high-impact {
  border-color: rgba(255, 90, 22, .72);
  background: rgba(255, 90, 22, .06);
}

.ranking-impact small,
.ranking-impact b {
  color: var(--muted);
}

.ranking-impact strong {
  font-size: 21px;
}

.ranking-impact.high-impact strong,
.ranking-impact.high-impact b {
  color: var(--orange);
}

.ranking-impact > div {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.verification-actions {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.verification-method-note {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 90, 22, .48);
  border-radius: 12px;
  display: grid;
  gap: 3px;
  background: rgba(255, 90, 22, .06);
}

.verification-method-note b {
  color: var(--orange);
  font-size: 12px;
}

.verification-method-note span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.verification-option {
  width: 100%;
  min-height: 66px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--chalk);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.verification-option:disabled {
  cursor: default;
  opacity: .72;
}

.verification-option:last-child {
  border-bottom: 0;
}

.verification-option > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.verification-option small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.verify-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #323538;
  color: #aaa;
  font-size: 17px;
}

.verify-icon.witness {
  color: #a46de5;
}

.verify-icon.video {
  color: #4d91ff;
}

.verify-icon.staff {
  color: #e5ab39;
}

.score-audit-card {
  margin-bottom: 12px;
  padding: 14px;
}

.score-audit-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.score-audit-card small,
.score-audit-card p {
  color: var(--muted);
  font-size: 11px;
}

.score-formula {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.score-formula b {
  color: var(--orange);
}

.community-maintained {
  min-height: 74px;
  margin-bottom: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 90, 22, .5);
  border-radius: 15px;
  background: rgba(255, 90, 22, .06);
}

.community-maintained > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.community-maintained small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.role-readonly {
  max-width: 112px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.steward-hero {
  margin-bottom: 12px;
}

.steward-hero > div:first-child {
  display: flex;
  align-items: end;
  gap: 4px;
}

.steward-hero > div:first-child small {
  margin-right: auto;
  color: var(--muted);
}

.steward-hero > div:first-child strong {
  color: var(--orange);
  font-size: 34px;
}

.steward-hero > div:nth-child(2) {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.steward-hero > div:nth-child(2) b {
  flex: 1;
  padding: 8px;
  border-radius: 9px;
  background: var(--panel-3);
  text-align: center;
  font-size: 11px;
}

.steward-hero p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.steward-route {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.steward-route-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.steward-route-main > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.steward-route-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.canonical-list {
  display: grid;
}

.canonical-list > div {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.canonical-list > div b {
  align-self: end;
}

.canonical-list > div small {
  grid-column: 2;
  align-self: start;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.canonical-list > div .trust-tag {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.trust-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.trust-legend span {
  min-height: 40px;
  padding: 7px 3px;
  display: grid;
  place-items: center;
  border: 1px solid var(--verify);
  border-radius: 9px;
  color: var(--verify);
  font-size: 9px;
  text-align: center;
}

.session-live-meta {
  margin: -4px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 10px;
}

.session-live-meta span:first-child {
  font-weight: 900;
}

.session-confirm {
  margin-bottom: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 90, 22, .6);
  border-radius: 12px;
  background: rgba(255, 90, 22, .08);
  font-size: 11px;
}

.session-summary-backdrop {
  background: rgba(0, 0, 0, .82);
}

.session-summary-sheet {
  height: min(94dvh, 860px);
  max-height: 94dvh;
}

.session-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.session-summary-head h2 {
  margin: 0 0 3px;
  font-size: 23px;
}

.session-summary-head small {
  color: var(--muted);
}

.summary-check {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--lime);
  border-radius: 50%;
  color: var(--lime);
  font-size: 24px;
  font-weight: 900;
}

.real-duration {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 8px 0 14px;
}

.real-duration span {
  color: var(--muted);
}

.real-duration strong {
  font-size: clamp(32px, 10vw, 46px);
  letter-spacing: -.05em;
}

.session-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 12px;
  padding: 12px 2px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.session-metrics > div {
  min-width: 0;
  text-align: center;
  border-right: 1px solid var(--line);
}

.session-metrics > div:last-child {
  border-right: 0;
}

.session-metrics strong,
.session-metrics small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.session-metrics strong {
  font-size: 17px;
}

.session-metrics small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.points-breakdown {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.points-breakdown > div {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.points-breakdown small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
}

.points-breakdown b {
  white-space: nowrap;
}

.points-breakdown em {
  margin-left: 4px;
  padding: 3px 5px;
  border-radius: 5px;
  background: var(--orange);
  color: #1c0a00;
  font-size: 8px;
  font-style: normal;
}

.points-breakdown footer {
  min-height: 44px;
  margin-top: 7px;
  padding-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  border-top: 1px solid var(--line);
}

.points-breakdown footer strong {
  margin-left: auto;
  color: var(--orange);
  font-size: 26px;
}

.duration-milestones {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 5px 0 7px;
}

.duration-milestones > div {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--faint);
}

.duration-milestones > div::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.duration-milestones > div:last-child::after {
  display: none;
}

.duration-milestones span {
  z-index: 1;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 2px solid var(--faint);
  border-radius: 50%;
  background: var(--panel-2);
  font-size: 10px;
}

.duration-milestones small,
.duration-milestones b {
  font-size: 8px;
}

.duration-milestones b {
  visibility: hidden;
}

.duration-milestones .reached {
  color: var(--lime);
}

.duration-milestones .reached span {
  border-color: var(--lime);
  background: var(--lime);
  color: #183000;
}

.duration-milestones .reached::after {
  background: var(--lime);
}

.duration-milestones .reached b {
  visibility: visible;
}

.duration-rule {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.session-proof {
  margin-bottom: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--verify);
  border-radius: 11px;
}

.session-proof b {
  color: var(--verify);
  font-size: 12px;
}

.session-proof small {
  color: var(--muted);
  font-size: 9px;
}

.recent-session-row {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: baseline;
  gap: 5px;
  margin-top: 10px;
}

.recent-session-row strong {
  color: var(--orange);
  font-size: 18px;
}

.recent-session-row span {
  color: var(--muted);
  font-size: 10px;
}

.divider {
  height: 1px;
  margin: 12px 0;
  background: var(--line);
}

.hidden {
  display: none !important;
}

@media (max-width: 359px) {
  .page {
    padding-left: 10px;
    padding-right: 10px;
  }

  .project-feature {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .avatar-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .scanner-ready-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .scanner-ready-card .btn {
    grid-column: 1 / -1;
  }

  .update-prompt {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 481px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 36px);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 28px;
  }

  .bottom-nav {
    bottom: 18px;
    border-radius: 0 0 28px 28px;
  }

  .modal-backdrop {
    align-items: center;
  }

  .bottom-sheet {
    border-radius: 24px;
    max-height: min(780px, 90dvh);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
