:root{
    --teal-dark:#0b3d3d;
    --teal-darker:#082e2e;
    --teal-accent:#4fe0cf;
    --teal-accent-2:#2dd4bf;
    --teal-light-bg:#eef8f7;
    --teal-mid:#0f4c4c;
    --yellow:#ffd23f;
    --yellow-dark:#f3b900;
    --text-dark:#0b3d3d;
    --text-muted:#6b8c8b;
    --white:#ffffff;
    --danger:#e0525a;
    --border:#d7e8e6;
    --radius-lg:28px;
    --radius-md:16px;
    --radius-sm:12px;
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    background:#dfe7e6;
    color:var(--text-dark);
    min-height:100vh;
    display:flex;
    align-items:flex-start;
    justify-content:center;
  }
  .frame-outer{
    width:100%;
    min-height:100vh;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    padding:0;
  }
  .phone-frame{
    position:relative;
    width:100%;
    max-width:100%;
    height:100vh;
    height:100dvh;
    background:var(--white);
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  @media (min-width:560px){
    body{padding:32px 0;}
    .phone-frame{
      max-width:430px;
      min-height:900px;
      height:900px;
      border-radius:40px;
      box-shadow:0 30px 60px -20px rgba(11,61,61,0.35), 0 0 0 10px #0b3d3d10;
    }
  }

  .lang-toggle{
    position:absolute;
    top:20px;
    right:20px;
    z-index:50;
    background:rgba(255,255,255,0.14);
    color:#fff;
    border:1px solid rgba(255,255,255,0.4);
    padding:8px 16px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    user-select:none;
    min-height:32px;
    display:flex;
    align-items:center;
  }
  .lang-toggle.on-light{
    background:var(--teal-dark);
    border-color:var(--teal-dark);
  }

  .screen{display:none; height:100%; flex-direction:column;}
  .screen.active{display:flex;}

  .screen-scroll{
    flex:1;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .screen-scroll.pad-nav{padding-bottom:100px;}

  /* ---------- Hero / teal header ---------- */
  .hero-full{
    background:linear-gradient(160deg, var(--teal-dark), var(--teal-darker));
    color:#fff;
    padding:64px 28px 40px;
    position:relative;
    flex:1;
    display:flex;
    flex-direction:column;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .hero-card{
    background:linear-gradient(160deg, var(--teal-dark), var(--teal-darker));
    color:#fff;
    padding:60px 26px 34px;
    border-bottom-left-radius:var(--radius-lg);
    border-bottom-right-radius:var(--radius-lg);
    position:relative;
  }
  .logo-mark{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin-bottom:6px;
  }
  .logo-mark .w{
    width:44px;height:44px;border-radius:10px;
    background:#ffffff;
    display:flex;align-items:center;justify-content:center;
    font-weight:800;color:var(--teal-darker);font-size:20px;
    overflow:hidden;
  }
  .logo-mark .w img{
    width:80%;height:80%;object-fit:contain;display:block;
  }
  .logo-title{font-size:22px;font-weight:800;text-align:center;}
  .logo-sub{text-align:center;font-size:12px;color:#bcd9d6;margin-top:2px;letter-spacing:0.5px;}
  .plus-tag{
    text-align:center;
    font-size:34px;
    font-weight:800;
    color:var(--teal-accent);
    margin:22px 0 18px;
  }
  .hero-h1{
    text-align:center;
    font-size:30px;
    font-weight:800;
    line-height:1.25;
    margin:0 0 14px;
  }
  .hero-p{
    text-align:center;
    color:#cfe6e3;
    font-size:14.5px;
    line-height:1.6;
    margin:0 0 28px;
  }

  /* ---------- buttons ---------- */
  .btn{
    display:flex;align-items:center;justify-content:center;gap:8px;
    width:100%;
    min-height:56px;
    border-radius:16px;
    font-size:16px;
    font-weight:700;
    border:none;
    cursor:pointer;
    transition:transform .12s ease, opacity .12s ease;
  }
  .btn:active{transform:scale(0.98);}
  .btn-yellow{background:var(--yellow);color:#5c4300;}
  .btn-yellow:hover{background:var(--yellow-dark);}
  .btn-outline-light{
    background:rgba(255,255,255,0.06);
    color:#fff;
    border:1.5px solid rgba(255,255,255,0.55);
  }
  .btn-outline-teal{
    background:transparent;
    color:var(--teal-dark);
    border:1.5px solid var(--teal-dark);
  }
  .btn-teal{background:var(--teal-dark); color:#fff;}
  .btn[disabled]{opacity:0.45; cursor:not-allowed;}
  .btn-stack{display:flex; flex-direction:column; gap:14px; margin-top:auto;}
  .link-btn{
    background:none;border:none;color:var(--text-muted);
    font-size:14px;font-weight:600;cursor:pointer;
    padding:10px; text-align:center;
  }

  /* ---------- form fields ---------- */
  .field{margin-bottom:20px;}
  .field label, .field .flabel{
    display:block;font-size:13.5px;font-weight:700;color:var(--text-dark);
    margin-bottom:8px;
  }
  .field input[type=text], .field input[type=number], .field input[type=date], .field input[type=password], .field select{
    width:100%;
    min-height:52px;
    border-radius:14px;
    border:1.5px solid var(--border);
    background:#fff;
    padding:12px 16px;
    font-size:15px;
    font-family:inherit;
    color:var(--text-dark);
    outline:none;
  }
  .field input:focus, .field select:focus{border-color:var(--teal-accent-2);}
  .field-row{display:flex; gap:12px;}
  .field-row .field{flex:1;}
  .hint-text{font-size:12px;color:var(--text-muted); margin-top:6px;}
  .error-text{font-size:12.5px;color:var(--danger); font-weight:600; margin-top:6px; display:none;}
  .field.has-error input, .field.has-error select{border-color:var(--danger);}
  .field.has-error .error-text{display:block;}

  /* dark variant fields for teal backgrounds (phone/otp/login) */
  .field-dark label{color:#dff2f0;}
  .field-dark input{
    background:rgba(255,255,255,0.06);
    border:1.5px solid rgba(255,255,255,0.5);
    color:#fff;
  }
  .field-dark input::placeholder{color:#9fc3c0;}

  /* pill selector (gender / yes-no) */
  .pill-row{display:flex; gap:10px;}
  .pill{
    flex:1;
    min-height:48px;
    border-radius:14px;
    border:1.5px solid var(--border);
    background:#fff;
    color:var(--text-dark);
    font-weight:700;
    font-size:14.5px;
    cursor:pointer;
    display:flex;align-items:center;justify-content:center;
  }
  .pill.selected{
    background:var(--teal-dark);
    border-color:var(--teal-dark);
    color:#fff;
  }

  .conditional-block{
    margin-top:4px;
    padding-top:4px;
  }
  .hidden{display:none !important;}

  /* progress (kept for potential future use, unused for now) */
  .progress-wrap{margin-bottom:22px;}
  .progress-label{font-size:12.5px; color:#bcd9d6; margin-bottom:8px; font-weight:600;}
  .progress-track{height:6px;background:rgba(255,255,255,0.18); border-radius:999px; overflow:hidden;}
  .progress-fill{height:100%; background:var(--teal-accent-2); border-radius:999px;}

  .form-wrap{padding:26px 24px 24px;}
  .form-title{font-size:22px;font-weight:800;margin:0 0 4px;}
  .form-sub{font-size:13.5px;color:var(--text-muted); margin:0 0 22px;}

  /* otp boxes */
  .otp-row{display:flex; gap:8px; justify-content:space-between;}
  .otp-box{
    width:15%;
    aspect-ratio:1/1;
    border-radius:14px;
    background:rgba(255,255,255,0.06);
    border:1.5px solid rgba(255,255,255,0.5);
    color:#fff;
    font-size:24px;
    text-align:center;
    font-weight:700;
    outline:none;
  }
  .otp-box:focus{border-color:var(--teal-accent-2);}
  .demo-hint{
    text-align:center;font-size:12.5px;color:#9fc3c0;margin:14px 0 26px;
  }

  /* cards */
  .info-card{
    background:#fff;
    border:1.5px solid var(--border);
    border-radius:18px;
    padding:16px;
    display:flex;
    gap:14px;
    align-items:flex-start;
    margin-bottom:14px;
  }
  .info-card .ic-emoji{
    width:44px;height:44px;border-radius:12px;
    background:var(--teal-light-bg);
    display:flex;align-items:center;justify-content:center;
    font-size:20px; flex-shrink:0;
  }
  .info-card h4{margin:0 0 4px; font-size:15px; font-weight:700;}
  .info-card p{margin:0; font-size:13px; color:var(--text-muted); line-height:1.5;}

  .section-title{
    font-size:14px; font-weight:800; color:var(--teal-dark);
    margin:26px 0 14px; display:flex; align-items:center; gap:6px;
  }

  /* timeline */
  .timeline-card{
    background:var(--teal-light-bg);
    border-radius:18px;
    padding:18px 16px 6px;
  }
  .tl-item{display:flex; gap:14px; padding-bottom:22px; position:relative;}
  .tl-item:not(:last-child)::before{
    content:"";
    position:absolute;
    left:15px; top:32px; bottom:0;
    width:2px;
    background:var(--border);
  }
  .tl-dot{
    width:32px;height:32px;border-radius:999px;
    background:#fff; border:2px solid var(--border);
    display:flex;align-items:center;justify-content:center;
    font-weight:800; font-size:13px; color:var(--text-muted);
    flex-shrink:0;
  }
  .tl-dot.done{background:var(--teal-dark); border-color:var(--teal-dark); color:#fff;}
  .tl-dot.current{background:var(--teal-accent-2); border-color:var(--teal-accent-2); color:#0b3d3d;}
  .tl-body h5{margin:0 0 4px; font-size:14.5px; font-weight:800; color:var(--text-dark);}
  .tl-body p{margin:0; font-size:12.5px; color:var(--text-muted);}
  .tl-practice{
    margin-top:8px; display:inline-block;
    background:var(--teal-accent-2); color:#06302e;
    font-size:12.5px; font-weight:700;
    padding:8px 14px; border-radius:10px; border:none; cursor:pointer;
  }

  /* rewards grid */
  .reward-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
  .reward-tile{
    background:linear-gradient(160deg,#fff6d8,#ffefb0);
    border-radius:16px;
    padding:18px 12px;
    text-align:center;
    position:relative;
  }
  .reward-tile .rt-emoji{font-size:26px; margin-bottom:8px;}
  .reward-tile .rt-name{font-size:13.5px; font-weight:700; color:var(--text-dark);}
  .reward-tile .rt-pts{font-size:12px; color:#8a6d00; margin-top:2px; font-weight:600;}
  .reward-tile .lock{position:absolute; top:10px; right:10px; font-size:13px;}

  /* dashboard */
  .dash-points-card{
    background:linear-gradient(160deg, var(--teal-dark), var(--teal-darker));
    color:#fff;
    border-radius:22px;
    padding:22px 20px;
    margin-top:18px;
  }
  .dash-points-num{font-size:44px; font-weight:800; margin:6px 0 4px; color:var(--yellow);}
  .dash-progress-row{display:flex; justify-content:space-between; align-items:center; margin-top:14px;}
  .train-banner{
    background:var(--teal-light-bg);
    border-radius:18px;
    padding:16px 16px;
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    margin-top:18px;
  }
  .train-banner h4{margin:0 0 2px; font-size:15px;}
  .train-banner p{margin:0; font-size:12.5px; color:var(--text-muted);}
  .btn-small{
    min-height:42px; padding:0 16px; border-radius:12px;
    background:var(--yellow); color:#5c4300; font-weight:700; font-size:13.5px;
    border:none; cursor:pointer; white-space:nowrap;
  }

  /* points wallet */
  .wallet-hero{
    background:linear-gradient(160deg, var(--teal-dark), var(--teal-darker));
    color:#fff; padding:26px 24px 90px; border-bottom-left-radius:var(--radius-lg); border-bottom-right-radius:var(--radius-lg);
  }
  .wallet-stats{display:flex; gap:14px; margin-top:16px;}
  .wallet-stat{flex:1;}
  .wallet-stat .num{font-size:30px; font-weight:800;}
  .wallet-stat .lbl{font-size:12px; color:#bcd9d6;}
  .wallet-body{margin-top:-64px; padding:0 20px 20px;}
  .history-card{
    background:#fff; border:1.5px solid var(--border); border-radius:16px;
    padding:14px 16px; display:flex; justify-content:space-between; align-items:center;
    margin-bottom:10px;
  }
  .history-card .hname{font-weight:700; font-size:14px;}
  .history-card .hdate{font-size:12px; color:var(--text-muted); margin-top:2px;}
  .history-card .hpts{font-weight:800; color:var(--teal-accent-2); font-size:15px;}

  .assistant-card{
    background:var(--teal-light-bg);
    border-radius:18px; padding:16px; margin-top:22px;
  }
  .assistant-head{display:flex; align-items:center; gap:10px; font-weight:800; font-size:14.5px; margin-bottom:12px;}
  .chip-row{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px;}
  .chip{
    background:#fff; border:1.5px solid var(--border); border-radius:999px;
    padding:8px 14px; font-size:12.5px; font-weight:700; color:var(--teal-dark);
    cursor:pointer;
  }
  .assistant-msg{font-size:13.5px; color:var(--text-dark); line-height:1.5;}
  .assistant-reply{
    margin-top:10px; background:#fff; border-radius:12px; padding:10px 12px;
    font-size:13px; color:var(--text-muted); display:none;
  }

  /* profile tab */
  .profile-header{
    background:linear-gradient(160deg, var(--teal-dark), var(--teal-darker));
    color:#fff; padding:34px 24px 44px; text-align:center;
    border-bottom-left-radius:var(--radius-lg); border-bottom-right-radius:var(--radius-lg);
  }
  .avatar-circle{
    width:72px;height:72px;border-radius:999px;background:rgba(255,255,255,0.15);
    display:flex;align-items:center;justify-content:center;font-size:30px;
    margin:0 auto 10px;
  }
  .profile-body{padding:24px 22px;}
  .profile-row{
    display:flex; justify-content:space-between; align-items:center;
    padding:14px 0; border-bottom:1px solid var(--border);
  }
  .profile-row .plabel{font-size:13px; color:var(--text-muted);}
  .profile-row .pval{font-size:14.5px; font-weight:700; color:var(--text-dark);}

  /* top icon bar: Facebook / Instagram / Notifications - pinned to the top */
  .top-icons-bar{
    position:absolute; top:20px; left:20px; z-index:45;
    display:flex; gap:8px;
  }
  .top-icons-bar.hidden{display:none;}
  .ticon-btn{
    width:38px; height:38px; border-radius:12px;
    background:rgba(255,255,255,0.15);
    border:none; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    font-size:16px; color:#fff; line-height:1;
  }
  .ticon-btn:active{transform:scale(0.94);}

  /* bottom nav */
  .bottom-nav{
    position:absolute; left:0; right:0; bottom:0;
    background:#fff;
    border-top:1px solid var(--border);
    display:flex;
    padding:10px 6px 14px;
    z-index:40;
  }
  .bottom-nav.hidden{display:none;}
  .nav-item{
    flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
    min-height:48px; justify-content:center;
    cursor:pointer; color:var(--text-muted); font-size:11.5px; font-weight:700;
    background:none; border:none; font-family:inherit;
  }
  .nav-item .nicon{font-size:19px;}
  .nav-item.active{color:var(--teal-dark);}

  /* modal */
  .modal-overlay{
    position:absolute; inset:0; z-index:100;
    background:rgba(8,46,46,0.55);
    display:flex; align-items:flex-end; justify-content:center;
  }
  .modal-overlay.hidden{display:none;}
  .modal-card{
    width:100%; background:#fff; border-top-left-radius:28px; border-top-right-radius:28px;
    padding:28px 24px 26px; max-height:88%; overflow-y:auto;
  }
  .modal-emoji{font-size:34px; margin-bottom:10px;}
  .modal-title{font-size:19px; font-weight:800; margin:0 0 12px;}
  .modal-body{font-size:14px; line-height:1.7; color:var(--text-dark); margin:0 0 18px;}
  .modal-checkbox-row{
    display:flex; align-items:flex-start; gap:10px;
    background:var(--teal-light-bg); border-radius:14px; padding:14px;
    margin-bottom:18px;
  }
  .modal-checkbox-row input{width:20px;height:20px; flex-shrink:0; margin-top:1px;}
  .modal-checkbox-row label{font-size:13px; font-weight:600; color:var(--text-dark); cursor:pointer;}

  .top-back{
    position:absolute; top:20px; left:20px; z-index:50;
    color:#fff; font-size:14px; font-weight:700; cursor:pointer;
    display:flex; align-items:center; gap:4px;
  }
  .top-back.on-light{color:var(--teal-dark);}

  .banner-error{
    display:none;
    background:#fdecec; border:1.5px solid var(--danger); color:var(--danger);
    font-size:13px; font-weight:600; border-radius:12px; padding:12px 14px; margin-bottom:16px;
  }
  .banner-error.show{display:block;}

  /* country selection list */
  .country-list{display:flex; flex-direction:column; gap:12px; margin-top:30px;}
  .country-row{
    display:flex; align-items:center; gap:12px;
    width:100%;
    background:rgba(255,255,255,0.06);
    border:1.5px solid rgba(255,255,255,0.35);
    border-radius:16px; padding:14px 16px;
    color:#fff; font-family:inherit; cursor:pointer;
    min-height:56px;
  }
  .country-row:active{transform:scale(0.98);}
  .country-row .cflag{font-size:22px;}
  .country-row .cname{flex:1; text-align:left; font-size:15px; font-weight:700;}
  .country-row .csoon{font-size:11px; color:#9fc3c0; font-weight:600;}
  .country-row .carrow{font-size:16px; color:var(--teal-accent-2); font-weight:800;}
  .country-row.active-country{border-color:var(--teal-accent-2); background:rgba(79,224,207,0.14);}
