.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  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: var(--text);
  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-hero-intro {
  display: grid;
}

.auth-hero-copy {
  display: grid;
}

.auth-eyebrow,
.auth-card h2,
.auth-copy,
.auth-gate-status { margin: 0; }
.auth-gate-status[hidden] { display: none !important; }

.auth-eyebrow {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.69rem;
}

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

.auth-copy,
.auth-gate-status {
  color: var(--text-secondary);
  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-cta {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.35rem;
}

.auth-card:not(.landing-mode) {
  position: relative;
  border-color: rgba(87, 121, 140, 0.12);
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 115, 26, 0.08), rgba(232, 115, 26, 0) 25%),
    linear-gradient(180deg, #fbfdfd, #f3f8f9);
  box-shadow: 0 22px 50px rgba(21, 32, 39, 0.16);
}

.auth-card:not(.landing-mode) .auth-hero-intro {
  padding-bottom: 0.34rem;
  border-bottom: 1px solid rgba(87, 121, 140, 0.08);
}

.auth-card:not(.landing-mode) .auth-hero-copy {
  gap: 0.24rem;
}

.auth-card:not(.landing-mode) .auth-eyebrow,
.auth-card:not(.landing-mode) .auth-helper,
.auth-card:not(.landing-mode) .auth-section-label,
.auth-card:not(.landing-mode) .auth-region-picker label,
.auth-card:not(.landing-mode) .auth-form label,
.auth-card:not(.landing-mode) .auth-setup-actions label {
  color: var(--text-tertiary);
}

.auth-card:not(.landing-mode) h2 {
  color: #1d2c35;
  font-size: clamp(1.95rem, 8.4vw, 3.1rem);
  line-height: 0.94;
}

.auth-card:not(.landing-mode) .auth-copy,
.auth-card:not(.landing-mode) .auth-gate-status {
  color: var(--text-secondary);
}

