:root {
  --bg-top: #f5f6f8;
  --bg-mid: #eef0f2;
  --bg-bottom: #e8eaed;
  --panel: rgba(255, 255, 255, 0.95);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --text: #1a1a2e;
  --muted: #6b7280;
  --accent: #e8731a;
  --accent-soft: rgba(232, 115, 26, 0.08);
  --mint: #e8731a;
  --rank-warm: rgba(220, 80, 60, 0.15);
  --rank-sand: rgba(232, 174, 88, 0.15);
  --rank-cool: rgba(100, 140, 200, 0.12);
  --rank-foam: rgba(232, 115, 26, 0.15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Outfit", sans-serif;
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
}

body.auth-locked { overflow: hidden; }

.app-shell { max-width: 520px; margin: 0 auto; padding: 1.08rem 0.8rem 1.8rem; }
.top-hero-card {
  margin-bottom: 0.92rem;
  padding: 0.96rem 0.9rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 1.18rem;
  background: linear-gradient(165deg, #1a1a2e, #1c1c2e);
  color: #f0f0f5;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.1);
}
.top-bar {
  margin-bottom: 0.88rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 16.2rem);
  gap: 0.96rem;
  align-items: center;
}
.top-bar-copy {
  display: grid;
  align-content: center;
  gap: 0.08rem;
  min-width: 0;
  padding: 0.1rem 0 0.16rem;
}
.eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.63rem;
}
h1 {
  margin: 0.02rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.72rem, 10.4vw, 4.42rem);
  line-height: 0.88;
  letter-spacing: -0.07em;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
  background: rgba(20, 20, 36, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.auth-gate.visible {
  opacity: 1;
  pointer-events: auto;
}

.auth-card {
  width: min(100%, 430px);
  margin: clamp(0.8rem, 4vh, 2rem) auto;
  border-radius: 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.15rem;
  color: #1a1a2e;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
}

.auth-card.landing-mode {
  width: min(100%, 760px);
  padding: 1.15rem;
  background: #ffffff;
}

.auth-eyebrow,
.auth-card h2,
.auth-copy,
.auth-gate-status { margin: 0; }

.auth-eyebrow {
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.69rem;
}

.auth-card h2 {
  margin-top: 0.38rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.7rem, 10vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: none;
}

.auth-copy,
.auth-gate-status {
  color: #6b7280;
  font-size: 0.98rem;
  line-height: 1.65;
}

.auth-copy {
  margin-top: 0.28rem;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.5;
}
.auth-gate-status { margin-top: 0.7rem; }

.auth-flow-panel { margin-top: 1rem; }

.auth-home-hero {
  display: grid;
  gap: 1rem;
}

.auth-home-paragraph,
.auth-home-launch-note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.72;
  color: #4b5563;
}

.auth-home-paragraph strong {
  color: var(--text);
  font-weight: 800;
  margin-right: 0.35rem;
}

.auth-home-cta {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.35rem;
}

.auth-home-primary,
.auth-home-secondary {
  min-height: 3.3rem;
}

.auth-home-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
}

.auth-home-launch-note {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.88rem;
  line-height: 1.6;
}

.auth-region-picker {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.4rem;
  max-width: 23rem;
}

.auth-region-picker label {
  display: grid;
  gap: 0.34rem;
  color: #6b7280;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-region-picker select {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fafbfc;
  color: #1a1a2e;
  font: inherit;
  padding: 0.68rem 0.75rem;
}

.auth-path-grid,
.auth-break-list,
.crew-request-results,
.auth-value-stack {
  display: grid;
  gap: 0.72rem;
}

.stacked-copy {
  display: grid;
  gap: 0.28rem;
}

.auth-path-btn,
.auth-break-btn,
.crew-request-card,
.auth-value-card,
.auth-setup-crew-card {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f7f8fa;
  color: var(--text);
}

.auth-path-btn {
  padding: 0.82rem 0.9rem;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-back-btn,
.auth-secondary-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text);
  background: #f0f1f3;
}

.auth-back-btn {
  margin-bottom: 0.8rem;
}

