*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body, .container, header, main, section, aside, footer{
  -webkit-user-select:none;-moz-user-select:none;user-select:none;
}
input, textarea, select{
  -webkit-user-select:text;-moz-user-select:text;user-select:text;
}
img{-webkit-user-drag:none;user-drag:none}
body{margin:0;font-family:'Poppins',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#e5e7eb}

:root{
  --bg-outer:#e5e7eb;
  --bg-page:#f9fafb;
  --bg-card:#ffffff;
  --border:#e5e7eb;
  --text:#111827;
  --muted:#6b7280;

  /* Starbucks Green */
  --accent:#00704A;        /* warna utama logo */
  --accent-soft:#D9EFE6;   /* hijau muda lembut */
  --accent-dark:#005C3D;   /* hijau lebih tua */
}

:root.dark{
  --bg-outer:#020617;
  --bg-page:#020617;
  --bg-card:#020617;
  --border:#111827;
  --text:#f9fafb;
  --muted:#9ca3af;

  /* Starbucks Green - Dark Mode */
  --accent:#00A06B;        /* sedikit lebih terang agar kontras */
  --accent-soft:#03261D;   /* hijau gelap lembut */
  --accent-dark:#00704A;   /* hijau logo asli */
}

body{background:var(--bg-outer);color:var(--text)}

.page-shell{
  max-width:430px;margin:0 auto;min-height:100vh;background:var(--bg-page);
  display:flex;flex-direction:column;padding:0 14px 88px;
}
@media (min-width:768px){
  .page-shell{margin:24px auto;border-radius:32px;overflow:hidden;box-shadow:0 24px 60px rgba(15,23,42,0.45)}
}

/* ===== HEADER ===== */
#mainHeader{
  padding:10px 14px 10px;border-bottom:1px solid var(--border);
  background:var(--bg-card);margin:0 -14px;
}
.header-top-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.brand{margin:0;display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600}
.brand img{width:26px;height:26px;border-radius:8px}
.brand .badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;background:#fee2e2;color:#b91c1c;font-size:10px;font-weight:600}

.theme-toggle{position:relative;width:54px;height:26px;border-radius:999px;border:1px solid var(--border);background:var(--accent-soft);
  display:flex;align-items:center;justify-content:space-between;padding:0 6px;cursor:pointer;font-size:13px}
.theme-toggle .thumb{position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:999px;background:#fff;
  box-shadow:0 2px 6px rgba(15,23,42,0.25);transition:transform .18s ease-out}
.theme-toggle .sun,.theme-toggle .moon{z-index:1}
:root.dark .theme-toggle .thumb{transform:translateX(26px)}
.header-sub{margin-top:4px;font-size:11px;color:var(--muted)}

.notice-card{margin-top:16px;border:1px solid var(--border);border-radius:18px;background:var(--bg-card);padding:12px 12px}
.notice-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.notice-list li{display:flex;gap:8px;font-size:11px;line-height:1.5}
.notice-list li::before{content:"";width:6px;height:6px;border-radius:999px;background:var(--accent);margin-top:5px;flex-shrink:0}
.notice-label{font-weight:600;color:var(--text);min-width:92px;flex-shrink:0}
.notice-list li span:last-child{color:var(--muted)}

.notice-fee{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:var(--accent-soft);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  font-size:12px;
}
.notice-fee strong{font-size:13px;color:var(--accent-dark)}

/* ===== Tutorial Button (FIX: pointer-events + rapih) ===== */
/* =========================
   TUTORIAL BUTTON (MATCH SS)
   ========================= */
.tutorial-btn{
  margin-top:10px;
  width:100%;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.08);
  background: var(--accent-soft);
  color: var(--text);
  font-family: inherit;
  font-size:11px;
  font-weight:400;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}

.tutorial-left{display:flex;align-items:center;gap:5px}
.tutorial-eye{
  width:28px;height:28px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
}

:root.dark .tutorial-btn{
  border-color: rgba(255,255,255,.10);
  background: rgba(34,197,94,.10);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
}
:root.dark .tutorial-eye{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}

.tutorial-chevron{opacity:.75;font-size:14px}

