  html, body{
    margin: 0;
    padding: 0;
    background: #1b1330;
  }
  @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;700&display=swap');

  :root{
    --bg: #1b1330;
    --panel: #241a3d;
    --panel-line: #392a5c;
    --gold: #f2b807;
    --gold-dim: #caa23f;
    --cream: #f7f1e8;
    --cream-dim: #cfc4e0;
    --red: #e8577d;
  }

  #roleta-root{
    background: radial-gradient(circle at 50% 0%, #2a1f47 0%, var(--bg) 55%);
    color: var(--cream);
    font-family: 'Space Grotesk', sans-serif;
    padding: 28px 18px 40px;
    border-radius: 18px;
    min-height: 100%;
    box-sizing: border-box;
  }
  #roleta-root *{ box-sizing: border-box; }

  .rl-title{
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(26px, 4vw, 38px);
    text-align: center;
    margin: 0 0 4px;
    letter-spacing: 0.2px;
  }
  .rl-sub{
    text-align: center;
    color: var(--cream-dim);
    font-size: 14px;
    margin: 0 0 26px;
  }

  .rl-layout{
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    align-items: flex-start;
    max-width: 940px;
    margin: 0 auto;
  }

  .rl-wheel-col{
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
  }

  .rl-wheel-wrap{
    position: relative;
    width: min(360px, 82vw);
    height: min(360px, 82vw);
  }
  .rl-pointer{
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 26px solid var(--gold);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.4));
    z-index: 3;
  }
  #rl-svg{ width: 100%; height: 100%; display:block; }

  .rl-hub{
    cursor: pointer;
  }
  .rl-hub:hover circle.rl-hub-fill{ fill: #ffcb2b; }

  .rl-spin-btn{
    margin-top: 22px;
    background: var(--gold);
    color: #241a3d;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 16px;
    padding: 13px 34px;
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: .3px;
    box-shadow: 0 6px 0 var(--gold-dim);
    transition: transform .08s ease;
  }
  .rl-spin-btn:active{ transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-dim); }
  .rl-spin-btn:disabled{ opacity: .5; cursor: not-allowed; box-shadow: 0 6px 0 #6b6153; }

  .rl-panel{
    background: var(--panel);
    border: 1px solid var(--panel-line);
    border-radius: 14px;
    padding: 20px;
    width: 320px;
    max-width: 90vw;
  }
  .rl-panel h3{
    font-family: 'Fraunces', serif;
    font-size: 18px;
    margin: 0 0 14px;
    font-weight: 600;
  }
  .rl-field{ margin-bottom: 10px; }
  .rl-field label{ display:block; font-size: 12px; color: var(--cream-dim); margin-bottom: 4px; }
  .rl-field input{
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid var(--panel-line);
    background: #1b1330;
    color: var(--cream);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
  }
  .rl-field input:focus{ outline: 2px solid var(--gold); outline-offset: 1px; }

  .rl-master-toggle-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--panel-line);
    color: var(--cream-dim);
    font-size: 13px;
  }

  .rl-master-switch{
    margin-left: auto;
  }

  .rl-add-btn{
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
  }
  .rl-add-btn:hover{ background: rgba(242,184,7,.12); }

  .rl-list{
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
  }
  .rl-list li{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 6px;
    border-radius: 8px;
    transition: opacity .15s ease;
  }
  .rl-list li:hover{ background: rgba(255,255,255,.04); }
  .rl-list li.rl-inactive{ opacity: .45; }
  .rl-thumb{
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid var(--panel-line);
  }
  .rl-thumb-fallback{
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: #241a3d;
    flex: 0 0 auto;
  }
  .rl-list-name{ flex: 1; font-size: 14px; }

  .rl-switch{
    position: relative;
    width: 38px; height: 22px;
    flex: 0 0 auto;
    border: none;
    border-radius: 999px;
    background: var(--panel-line);
    cursor: pointer;
    padding: 0;
  }
  .rl-switch.rl-on{ background: var(--gold); }
  .rl-switch-knob{
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--cream);
    transition: left .15s ease;
  }
  .rl-switch.rl-on .rl-switch-knob{ left: 18px; background: #241a3d; }

  .rl-delete{
    background: none; border: none; color: var(--cream-dim);
    cursor: pointer; font-size: 15px; line-height: 1; padding: 4px;
    flex: 0 0 auto;
  }
  .rl-delete:hover{ color: var(--red); }

  .rl-empty{ color: var(--cream-dim); font-size: 13px; text-align:center; padding: 10px 0; }

  .rl-overlay{
    position: fixed; inset: 0;
    background: rgba(10, 6, 20, .78);
    display: flex; align-items: center; justify-content: center;
    z-index: 50;
    padding: 20px;
  }
  .rl-modal{
    background: var(--panel);
    border: 1px solid var(--gold);
    border-radius: 18px;
    padding: 30px 28px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    animation: rl-pop .32s cubic-bezier(.2,1.4,.4,1);
  }
  @keyframes rl-pop{ from{ transform: scale(.6); opacity: 0; } to{ transform: scale(1); opacity: 1; } }

  .rl-modal-img{
    width: 200px; height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--gold);
    margin: 0 auto 16px;
    display: block;
  }
  .rl-modal-fallback{
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 5px solid var(--gold);
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Fraunces', serif;
    font-size: 66px; font-weight: 700;
    color: #241a3d;
  }
  .rl-modal-name{
    font-family: 'Fraunces', serif;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 22px;
  }
  .rl-modal-actions{ display: flex; flex-direction: column; gap: 10px; }
  .rl-btn-primary{
    background: var(--gold); color: #241a3d; border: none;
    padding: 11px; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: 14px;
  }
  .rl-btn-danger{
    background: transparent; color: var(--red); border: 1px solid var(--red);
    padding: 10px; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: 14px;
  }
  .rl-btn-text{
    background: none; border: none; color: var(--cream-dim);
    cursor: pointer; font-size: 13px; margin-top: 2px; text-decoration: underline;
  }

  .rl-status{ text-align:center; color: var(--cream-dim); font-size: 12px; margin-top: 18px; }

  /* Celular: roleta quase full-width e resultado quase em tela cheia */
  @media (max-width: 640px){
    #roleta-root{ padding: 18px 6px 28px; }
    .rl-title{ font-size: clamp(22px, 6.5vw, 30px); }
    .rl-sub{ font-size: 13px; margin-bottom: 18px; }
    .rl-layout{ gap: 22px; }
    .rl-wheel-wrap{
      width: calc(100vw - 20px);
      height: calc(100vw - 20px);
      max-width: 520px;
      max-height: 520px;
    }
    .rl-pointer{
      border-left-width: 18px;
      border-right-width: 18px;
      border-top-width: 32px;
    }
    .rl-panel{ width: calc(100vw - 20px); max-width: 480px; }

    .rl-overlay{ padding: 0; }
    .rl-modal{
      max-width: 100%;
      width: 100%;
      height: 100%;
      max-height: 100%;
      border-radius: 0;
      border: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 28px 22px;
      overflow-y: auto;
    }
    .rl-modal-img, .rl-modal-fallback{
      width: min(82vw, 58vh);
      height: min(82vw, 58vh);
      border-width: 6px;
      margin-bottom: 8px;
    }
    .rl-modal-fallback{ font-size: min(22vw, 15vh); }
    .rl-modal-name{ font-size: clamp(28px, 8vw, 42px); margin-bottom: 26px; }
    .rl-modal-actions{ width: 100%; max-width: 360px; gap: 12px; }
    .rl-btn-primary, .rl-btn-danger{ padding: 15px; font-size: 16px; }
  }