.auth-helper,
.auth-section-label {
  margin: 0;
  color: #6b7280;
  font-size: 0.72rem;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-form {
  display: grid;
  gap: 0.72rem;
}

.auth-form label,
.identity-control {
  display: grid;
  gap: 0.34rem;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-form label {
  color: #6b7280;
}

.identity-control {
  color: var(--muted);
}

.auth-form input,
.crew-create input {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fafbfc;
  color: #1a1a2e;
  font: inherit;
  padding: 0.68rem 0.75rem;
}

.auth-submit {
  padding: 0.78rem 0.9rem;
  border-color: transparent;
  color: #ffffff;
  font-weight: 800;
  background: #e8731a;
}

.crew-request-card,
.auth-break-btn,
.auth-value-card,
.auth-setup-crew-card {
  padding: 0.78rem 0.82rem;
}

.crew-request-card,
.auth-break-btn,
.auth-setup-crew-card {
  display: grid;
  gap: 0.28rem;
  text-align: left;
}

.auth-break-list { gap: 0.56rem; }

.auth-break-btn {
  padding: 0.72rem 0.82rem;
}

.crew-request-card strong,
.auth-break-btn strong,
.auth-value-card strong,
.auth-setup-crew-card strong {
  font-size: 0.96rem;
}

.crew-request-card span,
.auth-break-btn span,
.auth-value-card span,
.auth-setup-crew-card span {
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-break-btn.active {
  border-color: rgba(232, 115, 26, 0.35);
  background: rgba(232, 115, 26, 0.08);
}

.auth-setup-break-tools {
  display: grid;
  gap: 0.72rem;
}

.auth-setup-footer {
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

.auth-setup-footer .auth-submit {
  width: 100%;
}

.auth-setup-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: end;
}

.auth-setup-actions label {
  color: #6b7280;
}

.auth-setup-actions select {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fafbfc;
  color: #1a1a2e;
  font: inherit;
  padding: 0.68rem 0.75rem;
}

.auth-value-card {
  background: #f7f8fa;
}

.auth-request-hero,
.auth-map-card {
  display: grid;
  gap: 0.28rem;
  padding: 0.82rem 0.88rem;
  border-radius: 0.92rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f7f8fa;
}

.auth-request-hero strong,
.auth-map-card strong {
  font-size: 1rem;
}

.auth-request-hero span,
.auth-map-card span {
  color: #6b7280;
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-map-page {
  margin-top: 0.2rem;
}

#auth-map-back-btn {
  margin-bottom: 0.72rem;
}

.auth-setup-map {
  margin-top: 0.12rem;
  height: 260px;
  border-radius: 0.88rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f0f1f3;
}

.auth-value-card .auth-section-label {
  margin-bottom: 0.22rem;
}

.auth-confirmation-hero,
.auth-confirmation-copy {
  display: grid;
  gap: 0.28rem;
  padding: 0.88rem 0.92rem;
  border-radius: 0.92rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f7f8fa;
}

.auth-confirmation-copy {
  margin-top: 0.72rem;
}

.auth-confirmation-hero strong,
.auth-confirmation-copy strong {
  font-size: 1.08rem;
}

.auth-confirmation-hero span,
.auth-confirmation-copy span {
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-confirmation-points {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.72rem;
}

.auth-submit[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
}

.confidence-tile {
  width: 100%;
  min-height: 5.72rem;
  padding: 0.72rem 0.82rem 0.74rem;
  border-radius: 1.04rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: grid;
  align-content: start;
  gap: 0.22rem;
}

.confidence-kicker,
.confidence-percent,
.confidence-support {
  margin: 0;
}

.confidence-kicker {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.54rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.confidence-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.72rem;
}

.confidence-level {
  display: block;
  color: #f0f0f5;
  font-size: 1.58rem;
  line-height: 0.8;
  letter-spacing: -0.07em;
  padding-top: 0;
}

.confidence-percent {
  color: #e8731a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.26rem;
  line-height: 0.8;
  letter-spacing: -0.06em;
  flex-shrink: 0;
}

.confidence-support {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  line-height: 1.22;
}

.confidence-progress-block {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.12rem;
}

.confidence-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.confidence-progress-label,
.confidence-progress-detail {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
}

.confidence-progress-label {
  font-size: 0.68rem;
  line-height: 1.15;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.confidence-progress-detail {
  font-size: 0.63rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-align: right;
}

.confidence-progress-track {
  position: relative;
  height: 0.34rem;
  overflow: visible;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  margin-top: 0.05rem;
}

.confidence-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8731a, #f08c28);
  transition: width 180ms ease;
}

.confidence-progress-marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 50%;
  border: 1px solid rgba(232, 115, 26, 0.3);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -50%);
}

.confidence-progress-stop {
  position: absolute;
  top: 50%;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
}

.confidence-tile[data-state="firing"] {
  background: rgba(255, 255, 255, 0.1);
}

.confidence-tile[data-state="locked-in"] {
  background: rgba(255, 255, 255, 0.09);
}

.confidence-tile[data-state="dialing-in"] {
  background: rgba(255, 255, 255, 0.08);
}

.confidence-tile[data-state="feeling-it-out"] {
  background: rgba(255, 255, 255, 0.07);
}

.confidence-tile[data-state="fresh"] {
  background: rgba(255, 255, 255, 0.06);
}

.confidence-tile[data-state="firing"] .confidence-progress-fill {
  background: linear-gradient(90deg, #e8731a, #f08c28);
}

.confidence-tile[data-state="locked-in"] .confidence-progress-fill,
.confidence-tile[data-state="dialing-in"] .confidence-progress-fill {
  background: linear-gradient(90deg, #e8731a, #f08c28);
}

.confidence-tile[data-state="feeling-it-out"] .confidence-progress-fill {
  background: linear-gradient(90deg, #e8731a, #f08c28);
}

.confidence-tile[data-state="fresh"] .confidence-progress-fill {
  background: linear-gradient(90deg, #e8731a, #f08c28);
}

.panel {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 0.82rem;
  margin-bottom: 0.78rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.panel-label { margin: 0; color: #e8731a; text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.7rem; font-weight: 700; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.coords { margin: 0; color: var(--muted); font-size: 0.74rem; }

.identity-panel {
  position: relative;
  overflow: hidden;
  padding: 1rem 1rem 0.95rem;
  border-radius: 1.25rem;
  background: linear-gradient(165deg, #1a1a2e, #1c1c2e);
  color: #f0f0f5;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.identity-panel .panel-label {
  color: #e8731a;
}

.identity-panel .coords {
  color: rgba(255, 255, 255, 0.5);
}

.identity-panel .feedback-status {
  color: rgba(255, 255, 255, 0.5);
}

.identity-panel input,
.identity-panel select {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f0f0f5;
}

.identity-panel button {
  color: #d0d0dc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.identity-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.identity-hero {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.38rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.identity-heading {
  min-width: 0;
  display: grid;
  gap: 0.34rem;
}

.identity-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
}

.identity-crew-name {
  display: block;
  margin: 0;
  color: #f0f0f5;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.25rem, 7vw, 3.05rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.identity-switcher {
  width: auto;
  min-width: 7rem;
  margin: 0;
  padding: 0.48rem 2rem 0.48rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #d0d0dc;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: none;
}

.identity-summary,
.identity-break-meta,
.identity-member-status,
.identity-members-empty,
.identity-session-copy span {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
}

.identity-summary {
  font-size: 0.84rem;
  line-height: 1.3;
}

.identity-logout,
.identity-link-btn {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.identity-logout {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.identity-logout:hover,
.identity-link-btn:hover {
  color: #f0f0f5;
}

.identity-break-block {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.32rem;
}

.identity-break-name-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.8rem;
}

.identity-break-name-input {
  min-width: 0;
  margin: 0;
  padding: 0 0 0.12rem;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f0f0f5;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.identity-break-name-input:not([readonly]) {
  cursor: text;
}

.identity-break-name-input:not([readonly]):hover {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.identity-break-name-input.is-editing {
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.identity-break-name-input:focus {
  outline: none;
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.identity-break-name-input[readonly] {
  pointer-events: none;
}

.identity-break-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
}

.identity-break-name-hint {
  width: fit-content;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.identity-break-name-hint[hidden] {
  display: none;
}

.identity-break-save-btn {
  min-width: 4.9rem;
  padding: 0.58rem 0.82rem;
  font-size: 0.78rem;
}

.identity-break-save-btn:disabled {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.25);
  cursor: default;
}

.identity-break-meta {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.identity-break-meta:empty {
  display: none;
}

.identity-break-coords {
  color: #f0f0f5;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.98rem, 2.6vw, 1.08rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.identity-break-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 1rem;
}

.identity-break-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
}

.identity-link-btn {
  color: #e8731a;
  font-size: 0.78rem;
  font-weight: 700;
}

.identity-break-status {
  margin-top: 0.4rem;
  font-size: 0.76rem;
}

.identity-people,
.identity-utility-stack,
.identity-status {
  margin-top: 0.95rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.identity-people {
  margin-top: 1rem;
}

.identity-members-block {
  margin: 0;
  padding: 0;
  border: 0;
}

.identity-members-toggle {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  color: #f0f0f5;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.identity-members-toggle::-webkit-details-marker {
  display: none;
}

.identity-members-caret {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.identity-members-block[open] .identity-members-caret {
  transform: rotate(225deg);
}

.identity-members-list {
  margin-top: 0.6rem;
  display: grid;
  gap: 0;
}

.identity-session-row {
  display: grid;
  gap: 0.32rem;
}

.identity-session-copy {
  display: grid;
  gap: 0.12rem;
}

.identity-session-copy strong {
  color: #f0f0f5;
  font-size: 0.96rem;
  line-height: 1.2;
}

.identity-invite-row {
  margin: 0;
  padding: 0;
  border: 0;
}

.identity-utility-stack {
  display: grid;
  gap: 0.75rem;
}

.invite-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.invite-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 36, 0.6);
  backdrop-filter: blur(8px);
}

.invite-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 30rem);
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
}

.invite-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.invite-modal-head strong {
  color: #1a1a2e;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  line-height: 1.05;
}

.invite-modal-close {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 700;
}

.invite-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.invite-modal[hidden] {
  display: none;
}

.identity-member-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
}

.identity-member-head strong {
  color: #f0f0f5;
  font-size: 1rem;
  line-height: 1.2;
}

.identity-member-status,
.identity-members-empty,
.identity-session-copy span {
  font-size: 0.8rem;
  line-height: 1.3;
}

.identity-member-badge,
.identity-user-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  background: rgba(232, 115, 26, 0.15);
  color: #e8731a;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.identity-member-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.identity-member-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.identity-member-status {
  text-align: right;
}

.crew-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}

.crew-create-field {
  min-width: 0;
}

.identity-control {
  gap: 0.28rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.67rem;
  font-weight: 700;
}

.identity-control input {
  margin-top: 0;
  padding: 0.76rem 0.82rem;
  border-radius: 0.98rem;
  background: rgba(255, 255, 255, 0.08);
}

.identity-secondary-btn {
  padding: 0.68rem 0.92rem;
  border-radius: 999px;
  border-color: rgba(232, 115, 26, 0.5);
  background: transparent;
  color: #e8731a;
  font-weight: 700;
  box-shadow: none;
}

.identity-invite-row .identity-secondary-btn {
  width: auto;
}

.identity-status {
  font-size: 0.75rem;
}

.rank-panel {
  --rank-hero-size: clamp(226px, 49vw, 282px);
  display: grid;
  gap: 0.78rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-decision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13.8rem, 15rem);
  gap: 0.48rem;
  align-items: center;
}

.rank-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: center;
  min-height: var(--rank-hero-size);
  gap: 0.24rem;
  min-width: 0;
  padding: 0.08rem 0.02rem 0.04rem;
}
.rank-window-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.66rem 0.72rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.82rem;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}
.rank-window-row {
  grid-column: 1 / -1;
}
.rank-window-copy {
  display: grid;
  gap: 0.08rem;
}
.rank-window-kicker,
.rank-window-helper,
.rank-window-title {
  margin: 0;
}
.rank-window-kicker {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.rank-window-title {
  color: #f0f0f5;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.22;
}
.rank-timeline-wrap {
  margin-top: 0;
}
.rank-gauge-card {
  position: relative;
  display: grid;
  width: min(100%, var(--rank-hero-size));
  aspect-ratio: 1 / 1;
  justify-self: start;
  align-self: center;
  align-items: center;
  margin-top: 0;
}
.rank-gauge {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: block;
}
.rank-gauge-track {
  fill: none;
  stroke-width: 22;
  stroke-linecap: round;
  stroke-dasharray: 86 14;
  transform: rotate(55deg);
  transform-origin: 130px 130px;
  stroke: rgba(255, 255, 255, 0.12);
}

.rank-gauge-fill {
  fill: none;
  stroke-width: 22;
  stroke-linecap: round;
  transform: rotate(55deg);
  transform-origin: 130px 130px;
  transition: filter 400ms ease;
}

.rank-gauge-ticks line {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: stroke 300ms ease;
}

.rank-gauge-ticks line.tick-active {
  stroke: rgba(255, 255, 255, 0.7);
}

.rank-gauge-ticks line.tick-major {
  stroke-width: 2;
}

/* Perfect 10 easter egg */
@keyframes gauge-arc-breathe {
  0%, 100% { filter: drop-shadow(0 0 8px #2a6fdb99) drop-shadow(0 0 20px #2a6fdb44); }
  50%       { filter: drop-shadow(0 0 20px #2a6fdbcc) drop-shadow(0 0 44px #2a6fdb88); }
}
@keyframes gauge-score-glow {
  0%, 100% { text-shadow: 0 0 12px #2a6fdb55, 0 0 32px #2a6fdb22; }
  50%       { text-shadow: 0 0 28px #2a6fdba0, 0 0 64px #2a6fdb55; }
}
.rank-gauge-fill.gauge-perfect {
  animation: gauge-arc-breathe 3s ease-in-out infinite;
}
.rank-gauge-ticks.gauge-perfect line {
  stroke: rgba(255, 255, 255, 0.85) !important;
}
.rank-value.gauge-perfect {
  animation: gauge-score-glow 3s ease-in-out infinite;
}
.rank-score-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
.rank-value {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem;
  font-weight: 800;
  transform: translateY(-0.12rem);
}
#rank-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.5rem, 13vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: #ffffff;
}
.rank-denom {
  font-size: clamp(1.85rem, 4.6vw, 2.5rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
}
.rank-copy-below {
  display: none;
}

.decision-board {
  min-height: var(--rank-hero-size);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 2px solid rgba(232, 115, 26, 0.55);
  border-radius: 1.06rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
}

.decision-board-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.decision-cell {
  min-width: 0;
  padding: 0.56rem 0.62rem 0.52rem;
  display: grid;
  align-content: space-between;
  gap: 0.32rem;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
}

.decision-cell:nth-child(2n) {
  border-right: none;
}

.decision-cell:nth-last-child(-n + 2) {
  border-bottom: none;
}

.decision-cell-primary {
  background: rgba(0, 0, 0, 0.01);
}

.decision-cell-judgement {
  background: rgba(0, 0, 0, 0.01);
}

.decision-cell-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.3rem;
}

.decision-label {
  margin: 0;
  color: #555d68;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.14;
}

.decision-value {
  display: block;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.decision-cell-primary .decision-value {
  font-size: 1.32rem;
  font-weight: 700;
}

.decision-cell-direction .decision-value,
.decision-cell-energy .decision-value,
.decision-cell-tide .decision-value {
  font-size: 1.02rem;
}

.decision-cell-cleanliness .decision-value {
  font-size: 1.08rem;
  max-width: 8ch;
}

.decision-cell-confidence .decision-value {
  font-size: 1.18rem;
}

.decision-bearing {
  position: relative;
  width: 1.56rem;
  height: 1.56rem;
  border-radius: 0.54rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f5f6f8;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: none;
}

.decision-bearing::after {
  content: "";
  position: absolute;
  left: 0.26rem;
  right: 0.26rem;
  bottom: 0.24rem;
  height: 1px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
}

.decision-bearing[data-shore-edge="left"]::after,
.decision-bearing[data-shore-edge="right"]::after {
  top: 0.26rem;
  bottom: 0.26rem;
  left: auto;
  right: auto;
  width: 1px;
  height: auto;
}

.decision-bearing[data-shore-edge="left"]::after {
  left: 0.24rem;
}

.decision-bearing[data-shore-edge="right"]::after {
  right: 0.24rem;
}

.decision-bearing[data-shore-edge="top"]::after {
  top: 0.24rem;
  bottom: auto;
}

.decision-bearing[data-shore-edge="bottom"]::after {
  bottom: 0.24rem;
}

.decision-bearing svg {
  width: 0.72rem;
  height: 0.72rem;
  display: block;
  transform: rotate(var(--arrow-rotation, 0deg));
  transform-origin: 50% 50%;
  transition: transform 180ms ease;
}

.decision-bearing path {
  fill: #6b7280;
}

.decision-cell-cleanliness[data-state="clean"] {
  background: rgba(52, 168, 83, 0.06);
}

.decision-cell-cleanliness[data-state="slightly-bumpy"] {
  background: rgba(232, 174, 88, 0.08);
}

.decision-cell-cleanliness[data-state="bumpy"],
.decision-cell-cleanliness[data-state="blown-out"] {
  background: rgba(220, 80, 60, 0.06);
}

.decision-cell-confidence[data-state="high"] {
  background: rgba(52, 168, 83, 0.06);
}

.decision-cell-confidence[data-state="medium"] {
  background: rgba(232, 174, 88, 0.08);
}

.decision-cell-confidence[data-state="low"] {
  background: rgba(220, 80, 60, 0.06);
}

.target-time {
  margin: 0;
  grid-column: 1 / -1;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 800;
  padding: 0.8rem 0.94rem;
  border: 1px solid rgba(232, 115, 26, 0.3);
  border-radius: 0.88rem;
  background: linear-gradient(135deg, rgba(232, 115, 26, 0.2), rgba(232, 115, 26, 0.1));
  box-shadow: none;
}

.paddling-inline {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  column-gap: 0.72rem;
  row-gap: 0.38rem;
  align-items: center;
  padding-top: 0.42rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.paddling-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.paddling-status {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  line-height: 1.35;
}

.paddling-target {
  color: #f0f0f5;
  font-size: clamp(0.98rem, 2.2vw, 1.08rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.paddling-actions {
  display: grid;
  gap: 0.26rem;
  justify-items: end;
}

.paddling-out-btn {
  margin: 0;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f5;
  font-size: 0.78rem;
  font-weight: 700;
}

.paddling-out-btn.active {
  border-color: transparent;
  background: #e8731a;
  color: #ffffff;
}

.paddling-out-btn:disabled {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
  cursor: not-allowed;
}

.paddling-lines {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.28rem;
}

.paddling-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  line-height: 1.42;
}

.paddling-line-remove {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: baseline;
}

.paddling-line-remove:hover {
  color: rgba(255, 255, 255, 0.7);
}

.paddling-line-empty {
  color: rgba(255, 255, 255, 0.4);
}

.spot-context-card {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.78rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
}
.spot-context-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
}
.spot-context-copy { display: grid; gap: 0.14rem; }
.spot-context-copy .panel-label {
  color: rgba(255, 255, 255, 0.45);
}
.spot-context-copy strong { font-size: 1rem; color: #f0f0f5; }
.spot-context-copy span { color: rgba(255, 255, 255, 0.5); font-size: 0.79rem; }
.identity-home-break-card {
  margin-top: 0.8rem;
}
.identity-home-break-card .feedback-status {
  margin-top: 0;
}
.draft-spot-name-field {
  display: grid;
  gap: 0.34rem;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.draft-spot-name-field[hidden] {
  display: none;
}
.draft-spot-name-field input {
  width: 100%;
  border-radius: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f5;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.7rem 0.8rem;
}
.spot-context-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

#change-home-break-btn {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #e8731a;
  font-weight: 700;
}
.spot-lists {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.7rem;
}
.spot-list-block { display: grid; gap: 0.42rem; }
.spot-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}
.spot-chip {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.5rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.spot-chip.active {
  border-color: rgba(232, 115, 26, 0.5);
  background: rgba(232, 115, 26, 0.2);
  color: #f0f0f5;
}
.spot-discovery-list {
  display: grid;
  gap: 0.45rem;
}
.spot-discovery-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.72rem;
  padding: 0.56rem 0.62rem;
  background: rgba(255, 255, 255, 0.05);
}
.spot-discovery-copy {
  display: grid;
  gap: 0.08rem;
}
.spot-discovery-copy strong { font-size: 0.84rem; color: #f0f0f5; }
.spot-discovery-copy span { color: rgba(255, 255, 255, 0.5); font-size: 0.74rem; }
.spot-discovery-card.manual {
  border-style: dashed;
}
.spot-discovery-card.upgrade-card {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.spot-discovery-card.upgrade-card .spot-discovery-copy strong {
  color: #f0f0f5;
}
.spot-discovery-card.upgrade-card .spot-discovery-copy span {
  max-width: 38ch;
  line-height: 1.45;
}
.upgrade-cta {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}
.spot-upgrade-note {
  margin: 0.02rem 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  line-height: 1.4;
}
.spot-upgrade-note[hidden] {
  display: none;
}
.map-edit-hint {
  margin: 0.52rem 0 0;
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  line-height: 1.42;
}
.map-edit-hint[hidden] {
  display: none;
}
.map-stage { margin-top: 0.55rem; position: relative; height: 300px; border-radius: 0.85rem; overflow: hidden; }
.map-wrap { position: absolute; inset: 0; z-index: 1; border: 1px solid var(--line-strong); }
.swell-lines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.2;
  transform-origin: center;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0) 14px, rgba(255,255,255,0.46) 14px, rgba(255,255,255,0.46) 16px, rgba(255,255,255,0) 16px, rgba(255,255,255,0) 27px);
}
.map-legend { margin-top: 0.44rem; }
.map-legend p { margin: 0.2rem 0 0; font-size: 0.69rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.legend-swatch { width: 14px; height: 3px; border-radius: 4px; display: inline-block; }
.legend-swatch.swell { background: var(--mint); }
.legend-swatch.wind { background: #ff6a56; }
.legend-swatch.crew { background: #1f6fb0; }
.map-status { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.74rem; }

.spot-marker {
  appearance: none;
  display: block;
  padding: 0;
  width: 124px;
  height: 124px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  border: 2px solid rgba(232, 115, 26, 0.25);
  background: radial-gradient(circle, rgba(232, 115, 26, 0.08), rgba(232, 115, 26, 0.14));
}
.marker-core { width: 16px; height: 16px; border-radius: 50%; background: #d46457; border: 4px solid #f5ddd7; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dir-arrow { position: absolute; left: 50%; top: 50%; transform-origin: left center; width: 38px; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.dir-arrow.swell { border-left: 36px solid var(--mint); }
.dir-arrow.wind { border-left: 36px solid #cb564a; }
.mini-spot-marker,
.user-marker {
  appearance: none;
  display: block;
  padding: 0;
  width: 18px;
  height: 18px;
  aspect-ratio: 1 / 1;
  flex: 0 0 18px;
  border-radius: 50%;
  border: 2px solid #f7fbff;
  box-shadow: 0 6px 16px rgba(13, 30, 44, 0.24);
}
.mini-spot-marker.saved { background: #1f6fb0; }
.mini-spot-marker.nearby {
  background: rgba(22, 34, 48, 0.9);
  border-color: #1f6fb0;
}
.drag-handle-marker {
  position: relative;
  appearance: none;
  display: block;
  padding: 0;
  width: 28px;
  height: 28px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(13, 30, 44, 0.24);
}
.drag-handle-marker::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(31, 111, 176, 0.22);
  background: rgba(31, 111, 176, 0.08);
}
.drag-handle-marker::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: rgba(22, 34, 48, 0.96);
}
.drag-handle-marker.draft {
  background: linear-gradient(180deg, #2f7dc0, #185c93);
}
.drag-handle-marker.editing {
  background: linear-gradient(180deg, #f26a56, #c84a39);
}
#save-draft-spot-btn {
  border-color: transparent;
  background: #e8731a;
  color: #ffffff;
  font-weight: 800;
}
#cancel-draft-spot-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f0f5;
}
.user-marker {
  width: 14px;
  height: 14px;
  background: #ffb347;
  border-color: rgba(255, 255, 255, 0.95);
}

.timeline-wrap { margin-top: 0.68rem; }
.timeline-chart {
  position: relative;
  min-height: 86px;
}
.timeline-light-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.timeline-light-marker {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 0.14rem;
  transform: translateX(-50%);
}
.timeline-light-label {
  padding: 0.12rem 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.timeline-light-marker.first-light .timeline-light-label {
  color: #e8731a;
  background: rgba(232, 115, 26, 0.12);
}
.timeline-light-marker.last-light .timeline-light-label {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}
.timeline-light-tick {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
}
.timeline-strip {
  display: flex;
  gap: 0.72rem;
  align-items: stretch;
  min-height: 86px;
}
.timeline-day-group {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.2rem;
}
.timeline-day-group + .timeline-day-group {
  padding-left: 0.72rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.timeline-day-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.timeline-day-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  min-height: 54px;
  align-items: end;
}
.timeline-day-bars span {
  display: block;
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.timeline-bar.daylight {
  opacity: 1;
}
.timeline-bar.active {
  outline: 2px solid rgba(232, 115, 26, 0.6);
  box-shadow: 0 0 0 1px rgba(232, 115, 26, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}
input[type="range"] { width: 100%; margin-top: 0.56rem; accent-color: var(--accent); }
.timeline-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.72rem; }

/* --- Legendary tier bar wrappers --- */
.timeline-tier-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.timeline-tier-label {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1;
  margin-bottom: 3px;
  display: block;
  pointer-events: none;
}

/* XL — 10ft+: steel blue steady glow */
@keyframes xl-glow {
  0%, 100% { box-shadow: 0 0 5px 1px rgba(78, 168, 222, 0.45); }
  50%       { box-shadow: 0 0 10px 3px rgba(78, 168, 222, 0.7); }
}
.tier-label-xl { color: #4ea8de; }
.timeline-bar-xl {
  background: linear-gradient(to top, #1a6fa0, #4ea8de, #a8d8f0);
  animation: xl-glow 2.4s ease-in-out infinite;
}

/* Legendary — 12ft+ clean: shimmering gold crown */
@keyframes legendary-bar-shimmer {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(255, 215, 0, 0.55); }
  50%       { box-shadow: 0 0 16px 5px rgba(255, 185, 0, 0.8); }
}
@keyframes legendary-crown-pulse {
  0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 6px #ffd700, 0 0 12px #ffd700; }
  50%       { opacity: 0.75; transform: scale(1.2); text-shadow: 0 0 14px #ffd700, 0 0 28px #ffaa00; }
}
.tier-label-legendary {
  color: #ffd700;
  animation: legendary-crown-pulse 1.6s ease-in-out infinite;
}
.timeline-bar-legendary {
  background: linear-gradient(to top, #b8860b, #ffd700, #fffacd);
  animation: legendary-bar-shimmer 1.6s ease-in-out infinite;
}

/* XXL — 20ft+: electric violet lightning */
@keyframes xxl-lightning {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(180, 80, 255, 0.7), 0 0 20px 4px rgba(120, 0, 255, 0.4); }
  25%       { box-shadow: 0 0 18px 5px rgba(220, 100, 255, 0.95), 0 0 36px 8px rgba(160, 0, 255, 0.65); }
  50%       { box-shadow: 0 0 6px 1px rgba(180, 80, 255, 0.5), 0 0 14px 3px rgba(120, 0, 255, 0.3); }
  75%       { box-shadow: 0 0 22px 7px rgba(240, 120, 255, 1), 0 0 44px 12px rgba(180, 0, 255, 0.75); }
}
@keyframes xxl-label-pulse {
  0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 8px #cc44ff, 0 0 16px #9900ff; }
  50%       { opacity: 0.8; transform: scale(1.2); text-shadow: 0 0 18px #ee88ff, 0 0 36px #cc00ff; }
}
.tier-label-xxl {
  color: #fff;
  animation: xxl-label-pulse 0.7s ease-in-out infinite;
}
.timeline-bar-xxl {
  background: linear-gradient(to top, #4a00a0, #9933ff, #ee88ff);
  animation: xxl-lightning 0.7s ease-in-out infinite;
}

/* Active state for tier wraps */
.timeline-tier-wrap.active .timeline-bar {
  outline: 2px solid rgba(232, 115, 26, 0.6);
  box-shadow: 0 0 0 1px rgba(232, 115, 26, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

textarea, select {
  margin-top: 0.34rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.62rem;
  background: #fafbfc;
  color: var(--text);
  font: inherit;
  padding: 0.48rem 0.58rem;
}
textarea { margin-top: 0.6rem; min-height: 88px; resize: vertical; }
.report-block,
.calibration-block {
  margin-top: 0.58rem;
}
.report-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.82rem;
  padding: 0.72rem;
  background: #fafbfc;
}

button {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.62rem;
  color: #1a1a2e;
  background: #ffffff;
  font: inherit;
  font-size: 0.76rem;
  padding: 0.44rem 0.6rem;
}
.feedback-status { margin: 0.56rem 0 0; color: var(--muted); font-size: 0.76rem; }
.feedback-status:empty { display: none; }

.report-feed { margin-top: 0.56rem; display: grid; gap: 0.42rem; }
.report-observed {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.42rem;
}
.report-observed-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}
.report-observed-btn {
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 700;
}
.report-observed-btn.active {
  border-color: #e8731a;
  background: rgba(232, 115, 26, 0.08);
  color: #e8731a;
}
.report-observed-custom {
  display: grid;
  gap: 0.32rem;
  color: #6b7280;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.report-observed-custom[hidden] {
  display: none;
}
.report-observed-custom input {
  width: 100%;
  border-radius: 0.68rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fafbfc;
  color: #1a1a2e;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.64rem 0.74rem;
}
.report-empty {
  margin: 0;
  color: #6b7280;
  font-size: 0.74rem;
  line-height: 1.4;
}
.report-credit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  border: 1px solid rgba(232, 115, 26, 0.15);
  border-radius: 0.68rem;
  background: rgba(232, 115, 26, 0.04);
  padding: 0.55rem 0.62rem;
}
.report-credit-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8731a;
  box-shadow: none;
  position: relative;
  color: transparent;
}
.report-credit-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(40deg);
}
.report-credit-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.report-credit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.32rem;
  min-width: 0;
}
.report-credit-copy strong {
  font-size: 0.82rem;
  color: #e8731a;
  line-height: 1.2;
}
.report-credit-summary {
  color: #4b5563;
  font-size: 0.79rem;
  line-height: 1.28;
  min-width: 0;
}
.report-credit-meta {
  color: #6b7280;
  font-size: 0.72rem;
}

.memory-strip {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.26rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.68rem;
  padding: 0.52rem 0.58rem;
  background: #f7f8fa;
}
.memory-strip p { margin: 0; color: #4b5563; font-size: 0.77rem; }

.calibration-block {
  margin-top: 0.72rem;
}
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.feedback-group {
  margin-top: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.64rem;
  padding: 0.5rem 0.56rem;
  background: #fafbfc;
}
.feedback-group p { margin: 0 0 0.36rem; font-size: 0.79rem; color: #1a1a2e; font-weight: 800; }
.feedback-group div { display: flex; flex-wrap: wrap; gap: 0.42rem; }
.feedback-group button.active { border-color: #e8731a; background: rgba(232, 115, 26, 0.06); color: #e8731a; font-weight: 700; }

.submit-btn {
  width: 100%;
  margin-top: 0.82rem;
  padding: 0.63rem;
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  background: #e8731a;
}

.app-source-line {
  margin: 0.82rem 0 0;
  color: #6b7280;
  font-size: 0.72rem;
  line-height: 1.5;
  text-wrap: balance;
}

@media (max-width: 460px) {
  .auth-card.landing-mode {
    padding: 1rem;
  }

  .top-bar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .top-hero-card {
    padding: 0.92rem 0.82rem 0.84rem;
  }

  .confidence-tile {
    width: 100%;
    min-height: 6.2rem;
  }

  .rank-decision-row {
    grid-template-columns: 1fr;
  }

  .decision-board {
    min-height: auto;
  }

  .decision-board-grid {
    grid-template-rows: repeat(4, minmax(74px, auto));
  }

  .identity-break-name-form {
    grid-template-columns: 1fr;
  }

  .identity-break-meta-row {
    align-items: start;
  }

  .identity-break-actions {
    width: 100%;
  }

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

@media (max-width: 380px) {
  .crew-create { grid-template-columns: 1fr; }
  .auth-setup-actions { grid-template-columns: 1fr; }
  .spot-context-head { grid-template-columns: 1fr; }
  .spot-context-actions { flex-direction: column; }
  .spot-discovery-card { grid-template-columns: 1fr; }

  .identity-panel {
    padding: 0.9rem 0.82rem;
  }

  .identity-crew-name {
    font-size: clamp(1.86rem, 9vw, 2.3rem);
  }

  .identity-break-name-input {
    font-size: clamp(1.62rem, 8vw, 2rem);
  }

  .identity-break-meta-row {
    justify-content: flex-start;
  }

  .identity-member-item {
    grid-template-columns: 1fr;
    gap: 0.14rem;
  }

  .identity-member-status {
    text-align: left;
  }

  .rank-panel {
    --rank-hero-size: 214px;
  }

  .decision-cell {
    padding: 0.5rem 0.52rem 0.48rem;
  }

  .decision-value {
    font-size: 1rem;
  }

  .decision-cell-primary .decision-value {
    font-size: 1.22rem;
  }

  .decision-cell-direction .decision-value,
  .decision-cell-energy .decision-value,
  .decision-cell-tide .decision-value,
  .decision-cell-cleanliness .decision-value {
    font-size: 0.96rem;
  }

  .decision-cell-confidence .decision-value {
    font-size: 1.12rem;
  }

  .paddling-inline { grid-template-columns: 1fr; }
  .paddling-actions { justify-items: start; }
  .timeline-chart {
    min-height: 84px;
  }
  .timeline-strip {
    gap: 0.48rem;
    min-height: 84px;
  }
  .timeline-day-group + .timeline-day-group {
    padding-left: 0.48rem;
  }
  .timeline-day-label {
    font-size: 0.6rem;
  }
}

@media (min-width: 760px) {
  .auth-card.landing-mode {
    padding: 1.4rem;
  }

  .auth-home-cta {
    grid-template-columns: repeat(2, minmax(0, 12rem));
  }

  .auth-home-cta .auth-home-primary {
    grid-column: auto;
  }
}