/* state saat modal terbuka (seperti SS tombol jadi "aktif") */
.tutorial-btn.is-open{
  border-color: rgba(0,168,132,.55);
  box-shadow: 0 12px 26px rgba(0,168,132,.12);
}

/* =========================
   TUTORIAL MODAL (MATCH SS)
   ========================= */
#tutorialModal.modal-block{
  z-index: 3500;
  align-items:center;
  justify-content:center;
  padding: 18px;
}

#tutorialModal.modal-block.is-open{
  display:flex;
}

/* timpa modal-card khusus tutorial (karena HTML kamu inline) */
#tutorialModal .modal-card{
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  max-width: 420px !important;
  width: 100% !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.35) !important;
  text-align:left !important;
  padding: 14px !important;

  transform: translateY(10px);
  opacity: 0;
  animation: tutIn .18s ease-out forwards;
}

@keyframes tutIn{ to{ transform: translateY(0); opacity: 1; } }

#tutorialModal h3{
  margin:0 !important;
  font-size:16px !important;
  font-weight:900 !important;
}

#tutorialSubtitle{
  margin:4px 0 0 !important;
  font-size:12px !important;
  color: var(--muted) !important;
  line-height:1.4;
}

#tutorialCloseX{
  width:34px !important;
  height:34px !important;
  border-radius:12px !important;
  border:1px solid var(--border) !important;
  background: transparent !important;
  cursor:pointer;
  color: var(--text) !important;
}
#tutorialCloseX:hover{ filter: brightness(1.06); }

#tutorialList{
  margin: 12px 0 14px !important;
  padding-left: 18px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  max-height: min(52vh, 420px);
  overflow:auto;
  scrollbar-width:none;
}
#tutorialList::-webkit-scrollbar{ width:0; height:0; }
#tutorialList li{ margin: 8px 0; }

/* highlight hijau seperti SS (judul poin) */
#tutorialList b{
  color: var(--accent-dark);
  font-weight: 900;
}

/* tombol bawah: hijau pill */
#tutorialOk.detail-cta{
  margin-top:2px !important;
  width: 100% !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  background: linear-gradient(135deg,var(--accent-dark),var(--accent)) !important;
}

.tutorial-chevron{opacity:.8}

