/* inoff. Shared Navigation Shell, Account Slide-Out & Page Header (Batch 1 / #75)
   Mobile-first, width-based responsive layout, >=44px (48px preferred) touch targets. */

:root {
  --inoff-shell-bg: #fdf9f0;
  --inoff-shell-surface: #ffffff;
  --inoff-shell-surface-subtle: #f1ede5;
  --inoff-shell-border: #d8d0c0;
  --inoff-shell-ink: #1c1c16;
  --inoff-shell-muted: #59413a;
  --inoff-shell-primary: #aa3600;
  --inoff-shell-primary-accent: #f36a36;
  --inoff-shell-primary-soft: #ffdbcf;
  --inoff-shell-header-h: 56px;
  --inoff-hub-nav-h: 58px;
  --inoff-safe-left: env(safe-area-inset-left, 0px);
  --inoff-safe-right: env(safe-area-inset-right, 0px);
  --inoff-font-display: 'Oswald', 'Arial Narrow', 'Impact', system-ui, sans-serif;
  --inoff-font-ui: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* On iOS landscape, safe-area-inset-left/right are reported symmetrically (~59px) even though
   the Dynamic Island / notch is only on one side. Apply full safe-area inset on the hardware
   cutout side, and a compact 14px corner-clearance inset on the opposite rounded-glass edge
   (capped by env() so flat-edge devices stay at 0px). */
html[data-inoff-notch-side="left"] {
  --inoff-safe-left: env(safe-area-inset-left, 0px);
  --inoff-safe-right: min(14px, env(safe-area-inset-right, 0px));
}

html[data-inoff-notch-side="right"] {
  --inoff-safe-left: min(14px, env(safe-area-inset-left, 0px));
  --inoff-safe-right: env(safe-area-inset-right, 0px);
}

/* Global Slim Header */
.inoff-shell-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--inoff-shell-bg);
  border-bottom: 1px solid var(--inoff-shell-border);
  padding-top: env(safe-area-inset-top, 0px);
  font-family: var(--inoff-font-ui);
}

/* Immersive mode hides global chrome during live scoring & camera sync */
body.live-scoreboard .inoff-shell-header,
body.inoff-immersive .inoff-shell-header {
  display: none !important;
}

.inoff-shell-inner {
  max-width: 1120px;
  margin: 0 auto;
  min-height: var(--inoff-shell-header-h);
  padding: 4px calc(var(--inoff-safe-right) + 12px) 4px calc(var(--inoff-safe-left) + 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inoff-shell-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  text-decoration: none;
  font-size: clamp(1.4rem, 6vw, 1.65rem);
  color: #292d2b;
  border-radius: 8px;
  flex-shrink: 0;
}

.inoff-shell-brand,
.app-header .brand-lockup .wordmark {
  font-family: 'urbane-rounded', 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.05em;
}

.app-header .brand-lockup .wordmark-dot { color: var(--inoff-shell-primary-accent); }

.inoff-shell-brand:focus-visible,
.inoff-shell-switch-link:focus-visible,
.inoff-shell-avatar:focus-visible,
.inoff-drawer-close:focus-visible,
.inoff-drawer-item:focus-visible,
.inoff-hub-nav-item:focus-visible,
.inoff-page-back:focus-visible,
.inoff-page-ellipsis:focus-visible {
  outline: 2px solid var(--inoff-shell-primary);
  outline-offset: 2px;
}

.inoff-shell-brand-dot {
  color: var(--inoff-shell-primary-accent);
}

/* Product Switcher */
.inoff-shell-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--inoff-shell-surface-subtle);
  border: 1px solid var(--inoff-shell-border);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
  min-width: 0;
}

.inoff-shell-switch-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  border-radius: 9999px;
  background: var(--inoff-shell-surface);
  box-shadow: 0 1px 3px rgba(28, 28, 22, 0.1);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: transform, width;
}

.inoff-shell-switch.has-pill-ready .inoff-shell-switch-pill {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              width 220ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 160ms ease;
}

.inoff-shell-switch-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--inoff-shell-muted);
  white-space: nowrap;
  transition: background-color 140ms ease, color 180ms ease;
}

