
    :root{
      --bg:#f3f4f6;
      --card:#ffffff;
      --muted:#666;
      --text:#111;
      --border:#ddd;
      --focus:#111;
      --danger:#d32f2f;
      --radius:14px;
    }

    * { box-sizing: border-box; }

    body{
      margin:0;
      background:var(--bg);
      color:var(--text);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
      line-height:1.4;
    }

    .survey-container {
      max-width: 720px;
      margin: 24px auto;
      padding: 24px;
      background: var(--card);
      border-radius: var(--radius);
      box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    }

    .survey-container h2 {
      margin: 0 0 10px 0;
      font-size: 22px;
      font-weight: 600;
      color: var(--text);
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .survey-container p {
      margin: 0 0 26px 0;
      color: var(--muted);
      font-size: 15px;
    }

    .question {
      margin-bottom: 22px;
      padding: 16px;
      border: 1px solid rgba(0,0,0,0.06);
      border-radius: 12px;
      background: #fff;
    }

    .question-label {
      display: block;
      margin-bottom: 12px;
      font-weight: 650;
      color: var(--text);
      font-size: 15px;
    }

    .text-input {
      width: 100%;
      padding: 14px 14px;
      border: 1px solid var(--border);
      border-radius: 10px;
      font-size: 16px; /* 16px prevents iOS zoom-on-focus */
      background: #fff;
    }

    .text-input:focus {
      outline: none;
      border-color: var(--focus);
      box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
    }

    .radio-group, .checkbox-group {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .radio-label, .checkbox-label {
      display: flex;
      align-items: center;
      cursor: pointer;
      font-size: 15px;
      color: #222;
      gap: 10px;
      padding: 10px 10px;
      border-radius: 10px;
      border: 1px solid rgba(0,0,0,0.06);
      background: #fafafa;
    }

    .radio-label:hover, .checkbox-label:hover {
      background: #f6f6f6;
    }

    .radio-label input[type="radio"],
    .checkbox-label input[type="checkbox"] {
      margin: 0;
      width: 20px;
      height: 20px;
      cursor: pointer;
      accent-color: #111;
      flex: 0 0 auto;
    }

    .stars-group {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .star-btn {
      padding: 10px 12px;
      border: 2px solid rgba(0,0,0,0.12);
      background: #fff;
      border-radius: 12px;
      cursor: pointer;
      font-size: 20px;
      transition: transform 0.12s, border-color 0.12s, background 0.12s;
      min-width: 72px;
      text-align:center;
    }

    .star-btn:hover {
      border-color: #111;
      transform: translateY(-1px);
    }

    .star-btn.selected {
      border-color: #111;
      background: #f3f3f3;
    }

    .submit-btn {
      width: 100%;
      padding: 16px;
      background: #111;
      color: #fff;
      border: none;
      border-radius: 12px;
      font-size: 16px;
      font-weight: 650;
      cursor: pointer;
      margin-top: 14px;
      transition: transform 0.12s, opacity 0.12s;
    }

    .submit-btn:hover {
      opacity: 0.95;
      transform: translateY(-1px);
    }

    .submit-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    .error-message {
      color: var(--danger);
      font-size: 12px;
      margin-top: 8px;
      display: none;
    }

    /* Mobile tweaks */
    @media (max-width: 520px){
      .survey-container{
        margin: 14px;
        padding: 18px;
      }
      .survey-container h2{
        font-size: 20px;
      }
      .question{
        padding: 14px;
      }
      .star-btn{
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
      }
    }


    .ty-wrap{
      max-width:720px;
      margin:80px auto;
      padding:40px 24px;
      text-align:center;
      font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif
    }
    .ty-title{
      font-size:32px;
      font-weight:700;
      margin-bottom:12px
    }
    .ty-text{
      font-size:16px;
      color:#555;
      margin-bottom:32px
    }
    .ty-btn{
      display:inline-block;
      padding:14px 26px;
      border-radius:999px;
      background:#111;
      color:#ffffff !important;
      font-weight:600;
      font-size:16px;
      text-decoration:none;
    }
    .ty-btn:hover{ opacity:.9; }


/* State/accessibility helpers; the original survey and thank-you rules above stay intact. */
[hidden] { display: none !important; }
.error-message.is-visible { display: block; }
.store-name { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.survey-message { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.survey-help { margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.survey-help a, .ty-text a { color: inherit; }
.survey-complete { background: #fff; }
.ty-wrap .ty-btn { margin: 0 4px 12px; }
.reward-details { margin: 18px 0; }
.reward-details p { margin: 0 0 8px; }
.star-btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #555; outline-offset: 3px; }