.search-row{margin-top:10px}
.search{width:100%;border-radius:999px;border:1px solid var(--border);padding:9px 34px;font-size:13px;
  background:var(--bg-page) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" stroke="%239ca3af" stroke-width="1.8" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6"/><path d="m16 16 4 4"/></svg>') no-repeat 12px center;background-size:16px;color:var(--text)}
.search::placeholder{color:#9ca3af}

.chips{margin-top:8px;display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}
.chips::-webkit-scrollbar{display:none}
.chip{white-space:nowrap;padding:6px 12px;border-radius:999px;border:1px solid var(--border);font-size:11px;background:var(--bg-card);cursor:pointer;color:var(--text)}
.dark .chip{background:transparent;border-color:#1f2937;color:#f9fafb}
.chip.is-active{background:var(--accent);color:#fff;border-color:var(--accent)}

/* ===== MAIN ===== */
main.gf-main{flex:1 1 auto;padding:10px 10px 18px}
.gf-screen{display:none}
.gf-screen.is-active{display:block}

/* Catalog */
.category-block{margin-bottom:16px}
.category-title{margin:6px 2px 8px;font-size:15px;font-weight:600}
.category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.product-card{background:var(--bg-card);border-radius:16px;border:1px solid var(--border);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 4px 10px rgba(15,23,42,0.03)}
.product-image{width:100%;padding-top:70%;position:relative;overflow:hidden}
.product-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.product-body{padding:8px 9px 9px;display:flex;flex-direction:column;gap:4px}
.product-name{font-size:13px;font-weight:600}
.product-price-row{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.product-price-old{font-size:11px;color:#9ca3af;text-decoration:line-through}
.product-price{font-size:13px;font-weight:600;color:#b91c1c}
.product-footer{margin-top:6px;display:flex;justify-content:flex-end;align-items:center;gap:8px}

.btn-plus{border:none;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:600;cursor:pointer;
  background:linear-gradient(135deg,var(--accent-dark),var(--accent));color:#fff;box-shadow:0 10px 22px rgba(16,185,129,0.35)}
.btn-plus:active{transform:translateY(1px);box-shadow:0 6px 14px rgba(16,185,129,0.25)}

/* ===== DETAIL ===== */
.detail-header{
  position: relative;          /* anchor untuk tombol X */
  display:flex;
  align-items:flex-start;      /* biar title bisa 2 baris enak */
  gap:10px;
  padding: 6px 6px 10px;
}

.detail-title-wrap{
  display:flex;
  flex-direction:column;
  padding-right: 44px;         /* ruang buat tombol X */
}

.detail-title-wrap strong{font-size:15px}
.detail-title-wrap span{font-size:11px;color:var(--muted)}

.detail-x{
  position: absolute;          /* ✅ kunci di pojok kanan atas */
  top: 6px;
  right: 6px;

  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor: pointer;

  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 16px;
  line-height: 1;
}

.detail-x:hover{ filter: brightness(1.08); }


.detail-card{background:var(--bg-card);border:1px solid var(--border);border-radius:18px;overflow:hidden;}
.detail-hero{padding:12px 12px 10px}
.detail-hero .imgwrap{width:100%;padding-top:72%;position:relative;border-radius:16px;overflow:hidden;background:#e5e7eb}
.detail-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.detail-name{margin:10px 2px 2px;font-size:16px;font-weight:700}
.detail-desc{margin:0 2px 0;font-size:12px;color:var(--muted);line-height:1.5}
.detail-price{margin:10px 2px 0;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.detail-price .old{font-size:12px;color:#9ca3af;text-decoration:line-through}
.detail-price .now{font-size:16px;font-weight:800;color:#065f46}

.opt-section{padding:10px 12px 12px;border-top:1px dashed var(--border)}
.opt-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.opt-head strong{font-size:13px}
.opt-head span{font-size:11px;color:var(--muted)}
.opt-grid{display:flex;flex-direction:column;gap:10px}

.opt-row{display:flex;gap:8px;flex-wrap:wrap}
.pill{
  padding:8px 12px;border-radius:999px;border:1px solid var(--border);background:var(--bg-page);
  font-size:12px;cursor:pointer;color:var(--text);display:inline-flex;align-items:center;gap:6px;
}
.pill.is-active{background:var(--accent);border-color:var(--accent);color:#fff}
.pill small{opacity:.85;font-weight:700}
.pill.is-disabled{opacity:.45;cursor:not-allowed;text-decoration:line-through}

/* ===== DETAIL MODAL (POPUP) ===== */
.gf-modal{position: fixed;inset: 0;display: none;z-index: 3000;}
.gf-modal.is-open{ display:block; }
.gf-modal__overlay{position:absolute; inset:0;background: rgba(0,0,0,.55);backdrop-filter: blur(8px);}
.gf-modal__card{
  position: relative;
  width: min(92vw, 420px);
  height: min(86vh, 720px);
  margin: 6vh auto 0;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  padding: 12px;

  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  animation: gfModalIn .18s ease-out forwards;
}
@keyframes gfModalIn{to{ transform: translateY(0); opacity: 1; }}
.gf-modal__body{max-height: 86vh;overflow: auto;padding: 0 12px 18px;scrollbar-width: none;}
.gf-modal__body::-webkit-scrollbar{ width:0; height:0; }

.gf-modal #screenDetail{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;}
.gf-modal .detail-card{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 18px;
}
.gf-modal .detail-card::-webkit-scrollbar{width:0;height:0}

.gf-modal .detail-bottom{
  position: sticky;
  bottom: 0;
  padding: 12px 12px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.detail-cta{
  width:100%;border:none;border-radius:999px;padding:13px 16px;font-size:14px;font-weight:700;
  background:linear-gradient(135deg,var(--accent-dark),var(--accent));color:#fff;
  display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;
  box-shadow:0 16px 32px rgba(15,23,42,0.35);
}
.detail-cta:active{transform:translateY(1px);box-shadow:0 10px 22px rgba(15,23,42,0.25)}
.detail-cta .mut{font-weight:600;opacity:.92}
.gf-modal .detail-cta{max-width:360px;margin:0 auto;box-shadow:none}

/* ===== CART ===== */
#screenSummary{padding-top:4px}
.cart-header{padding:4px 4px 10px;display:flex;align-items:center;gap:10px}
.cart-back{width:30px;height:30px;border-radius:999px;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;background:var(--bg-card);cursor:pointer;color:#4b5563}
.dark .cart-back{background:#020617;border-color:#1f2937;color:#f9fafb}
.cart-header-title{display:flex;flex-direction:column}
.cart-header-title strong{font-size:17px}
.cart-header-title span{font-size:11px;color:var(--muted)}
.cart-section{background:var(--bg-card);border-radius:18px;border:1px solid var(--border);padding:10px 14px;margin-bottom:12px}
.cart-title-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:6px}
#cartList{display:flex;flex-direction:column;gap:10px}
.cart-empty{font-size:13px;color:var(--muted)}
.cart-item-row{display:flex;align-items:flex-start;gap:10px;font-size:13px}
.cart-thumb{width:46px;height:46px;border-radius:12px;overflow:hidden;flex-shrink:0;background:#e5e7eb}
.cart-thumb img{width:100%;height:100%;object-fit:cover}
.cart-item-main{flex:1 1 auto}
.cart-item-main .name{font-weight:700;margin-bottom:2px}
.cart-item-main .meta{font-size:11px;color:var(--muted);line-height:1.35;margin-top:2px}

/* Cart option chips */
.cart-badges{margin-top:4px;margin-bottom:6px;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.cart-chip{
  display:inline-flex;align-items:center;height:18px;padding:0 9px;border-radius:999px;
  font-size:9.5px;font-weight:700;letter-spacing:.1px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  line-height:1;white-space:nowrap;
}
:root:not(.dark) .cart-chip{
  border:1px solid rgba(15,23,42,.10);
  background:rgba(15,23,42,.04);
  color:#111827;
}
.cart-chip.temp-iced{background:rgba(59,130,246,.16);border-color:rgba(59,130,246,.35);color:#bfdbfe}
:root:not(.dark) .cart-chip.temp-iced{ color:#1d4ed8; }
.cart-chip.temp-hot{background:rgba(239,68,68,.16);border-color:rgba(239,68,68,.35);color:#fecaca}
:root:not(.dark) .cart-chip.temp-hot{ color:#b91c1c; }

#cartTotalPcs{margin-top:12px !important;padding-top:8px}

.cart-item-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0}
.cart-item-price{font-weight:800;white-space:nowrap;font-size:13px}
.qty-pill{display:inline-flex;align-items:center;gap:12px;padding:4px 10px;border-radius:999px;background:#fff;border:1px solid rgba(15,23,42,0.08);
  color:var(--text);font-size:13px;font-weight:500;box-shadow:0 2px 6px rgba(15,23,42,0.10)}
.qty-pill button{width:24px;height:24px;border-radius:999px;border:1px solid var(--accent);background:transparent;display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:16px;color:var(--accent)}
.qty-pill button:hover{background:rgba(0,168,132,0.08)}
:root.dark .qty-pill{background:#020617;border-color:#1f2937;color:#f9fafb}
.cart-remove{background:none;border:none;color:#b91c1c;font-size:11px;cursor:pointer;padding:0}
.btn-link{background:none;border:none;padding:0;font-size:13px;font-weight:700;cursor:pointer;color:var(--accent)}

.summary-card{background:var(--bg-card);border-radius:18px;border:1px solid var(--border);padding:10px 14px 14px}
.summary-card h4{margin:0 0 8px;font-size:14px}
.summary-row{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:4px}
.summary-row .old{text-decoration:line-through;color:#9ca3af;font-size:11px;margin-right:4px}
.summary-row.summary-total{margin-top:6px;font-weight:800}
.summary-saving{position:relative;margin-top:6px;padding:6px 10px;border-radius:12px;overflow:hidden}
.summary-saving::before{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(135deg,#ffe4e6,#fecaca);
  opacity:0;transform:scale(.98);transition:opacity .18s ease, transform .18s ease;z-index:0}
.summary-saving .saving-label,.summary-saving .saving-amount{position:relative;z-index:1}
.saving-label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#b91c1c}
.saving-icon{width:22px;height:22px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;background:#fb7185;color:#fff;
  box-shadow:0 0 0 0 rgba(248,113,113,0.4);transform:translateZ(0)}
.saving-amount{font-weight:900;font-size:13px;color:#b91c1c}
.summary-saving.has-saving::before{opacity:1;transform:scale(1)}
.summary-saving.has-saving .saving-icon{animation:promoPulse 1.2s ease-in-out infinite}
@keyframes promoPulse{
  0%{transform:scale(1);box-shadow:0 0 0 0 rgba(248,113,113,0.5)}
  70%{transform:scale(1.08);box-shadow:0 0 0 12px rgba(248,113,113,0)}
  100%{transform:scale(1);box-shadow:0 0 0 0 rgba(248,113,113,0)}
}
:root.dark .summary-saving::before{background:linear-gradient(135deg,#4c0519,#9f1239)}
:root.dark .saving-label,:root.dark .saving-amount{color:#fecaca}

#buyerForm{margin-top:10px;padding-top:8px;border-top:1px dashed var(--border)}
#buyerForm input,#buyerForm textarea{width:100%;border-radius:12px;border:1px solid var(--border);padding:9px 11px;font-size:13px;font-family:inherit;margin-bottom:8px;background:var(--bg-card);color:var(--text)}
#buyerForm textarea{min-height:72px;resize:vertical}
.time-with-tz{display:grid;grid-template-columns:1fr auto;border-radius:12px;border:1px solid var(--border);overflow:hidden;margin-bottom:8px;background:var(--bg-card)}
.time-with-tz input[type="time"]{border:0;padding:9px 11px;font:inherit;background:transparent;color:var(--text)}
.tz-inline{border:0;border-left:1px solid var(--border);padding:0 10px;font-size:12px;font-weight:700;background:var(--bg-page);color:var(--text)}
#buyerForm .hint{font-size:11px;color:var(--muted);margin:4px 0 0}
#buyerForm .btn-primary{margin-top:10px;width:100%;border-radius:999px;border:none;padding:11px 16px;font-size:15px;font-weight:800;
  background:var(--accent);color:#fff;box-shadow:0 10px 24px rgba(16,185,129,0.35);cursor:pointer}
#buyerForm .btn-primary.locked{background:#c62828 !important;color:#fff !important;cursor:not-allowed !important;opacity:1 !important;box-shadow:none}

.footer{padding:10px 0 12px;text-align:center;font-size:11px;color:var(--muted)}


.footer a{
  color: inherit;              /* ikut warna teks footer */
  text-decoration: none;       /* hilangkan garis */
  font-weight: 700;            /* opsional biar tegas */
}
.footer a:hover{
  text-decoration: none;
  opacity: .9;                 /* efek hover halus */
}
.footer a:visited{
  color: inherit;              /* visited juga tidak berubah ungu */
}



/* BAR BAWAH */
.fab-cart{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:19px;
  width: calc(100% - 28px);
  max-width:392px;
  border-radius:999px;
  border:none;
  background:var(--accent);
  color:#fff;
  padding:11px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-family:'Poppins',system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:13px;
  font-weight:700;
  box-shadow:0 16px 32px rgba(15,23,42,0.6);
  cursor:pointer;
  z-index:60;
}
.fab-left{display:flex;flex-direction:column;text-align:left;gap:2px}
.fab-line1{font-size:11px;font-weight:600;opacity:.92;line-height:1.1}
.fab-line2{font-size:12px;font-weight:700;line-height:1.15}
.fab-right{display:flex;align-items:center;gap:8px}
.fab-total{font-size:13px;font-weight:800}
.fab-icon{width:26px;height:26px;border-radius:999px;background:rgba(255,255,255,0.18);display:flex;align-items:center;justify-content:center}
.fab-back{display:none;width:30px;height:30px;border-radius:999px;background:rgba(0,0,0,0.20);align-items:center;justify-content:center;margin-right:10px;flex-shrink:0;cursor:pointer;color:#fff}
.fab-cart.is-summary .fab-back,
.fab-cart.is-detail .fab-back{display:flex}
.fab-cart.is-empty .fab-line1{opacity:.85}
.fab-cart.is-empty .fab-total{opacity:.9}

/* Modal kata kasar */
.modal-block{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;z-index:2000;padding:16px}
.modal-block.is-open{display:flex}
.modal-card{background:#111827;color:#f9fafb;border-radius:16px;padding:18px 16px;max-width:420px;width:100%;text-align:center}
.modal-card h3{margin:0 0 8px;font-size:16px}
.modal-card p{margin:0 0 16px;font-size:13px;line-height:1.5}
.modal-card .btn-primary{width:100%;border-radius:999px;padding:10px 14px;font-size:14px;font-weight:800;background:#fff;color:var(--accent-dark);
  border:1px solid var(--accent);cursor:pointer;box-shadow:0 6px 18px rgba(15,23,42,0.10)}

/* Tutorial modal improvements */
.modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,.55);backdrop-filter:blur(8px)}
.tut-card{
  position:relative;
  width:min(92vw,420px);
  margin:10vh auto 0;
  background:var(--bg-card);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:22px;
  box-shadow:0 24px 70px rgba(0,0,0,.55);
  padding:14px;
  overflow:hidden;
  transform:translateY(12px);
  opacity:0;
  animation:tutIn .18s ease-out forwards;
  text-align:left;
}
@keyframes tutIn{to{transform:translateY(0);opacity:1}}
.tut-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.tut-title{font-weight:800;font-size:16px}
.tut-sub{margin-top:2px;font-size:12px;color:var(--muted);line-height:1.4}
.tut-x{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  width:34px;height:34px;border-radius:12px;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.tut-list{
  margin:12px 0 12px;
  padding-left:18px;
  max-height:min(52vh,420px);
  overflow:auto;
  scrollbar-width:none;
}
.tut-list::-webkit-scrollbar{width:0;height:0}
.tut-list li{margin:8px 0;font-size:13px;line-height:1.45;color:var(--text)}
.tut-ok{
  width:100%;
  border:none;
  border-radius:999px;
  padding:12px 14px;
  font-size:14px;
  font-weight:900;
  background:var(--accent);
  color:#fff;
  cursor:pointer;
  box-shadow:0 16px 32px rgba(15,23,42,.25);
}
.tut-ok:active{transform:translateY(1px)}

/* Clean Modal */
.sgp-modal{position: fixed; inset: 0;display: none;z-index: 9999;}
.sgp-modal.is-open{ display:block; }
.sgp-modal__overlay{position:absolute; inset:0;background: rgba(0,0,0,.55);backdrop-filter: blur(6px);}
.sgp-modal__card{
  position:relative;
  width: min(92vw, 420px);
  margin: 12vh auto 0;
  border-radius: 18px;
  background: rgba(20,24,32,.92);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  padding: 14px;
  color: #fff;
  transform: translateY(10px);
  opacity: 0;
  animation: sgpModalIn .18s ease-out forwards;
}
@keyframes sgpModalIn{to { transform: translateY(0); opacity: 1; }}
.sgp-modal__head{display:flex; align-items:flex-start; gap:12px;}
.sgp-modal__icon{width:40px;height:40px;border-radius:14px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;flex:0 0 auto;}
.sgp-modal__title{font-weight:700;font-size:15px;letter-spacing:.2px;}
.sgp-modal__sub{font-size:12px;color:rgba(255,255,255,.65);margin-top:2px;}
.sgp-modal__x{margin-left:auto;border:0;background:transparent;color:rgba(255,255,255,.7);font-size:16px;padding:8px 10px;border-radius:10px;cursor:pointer;}
.sgp-modal__x:hover{ background: rgba(255,255,255,.08); color:#fff; }
.sgp-modal__msg{margin-top:12px;font-size:13px;line-height:1.5;color:rgba(255,255,255,.85);white-space: pre-line;}
.sgp-modal__actions{display:flex; gap:10px; justify-content:flex-end;margin-top:14px;}
.sgp-btn{border:0;border-radius:14px;padding:10px 12px;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;}
.sgp-btn--primary{background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(16,185,129,.95));color:#06120b;}
.sgp-btn--ghost{background: rgba(255,255,255,.08);color: rgba(255,255,255,.9);border: 1px solid rgba(255,255,255,.10);}
@media (prefers-reduced-motion: reduce){
  .sgp-modal__card{ animation:none; opacity:1; transform:none; }
}
@media (max-width:360px){
  #mainHeader{padding-inline:10px}
  main.gf-main{padding-inline:8px}
  .gf-modal__card{ width: 94vw; height: 88vh; margin-top: 5vh; }
}