.inoff-shell-switch-link[aria-current="page"] {
  background: var(--inoff-shell-surface);
  color: var(--inoff-shell-primary);
  box-shadow: 0 1px 2px rgba(28, 28, 22, 0.08);
}

.inoff-shell-switch.has-pill .inoff-shell-switch-link[aria-current="page"] {
  background: transparent;
  box-shadow: none;
}

/* Prevent iOS Safari auto-zoom on form field focus (requires >= 16px computed font-size) */
@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
  textarea,
  select {
    font-size: max(16px, 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .inoff-shell-switch.has-pill-ready .inoff-shell-switch-pill {
    transition: none;
  }
}

@media (min-width: 480px) {
  .inoff-shell-switch-link {
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
  }
}

/* Account Avatar Trigger */
.inoff-shell-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 9999px;
  border: 1px solid var(--inoff-shell-border);
  background: var(--inoff-shell-surface);
  color: var(--inoff-shell-ink);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.inoff-shell-avatar.is-signed-in {
  background: var(--inoff-shell-primary-soft);
  border-color: var(--inoff-shell-primary-accent);
  color: var(--inoff-shell-primary);
}

.inoff-shell-avatar {
  overflow: hidden;
  padding: 0;
}

.inoff-shell-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 9999px;
}

.inoff-shell-avatar svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Account Slide-Out Drawer */
.inoff-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(28, 28, 22, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.inoff-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.inoff-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1110;
  width: min(320px, 88vw);
  background: var(--inoff-shell-surface);
  border-left: 1px solid var(--inoff-shell-border);
  box-shadow: -8px 0 24px rgba(28, 28, 22, 0.16);
  transform: translateX(100%);
  transition: transform 200ms ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: var(--inoff-font-ui);
}

.inoff-drawer.is-open {
  transform: translateX(0);
}

.inoff-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--inoff-shell-border);
}

.inoff-drawer-identity {
  min-width: 0;
}

.inoff-drawer-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--inoff-shell-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inoff-drawer-role {
  font-size: 0.78rem;
  color: var(--inoff-shell-muted);
}

.inoff-drawer-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 9999px;
  border: 1px solid var(--inoff-shell-border);
  background: var(--inoff-shell-bg);
  color: var(--inoff-shell-ink);
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inoff-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 4px;
}

.inoff-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--inoff-shell-ink);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.inoff-drawer-item:hover:not([aria-disabled="true"]) {
  background: var(--inoff-shell-surface-subtle);
}

.inoff-drawer-item[aria-current="page"] {
  background: var(--inoff-shell-primary-soft);
  color: var(--inoff-shell-primary);
  font-weight: 600;
}

.inoff-drawer-item[aria-disabled="true"] {
  color: var(--inoff-shell-muted);
  opacity: 0.72;
  cursor: not-allowed;
}

.inoff-drawer-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--inoff-shell-surface-subtle);
  color: var(--inoff-shell-muted);
  white-space: nowrap;
}

.inoff-drawer-divider {
  height: 1px;
  background: var(--inoff-shell-border);
  margin: 6px 4px;
}

.inoff-drawer-item--primary {
  background: var(--inoff-shell-primary-accent);
  color: #ffffff;
  font-weight: 600;
  justify-content: center;
}

.inoff-drawer-item--primary:hover {
  background: var(--inoff-shell-primary) !important;
  color: #ffffff;
}

.inoff-drawer-item--danger {
  color: #ba1a1a;
}

/* Shared Page Header (Back left, Title, Optional Ellipsis right) */
.inoff-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.inoff-page-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inoff-page-back,
.inoff-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--inoff-shell-border);
  background: var(--inoff-shell-surface);
  color: var(--inoff-shell-ink);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.inoff-page-title {
  font-family: var(--inoff-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--inoff-shell-ink);
  margin: 0;
}

/* Match Hub Secondary Navigation
   Mobile (<768px): persistent bottom navigation bar
   Wider (>=768px): horizontal bar directly below global header */
.inoff-hub-nav {
  background: var(--inoff-shell-surface);
  border-top: 1px solid var(--inoff-shell-border);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 880;
  padding: 4px max(8px, env(safe-area-inset-right, 8px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 8px));
  font-family: var(--inoff-font-ui);
}

.inoff-hub-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
}