.auth-card:not(.landing-mode) .auth-region-picker select,
.auth-card:not(.landing-mode) .auth-form input,
.auth-card:not(.landing-mode) .auth-setup-actions select {
  border-color: rgba(87, 121, 140, 0.12);
  background: rgba(248, 253, 254, 0.94);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.auth-card:not(.landing-mode) .auth-path-btn,
.auth-card:not(.landing-mode) .auth-break-btn,
.auth-card:not(.landing-mode) .auth-request-hero,
.auth-card:not(.landing-mode) .auth-map-card {
  border-color: rgba(87, 121, 140, 0.1);
  background: linear-gradient(180deg, rgba(250, 253, 254, 0.98), rgba(242, 248, 249, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 12px 24px rgba(81, 111, 125, 0.07);
}

.auth-card:not(.landing-mode) .auth-request-hero,
.auth-card:not(.landing-mode) .auth-map-card {
  box-shadow:
    inset 3px 0 0 rgba(232, 115, 26, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 12px 24px rgba(81, 111, 125, 0.07);
}

.auth-card:not(.landing-mode) .auth-break-btn strong,
.auth-card:not(.landing-mode) .auth-request-hero strong,
.auth-card:not(.landing-mode) .auth-map-card strong {
  color: var(--text);
}

.auth-card:not(.landing-mode) .auth-break-btn span,
.auth-card:not(.landing-mode) .auth-request-hero span,
.auth-card:not(.landing-mode) .auth-map-card span {
  color: var(--text-secondary);
}

.auth-card:not(.landing-mode) .auth-break-btn.active {
  border-color: rgba(232, 115, 26, 0.26);
  background: linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(249, 241, 233, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 12px 24px rgba(232, 115, 26, 0.1);
}

.auth-card:not(.landing-mode) .auth-back-btn,
.auth-card:not(.landing-mode) .auth-secondary-btn {
  border-color: rgba(87, 121, 140, 0.14);
  color: #30434c;
  background: rgba(242, 248, 250, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-card:not(.landing-mode) .auth-submit {
  box-shadow: 0 12px 24px rgba(232, 115, 26, 0.16);
}

.auth-card:not(.landing-mode) .auth-setup-footer {
  margin-top: 1.08rem;
}

.auth-card:not(.landing-mode) .auth-setup-map {
  border-color: rgba(87, 121, 140, 0.14);
  background: linear-gradient(180deg, rgba(225, 236, 241, 0.9), rgba(241, 247, 249, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.auth-card.landing-mode .auth-eyebrow {
  color: rgba(244, 247, 252, 0.8);
  letter-spacing: 0.18em;
}

.auth-card.landing-mode .auth-hero-intro {
  position: relative;
  overflow: hidden;
  min-height: clamp(15.5rem, 52vw, 22rem);
  padding: clamp(1.15rem, 3vw, 1.9rem);
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, rgba(11, 18, 28, 0.18) 0%, rgba(10, 16, 24, 0.78) 76%),
    linear-gradient(90deg, rgba(11, 18, 28, 0.68) 0%, rgba(11, 18, 28, 0.38) 42%, rgba(11, 18, 28, 0.08) 100%),
    url("assets/landing-hero.jpeg");
  background-size: cover;
  background-position: center 54%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  align-items: end;
}

.auth-card.landing-mode .auth-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 27rem;
  align-self: end;
  gap: 0.3rem;
  padding-bottom: clamp(0.2rem, 0.8vw, 0.7rem);
}

.auth-card.landing-mode #auth-title {
  color: #f7f9fc;
  max-width: 9ch;
  text-wrap: balance;
}

.auth-made-in {
  display: none;
}

.auth-card.landing-mode .auth-made-in {
  display: block;
  margin-top: 0.2rem;
  color: rgba(224, 231, 240, 0.78);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
}

.auth-card.landing-mode .auth-copy {
  max-width: 23rem;
  margin-top: 0.62rem;
  color: rgba(237, 241, 247, 0.94);
  font-family: var(--lb-font-sans);
  font-size: clamp(1.12rem, 2.2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.45;
  text-wrap: balance;
}

.auth-card.landing-mode #auth-entry-panel {
  margin-top: 1.7rem;
}

.auth-card.landing-mode .auth-home-hero {
  max-width: 42rem;
  gap: 1.6rem;
}

.auth-card.landing-mode .auth-home-cta {
  margin-top: 1.45rem;
}

.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-region-picker {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.4rem;
  max-width: 23rem;
}

.auth-region-picker label {
  display: grid;
  gap: 0.34rem;
  color: var(--text-secondary);
  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: var(--text);
  font: inherit;
  padding: 0.68rem 0.75rem;
}

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

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

.auth-path-btn,
.auth-break-btn {
  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: var(--text-secondary);
  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: var(--text-secondary);
}

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

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

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

.auth-break-btn {
  padding: 0.78rem 0.82rem;
  display: grid;
  gap: 0.28rem;
  text-align: left;
}

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

.auth-break-btn {
  padding: 0.46rem 0.68rem;
  border-radius: 0.72rem;
}

.auth-break-btn strong {
  font-size: 0.88rem;
  color: var(--lb-ink);
}

.auth-break-btn span {
  color: rgba(33, 46, 58, 0.78);
  font-size: 0.77rem;
  line-height: 1.32;
}

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

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

.auth-surf-fit-block,
.surf-fit-panel {
  display: grid;
  gap: 0.75rem;
}

.surf-fit-panel {
  padding: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
}

.surf-fit-panel[hidden] {
  display: none;
}

.surf-fit-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.surf-fit-summary {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.35;
}

.surf-fit-options {
  display: grid;
  gap: 0.42rem;
}

.surf-fit-option-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.42rem;
  align-items: start;
}

.auth-surf-fit-block .surf-fit-option-wrap {
  grid-template-columns: minmax(0, 1fr);
}

.surf-fit-options[hidden] {
  display: none;
}

.surf-fit-option {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.58rem;
  padding: 0.56rem 0.68rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.surf-fit-option strong {
  font-size: 0.86rem;
}

.surf-fit-option span {
  color: var(--text-secondary);
  font-size: 0.74rem;
  line-height: 1.24;
}

.surf-fit-option:hover {
  border-color: rgba(21, 101, 192, 0.34);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.surf-fit-option.active {
  border-color: rgba(21, 101, 192, 0.72);
  background: rgba(21, 101, 192, 0.09);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.16);
}

.surf-fit-option-compact {
  padding: 0.52rem 0.65rem;
}

.surf-fit-info-btn {
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-secondary);
  font-family: var(--lb-font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.surf-fit-info-btn[aria-expanded="true"] {
  border-color: rgba(21, 101, 192, 0.58);
  color: #1565c0;
  background: rgba(21, 101, 192, 0.08);
}

.surf-fit-info-popout {
  grid-column: 1 / -1;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(21, 101, 192, 0.18);
  border-radius: 0.58rem;
  background: rgba(21, 101, 192, 0.06);
  color: var(--text-secondary);
  font-family: var(--lb-font-sans);
  font-size: 0.76rem;
  line-height: 1.35;
}

.crew-manage-card .surf-fit-panel {
  position: relative;
  overflow: visible;
  padding: 0.82rem;
  border-color: rgba(232, 115, 26, 0.28);
  background: rgba(255, 122, 28, 0.06);
  border-radius: 0.96rem;
  box-shadow: none;
}

.crew-manage-card .surf-fit-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.2rem;
  background: #e8731a;
}

.crew-manage-card .surf-fit-summary {
  color: var(--lb-ink-60);
}

.crew-manage-card .surf-fit-option {
  border-color: var(--lb-hairline);
  background: var(--lb-bg-raised);
  color: var(--lb-ink);
  box-shadow: none;
}

.crew-manage-card .surf-fit-option span {
  color: var(--lb-ink-60);
}

.crew-manage-card .surf-fit-option:hover {
  border-color: rgba(246, 175, 110, 0.38);
  background: rgba(232, 115, 26, 0.08);
}

.crew-manage-card .surf-fit-option.active {
  border-color: rgba(246, 175, 110, 0.58);
  background: rgba(232, 115, 26, 0.13);
  box-shadow: 0 0 0 2px rgba(246, 175, 110, 0.14);
}

.surf-fit-nudge {
  display: grid;
  gap: 0.62rem;
  padding: 0.72rem;
  border: 1px solid rgba(120, 176, 199, 0.18);
  border-radius: 0.72rem;
  background: rgba(241, 251, 255, 0.07);
}

.surf-fit-nudge[hidden] {
  display: none;
}

.surf-fit-nudge-copy {
  margin: 0;
  color: rgba(244, 229, 213, 0.86);
  font-size: 0.78rem;
  line-height: 1.38;
}

.surf-fit-nudge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.surf-fit-nudge-actions .identity-secondary-btn,
.surf-fit-nudge-actions .identity-link-btn {
  min-height: 2.24rem;
}

.surf-preference-advanced {
  display: grid;
  gap: 0.68rem;
}

.surf-preference-advanced summary {
  cursor: pointer;
  color: rgba(244, 229, 213, 0.88);
  font-size: 0.78rem;
  font-weight: 800;
}

.surf-preference-advanced[open] summary {
  margin-bottom: 0.62rem;
}

.surf-preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

.surf-preference-helper,
.surf-preference-source,
.surf-preference-field-wide,
.surf-preference-actions {
  grid-column: 1 / -1;
}

.surf-preference-helper,
.surf-preference-source {
  margin: 0;
  color: var(--lb-ink-60);
  font-size: 0.74rem;
  line-height: 1.35;
}

.surf-preference-source {
  color: rgba(244, 229, 213, 0.82);
  font-weight: 800;
}

.surf-preference-field input {
  width: 100%;
}

.surf-preference-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.surf-preference-actions .identity-secondary-btn,
.surf-preference-actions .identity-link-btn {
  min-height: 2.35rem;
}

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

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

#auth-setup-panel #auth-cancel-change-btn[data-auth-action="logout"] {
  position: absolute;
  top: 0.84rem;
  right: 0.9rem;
  min-height: 1.9rem;
  width: auto;
  padding: 0.24rem 0.48rem;
  border-radius: 0.42rem;
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: none;
}

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

.auth-setup-actions label {
  color: var(--text-secondary);
}

.auth-setup-select-wrap {
  display: block;
}

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

.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: var(--text-secondary);
  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-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: var(--lb-ink-60);
  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: var(--lb-ink);
  font-size: 1.58rem;
  line-height: 0.8;
  letter-spacing: -0.07em;
  padding-top: 0;
}

.confidence-percent {
  color: #e8731a;
  font-family: var(--lb-font-sans);
  font-size: 2.26rem;
  line-height: 0.8;
  letter-spacing: -0.06em;
  flex-shrink: 0;
}

.confidence-support {
  color: var(--lb-ink-60);
  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: var(--lb-ink-40);
}

.confidence-progress-label {
  font-size: 0.68rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--lb-ink-60);
}

.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(--text-secondary); font-size: 0.74rem; }

.identity-panel {
  position: relative;
  overflow: hidden;
  padding: 0.88rem 0.92rem 0.84rem;
  border-radius: 1.12rem;
  background: linear-gradient(165deg, #0d1b2a, #0f1f30);
  color: var(--lb-ink);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

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

.identity-panel .coords {
  color: var(--lb-ink-60);
}

.identity-panel .feedback-status {
  color: var(--lb-ink-60);
}

.identity-panel input,
.identity-panel select {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--lb-hairline);
  color: var(--lb-ink);
}

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

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

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

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

.identity-manage-toggle {
  list-style: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0.66rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.86rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  color: var(--lb-ink-80);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.identity-manage-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.05);
}

.identity-manage-toggle[aria-expanded="true"] .identity-manage-caret {
  transform: rotate(225deg);
}

.identity-crew-tools {
  display: grid;
  gap: 0.52rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.94rem;
  background: rgba(255, 255, 255, 0.03);
}

.identity-owned-crews {
  display: grid;
  gap: 0.42rem;
}

.identity-owned-crews-label {
  margin: 0;
  color: var(--lb-ink-40);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.identity-owned-crews-list {
  display: grid;
  gap: 0.36rem;
}

.identity-name-row {
  display: block;
  min-width: 0;
}

.identity-crew-name {
  display: block;
  margin: 0;
  color: var(--lb-ink);
  font-family: var(--lb-font-sans);
  font-size: clamp(1.8rem, 5.8vw, 2.38rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.identity-switcher {
  width: min(100%, 18rem);
  min-width: 0;
  margin: 0;
  padding: 0.42rem 1.8rem 0.42rem 0.66rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #d0d0dc;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: none;
}

.break-switcher-list {
  display: grid;
  gap: 0.32rem;
}

.break-switcher-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.44rem 0.66rem;
  border-radius: 0.68rem;
  border: 1px solid rgba(33, 46, 58, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--lb-ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.break-switcher-card:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(33, 46, 58, 0.22);
}

.break-switcher-card.is-active {
  border-color: rgba(120, 176, 199, 0.35);
  background: rgba(120, 176, 199, 0.12);
  cursor: default;
}

.break-switcher-card-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.break-switcher-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lb-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.break-switcher-card-crew {
  font-size: 0.68rem;
  color: rgba(33, 46, 58, 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.break-switcher-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ab0c7;
  flex-shrink: 0;
}

.identity-summary,
.identity-break-meta,
.identity-member-status,
.identity-members-empty,
.identity-session-copy span {
  margin: 0;
  color: var(--lb-ink-60);
}

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

.identity-crew-actions,
.identity-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem 0.72rem;
}

.identity-crew-editor,
.identity-delete-confirm {
  display: grid;
  gap: 0.52rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.88rem;
  background: rgba(255, 255, 255, 0.04);
}

.identity-crew-editor-field {
  min-width: 0;
}

.identity-delete-copy {
  margin: 0;
  color: var(--lb-ink-80);
  font-size: 0.74rem;
  line-height: 1.45;
}

.identity-owned-crew-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.82rem;
  background: rgba(255, 255, 255, 0.04);
}

.identity-owned-crew-copy {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.identity-owned-crew-copy strong {
  color: var(--lb-ink);
  font-size: 0.84rem;
  line-height: 1.2;
}

.identity-owned-crew-copy span {
  margin: 0;
  color: var(--lb-ink-60);
  font-size: 0.72rem;
  line-height: 1.3;
}

.identity-owned-crew-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 0.8rem;
}

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

.identity-logout {
  color: var(--lb-ink-60);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.identity-logout:hover,
.identity-link-btn:hover {
  color: var(--lb-ink);
}

.identity-break-block {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.26rem;
  padding: 0.58rem 0.66rem 0.54rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.94rem;
  background: rgba(255, 255, 255, 0.03);
}

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

.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: var(--lb-ink);
  font-family: var(--lb-font-sans);
  font-size: clamp(1.14rem, 3.7vw, 1.42rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
}

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

.identity-break-name-input:not([readonly]):hover {
  border-bottom-color: var(--lb-hairline-2);
}

.identity-break-name-input.is-editing {
  border-bottom-color: var(--lb-ink-20);
}

.identity-break-name-input:focus {
  outline: none;
  border-bottom-color: var(--lb-ember);
}

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

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

.identity-break-name-hint {
  width: fit-content;
  color: var(--lb-ink-40);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.identity-break-save-btn {
  min-width: 3.5rem;
  padding: 0.42rem 0.68rem;
  font-size: 0.72rem;
}

.identity-break-save-btn:disabled {
  border-color: var(--lb-hairline);
  background: rgba(255, 255, 255, 0.05);
  color: var(--lb-ink-20);
  cursor: default;
}

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

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

.identity-break-coords {
  color: var(--lb-ink);
  font-family: var(--lb-font-sans);
  font-size: clamp(0.82rem, 2vw, 0.92rem);
  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.18rem 0.6rem;
}

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

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

.identity-link-btn-danger {
  color: #f78b8b;
}

.identity-link-btn-danger:hover {
  color: #ffd2d2;
}

.identity-danger-btn {
  border-color: rgba(247, 139, 139, 0.5);
  color: #f78b8b;
}

.identity-danger-btn:disabled {
  border-color: var(--lb-hairline);
  color: var(--lb-ink-20);
}

.identity-break-status {
  margin-top: 0.18rem;
  font-size: 0.68rem;
}

.identity-break-status:empty,
.identity-status:empty {
  display: none;
}

.identity-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.66rem;
}

.identity-quick-actions .identity-secondary-btn {
  min-width: 0;
  padding: 0.46rem 0.72rem;
  font-size: 0.72rem;
}

.identity-section-card {
  margin-top: 0.82rem;
  display: grid;
  gap: 0.68rem;
  padding: 0.72rem 0.76rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.94rem;
  background: rgba(255, 255, 255, 0.03);
}

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

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

.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: var(--lb-ink);
  font-size: 0.72rem;
  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.45rem;
  display: grid;
  gap: 0;
}

.identity-session-row {
  margin-top: 0.78rem;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.24rem;
}

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

.identity-session-copy strong {
  color: var(--lb-ink);
  font-size: 0.9rem;
  line-height: 1.2;
}

.identity-invite-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.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: var(--text);
  font-family: var(--lb-font-sans);
  font-size: 1.1rem;
  line-height: 1.05;
}

.invite-modal-close {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
}

.invite-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

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

.crew-manage-modal {
  position: fixed;
  inset: 0;
  z-index: 61;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}

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

.surf-journal-chooser-modal {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.surf-journal-chooser-modal[hidden] {
  display: none;
}

.surf-journal-chooser-card {
  width: min(100%, 26rem);
}

.surf-journal-chooser-actions {
  display: grid;
  gap: 0.75rem;
}

.surf-journal-chooser-btn {
  width: 100%;
  justify-content: center;
}

.surf-journal-page {
  position: fixed;
  inset: 0;
  z-index: 63;
  display: grid;
}

.surf-journal-page[hidden] {
  display: none;
}

.surf-journal-page-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(244, 248, 249, 0.98), rgba(233, 239, 240, 0.99));
}

.surf-journal-page-card {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  margin: 0 auto;
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1rem 0.9rem 2rem;
  color: #22343d;
}

.surf-journal-page-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.2rem;
}

.surf-journal-page-head strong {
  justify-self: center;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.surf-journal-title-stack {
  justify-self: center;
  display: grid;
  gap: 0.12rem;
  text-align: center;
}

.surf-journal-context {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.surf-journal-page-spacer {
  width: 3rem;
}

.surf-journal-page-status {
  margin: 0;
}

.surf-journal-page-actions {
  display: grid;
}

.surf-journal-page-actions .identity-secondary-btn {
  width: 100%;
}

.surf-journal-current-session,
.surf-journal-list {
  display: grid;
  gap: 0.75rem;
}

.surf-journal-section-label {
  margin: 0;
  color: rgba(77, 99, 112, 0.78);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.surf-journal-session-row {
  width: 100%;
  display: grid;
  gap: 0.42rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(90, 116, 128, 0.14);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(31, 48, 59, 0.08);
  text-align: left;
}

.surf-journal-session-row-compact {
  box-shadow: 0 10px 24px rgba(31, 48, 59, 0.06);
}

.surf-journal-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.surf-journal-session-head strong {
  color: #112029;
  font-size: 1rem;
}

.surf-journal-session-badge {
  padding: 0.26rem 0.56rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.surf-journal-session-badge-live {
  background: rgba(232, 115, 26, 0.14);
  color: #bf6117;
}

.surf-journal-session-badge-timed_out {
  background: rgba(192, 82, 62, 0.13);
  color: #9e412f;
}

.surf-journal-session-badge-completed {
  background: rgba(78, 164, 108, 0.12);
  color: #2f7444;
}

.surf-journal-session-meta,
.surf-journal-session-notes {
  margin: 0;
  color: #556974;
  font-size: 0.9rem;
}

.surf-journal-form-card {
  gap: 1.1rem;
}

.surf-journal-form {
  display: grid;
  gap: 0.95rem;
}

.surf-journal-quality-wrap {
  display: grid;
  gap: 0.55rem;
}

.surf-journal-quality-label,
.surf-journal-notes-count {
  margin: 0;
  color: #61737e;
  font-size: 0.82rem;
}

.surf-journal-quality-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.surf-journal-quality-buttons button {
  padding: 0.78rem 0.35rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(90, 116, 128, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #4f6571;
  font-weight: 700;
}

.surf-journal-quality-buttons button.active {
  border-color: rgba(232, 115, 26, 0.34);
  background: rgba(232, 115, 26, 0.12);
  color: #bf6117;
}

.surf-journal-form textarea,
.surf-journal-form input[type="datetime-local"] {
  width: 100%;
}

.surf-journal-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.surf-journal-delete-confirm {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(177, 60, 44, 0.07);
  border: 1px solid rgba(177, 60, 44, 0.12);
}

.surf-journal-overlap-warning {
  color: #9e412f;
}

.submission-notification {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(20, 20, 36, 0.4);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.submission-notification[hidden] {
  display: none;
}

.submission-notification-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 2.4rem;
  border-radius: 1.6rem;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
  text-align: center;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.submission-notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: #dcf4e7;
  color: #059669;
  font-size: 2rem;
  font-weight: 700;
  animation: checkmark 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s both;
}

.submission-notification-text {
  font-family: var(--lb-font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
