/* TSW Registration Wizard v0.9.9 */
  #tswRegRoot, #tswRegRoot * { box-sizing: border-box; }
  #tswRegRoot {
    --tsw-bg1: #667eea;
    --tsw-bg2: #764ba2;
    --tsw-accent: #F89838;
    --tsw-text: #1a202c;
    --tsw-muted: #718096;
    --tsw-border: #e2e8f0;
    --tsw-good: #27ae60;
    --tsw-bad: #e74c3c;
    --tsw-warn: #f39c12;
    --tsw-card: #ffffff;
    --tsw-coach-bg: #6699CC;

    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 20px 20px;
  }

  #tswRegRoot .tsw-shell {
    background: var(--tsw-card);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    width: 100%;
    max-width: 820px;
  }

  #tswRegRoot .tsw-top {
    background: linear-gradient(135deg, var(--tsw-bg1) 0%, var(--tsw-bg2) 100%);
    padding: 18px 18px 14px;
    color: #fff;
    position: relative;
  }

  #tswRegRoot .tsw-progress {
    height: 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
  }
  #tswRegRoot .tsw-progress > div {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffbf7a 0%, var(--tsw-accent) 100%);
    transition: width 240ms ease;
  }

  #tswRegRoot .tsw-toprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  #tswRegRoot .tsw-step {
    font-size: 13px;
    opacity: 0.95;
  }

  #tswRegRoot .tsw-back {
    border: 1px solid rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.10);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    line-height: 1;
  }
  #tswRegRoot .tsw-back[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
  }

  #tswRegRoot .tsw-version {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    opacity: 0.6;
  }

  #tswRegRoot .tsw-logo-header {
    text-align: center;
    padding: 14px 20px 16px;
    background: transparent;
  }

  #tswRegRoot .tsw-logo-header img {
    max-width: 175px;
    height: auto;
    margin-bottom: 12px;
  }

  #tswRegRoot .tsw-logo-header h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--tsw-text);
    margin: 0;
    line-height: 1.3;
  }

  #tswRegRoot .tsw-body {
    /* Keep content anchored to the top, but always leave 30px breathing room at the bottom of the white card */
    padding: 18px 40px 30px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }

  #tswRegRoot .tsw-body-inner {
    width: 100%;
    max-width: 100%;
    opacity: 1;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  /* Make the dynamic content area fill the available vertical space so actions can sit consistently at the bottom. */
  #tswRegRoot #tswContent {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  #tswRegRoot .tsw-body-inner.fade-out {
    opacity: 0;
  }

  #tswRegRoot .tsw-welcome {
    font-size: 48px;
    font-weight: 900;
    color: var(--tsw-bg1);
    margin: 0 0 16px 0;
    text-align: center;
  }

  #tswRegRoot .tsw-h1 {
    font-size: 26px;
    line-height: 1.15;
    margin: 0 0 8px 0;
    color: var(--tsw-text);
    text-align: center;
  }

  #tswRegRoot .tsw-sub {
    margin: 0 0 24px 0;
    color: var(--tsw-muted);
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
  }

  #tswRegRoot .tsw-error {
    display: none;
    background: #fff5f5;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    border-radius: 12px;
    margin: 12px 0 0 0;
    font-size: 14px;
  }

  #tswRegRoot .tsw-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
  }

  #tswRegRoot .tsw-field { margin-bottom: 12px; }

  #tswRegRoot label {
    display: block;
    font-size: 15px;
    color: var(--tsw-muted);
    font-weight: 600;
    margin-bottom: 10px;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: center;
  }

  #tswRegRoot .tsw-timezone-wrapper {
    position: relative;
    display: inline-block;
    width: 50%;
    min-width: 250px;
  }

  #tswRegRoot .tsw-timezone-wrapper::after {
    content: "▼";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--tsw-muted);
    font-size: 12px;
  }

  #tswRegRoot .tsw-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: auto;
    padding-top: 18px;
    padding-bottom: 0;
  }

  /* Narrow centered field for username step */
  #tswRegRoot .tsw-field-narrow {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  #tswRegRoot .tsw-field-narrow input[type="text"] {
    text-align: center;
    width: 100%;
  }

  #tswRegRoot .tsw-num-section {
    margin: 20px 0;
  }

  #tswRegRoot .tsw-num-row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
  }

  #tswRegRoot .tsw-num-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--tsw-muted);
    min-width: 80px;
  }

  #tswRegRoot .tsw-num-label.left {
    text-align: right;
  }

  #tswRegRoot .tsw-num-label.right {
    text-align: left;
  }

  #tswRegRoot .tsw-num-tile {
    width: 48px;
    height: 48px;
    border: 2px solid var(--tsw-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    background: #fff;
    transition: all 120ms ease;
    position: relative;
  }

  #tswRegRoot .tsw-num-tile:hover {
    border-color: rgba(102,126,234,0.75);
    background: rgba(102,126,234,0.08);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(102,126,234,0.25);
  }

  #tswRegRoot .tsw-num-tile:active {
    transform: scale(0.98);
  }

  #tswRegRoot .tsw-date-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin: 8px 0 20px;
    max-width: 700px;
  }

  #tswRegRoot .tsw-date {
    border: 2px solid var(--tsw-border);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 120ms ease;
  }

  #tswRegRoot .tsw-date:hover {
    border-color: rgba(102,126,234,0.55);
    transform: translateY(-1px);
  }

  #tswRegRoot .tsw-date .dmon {
    font-size: 11px;
    font-weight: 800;
    color: var(--tsw-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  #tswRegRoot .tsw-date .dnum {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    color: var(--tsw-text);
  }

  #tswRegRoot .tsw-date .dyear {
    font-size: 11px;
    font-weight: 700;
    color: var(--tsw-muted);
  }

  #tswRegRoot .tsw-coach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    justify-items: center;
    margin: 0 0 20px;
  }

  #tswRegRoot .tsw-coach-photo-wrap {
    width: 68%;
    aspect-ratio: 1 / 1;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.7);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: url("https://www.thesixweek.com/wp-content/uploads/2024/08/overview_mov-scaled.jpg");
  }

  #tswRegRoot .tsw-coach-name {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 4px;
    text-align: center;
  }

  #tswRegRoot .tsw-bio-link {
    text-align: center;
    margin-bottom: 10px;
  }

  #tswRegRoot .tsw-bio-link a {
    color: #2563eb;
    text-decoration: underline;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  #tswRegRoot .tsw-bio-link a:hover {
    opacity: 0.85;
  }

  #tswRegRoot .tsw-coach-times {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 6px;
  }

  #tswRegRoot .tsw-calltime-option {
    cursor: pointer;
    background: rgba(255,255,255,0.25);
    padding: 8px 10px;
    border-radius: 14px;
    transition: all 0.15s ease;
  }

  #tswRegRoot .tsw-calltime-option:hover {
    background: rgba(255,255,255,0.35);
  }

  #tswRegRoot .tsw-calltime-option .time-headline {
    font-weight: 500;
    font-size: 28px;
    margin-bottom: 2px;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }

  #tswRegRoot .tsw-calltime-option .time-subgrid {
    display: flex;
    justify-content: space-between;
    gap: 0;
    font-size: 11px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
  }

  #tswRegRoot .tsw-calltime-option .time-subgrid .tz-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
  }

  #tswRegRoot .tsw-calltime-option .time-subgrid .tz-label {
    font-weight: 400;
    opacity: 0.8;
    font-size: 10px;
    margin-bottom: 0;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
  }

  /* Divider line: 20px wide, centered in timezone/time stack */
  #tswRegRoot .tsw-calltime-option .time-subgrid .tz-divider {
    display: block;
    width: 20px;
    height: 1px;
    background: rgba(255,255,255,0.45);
    margin: 2px auto;
  }

  #tswRegRoot .tsw-calltime-option .time-subgrid .time-label {
    opacity: 0.95;
    font-weight: 400;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
  }

  /* Ensure headline and subgrid have matching widths */
  #tswRegRoot .tsw-calltime-option {
    width: 100%;
    max-width: 100%;
  }
  
  #tswRegRoot .tsw-calltime-option .time-subgrid {
    max-width: 100%;
    overflow: visible;
  }

  /* Only the selected local-time should be bold */
  #tswRegRoot .tsw-calltime-option .local-day { font-weight: 500; font-size: 28px; line-height: 1.05; display: inline-block; }
  #tswRegRoot .tsw-calltime-option .local-time { font-weight: 400; font-size: 28px; line-height: 1.05; display: inline-block; }
  #tswRegRoot .tsw-calltime-option.selected .local-time { font-weight: 900; }

  #tswRegRoot .tsw-cant-make {
    text-align: center;
    margin: 14px 0;
  }

  #tswRegRoot .tsw-cant-make a {
    color: #FBB040;
    font-weight: 700;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
  }

  #tswRegRoot .tsw-username-status { margin-top: 8px; font-weight: 800; font-size: 14px; }
  #tswRegRoot .tsw-username-status.good { color: var(--tsw-good); }
  #tswRegRoot .tsw-username-status.bad { color: var(--tsw-bad); }
  #tswRegRoot .tsw-username-status.neutral { color: var(--tsw-muted); }

  #tswRegRoot .tsw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  #tswRegRoot .tsw-modal-overlay.show { display: flex; }

  #tswRegRoot .tsw-modal {
    background: #fff;
    border-radius: 18px;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
  }

  #tswRegRoot .tsw-modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--tsw-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #tswRegRoot .tsw-modal-title {
    font-size: 20px;
    font-weight: 900;
    margin: 0;
  }

  #tswRegRoot .tsw-modal-close {
    width: 32px;
    height: 32px;
    border: 0;
    background: #f1f5f9;
    border-radius: 999px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
  }

  #tswRegRoot .tsw-modal-body {
    padding: 20px;
  }

  #tswRegRoot .tsw-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
  }

  /* Slider styling */
  #tswRegRoot #tswUsername {
    width: 30% !important;
    min-width: 200px;
  }

  /* Safari-specific fixes */
  @supports (-webkit-appearance: none) {
    #tswRegRoot {
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    
    #tswRegRoot .tsw-shell {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
    
    #tswRegRoot input,
    #tswRegRoot textarea,
    #tswRegRoot select {
      -webkit-appearance: none;
      -webkit-border-radius: 12px;
    }
    
    #tswRegRoot .tsw-btn {
      -webkit-appearance: none;
      -webkit-user-select: none;
      user-select: none;
    }
    
    /* Fix flexbox issues in Safari */
    #tswRegRoot .tsw-grid2 {
      display: -webkit-flex;
      display: flex;
      -webkit-flex-wrap: wrap;
      flex-wrap: wrap;
    }
    
    #tswRegRoot .tsw-grid2 > * {
      -webkit-flex: 1 1 calc(50% - 5px);
      flex: 1 1 calc(50% - 5px);
    }
  }