.inoff-hub-nav-item {
  flex: 1;
  min-height: 48px;
  padding: 5px 6px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--inoff-shell-secondary, #47626c);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.1;
  transition: color 0.14s ease;
}

.inoff-hub-nav-item .inoff-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.inoff-hub-nav-item:hover {
  color: var(--inoff-shell-ink, #1c1c16);
}

.inoff-hub-nav-item.is-active,
.inoff-hub-nav-item[aria-current="page"] {
  background: transparent;
  color: var(--inoff-shell-primary-accent, #f36a36);
}

/* Shared inline outline & visibility icons (#116 — no decorative background tiles) */
.inoff-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.inoff-vis-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #47626c;
  flex-shrink: 0;
  line-height: 1;
}

.inoff-vis-icon.is-private {
  color: #6b7b82;
}

body.has-inoff-hub-nav {
  padding-bottom: calc(var(--inoff-hub-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

@media (min-width: 768px) {
  .inoff-hub-nav {
    position: sticky;
    top: var(--inoff-shell-header-h);
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid var(--inoff-shell-border);
    padding: 6px 16px;
  }

  .inoff-hub-nav-inner {
    justify-content: flex-start;
    gap: 8px;
  }

  .inoff-hub-nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 9px;
    min-height: 44px;
    padding: 6px 14px;
    font-size: 0.88rem;
  }

  .inoff-hub-nav-item .inoff-icon {
    width: 18px;
    height: 18px;
  }

  body.has-inoff-hub-nav {
    padding-bottom: 0;
  }
}

/* Shared Contextual Action Group (max 2 visible buttons: primary right/full, secondary left) */
.inoff-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inoff-action-group .inoff-btn-primary,
.inoff-action-group .inoff-btn-secondary {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
}

.inoff-btn-primary {
  background: var(--inoff-shell-primary-accent);
  color: #ffffff;
  border: 1px solid var(--inoff-shell-primary-accent);
}

.inoff-btn-primary:hover {
  background: var(--inoff-shell-primary);
  border-color: var(--inoff-shell-primary);
}

.inoff-btn-secondary {
  background: var(--inoff-shell-surface);
  color: var(--inoff-shell-ink);
  border: 1px solid var(--inoff-shell-border);
}

.inoff-btn-secondary:hover {
  background: var(--inoff-shell-surface-subtle);
}

/* Prevent legacy page headers from duplicating global brand/avatar or overlapping the slim global header */
body:has(#inoff-shell-header):not(.live-scoreboard):not(.inoff-immersive) .app-header {
  position: sticky;
  top: var(--inoff-shell-header-h);
  z-index: 850;
  height: auto;
  min-height: 40px;
  padding: 4px 0;
  background: var(--inoff-shell-bg);
  border-bottom: 1px solid rgba(216, 208, 192, 0.7);
}

body:has(#inoff-shell-header):not(.live-scoreboard):not(.inoff-immersive) .app-header .wordmark,
body:has(#inoff-shell-header):not(.live-scoreboard):not(.inoff-immersive) .app-header .header-dot,
body:has(#inoff-shell-header):not(.live-scoreboard):not(.inoff-immersive) .app-header #btn-account,
body:has(#inoff-shell-header):not(.live-scoreboard):not(.inoff-immersive) .app-header #btn-hub-signout,
body:has(#inoff-shell-header):not(.live-scoreboard):not(.inoff-immersive) .app-header #btn-signout {
  display: none !important;
}

body:has(#inoff-shell-header)[data-screen="1"] .app-header .brand-lockup,
body:has(#inoff-shell-header)[data-screen="1"] .app-header #btn-back {
  display: none !important;
}

body:has(#inoff-shell-header)[data-screen="1"] .app-header .header-inner {
  justify-content: flex-end;
  min-height: 32px;
  padding-top: 2px;
  padding-bottom: 2px;
}

/* Screen 4 Results (#130): use shared shell only — hide legacy numbered step header & Synced text pill */
body:has(#inoff-shell-header)[data-screen="4"] .app-header {
  display: none !important;
}

body:has(#inoff-shell-header):not(.live-scoreboard):not(.inoff-immersive) .app-main {
  padding-top: 12px;
}

/* Contextual Ellipsis Menu (left secondary actions, primary right — Batch 2 UAT #76) */
.accordion-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.accordion-secondary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.accordion-ellipsis-wrap {
  position: relative;
}

.accordion-ellipsis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--inoff-shell-border);
  background: var(--inoff-shell-surface);
  color: var(--inoff-shell-ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.accordion-ellipsis-btn:hover {
  background: var(--inoff-shell-surface-subtle);
}

.accordion-ellipsis-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1150;
  min-width: 196px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  background: var(--inoff-shell-surface);
  border: 1px solid var(--inoff-shell-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(28, 28, 22, 0.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.accordion-ellipsis-menu.hidden {
  display: none;
}

.accordion-ellipsis-item {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--inoff-shell-ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.accordion-ellipsis-item:hover {
  background: var(--inoff-shell-surface-subtle);
}

.accordion-ellipsis-item--danger {
  color: #ba1a1a;
}

.accordion-readonly-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: #e6f0f4;
  color: #35505a;
  font-size: 0.8rem;
  font-weight: 600;
}

/* inoff. Branded Confirmation Modal Styling (Batch 2 UAT #76) */
.inoff-confirm-matchup {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f3ea;
  border: 1px solid #d8d0c0;
  font-weight: 600;
  color: #1c1c16;
  margin-bottom: 10px;
}

.inoff-confirm-copy {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #59413a;
}

.inoff-confirm-field {
  margin: 0 0 14px;
}

.inoff-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.inoff-confirm-actions .btn {
  min-height: 48px;
}

/* Shared Fixture-Card Style Animated Accordion (Reused across Manage Lists, Venue Rows & Forms) */
.inoff-acc {
  --inoff-acc-duration: 300ms;
  --inoff-acc-ease: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  border: 1px solid var(--inoff-shell-border);
  border-radius: 12px;
  background: var(--inoff-shell-surface);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(41, 45, 43, 0.05);
}

@supports (transition-timing-function: linear(0, 1)) {
  .inoff-acc {
    --inoff-acc-ease: linear(0, 0.03125, 0.125, 0.28125, 0.5, 0.71875, 0.875, 0.96875, 1);
  }
}

.inoff-acc.has-error {
  border-color: #ba1a1a;
}

.inoff-acc-header {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--inoff-shell-ink);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.inoff-acc-header:hover {
  background: #f7f3ea;
}

.inoff-acc-header:focus-visible {
  outline: 2px solid #47626c;
  outline-offset: -2px;
}

.inoff-acc-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #47626c;
  flex-shrink: 0;
  transition: transform var(--inoff-acc-duration) var(--inoff-acc-ease);
}

.inoff-acc.is-open > .inoff-acc-header .inoff-acc-chev,
.inoff-acc.is-open > .manage-card-head .inoff-acc-chev {
  transform: rotate(180deg);
}

.inoff-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--inoff-acc-duration) var(--inoff-acc-ease),
    visibility 0s var(--inoff-acc-duration);
}

.inoff-acc.is-open > .inoff-acc-panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}

.inoff-acc-clip {
  min-height: 0;
  overflow: hidden;
}

.inoff-acc-body {
  padding: 12px 16px 16px;
  border-top: 1px solid #ece8df;
  background: var(--inoff-shell-surface);
}

/* Shared Quick-Start Matched Form Controls (Segmented, Stepper, Checkboxes, Field Labels) */
.inoff-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #47626c;
  margin-bottom: 6px;
}

.inoff-segmented {
  display: flex;
  padding: 4px;
  border-radius: 12px;
  background: #f1ede5;
  gap: 4px;
}

.inoff-seg-btn {
  flex: 1 1 0;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--inoff-shell-border);
  background: #f3efe6;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #292d2b;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.inoff-seg-btn:hover:not(.is-active):not(:disabled) {
  background: #ece8df;
  border-color: #8da9b4;
}

.inoff-seg-btn.is-active {
  background: #47626c;
  border-color: #47626c;
  color: #ffffff;
}

.inoff-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f3ea;
  border: 1px solid var(--inoff-shell-border);
}

.inoff-stepper-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.inoff-step-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--inoff-shell-border);
  background: #ffffff;
  color: #292d2b;
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inoff-step-btn:hover:not(:disabled) {
  background: #ece8df;
}

.inoff-step-val {
  font-family: var(--inoff-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  min-width: 42px;
  text-align: center;
  color: #292d2b;
}

.inoff-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
}

.inoff-check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  margin: 2px 0 0;
  accent-color: #aa3600;
  cursor: pointer;
}

/* Shared Unsaved-Changes Discard Bar (#37) */
.inoff-discard-bar {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #aa3600;
  background: #ffdbcf;
  color: #380c00;
  font-size: 0.88rem;
}

.inoff-discard-bar p {
  margin: 0 0 10px;
  font-weight: 600;
}

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

.inoff-discard-actions button {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.inoff-btn-danger {
  background: #ba1a1a;
  color: #ffffff;
  border: 1px solid #ba1a1a;
}

.inoff-btn-danger:hover {
  background: #93000a;
  border-color: #93000a;
}

/* Compact Left Navigation Rail for Short Mobile Landscape (#125)
   Only active when scrolled past top on landscape viewports <= 500px tall and >= 600px wide. */
.inoff-landscape-rail {
  display: none;
}

@media (orientation: landscape) and (max-height: 500px) and (min-width: 600px) {
  .inoff-shell-header,
  .inoff-hub-nav,
  .app-header {
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 200ms ease,
                left 240ms cubic-bezier(0.22, 1, 0.36, 1),
                top 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Keep secondary headers, hub nav, and main content clear of the Dynamic Island / notch */
  .inoff-hub-nav {
    padding-left: calc(var(--inoff-safe-left) + 12px);
    padding-right: calc(var(--inoff-safe-right) + 12px);
  }

  .app-header .header-inner {
    padding-left: calc(var(--inoff-safe-left) + 16px);
    padding-right: calc(var(--inoff-safe-right) + 16px);
  }

  main.main-container,
  main.app-main,
  main.inoff-page-main {
    padding-left: calc(var(--inoff-safe-left) + 16px);
    padding-right: calc(var(--inoff-safe-right) + 16px);
    transition: padding-left 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .inoff-landscape-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(64px + var(--inoff-safe-left));
    padding: 14px 4px max(14px, env(safe-area-inset-bottom, 0px)) calc(var(--inoff-safe-left) + 4px);
    z-index: 950;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--inoff-shell-surface);
    border-right: 1px solid var(--inoff-shell-border);
    box-shadow: 2px 0 12px rgba(28, 28, 22, 0.06);
    font-family: var(--inoff-font-ui);
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 200ms ease;
    will-change: transform, opacity;
  }

  body.live-scoreboard .inoff-landscape-rail,
  body.inoff-immersive .inoff-landscape-rail {
    display: none !important;
  }

  .inoff-rail-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-shrink: 0;
  }

  .inoff-rail-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 0.82rem;
  }

  /* Vertical segmented product switcher matching .inoff-shell-switch */
  .inoff-rail-switch {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 56px;
    padding: 3px;
    gap: 2px;
    border-radius: 14px;
    background: var(--inoff-shell-surface-subtle);
    border: 1px solid var(--inoff-shell-border);
  }

  .inoff-rail-switch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 2px 4px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--inoff-shell-muted);
    white-space: nowrap;
    transition: background-color 140ms ease, color 180ms ease;
  }

  .inoff-rail-switch-link:hover {
    color: var(--inoff-shell-ink);
  }

  .inoff-rail-switch-link[aria-current="page"] {
    background: var(--inoff-shell-surface);
    color: var(--inoff-shell-primary);
    box-shadow: 0 1px 2px rgba(28, 28, 22, 0.08);
  }

  .inoff-rail-tabs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 100%;
    margin-top: auto;
  }

  /* Match .inoff-hub-nav-item styling: transparent background, orange text/icon when active */
  .inoff-rail-tab {
    width: 56px;
    min-height: 44px;
    padding: 4px 2px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--inoff-shell-secondary, #47626c);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.05;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.14s ease;
  }

  .inoff-rail-tab.hidden {
    display: none;
  }

  .inoff-rail-tab:hover {
    background: transparent;
    color: var(--inoff-shell-ink, #1c1c16);
  }

  .inoff-rail-tab.is-active,
  .inoff-rail-tab[aria-current="page"] {
    background: transparent;
    color: var(--inoff-shell-primary-accent, #f36a36);
  }

  .inoff-rail-switch-link:focus-visible,
  .inoff-rail-tab:focus-visible {
    outline: 2px solid var(--inoff-shell-primary);
    outline-offset: 2px;
  }

  .inoff-rail-tab .inoff-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* Active scrolled state: slide top/bottom chrome out, slide left rail in */
  body.inoff-landscape-rail-active .inoff-landscape-rail {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  body.inoff-landscape-rail-active .inoff-shell-header {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }

  body.inoff-landscape-rail-active .inoff-hub-nav {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
  }

  body.inoff-landscape-rail-active:not(.inoff-rail-has-back) .app-header {
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
  }

  body.has-inoff-hub-nav.inoff-landscape-rail-active.inoff-rail-has-back .app-header {
    top: 0;
    margin-left: calc(64px + var(--inoff-safe-left));
  }

  body:not(.has-inoff-hub-nav).inoff-landscape-rail-active.inoff-rail-has-back .app-header {
    top: 0;
    left: calc(64px + var(--inoff-safe-left));
  }

  body.inoff-landscape-rail-active.inoff-rail-has-back .app-header .header-inner {
    padding-left: 16px;
  }

  body.inoff-landscape-rail-active main.main-container,
  body.inoff-landscape-rail-active main.app-main,
  body.inoff-landscape-rail-active main.inoff-page-main {
    padding-left: calc(64px + var(--inoff-safe-left) + 14px);
    padding-right: calc(var(--inoff-safe-right) + 14px);
  }

  body.has-inoff-hub-nav.inoff-landscape-rail-active {
    padding-bottom: 16px;
  }
}

@media (orientation: landscape) and (max-height: 345px) and (min-width: 600px) {
  .inoff-rail-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .inoff-rail-switch-link {
    min-height: 26px;
  }

  .inoff-rail-tabs {
    gap: 2px;
  }

  .inoff-rail-tab {
    min-height: 38px;
  }
}

@media (orientation: landscape) and (max-height: 500px) and (min-width: 768px) {
  body.inoff-landscape-rail-active .inoff-hub-nav {
    transform: translateY(calc(-100% - var(--inoff-shell-header-h) - 8px));
  }
}

/* Prevent iOS Safari auto-zoom on form field focus (requires >= 16px computed font-size) */
@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
  textarea,
  select {
    font-size: max(16px, 1rem);
  }
}

/* Unsaved completed guest match banner (#149 — Option A, shared across Scoreboard & Match Hub) */
.inoff-unsynced-banner {
  background: #ffffff;
  border: 1.5px solid #f36a36;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(243, 106, 54, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inoff-unsynced-banner.hidden {
  display: none;
}

.inoff-unsynced-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inoff-unsynced-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #f36a36;
  margin-top: 5px;
  flex-shrink: 0;
}

.inoff-unsynced-body {
  flex: 1 1 auto;
  min-width: 0;
}

.inoff-unsynced-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1c1c16;
  margin-bottom: 2px;
}

.inoff-unsynced-copy {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #59413a;
}

.inoff-unsynced-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.inoff-unsynced-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.inoff-unsynced-btn-secondary {
  border: 1px solid #d8d0c0;
  background: transparent;
  color: #59413a;
}

.inoff-unsynced-btn-secondary:hover {
  background: #f3efe6;
}

.inoff-unsynced-btn-primary {
  border: 1px solid #f36a36;
  background: #f36a36;
  color: #ffffff;
  flex: 1 1 auto;
}

.inoff-unsynced-btn-primary:hover {
  background: #d95726;
  border-color: #d95726;
}

@media (min-width: 560px) {
  .inoff-unsynced-btn-primary {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inoff-drawer,
  .inoff-drawer-backdrop,
  .inoff-shell-switch-link,
  .inoff-shell-avatar,
  .inoff-acc-panel,
  .inoff-acc-chev,
  .inoff-landscape-rail,
  .inoff-shell-header,
  .inoff-hub-nav,
  .app-header,
  main.main-container,
  main.app-main,
  main.inoff-page-main {
    transition: none;
  }
}
