@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;600;700&family=Space+Grotesk:wght@500;700;800&display=swap');

:root{
  --bg:#eef3f3;
  --bg-soft:#f7f9f9;
  --surface:#ffffff;
  --surface-soft:#f9fbfb;
  --surface-tint:#edf5f4;
  --surface-tint-2:#f3f8f8;
  --text:#16263a;
  --text-strong:#0f1d31;
  --muted:#6f8090;
  --line:#d5dddd;
  --line-strong:#c7d2d2;
  --accent:#77bcc0;
  --accent-strong:#4e9ea4;
  --accent-soft:#e8f4f3;
  --accent-2:#d88445;
  --danger:#cb5f4f;
  --danger-soft:#faece9;
  --ok:#3d9866;
  --ok-soft:#e8f4ec;
  --warning:#c99b34;
  --warning-soft:#fdf4d8;
  --shadow:none;
  --radius-xl:24px;
  --radius-lg:18px;
  --radius-md:14px;
  --radius-sm:12px;
}

*{box-sizing:border-box}
html{color-scheme:light}
body{
  margin:0;
  min-height:100vh;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(119,188,192,.18), transparent 24%),
    linear-gradient(180deg, #f9fbfb 0%, var(--bg) 100%);
}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}

h1,h2,h3,h4,.brand,.winner-box .name,.countdown{
  font-family:"Space Grotesk","Inter",ui-sans-serif,system-ui,sans-serif;
  color:var(--text-strong);
}
.eyebrow,.field label,.entry-summary,.status-pill,.count-label,.detail b,.badge,.mini,.help,.muted,.public-footer,.mono,code,.fingerprint{
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}

.wrap{width:min(1180px,calc(100% - 36px));margin:auto;padding:28px 0 56px}
.wrap.narrow{max-width:760px}
.wrap.public{width:min(1240px,calc(100% - 36px))}

.topbar{
  display:flex;justify-content:space-between;align-items:center;gap:18px;
  margin-bottom:24px;padding:16px 18px;border-radius:18px;
  border:1px solid var(--line);background:rgba(255,255,255,.76);backdrop-filter:blur(8px);
  box-shadow:var(--shadow)
}
.brand{font-weight:800;letter-spacing:-.03em;font-size:24px}
.badge{
  display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);
  background:var(--surface);border-radius:999px;padding:9px 13px;color:var(--muted);
  font-size:11px;letter-spacing:.02em
}
.badge.locked{background:var(--ok-soft);border-color:#cde4d6;color:var(--ok)}
.dot{width:8px;height:8px;background:var(--ok);border-radius:50%;box-shadow:none}

.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-xl);
  padding:22px;box-shadow:var(--shadow)
}
.card h2,.card h3{margin:0 0 14px}
.eyebrow{
  font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:var(--accent-strong);font-weight:700
}
.hero{margin-bottom:26px}
.hero h1{font-size:clamp(40px,6vw,68px);letter-spacing:-.05em;line-height:.97;margin:10px 0 14px}
.hero p{color:var(--muted);max-width:780px;font-size:17px;line-height:1.65}
.compact-hero h1{font-size:clamp(38px,5vw,58px)}

.form{display:grid;gap:14px}
.field{display:grid;gap:8px}
.field label{font-size:11px;font-weight:700;color:var(--muted);letter-spacing:.08em;text-transform:uppercase}
.input,.textarea{
  width:100%;border:1px solid var(--line);background:var(--surface-soft);color:var(--text);
  border-radius:14px;padding:13px 14px;outline:none;transition:border-color .18s ease, box-shadow .18s ease, background .18s ease
}
.input:hover,.textarea:hover{border-color:var(--line-strong)}
.input:focus,.textarea:focus{
  border-color:var(--accent);box-shadow:none;background:#fff
}
.textarea{min-height:220px;resize:vertical}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;
  border-radius:12px;padding:12px 15px;font-weight:700;border:1px solid transparent;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease
}
.btn:hover{transform:translateY(-1px)}
.btn.small{padding:9px 12px;border-radius:11px;font-size:12px}
.primary{background:var(--accent-strong);border-color:var(--accent-strong);color:#fff;box-shadow:none}
.primary:hover{background:#448f94;border-color:#448f94}
.secondary{background:var(--surface);border:1px solid var(--line-strong);color:var(--text-strong)}
.secondary:hover{background:var(--surface-tint-2)}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}

.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.actions.compact{margin:0;align-items:center}
.help,.mini,.muted{font-size:12px;color:var(--muted);line-height:1.6}
.notice{
  padding:13px 15px;border-radius:14px;border:1px solid var(--line);font-size:13px;line-height:1.6;margin-top:14px
}
.notice.neutral{background:var(--surface-tint-2);color:var(--muted)}
.notice.success{background:var(--ok-soft);border-color:#cfe4d8;color:var(--ok)}
.notice.error{background:var(--danger-soft);border-color:#efcdc7;color:var(--danger)}

.admin-grid{display:grid;grid-template-columns:.92fr 1.08fr;gap:20px}
.section-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:16px}
.section-head h2{margin:4px 0 0}

.raffle-list{display:grid;gap:12px}
.raffle-item{
  padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--surface-soft)
}
.raffle-item strong{font-size:16px;font-family:"Space Grotesk","Inter",sans-serif;color:var(--text-strong)}
.raffle-title-row{display:flex;justify-content:space-between;gap:12px}
.raffle-title-row>div:first-child{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.raffle-prize{margin:8px 0 5px;color:var(--text)}
.status-pill{
  font-size:10px;letter-spacing:.14em;text-transform:uppercase;padding:5px 8px;border-radius:999px;border:1px solid var(--line);color:var(--muted);background:#fff
}
.status-pill.scheduled{color:var(--ok);border-color:#cfe4d8;background:var(--ok-soft)}
.status-pill.spinning{color:var(--warning);border-color:#ecdba3;background:var(--warning-soft)}
.status-pill.ended{color:var(--accent-strong);border-color:#d7e8e7;background:var(--accent-soft)}
.status-pill.draft{color:#7d8499;background:#f2f5f6}
.winner-mini{margin-top:8px;padding:9px 11px;background:var(--ok-soft);border-radius:10px;color:var(--ok);font-size:12px;border:1px solid #d3e8db}
.fingerprint{margin-top:7px;font-size:11px;color:var(--muted)}
.entry-summary{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px;letter-spacing:.01em}
.empty-state{display:grid;gap:6px;text-align:center;padding:44px 10px;color:var(--muted)}
.empty-state strong{color:var(--text)}
.login-card{max-width:480px}

.public{max-width:1180px}
.event-head{text-align:center;padding:18px 0 10px}
.event-head h1{font-size:clamp(36px,5vw,60px);margin:10px 0 12px;letter-spacing:-.05em}
.prize{font-size:22px;color:var(--text-strong);font-weight:600}
.countdown{
  font-variant-numeric:tabular-nums;font-weight:800;font-size:clamp(44px,8vw,84px);
  letter-spacing:-.06em;margin:16px 0 6px;line-height:1;color:var(--text-strong)
}
.count-label{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.16em}
.stage{display:grid;grid-template-columns:minmax(0,1.15fr) .85fr;gap:20px;align-items:stretch;margin-top:22px}
.wheel-card{
  display:grid;place-items:center;min-height:590px;position:relative;overflow:hidden;
  background:linear-gradient(180deg, #f8fbfb 0%, #edf4f4 100%)
}
.wheel-card::before{
  content:"";position:absolute;inset:0;background:radial-gradient(circle at top, rgba(119,188,192,.12), transparent 34%);pointer-events:none
}
.wheel-wrap{position:relative;width:min(520px,90vw);aspect-ratio:1;z-index:1}
.wheel-wrap canvas{width:100%;height:100%;filter:none;will-change:transform}
.pointer{
  position:absolute;left:50%;top:-4px;transform:translateX(-50%);width:0;height:0;
  border-left:18px solid transparent;border-right:18px solid transparent;border-top:34px solid var(--accent-2);
  filter:none;z-index:3
}
.result-overlay{
  position:absolute;inset:0;display:grid;place-items:center;background:rgba(245,250,250,.9);
  backdrop-filter:blur(10px);opacity:0;pointer-events:none;transition:.55s
}
.result-overlay.show{opacity:1}
.winner-box{text-align:center;padding:28px}
.winner-box .label{color:var(--accent-strong);font-size:12px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;font-family:"JetBrains Mono",ui-monospace,monospace}
.winner-box .name{font-size:clamp(42px,7vw,74px);font-weight:800;letter-spacing:-.05em;margin-top:8px}

.details{display:grid;gap:12px;align-content:start}
.detail{border:1px solid var(--line);border-radius:16px;padding:15px;background:var(--surface-soft)}
.detail b{display:block;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:7px}
.mono{font-size:11px;word-break:break-all;color:var(--muted)}
.names{max-height:300px;overflow:auto;display:flex;flex-wrap:wrap;gap:7px}
.chip{display:flex;gap:5px;align-items:center;font-size:12px;padding:8px 10px;border-radius:999px;background:var(--accent-soft);border:1px solid #d2e7e6;color:var(--text)}
.chip small{opacity:.55}
.statusline{text-align:center;color:var(--muted);margin:10px 0 0;line-height:1.6}
.locked,.verified{color:var(--ok)}
.warn{color:var(--warning)}
.hidden{display:none!important}
.toast{position:fixed;right:18px;bottom:18px;background:var(--surface);border:1px solid var(--line);padding:12px 14px;border-radius:14px;box-shadow:var(--shadow);display:none;z-index:10}
.toast.show{display:block}
.public-footer{text-align:center;color:var(--muted);font-size:11px;padding:22px 10px;letter-spacing:.01em}
.public-footer:before{content:'🔒';margin-right:6px}
code{color:var(--accent-strong);font-size:.96em}

@media(max-width:880px){
  .admin-grid,.stage{grid-template-columns:1fr}
  .wheel-card{min-height:auto;padding:18px}
  .row{grid-template-columns:1fr}
  .topbar{align-items:flex-start;flex-direction:column}
  .raffle-title-row{flex-direction:column}
  .entry-summary{flex-direction:column}
  .wrap,.wrap.public{width:min(100% - 24px, 100% - 24px)}
}

/* Public raffle: compact single-screen layout */
@media(min-width:881px){
  body:has(.wrap.public){overflow:hidden}
  .wrap.public{height:100vh;max-width:none;width:min(1380px,calc(100% - 28px));padding:14px 0 12px;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px}
  .public .topbar{margin:0;padding:10px 14px;border-radius:14px;box-shadow:none}
  .public .brand{font-size:19px}
  .public .badge{padding:7px 10px;font-size:10px}
  .event-head{padding:2px 0 0}
  .event-head .eyebrow{font-size:10px}
  .event-head h1{font-size:clamp(30px,3.2vw,48px);margin:5px 0 3px;line-height:1}
  .prize{font-size:16px}
  .count-label{font-size:10px;margin-top:5px}
  .countdown{font-size:clamp(34px,4.8vw,58px);margin:3px 0 0;line-height:.95}
  .statusline{font-size:11px;margin:4px 0 0;line-height:1.35}
  .stage{min-height:0;height:100%;margin-top:2px;gap:12px;grid-template-columns:minmax(0,1.12fr) minmax(350px,.88fr)}
  .stage>.card{min-height:0}
  .wheel-card{min-height:0;height:100%;padding:12px;border-radius:18px}
  .wheel-wrap{width:min(46vh,500px);max-width:90%;max-height:100%;}
  .pointer{border-left-width:14px;border-right-width:14px;border-top-width:27px}
  .details{height:100%;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto minmax(72px,1fr) auto;gap:7px;padding:12px;border-radius:18px;overflow:hidden}
  .detail{padding:9px 10px;border-radius:11px;min-width:0;overflow:hidden}
  .detail b{font-size:9px;margin-bottom:4px;letter-spacing:.11em}
  .detail span,.detail .mini{font-size:11px;line-height:1.3}
  .details .detail:nth-child(5),.details .detail:nth-child(6){font-size:10px}
  .details .detail:nth-child(7){grid-column:1/-1;min-height:0;overflow:hidden}
  .details .detail:nth-child(8){grid-column:1/-1}
  .names{max-height:100%;height:100%;overflow:auto;align-content:flex-start;gap:5px;padding-right:2px}
  .chip{font-size:10px;padding:5px 7px}
  .mono{font-size:9px!important;line-height:1.2!important}
  .public-footer{padding:2px 8px 0;font-size:9px;line-height:1.2}
  .winner-box{padding:20px}
  .winner-box .label{font-size:10px}
  .winner-box .name{font-size:clamp(34px,5vw,64px);margin-top:5px}
  .winner-box .mini{font-size:10px}
  .reveal-btn{margin:16px auto 0;min-width:150px;padding:10px 16px}
}

.blurred-winner{filter:blur(18px);user-select:none;opacity:.58;transition:filter .45s ease,opacity .45s ease}
.result-overlay.preview{background:rgba(248,251,251,.58)}
.reveal-btn{margin:18px auto 0}

/* v5 public raffle refinements */
.result-overlay{z-index:8}
.wheel-wrap{z-index:2}
.reveal-btn{
  min-width:180px;
  padding:12px 20px;
  font-size:14px;
  border-radius:12px;
  box-shadow:none;
}
.result-overlay.preview .winner-box{
  width:min(440px,82%);
  padding:28px 30px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(255,255,255,.94);
  box-shadow:none;
}
.result-overlay.preview .winner-box .name{margin:10px 0 4px}

@media(min-width:881px){
  .wrap.public{
    width:min(1420px,calc(100% - 36px));
    padding:16px 0 12px;
    gap:10px;
  }
  .public .topbar{
    padding:12px 16px;
    border-radius:16px;
  }
  .public .brand{font-size:20px}
  .event-head{padding:4px 0 2px}
  .event-head h1{
    font-size:clamp(32px,3.15vw,48px);
    margin:7px 0 5px;
  }
  .prize{font-size:17px}
  .count-label{margin-top:7px}
  .countdown{font-size:clamp(34px,4.5vw,56px);margin:5px 0 1px}
  .statusline{font-size:11px;margin:5px 0 0}

  .stage{
    gap:16px;
    grid-template-columns:minmax(0,1.18fr) minmax(390px,.82fr);
    margin-top:4px;
  }
  .wheel-card{
    padding:18px;
    border-radius:20px;
  }
  .wheel-wrap{
    width:min(57vh,570px);
    max-width:94%;
  }
  .pointer{
    border-left-width:16px;
    border-right-width:16px;
    border-top-width:30px;
  }

  .details{
    gap:10px;
    padding:16px;
    border-radius:20px;
    grid-template-rows:auto auto auto minmax(105px,1fr) auto;
  }
  .detail{
    padding:12px 13px;
    border-radius:13px;
  }
  .detail b{
    font-size:9.5px;
    margin-bottom:6px;
  }
  .detail span,.detail .mini{
    font-size:11.5px;
    line-height:1.42;
  }
  .details .detail:nth-child(7){
    min-height:105px;
    max-height:175px;
  }
  .names{
    min-height:0;
    max-height:145px;
    height:auto;
    overflow-y:auto;
    overflow-x:hidden;
    gap:7px;
    padding:2px 5px 4px 0;
    scrollbar-gutter:stable;
  }
  .names::-webkit-scrollbar{width:8px}
  .names::-webkit-scrollbar-thumb{background:#c7d8d8;border-radius:999px}
  .names::-webkit-scrollbar-track{background:#eef4f4;border-radius:999px}
  .chip{
    font-size:11px;
    padding:6px 9px;
  }
  .mono{font-size:9.5px!important;line-height:1.28!important}
  .public-footer{font-size:9.5px;padding-top:3px}

  .winner-box{padding:26px}
  .winner-box .label{font-size:11px}
  .winner-box .name{font-size:clamp(38px,5vw,66px)}
  .winner-box .mini{font-size:11px}
}

@media(min-width:881px) and (max-height:820px){
  .wrap.public{padding-top:10px;gap:6px}
  .public .topbar{padding:9px 13px}
  .event-head h1{font-size:clamp(29px,3vw,42px);margin:4px 0 3px}
  .prize{font-size:15px}
  .countdown{font-size:clamp(31px,4vw,48px);margin:3px 0 0}
  .stage{gap:12px}
  .wheel-card{padding:12px}
  .wheel-wrap{width:min(54vh,520px)}
  .details{padding:12px;gap:7px}
  .detail{padding:9px 10px}
  .details .detail:nth-child(7){min-height:84px;max-height:125px}
  .names{max-height:100px}
}

/* v6 public raffle fixes: clickable reveal + roomier layout */
.result-overlay.show.preview{pointer-events:auto}
.result-overlay.show:not(.preview){pointer-events:none}

@media(min-width:881px){
  .wrap.public{
    width:min(1500px,calc(100% - 48px));
    padding:18px 0 14px;
    gap:12px;
  }

  .public .topbar{
    padding:13px 18px;
    border-radius:17px;
  }
  .public .brand{font-size:21px}
  .public .badge{padding:8px 12px}

  .event-head{padding:4px 0 4px}
  .event-head h1{
    font-size:clamp(34px,3vw,50px);
    margin:8px 0 6px;
    line-height:1.02;
  }
  .prize{font-size:18px}
  .count-label{font-size:10px;margin-top:7px}
  .countdown{font-size:clamp(36px,4.4vw,58px);margin:5px 0 2px}
  .statusline{font-size:11.5px;margin:6px 0 0}

  .stage{
    gap:20px;
    grid-template-columns:minmax(0,1.28fr) minmax(430px,.72fr);
    align-items:start;
    margin-top:4px;
  }

  .wheel-card{
    min-height:0;
    height:calc(100vh - 285px);
    min-height:560px;
    padding:24px;
    border-radius:22px;
  }
  .wheel-wrap{
    width:min(62vh,650px);
    max-width:96%;
  }

  .details{
    height:auto;
    min-height:0;
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-auto-rows:auto;
    gap:12px;
    padding:18px;
    border-radius:22px;
    overflow:visible;
    align-content:start;
  }

  .detail{
    padding:14px 15px;
    border-radius:14px;
    overflow:visible;
  }
  .detail b{
    font-size:10px;
    margin-bottom:7px;
    letter-spacing:.12em;
  }
  .detail span,.detail .mini{
    font-size:12px;
    line-height:1.48;
  }

  .details .detail:nth-child(5),
  .details .detail:nth-child(6){font-size:11px}

  .details .detail:nth-child(7){
    grid-column:1/-1;
    min-height:0;
    max-height:none;
    overflow:visible;
  }
  .details .detail:nth-child(8){
    grid-column:1/-1;
    margin-top:0;
  }

  .names{
    height:132px;
    min-height:132px;
    max-height:132px;
    overflow-y:auto;
    overflow-x:hidden;
    align-content:flex-start;
    gap:8px;
    padding:3px 7px 4px 0;
    scrollbar-gutter:stable;
  }
  .chip{
    font-size:11.5px;
    padding:7px 10px;
  }
  .mono{font-size:10px!important;line-height:1.35!important}

  .result-overlay.preview .winner-box{
    width:min(500px,84%);
    padding:34px 36px;
    border-radius:24px;
  }
  .winner-box .label{font-size:11px}
  .winner-box .name{font-size:clamp(42px,5vw,70px);margin-top:10px}
  .winner-box .mini{font-size:11.5px;line-height:1.5}
  .reveal-btn{
    margin-top:20px;
    min-width:190px;
    padding:13px 22px;
    font-size:14px;
  }

  .public-footer{font-size:9.5px;padding-top:2px}
}

@media(min-width:881px) and (max-height:900px){
  .wrap.public{padding-top:12px;gap:8px}
  .public .topbar{padding:10px 14px}
  .event-head h1{font-size:clamp(31px,2.8vw,44px);margin:5px 0 4px}
  .prize{font-size:16px}
  .countdown{font-size:clamp(33px,4vw,50px);margin:3px 0 1px}
  .statusline{font-size:10.5px;margin-top:4px}
  .stage{gap:16px}
  .wheel-card{height:calc(100vh - 245px);min-height:500px;padding:18px}
  .wheel-wrap{width:min(60vh,590px)}
  .details{padding:15px;gap:9px}
  .detail{padding:11px 12px}
  .detail b{font-size:9px;margin-bottom:5px}
  .detail span,.detail .mini{font-size:11px;line-height:1.38}
  .names{height:104px;min-height:104px;max-height:104px}
  .chip{font-size:10.5px;padding:6px 8px}
  .result-overlay.preview .winner-box{padding:28px 30px}
}

/* v7: guaranteed bottom breathing room + unclipped above-the-fold public layout */
@media(min-width:881px){
  body:has(.wrap.public){overflow:hidden}
  .wrap.public{
    height:100vh;
    width:min(1500px,calc(100% - 48px));
    padding:16px 0 30px;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr) auto;
    gap:10px;
    overflow:hidden;
  }

  .public .topbar{padding:11px 16px;margin:0}
  .public .brand{font-size:20px}
  .event-head{padding:2px 0 2px}
  .event-head h1{font-size:clamp(31px,2.8vw,46px);margin:5px 0 4px;line-height:1}
  .prize{font-size:16px}
  .count-label{margin-top:4px}
  .countdown{font-size:clamp(34px,4vw,52px);margin:3px 0 0}
  .statusline{font-size:10.5px;margin-top:4px}

  .stage{
    min-height:0;
    height:100%;
    gap:18px;
    grid-template-columns:minmax(0,1.3fr) minmax(420px,.7fr);
    align-items:start;
    margin-top:2px;
    overflow:hidden;
  }

  .wheel-card{
    height:100%;
    min-height:0;
    padding:20px;
    overflow:hidden;
  }
  .wheel-wrap{
    width:min(64vh,660px);
    max-width:96%;
    max-height:100%;
  }

  .details{
    height:auto;
    max-height:100%;
    min-height:0;
    padding:16px;
    gap:10px;
    overflow:hidden;
    align-content:start;
  }
  .detail{padding:12px 13px}
  .detail b{margin-bottom:6px}
  .detail span,.detail .mini{font-size:11px;line-height:1.38}
  .details .detail:nth-child(7){min-height:0;max-height:none}
  .names{
    height:108px;
    min-height:108px;
    max-height:108px;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-gutter:stable;
  }
  .details .detail:nth-child(8){margin-top:0}
  .public-footer{padding:0 8px;font-size:9px;line-height:1.15}
}

@media(min-width:881px) and (max-height:900px){
  .wrap.public{padding:12px 0 30px;gap:7px}
  .public .topbar{padding:9px 13px}
  .event-head h1{font-size:clamp(29px,2.6vw,42px);margin:3px 0 3px}
  .prize{font-size:15px}
  .countdown{font-size:clamp(32px,3.7vw,48px);margin-top:2px}
  .stage{gap:14px}
  .wheel-card{padding:14px}
  .wheel-wrap{width:min(61vh,610px)}
  .details{padding:13px;gap:8px}
  .detail{padding:10px 11px}
  .detail b{font-size:9px;margin-bottom:4px}
  .detail span,.detail .mini{font-size:10.5px;line-height:1.32}
  .names{height:88px;min-height:88px;max-height:88px}
  .chip{font-size:10px;padding:5px 8px}
  .mono{font-size:9px!important;line-height:1.25!important}
}

/* v8 admin dashboard: single-screen desktop workspace */
@media(min-width:881px){
  body:has(.admin-grid){overflow:hidden}
  body:has(.admin-grid) .wrap{
    width:min(1380px,calc(100% - 36px));
    max-width:none;
    height:100vh;
    padding:14px 0 30px;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    gap:12px;
  }
  body:has(.admin-grid) .topbar{
    margin:0;
    padding:11px 15px;
    border-radius:15px;
    box-shadow:none;
  }
  body:has(.admin-grid) .brand{font-size:20px}
  body:has(.admin-grid) .badge{padding:7px 10px;font-size:10px}
  body:has(.admin-grid) .compact-hero{
    margin:0;
    padding:0 2px;
  }
  body:has(.admin-grid) .compact-hero .eyebrow{font-size:10px}
  body:has(.admin-grid) .compact-hero h1{
    font-size:clamp(30px,3vw,42px);
    line-height:1;
    margin:5px 0 5px;
  }
  body:has(.admin-grid) .compact-hero p{
    font-size:13px;
    line-height:1.45;
    margin:0;
    max-width:900px;
  }
  body:has(.admin-grid) .admin-grid{
    min-height:0;
    height:100%;
    grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr);
    gap:14px;
  }
  body:has(.admin-grid) .admin-grid>.card{
    min-height:0;
    height:100%;
    padding:18px;
    border-radius:20px;
  }
  /* Left form stays fully visible; no internal scrolling. */
  body:has(.admin-grid) .admin-grid>.card:first-child{
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>h2{
    font-size:21px;
    margin:0 0 10px;
    flex:0 0 auto;
  }
  body:has(.admin-grid) #raffleForm{
    gap:9px;
    min-height:0;
    flex:1 1 auto;
  }
  body:has(.admin-grid) #raffleForm .field{gap:0}
  body:has(.admin-grid) #raffleForm .field label{font-size:9px;line-height:1;margin:0 0 1px;padding:0}
  body:has(.admin-grid) #raffleForm .row{gap:9px}
  body:has(.admin-grid) #raffleForm .input,
  body:has(.admin-grid) #raffleForm .textarea{
    padding:9px 11px;
    border-radius:11px;
    font-size:13px;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    min-height:105px;
    height:clamp(105px,15vh,155px);
    max-height:155px;
    resize:none;
  }
  body:has(.admin-grid) #raffleForm .entry-summary{
    font-size:9px;
    line-height:1.35;
  }
  body:has(.admin-grid) #raffleForm .actions{
    margin-top:2px;
    gap:7px;
  }
  body:has(.admin-grid) #raffleForm .btn{
    padding:9px 13px;
    font-size:12px;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>.notice{
    flex:0 0 auto;
    padding:9px 11px;
    margin-top:9px;
    border-radius:11px;
    font-size:10px;
    line-height:1.45;
  }
  /* Right side: header fixed, raffle list is the only scrollable region. */
  body:has(.admin-grid) .admin-grid>.card:nth-child(2){
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  body:has(.admin-grid) .admin-grid>.card:nth-child(2) .section-head{
    flex:0 0 auto;
    margin-bottom:10px;
  }
  body:has(.admin-grid) .admin-grid>.card:nth-child(2) .section-head .eyebrow{font-size:10px}
  body:has(.admin-grid) .admin-grid>.card:nth-child(2) .section-head h2{
    font-size:21px;
    margin-top:3px;
  }
  body:has(.admin-grid) #raffleList{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    padding-right:7px;
    align-content:start;
    scrollbar-width:thin;
    scrollbar-color:var(--accent) transparent;
  }
  body:has(.admin-grid) #raffleList::-webkit-scrollbar{width:8px}
  body:has(.admin-grid) #raffleList::-webkit-scrollbar-track{background:transparent}
  body:has(.admin-grid) #raffleList::-webkit-scrollbar-thumb{
    background:#bdd9d8;
    border-radius:999px;
    border:2px solid transparent;
    background-clip:padding-box;
  }
  body:has(.admin-grid) .raffle-item{
    padding:13px;
    border-radius:14px;
  }
  body:has(.admin-grid) .raffle-item strong{font-size:14px}
  body:has(.admin-grid) .raffle-prize{margin:5px 0 3px;font-size:12px}
  body:has(.admin-grid) .raffle-item .mini{font-size:10px;line-height:1.45}
  body:has(.admin-grid) .raffle-item .actions{margin-top:7px}
  body:has(.admin-grid) .raffle-item .btn.small{padding:7px 9px;font-size:10px}
  body:has(.admin-grid) .winner-mini{padding:7px 9px;font-size:10px}
  body:has(.admin-grid) .fingerprint{font-size:9px}
}

/* Extra-short desktop screens: retain the 30px bottom safety zone. */
@media(min-width:881px) and (max-height:760px){
  body:has(.admin-grid) .wrap{gap:8px;padding-top:10px;padding-bottom:30px}
  body:has(.admin-grid) .compact-hero h1{font-size:28px}
  body:has(.admin-grid) .compact-hero p{font-size:11px}
  body:has(.admin-grid) .admin-grid>.card{padding:14px}
  body:has(.admin-grid) #raffleForm{gap:7px}
  body:has(.admin-grid) #raffleForm .input,
  body:has(.admin-grid) #raffleForm .textarea{padding:7px 9px;font-size:12px}
  body:has(.admin-grid) #raffleForm .textarea{min-height:82px;height:11vh;max-height:105px}
  body:has(.admin-grid) .admin-grid>.card:first-child>.notice{margin-top:7px;padding:7px 9px}
}

/* v9 footer placement + build credit */
.build-credit{
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:8px;
  line-height:1;
  color:#ccc;
  white-space:nowrap;
}
.build-credit a{color:#ccc;text-decoration:none}
.build-credit a:hover{text-decoration:underline}
.build-credit span{padding:0 3px}
.admin-credit{display:none}
.public-credit{justify-self:end;align-self:end;text-align:right}

.details-column{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:7px;
}
.public-trust-note{
  flex:0 0 auto;
  padding:0 4px;
  color:var(--muted);
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:9px;
  line-height:1.35;
  text-align:left;
}

@media(min-width:881px){
  /* Public: reserve a real footer row while keeping 30px bottom breathing room. */
  .wrap.public{
    padding-bottom:30px;
    grid-template-rows:auto auto minmax(0,1fr) auto;
  }
  .stage>.details-column{height:100%;overflow:hidden}
  .details-column .details{
    flex:1 1 auto;
    min-height:0;
    max-height:none;
  }
  .public-credit{margin-top:1px}

  /* Admin: credit gets its own tiny row; raffle list remains the only scrollable region. */
  body:has(.admin-grid) .wrap{
    padding-bottom:30px;
    grid-template-rows:auto auto minmax(0,1fr) auto;
  }
  body:has(.admin-grid) .admin-credit{
    display:block;
    justify-self:end;
    align-self:end;
    text-align:right;
  }
}

@media(max-width:880px){
  .details-column{gap:10px}
  .public-trust-note{padding:0 2px 4px;font-size:9px}
  .build-credit{font-size:8px;margin-top:16px}
  .admin-credit{display:block;width:min(100% - 24px,1180px);margin:0 auto 30px;text-align:right}
  .public-credit{margin-bottom:30px;text-align:right;margin-left:auto}
}

/* v11: integrated trust note + flat UI */
.public-trust-note{display:none!important}
.verification-lock-note{display:block;margin-top:2px;margin-bottom:10px;color:var(--muted)}
.result-proof{display:block}
.build-credit{justify-self:end!important;text-align:right!important}
.admin-credit,.public-credit{justify-self:end!important;text-align:right!important}
.topbar,.card,.primary,.reveal-btn,.result-overlay.preview .winner-box,.toast{box-shadow:none!important}
.input:focus,.textarea:focus{box-shadow:none!important;outline:2px solid rgba(119,188,192,.35);outline-offset:1px}
.dot{box-shadow:none!important}
.wheel-wrap canvas,.pointer{filter:none!important}

/* v13: participant list uses the full available height of its card */
@media(min-width:881px){
  .details .detail:nth-child(7){
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .details .detail:nth-child(7) > b{flex:0 0 auto}
  .details .detail:nth-child(7) .names{
    flex:1 1 auto;
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    overflow-y:auto;
    overflow-x:hidden;
    align-content:flex-start;
  }
}


/* v14: cleaner header + winner celebration */
.confetti-layer{position:fixed;inset:0;z-index:9999;pointer-events:none;width:100vw;height:100vh}
@media(min-width:881px){
  .event-head h1{margin-bottom:4px}
  .event-head .count-label{margin-top:4px}
}

/* v15 — polished public event header */
.event-head{
  width:min(920px,100%);
  margin:0 auto;
  padding:4px 0 10px;
  text-align:center;
}
.event-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:6px 11px;
  border:1px solid #cfe4e3;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent-strong);
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:10px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  line-height:1;
}
.event-kicker-dot{
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:50%;
  background:var(--accent-2);
}
.event-head h1{
  position:relative;
  width:fit-content;
  max-width:100%;
  margin:9px auto 7px;
  padding:0 20px;
  font-size:clamp(34px,4.2vw,56px);
  line-height:.98;
  letter-spacing:-.055em;
}
.event-head h1::before,
.event-head h1::after{
  content:"";
  position:absolute;
  top:50%;
  width:34px;
  height:1px;
  background:#d6e5e4;
}
.event-head h1::before{right:100%}
.event-head h1::after{left:100%}
.event-state{
  display:inline-flex;
  min-width:260px;
  max-width:min(620px,100%);
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin:0 auto;
  padding:7px 22px 8px;
  border-top:1px solid #d9e4e4;
  border-bottom:1px solid #d9e4e4;
  background:linear-gradient(90deg,transparent,rgba(119,188,192,.07),transparent);
}
.event-state .count-label{
  margin:0 0 2px;
  color:#7b8a98;
}
.event-state .countdown{
  margin:0;
  line-height:.95;
}
.event-state .statusline{
  margin:4px 0 0;
  max-width:560px;
}

@media (min-width:881px) and (max-height:900px){
  .event-head{padding:2px 0 7px}
  .event-kicker{padding:5px 10px;font-size:9px}
  .event-head h1{margin:6px auto 5px;font-size:clamp(31px,3.5vw,48px)}
  .event-state{padding:5px 20px 6px}
  .event-state .statusline{margin-top:3px}
}

@media(max-width:880px){
  .event-head{padding-top:4px}
  .event-head h1{padding:0;margin:9px auto 8px}
  .event-head h1::before,.event-head h1::after{display:none}
  .event-state{width:100%;min-width:0;padding:8px 14px 9px}
}

/* v16 — refined verification card */
#verification{
  display:flex;
  flex-direction:column;
  gap:10px;
  color:var(--muted);
}
.verification-status{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  gap:7px;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid #cfe4d8;
  background:var(--ok-soft);
  color:var(--ok);
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:10px;
  font-weight:700;
  line-height:1.1;
}
.verification-status.warn{
  border-color:#ecdba3;
  background:var(--warning-soft);
  color:var(--warning);
}
.verification-check{
  display:grid;
  place-items:center;
  width:15px;
  height:15px;
  border-radius:50%;
  background:rgba(255,255,255,.72);
  font-family:"Inter",sans-serif;
  font-size:10px;
  font-weight:800;
}
.verification-copy{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:8px;
  align-items:start;
  padding:0 1px;
  color:#667787;
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:10px;
  line-height:1.52;
}
.verification-lock{line-height:1.45}
.verification-proof{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:start;
  gap:9px;
  padding:8px 10px;
  border:1px solid #dce6e5;
  border-radius:10px;
  background:#f4f8f8;
}
.verification-proof-label{
  color:#82909c;
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:9px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}
.verification-proof-hash{
  min-width:0;
  color:#738291!important;
  font-size:7px!important;
  line-height:1.18!important;
  word-break:break-all;
}
@media(min-width:881px){
  .details .detail:nth-child(8){padding:13px 14px}
  .details .detail:nth-child(8)>b{margin-bottom:8px}
}

/* v17 — verification status aligned to the right of the section heading */
.details .detail:nth-child(8){position:relative}
.details .detail:nth-child(8)>b{
  min-height:22px;
  margin-bottom:9px;
  padding-right:150px;
}
#verification{position:static}
.verification-status{
  position:absolute;
  top:11px;
  right:13px;
  align-self:auto;
  margin:0;
  max-width:calc(100% - 150px);
  white-space:nowrap;
}
@media(max-width:880px){
  .details .detail:nth-child(8)>b{padding-right:0}
  .verification-status{
    position:static;
    align-self:flex-start;
    max-width:100%;
    white-space:normal;
    margin-top:-2px;
  }
}


/* v18 — Intrinsic Digital product lockup */
.brand-lockup{
  display:flex;
  align-items:center;
  min-width:0;
  gap:14px;
}
.brand-logo{
  display:block;
  width:auto;
  height:29px;
  max-width:190px;
  object-fit:contain;
  object-position:left center;
  flex:0 0 auto;
}
.brand-divider{
  width:1px;
  height:24px;
  background:var(--line-strong);
  flex:0 0 auto;
}
.brand-product{
  font-family:"Space Grotesk","Inter",sans-serif;
  font-size:15px;
  line-height:1;
  font-weight:700;
  letter-spacing:-.015em;
  color:var(--text);
  white-space:nowrap;
}
@media(max-width:680px){
  .brand-lockup{gap:10px}
  .brand-logo{height:24px;max-width:154px}
  .brand-divider{height:20px}
  .brand-product{font-size:13px;white-space:normal}
}

/* v20: keep the wheel comfortably inside its card with visible bottom breathing room */
@media(min-width:881px){
  .wheel-card{
    padding:18px 22px 30px;
  }
  .wheel-wrap{
    width:min(59vh,610px);
    max-width:94%;
    max-height:calc(100% - 18px);
  }
}
@media(min-width:881px) and (max-height:900px){
  .wheel-card{
    padding:14px 18px 28px;
  }
  .wheel-wrap{
    width:min(56vh,570px);
    max-height:calc(100% - 16px);
  }
}


/* v23: balanced audio release + preserve a mathematically circular wheel */
.wheel-wrap{
  aspect-ratio:1 / 1 !important;
  height:auto !important;
  max-height:none !important;
  flex:0 0 auto;
}
.wheel-wrap canvas{
  display:block;
  width:100% !important;
  height:auto !important;
  aspect-ratio:1 / 1;
}
@media(min-width:881px){
  .wheel-wrap{
    width:min(55vh,590px,92%) !important;
  }
}
@media(min-width:881px) and (max-height:900px){
  .wheel-wrap{
    width:min(52vh,550px,90%) !important;
  }
}


/* v30: larger large-raffle wheel while preserving top/bottom breathing room */
@media(min-width:881px){
  .wheel-card{
    padding-top:18px;
    padding-bottom:30px;
  }
  .wheel-wrap{
    width:min(58vh,620px,94%) !important;
  }
}
@media(min-width:881px) and (max-height:900px){
  .wheel-card{
    padding-top:16px;
    padding-bottom:30px;
  }
  .wheel-wrap{
    width:min(55vh,585px,92%) !important;
  }
}

/* v31: keep completed wheel visible behind reveal card */
.result-overlay.preview{backdrop-filter:blur(1.5px)}
.result-overlay.preview .winner-box{background:rgba(255,255,255,.96)}

/* v32 — cautious raffle deletion */
.delete-guidance{
  margin:-2px 0 14px;padding:10px 12px;border:1px solid #ead8c8;border-radius:12px;
  background:#fff8f1;color:#8b674b;font-size:11px;line-height:1.5;
}
.delete-guidance strong{color:#76503a}
.btn.danger-outline{background:#fff;border-color:#e7c8c2;color:var(--danger)}
.btn.danger-outline:hover{background:var(--danger-soft);border-color:#dda99f}

/* v36 tighter admin field-label spacing */
@media (min-width:881px){
  body:has(.admin-grid) #raffleForm .field label{
    margin:0!important;
    padding:2px 0 0!important;
    line-height:1!important;
  }
  body:has(.admin-grid) #raffleForm .field{gap:0!important;}
}

/* v37 — plain-language verification help */
.detail-label-with-help,
.verification-proof-label-help{
  display:flex !important;
  align-items:center;
  gap:6px;
}
.help-icon{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:15px;
  height:15px;
  flex:0 0 15px;
  border:1px solid #c9d7d7;
  border-radius:50%;
  background:#fff;
  color:var(--accent-strong);
  font-family:"Inter",sans-serif;
  font-size:9px;
  font-weight:800;
  line-height:1;
  cursor:help;
  text-transform:none;
  letter-spacing:0;
  outline:none;
}
.help-icon:hover,
.help-icon:focus-visible{
  background:var(--accent-soft);
  border-color:var(--accent);
}
.help-icon::after{
  content:attr(data-tooltip);
  position:absolute;
  z-index:50;
  left:50%;
  bottom:calc(100% + 8px);
  width:250px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  color:var(--text);
  font-family:"Inter",sans-serif;
  font-size:11px;
  font-weight:500;
  line-height:1.45;
  letter-spacing:0;
  text-transform:none;
  white-space:normal;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate(-50%,3px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s ease;
}
.help-icon::before{
  content:"";
  position:absolute;
  z-index:51;
  left:50%;
  bottom:calc(100% + 3px);
  width:8px;
  height:8px;
  background:#fff;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  opacity:0;
  visibility:hidden;
  transform:translateX(-50%) rotate(45deg);
  transition:opacity .14s ease,visibility .14s ease;
}
.help-icon:hover::after,
.help-icon:focus-visible::after,
.help-icon:hover::before,
.help-icon:focus-visible::before{
  opacity:1;
  visibility:visible;
}
.help-icon:hover::after,
.help-icon:focus-visible::after{transform:translate(-50%,0)}
.verification-proof-label-help .help-icon::after{left:auto;right:-8px;transform:translateY(3px)}
.verification-proof-label-help .help-icon:hover::after,
.verification-proof-label-help .help-icon:focus-visible::after{transform:translateY(0)}
.verification-proof-label-help .help-icon::before{left:50%}
@media(max-width:880px){
  .help-icon::after{width:210px}
}

/* v38 — readable verification tooltips + selected detail values at 13px */
@media(min-width:881px){
  /* Let help popovers escape the compact details grid instead of being clipped. */
  .stage>.details-column,
  .details-column .details{
    overflow:visible!important;
  }
  .details .detail:nth-child(6),
  .details .detail:nth-child(8),
  .verification-proof{
    overflow:visible!important;
    position:relative;
  }
  .details .detail:nth-child(6):has(.help-icon:hover),
  .details .detail:nth-child(6):has(.help-icon:focus-visible),
  .details .detail:nth-child(8):has(.help-icon:hover),
  .details .detail:nth-child(8):has(.help-icon:focus-visible){
    z-index:120;
  }

  /* Keep the lock-fingerprint explanation inside the right edge of the panel. */
  .detail-label-with-help .help-icon::after{
    left:auto;
    right:-10px;
    bottom:calc(100% + 8px);
    transform:translateY(3px);
  }
  .detail-label-with-help .help-icon:hover::after,
  .detail-label-with-help .help-icon:focus-visible::after{
    transform:translateY(0);
  }
  .detail-label-with-help .help-icon::before{
    left:50%;
  }

  /* Result-proof tooltip opens upward/right-aligned and is allowed outside the inset strip. */
  .verification-proof-label-help .help-icon::after{
    left:0;
    right:auto;
    bottom:calc(100% + 8px);
    transform:translateY(3px);
  }
  .verification-proof-label-help .help-icon:hover::after,
  .verification-proof-label-help .help-icon:focus-visible::after{
    transform:translateY(0);
  }

  /* Only the red-highlighted user-facing values get the requested 13px treatment. */
  #dPrize,
  #dSchedule,
  #dEntries,
  #dTiming,
  #dLocked{
    font-size:13px!important;
    line-height:1.35!important;
  }
  .names .chip{
    font-size:13px!important;
    line-height:1.25;
  }
}

/* v41 — MacBook / medium-height desktop spacing pass */
@media (min-width:1100px){
  /* Shared desktop header breathing room */
  .topbar{
    padding:14px 20px;
    border-radius:18px;
  }
  .brand-lockup{gap:16px}
  .brand-logo{height:31px;max-width:205px}
  .brand-divider{height:27px}
  .brand-product{font-size:16px}

  /* ADMIN: roomier single-screen workspace */
  body:has(.admin-grid) .wrap{
    width:min(1540px,calc(100% - 64px));
    padding:18px 0 30px;
    gap:16px;
  }
  body:has(.admin-grid) .topbar{
    padding:14px 18px;
    border-radius:18px;
  }
  body:has(.admin-grid) .compact-hero{
    padding:0 2px 2px;
  }
  body:has(.admin-grid) .compact-hero .eyebrow{font-size:10.5px}
  body:has(.admin-grid) .compact-hero h1{
    font-size:clamp(32px,2.6vw,40px);
    margin:7px 0 7px;
    line-height:1.02;
  }
  body:has(.admin-grid) .compact-hero p{
    font-size:13.5px;
    line-height:1.55;
    max-width:1040px;
  }
  body:has(.admin-grid) .admin-grid{
    grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr);
    gap:22px;
  }
  body:has(.admin-grid) .admin-grid>.card{
    padding:22px;
    border-radius:22px;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>h2{
    font-size:23px;
    margin-bottom:14px;
  }
  body:has(.admin-grid) #raffleForm{
    gap:12px;
  }
  body:has(.admin-grid) #raffleForm .row{
    gap:14px;
  }
  body:has(.admin-grid) #raffleForm .field label{
    font-size:9.5px;
    padding-top:2px!important;
    line-height:1.05!important;
  }
  body:has(.admin-grid) #raffleForm .input,
  body:has(.admin-grid) #raffleForm .textarea{
    padding:11px 13px;
    border-radius:12px;
    font-size:13.5px;
  }
  body:has(.admin-grid) #raffleForm .input{
    min-height:43px;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    min-height:118px;
    height:clamp(118px,15vh,160px);
    max-height:160px;
  }
  body:has(.admin-grid) #raffleForm .entry-summary{
    margin-top:3px;
    font-size:9.5px;
  }
  body:has(.admin-grid) #raffleForm .actions{
    margin-top:4px;
    gap:9px;
  }
  body:has(.admin-grid) #raffleForm .btn{
    padding:10px 15px;
    font-size:12.5px;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>.notice{
    margin-top:12px;
    padding:10px 12px;
    font-size:10.5px;
    line-height:1.5;
  }

  body:has(.admin-grid) .admin-grid>.card:nth-child(2) .section-head{
    margin-bottom:13px;
    align-items:center;
  }
  body:has(.admin-grid) .admin-grid>.card:nth-child(2) .section-head h2{
    font-size:23px;
    margin-top:4px;
  }
  body:has(.admin-grid) .delete-guidance{
    margin:0 0 15px;
    padding:12px 14px;
    border-radius:13px;
    font-size:11.5px;
    line-height:1.55;
  }
  body:has(.admin-grid) #raffleList{
    padding-right:9px;
  }
  body:has(.admin-grid) .raffle-list{gap:14px}
  body:has(.admin-grid) .raffle-item{
    padding:16px;
    border-radius:16px;
  }
  body:has(.admin-grid) .raffle-item strong{font-size:15px}
  body:has(.admin-grid) .raffle-prize{
    margin:7px 0 4px;
    font-size:12.5px;
  }
  body:has(.admin-grid) .raffle-item .mini{
    font-size:10.5px;
    line-height:1.55;
  }
  body:has(.admin-grid) .winner-mini{
    margin-top:10px;
    padding:9px 11px;
    font-size:10.5px;
  }
  body:has(.admin-grid) .fingerprint{
    margin-top:9px;
    font-size:9.5px;
  }
  body:has(.admin-grid) .raffle-item .actions{
    margin-top:10px;
    gap:8px;
  }
  body:has(.admin-grid) .raffle-item .btn.small{
    padding:8px 10px;
    font-size:10.5px;
  }

  /* PUBLIC: more space, but preserve the full single-screen composition */
  .wrap.public{
    width:min(1660px,calc(100% - 48px));
    padding:16px 0 30px;
    gap:12px;
  }
  .public .topbar{
    padding:13px 18px;
    border-radius:18px;
  }
  .event-head{
    width:min(980px,100%);
    padding:4px 0 8px;
  }
  .event-kicker{
    padding:6px 12px;
  }
  .event-head h1{
    margin:9px auto 7px;
    font-size:clamp(36px,3.4vw,54px);
  }
  .event-state{
    min-width:300px;
    padding:7px 24px 9px;
  }
  .event-state .statusline{
    margin-top:5px;
    line-height:1.45;
  }
  .stage{
    gap:24px;
    grid-template-columns:minmax(0,1.34fr) minmax(470px,.66fr);
  }
  .wheel-card{
    padding:24px 28px 34px;
    border-radius:22px;
  }
  .wheel-wrap{
    width:min(55vh,620px,92%)!important;
  }
  .details-column{
    gap:0;
    height:100%;
    min-height:0;
  }
  .details-column .details{
    height:100%;
    min-height:0;
    padding:18px;
    gap:12px;
    border-radius:22px;
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-template-rows:auto auto auto minmax(112px,1fr) auto;
    align-content:stretch;
    overflow:hidden;
  }
  .details .detail{
    padding:13px 14px;
    border-radius:14px;
  }
  .details .detail b{
    margin-bottom:7px;
    font-size:9.5px;
  }
  .detail-value-highlight,
  #dPrize,#dSchedule,#dEntries,#dTiming,#dLocked{
    font-size:13px!important;
    line-height:1.42!important;
  }
  .details .detail:nth-child(7){
    min-height:112px;
    height:auto;
    overflow:hidden;
  }
  .details .detail:nth-child(7) .names{
    height:100%;
    min-height:0;
    max-height:none;
    padding:3px 7px 5px 0;
    gap:8px;
  }
  .chip{
    font-size:13px;
    padding:7px 10px;
  }
  .details .detail:nth-child(8){
    min-height:0;
    padding:14px 15px;
  }
  #verification{gap:9px}
  .verification-copy{
    font-size:9.5px;
    line-height:1.5;
  }
  .verification-proof{padding:8px 10px}
  .public-credit{margin-top:2px}
}

/* Medium-height MacBooks: preserve generous spacing without clipping */
@media (min-width:1100px) and (min-height:780px) and (max-height:980px){
  body:has(.admin-grid) .wrap{
    padding-top:14px;
    gap:13px;
  }
  body:has(.admin-grid) .compact-hero h1{
    font-size:32px;
    margin:5px 0 5px;
  }
  body:has(.admin-grid) .compact-hero p{font-size:12.5px}
  body:has(.admin-grid) .admin-grid>.card{padding:19px 20px}
  body:has(.admin-grid) .admin-grid>.card:first-child>h2{margin-bottom:11px}
  body:has(.admin-grid) #raffleForm{gap:10px}
  body:has(.admin-grid) #raffleForm .row{gap:12px}
  body:has(.admin-grid) #raffleForm .input,
  body:has(.admin-grid) #raffleForm .textarea{padding:9px 12px}
  body:has(.admin-grid) #raffleForm .input{min-height:40px}
  body:has(.admin-grid) #raffleForm .textarea{
    min-height:100px;
    height:clamp(100px,13vh,130px);
    max-height:130px;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>.notice{
    margin-top:9px;
    padding:9px 11px;
  }
  body:has(.admin-grid) .delete-guidance{
    padding:10px 12px;
    margin-bottom:12px;
  }
  body:has(.admin-grid) .raffle-item{padding:14px}

  .wrap.public{
    padding-top:12px;
    gap:9px;
  }
  .public .topbar{padding:11px 16px}
  .event-head{padding:2px 0 6px}
  .event-kicker{padding:5px 11px}
  .event-head h1{
    font-size:clamp(34px,3vw,48px);
    margin:6px auto 5px;
  }
  .event-state{padding:5px 22px 7px}
  .stage{gap:20px}
  .wheel-card{padding:20px 24px 32px}
  .wheel-wrap{width:min(52vh,570px,90%)!important}
  .details-column .details{
    padding:15px;
    gap:9px;
    grid-template-rows:auto auto auto minmax(96px,1fr) auto;
  }
  .details .detail{padding:11px 12px}
  .details .detail b{margin-bottom:5px}
  .details .detail:nth-child(7){min-height:96px}
  .chip{font-size:12px;padding:6px 9px}
  .verification-copy{font-size:9px;line-height:1.42}
  .verification-proof{padding:7px 9px}
}

/* v42 — consistent viewport safe area + responsive layout */
@media (min-width:881px){
  html,body{width:100%;height:100%;}

  /* A true 30px safe area on every side of the desktop/MacBook viewport. */
  body:has(.admin-grid),
  body:has(.wrap.public){
    height:100vh;
    min-height:100vh;
    padding:30px;
    overflow:hidden;
  }

  body:has(.admin-grid) .wrap,
  body:has(.wrap.public) .wrap.public{
    width:100%!important;
    max-width:none!important;
    height:100%!important;
    min-height:0;
    margin:0!important;
    padding:0!important;
    overflow:hidden;
  }

  /* ADMIN — distribute the remaining space inside the 30px frame. */
  body:has(.admin-grid) .wrap{
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr) auto;
    gap:14px;
  }
  body:has(.admin-grid) .topbar{
    margin:0;
    padding:13px 18px;
  }
  body:has(.admin-grid) .compact-hero{
    margin:0;
    padding:0 2px;
  }
  body:has(.admin-grid) .compact-hero h1{
    margin:6px 0 6px;
  }
  body:has(.admin-grid) .admin-grid{
    height:100%;
    min-height:0;
    gap:18px;
  }
  body:has(.admin-grid) .admin-grid>.card{
    height:100%;
    min-height:0;
    padding:22px;
  }
  body:has(.admin-grid) #raffleForm{
    min-height:0;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    height:clamp(108px,14vh,150px);
    min-height:108px;
    max-height:150px;
  }
  body:has(.admin-grid) .admin-credit{
    margin:0;
    align-self:end;
  }

  /* PUBLIC — same 30px frame on all four edges. */
  body:has(.wrap.public) .wrap.public{
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr) auto;
    gap:12px;
  }
  .public .topbar{
    margin:0;
    padding:13px 18px;
  }
  .event-head{
    padding:2px 0 6px;
  }
  .stage{
    min-height:0;
    height:100%;
    margin:0;
    gap:22px;
    overflow:hidden;
  }
  .wheel-card{
    height:100%;
    min-height:0;
    padding:24px 28px 30px;
  }
  .wheel-wrap{
    width:min(58vh,640px,94%)!important;
    max-height:calc(100% - 6px)!important;
  }
  .details-column,
  .details-column .details{
    height:100%;
    min-height:0;
  }
  .details-column .details{
    padding:18px;
    gap:12px;
  }
  .details .detail:nth-child(7){
    min-height:0;
  }
  .details .detail:nth-child(7) .names{
    min-height:0;
    height:100%;
    max-height:none;
    overflow-y:auto;
  }
  .public-credit{
    margin:0;
    align-self:end;
  }
}

/* MacBook / medium-height desktop tuning while preserving the exact 30px outer frame. */
@media (min-width:881px) and (max-height:900px){
  body:has(.admin-grid) .wrap,
  body:has(.wrap.public) .wrap.public{
    gap:10px;
  }
  body:has(.admin-grid) .topbar,
  .public .topbar{
    padding:11px 16px;
  }
  body:has(.admin-grid) .compact-hero h1{
    font-size:30px;
    margin:4px 0 4px;
  }
  body:has(.admin-grid) .compact-hero p{
    font-size:12px;
    line-height:1.42;
  }
  body:has(.admin-grid) .admin-grid{
    gap:16px;
  }
  body:has(.admin-grid) .admin-grid>.card{
    padding:19px;
  }
  body:has(.admin-grid) #raffleForm{
    gap:10px;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    height:clamp(96px,12vh,126px);
    min-height:96px;
    max-height:126px;
  }
  body:has(.admin-grid) .delete-guidance{
    margin-bottom:11px;
    padding:10px 12px;
  }

  .event-head{
    padding:0 0 4px;
  }
  .event-head h1{
    font-size:clamp(33px,3vw,48px);
    margin:6px auto 5px;
  }
  .event-state{
    padding:5px 22px 7px;
  }
  .stage{
    gap:18px;
  }
  .wheel-card{
    padding:18px 22px 28px;
  }
  .wheel-wrap{
    width:min(55vh,590px,92%)!important;
  }
  .details-column .details{
    padding:15px;
    gap:9px;
  }
  .details .detail{
    padding:11px 12px;
  }
}

/* Mobile/tablet: normal scrolling with comfortable safe margins. */
@media (max-width:880px){
  html,body{width:100%;min-height:100%;}
  body{
    overflow-x:hidden;
    overflow-y:auto;
    padding:18px 16px 24px;
  }
  .wrap,
  .wrap.public{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    height:auto!important;
    min-height:0!important;
    display:block!important;
    overflow:visible!important;
  }
  .topbar{
    margin:0 0 18px;
    padding:13px 14px;
    gap:12px;
    align-items:center;
  }
  .brand-lockup{
    width:100%;
  }
  .brand-logo{
    height:24px;
    max-width:150px;
  }
  .brand-product{
    font-size:12px;
  }
  .topbar>.badge,
  .topbar>.actions{
    align-self:flex-start;
  }

  .compact-hero{
    margin-bottom:18px;
  }
  .compact-hero h1{
    font-size:clamp(30px,9vw,42px);
    line-height:1.02;
    margin:7px 0 8px;
  }
  .compact-hero p{
    font-size:14px;
    line-height:1.55;
    margin:0;
  }

  .admin-grid,
  .stage{
    display:grid!important;
    grid-template-columns:1fr!important;
    height:auto!important;
    overflow:visible!important;
    gap:18px!important;
  }
  .admin-grid>.card,
  .wheel-card,
  .details{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  .admin-grid>.card{
    padding:18px!important;
  }
  #raffleForm{
    gap:13px!important;
  }
  #raffleForm .row{
    grid-template-columns:1fr!important;
    gap:13px!important;
  }
  #raffleForm .input,
  #raffleForm .textarea{
    min-height:44px;
    padding:12px 13px!important;
    font-size:14px!important;
  }
  #raffleForm .textarea{
    height:180px!important;
    min-height:160px!important;
    max-height:none!important;
    resize:vertical!important;
  }
  #raffleList{
    max-height:none!important;
    overflow:visible!important;
    padding-right:0!important;
  }
  .raffle-list{gap:14px!important;}
  .raffle-item{padding:15px!important;}

  .event-head{
    width:100%;
    margin-bottom:16px;
    padding:0;
  }
  .event-head h1{
    font-size:clamp(34px,10vw,48px);
    line-height:1;
    margin:9px auto 8px;
  }
  .event-state{
    width:100%;
    max-width:100%;
  }
  .wheel-card{
    padding:18px 16px 24px!important;
  }
  .wheel-wrap{
    width:min(82vw,560px)!important;
    max-width:100%!important;
    max-height:none!important;
  }
  .details-column{
    height:auto!important;
    overflow:visible!important;
  }
  .details-column .details{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:none!important;
    height:auto!important;
    padding:16px!important;
    gap:10px!important;
    overflow:visible!important;
  }
  .details .detail:nth-child(n){
    grid-column:1!important;
    min-height:0!important;
    max-height:none!important;
  }
  .details .detail:nth-child(7) .names,
  .names{
    height:auto!important;
    min-height:120px!important;
    max-height:220px!important;
    overflow-y:auto!important;
  }
  .chip{
    font-size:12px;
    padding:7px 9px;
  }
  .verification-status{
    position:static!important;
    max-width:100%!important;
    white-space:normal!important;
    margin:0 0 4px!important;
  }
  .details .detail:nth-child(8)>b{
    padding-right:0!important;
  }
  .build-credit,
  .admin-credit,
  .public-credit{
    display:block!important;
    width:100%!important;
    margin:18px 0 0!important;
    text-align:right!important;
  }
}

@media (max-width:520px){
  body{padding:14px 12px 22px;}
  .topbar{padding:12px;}
  .brand-lockup{gap:8px;}
  .brand-logo{height:21px;max-width:132px;}
  .brand-divider{height:18px;}
  .brand-product{font-size:11px;}
  .badge{font-size:9px;padding:6px 9px;}
  .card{border-radius:18px;}
  .admin-grid>.card{padding:16px!important;}
  .event-kicker{font-size:9px;padding:5px 9px;}
  .event-head h1{font-size:clamp(30px,11vw,42px);}
  .countdown{font-size:clamp(38px,15vw,58px);}
  .wheel-wrap{width:min(86vw,460px)!important;}
  .winner-box .name{font-size:clamp(34px,12vw,54px);}
  .result-overlay.preview .winner-box{width:88%;padding:24px 20px;}
}

/* =========================================================
   v43 responsive safety pass
   Preserve the single-screen composition only when there is
   genuinely enough viewport space. Smaller/shorter screens
   scroll naturally instead of clipping content.
   ========================================================= */

/* Short but still wide laptops: keep two columns, allow page scroll. */
@media (min-width:1181px) and (max-height:760px){
  body:has(.admin-grid),
  body:has(.wrap.public){
    height:auto!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    padding:30px!important;
  }

  body:has(.admin-grid) .wrap,
  body:has(.wrap.public) .wrap.public{
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }

  body:has(.admin-grid) .topbar,
  body:has(.wrap.public) .topbar{
    margin-bottom:18px!important;
  }

  body:has(.admin-grid) .compact-hero{
    margin-bottom:18px!important;
  }
  body:has(.admin-grid) .compact-hero h1{
    font-size:36px!important;
    margin:6px 0 8px!important;
  }
  body:has(.admin-grid) .compact-hero p{
    font-size:14px!important;
    line-height:1.55!important;
  }

  body:has(.admin-grid) .admin-grid{
    height:auto!important;
    min-height:0!important;
    align-items:start!important;
    overflow:visible!important;
    gap:22px!important;
  }
  body:has(.admin-grid) .admin-grid>.card{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding:22px!important;
  }
  body:has(.admin-grid) #raffleForm{
    gap:12px!important;
  }
  body:has(.admin-grid) #raffleForm .row{
    gap:14px!important;
  }
  body:has(.admin-grid) #raffleForm .field label{
    font-size:10px!important;
    line-height:1.1!important;
    padding-top:2px!important;
    margin-bottom:0!important;
  }
  body:has(.admin-grid) #raffleForm .input,
  body:has(.admin-grid) #raffleForm .textarea{
    font-size:14px!important;
    padding:11px 13px!important;
  }
  body:has(.admin-grid) #raffleForm .input{
    min-height:46px!important;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    height:170px!important;
    min-height:170px!important;
    max-height:none!important;
  }
  body:has(.admin-grid) #raffleForm .actions{
    margin-top:4px!important;
  }
  body:has(.admin-grid) #raffleForm .btn{
    padding:11px 15px!important;
    font-size:13px!important;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>.notice{
    margin-top:12px!important;
    padding:11px 13px!important;
  }
  body:has(.admin-grid) #raffleList{
    max-height:520px!important;
    overflow-y:auto!important;
    padding-right:6px!important;
  }
  body:has(.admin-grid) .admin-credit{
    position:static!important;
    display:block!important;
    width:100%!important;
    margin-top:18px!important;
    text-align:right!important;
  }

  body:has(.wrap.public) .event-head{
    margin-bottom:18px!important;
  }
  body:has(.wrap.public) .stage{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    align-items:start!important;
    gap:22px!important;
  }
  body:has(.wrap.public) .wheel-card{
    height:auto!important;
    min-height:560px!important;
    overflow:hidden!important;
    padding:24px!important;
  }
  body:has(.wrap.public) .wheel-wrap{
    width:min(540px,46vw)!important;
    max-width:100%!important;
    max-height:none!important;
  }
  body:has(.wrap.public) .details-column,
  body:has(.wrap.public) .details-column .details{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  body:has(.wrap.public) .details-column .details{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:none!important;
    gap:12px!important;
    padding:18px!important;
  }
  body:has(.wrap.public) .details .detail{
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    padding:13px 14px!important;
  }
  body:has(.wrap.public) .details .detail:nth-child(7),
  body:has(.wrap.public) .details .detail:nth-child(8){
    grid-column:1/-1!important;
  }
  body:has(.wrap.public) .details .detail:nth-child(7) .names{
    height:170px!important;
    min-height:170px!important;
    max-height:170px!important;
    overflow-y:auto!important;
  }
  body:has(.wrap.public) .public-credit{
    position:static!important;
    display:block!important;
    width:100%!important;
    margin:18px 0 0!important;
    text-align:right!important;
  }
}

/* Narrow laptops/tablets: stack primary columns and let the page breathe. */
@media (max-width:1180px){
  html,body{width:100%;min-height:100%;}
  body:has(.admin-grid),
  body:has(.wrap.public){
    height:auto!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    padding:24px!important;
  }

  body:has(.admin-grid) .wrap,
  body:has(.wrap.public) .wrap.public{
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    display:block!important;
    overflow:visible!important;
  }

  body:has(.admin-grid) .topbar,
  body:has(.wrap.public) .topbar{
    margin:0 0 20px!important;
  }

  body:has(.admin-grid) .compact-hero{
    margin-bottom:20px!important;
  }
  body:has(.admin-grid) .compact-hero h1{
    font-size:clamp(34px,5vw,46px)!important;
    line-height:1.02!important;
    margin:7px 0 10px!important;
  }
  body:has(.admin-grid) .compact-hero p{
    max-width:900px!important;
    font-size:14px!important;
    line-height:1.6!important;
    white-space:normal!important;
  }

  body:has(.admin-grid) .admin-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    gap:22px!important;
  }
  body:has(.admin-grid) .admin-grid>.card{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding:24px!important;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>h2{
    margin-bottom:18px!important;
  }
  body:has(.admin-grid) #raffleForm{
    gap:15px!important;
  }
  body:has(.admin-grid) #raffleForm .row{
    grid-template-columns:1fr 1fr!important;
    gap:16px!important;
  }
  body:has(.admin-grid) #raffleForm .field label{
    font-size:10px!important;
    line-height:1.1!important;
    padding-top:2px!important;
    margin-bottom:0!important;
  }
  body:has(.admin-grid) #raffleForm .input,
  body:has(.admin-grid) #raffleForm .textarea{
    font-size:14px!important;
    padding:12px 14px!important;
  }
  body:has(.admin-grid) #raffleForm .input{
    min-height:48px!important;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    height:190px!important;
    min-height:190px!important;
    max-height:none!important;
  }
  body:has(.admin-grid) #raffleForm .entry-summary{
    margin-top:6px!important;
  }
  body:has(.admin-grid) #raffleForm .actions{
    margin-top:6px!important;
  }
  body:has(.admin-grid) #raffleForm .btn{
    padding:12px 16px!important;
    font-size:13px!important;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>.notice{
    margin-top:14px!important;
    padding:12px 14px!important;
  }
  body:has(.admin-grid) .delete-guidance{
    margin-bottom:16px!important;
    padding:13px 15px!important;
  }
  body:has(.admin-grid) #raffleList{
    max-height:520px!important;
    overflow-y:auto!important;
    padding-right:6px!important;
  }
  body:has(.admin-grid) .raffle-list{gap:16px!important;}
  body:has(.admin-grid) .raffle-item{padding:17px!important;}
  body:has(.admin-grid) .admin-credit{
    position:static!important;
    display:block!important;
    width:100%!important;
    margin:20px 0 0!important;
    text-align:right!important;
  }

  body:has(.wrap.public) .event-head{
    width:100%!important;
    margin-bottom:20px!important;
    padding:0!important;
  }
  body:has(.wrap.public) .stage{
    display:grid!important;
    grid-template-columns:1fr!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    gap:22px!important;
  }
  body:has(.wrap.public) .wheel-card{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:hidden!important;
    padding:28px 24px 32px!important;
  }
  body:has(.wrap.public) .wheel-wrap{
    width:min(68vw,620px)!important;
    max-width:100%!important;
    max-height:none!important;
    margin:0 auto!important;
  }
  body:has(.wrap.public) .details-column,
  body:has(.wrap.public) .details-column .details{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body:has(.wrap.public) .details-column .details{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:none!important;
    gap:12px!important;
    padding:20px!important;
  }
  body:has(.wrap.public) .details .detail{
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    padding:14px 15px!important;
  }
  body:has(.wrap.public) .details .detail:nth-child(7),
  body:has(.wrap.public) .details .detail:nth-child(8){
    grid-column:1/-1!important;
  }
  body:has(.wrap.public) .details .detail:nth-child(7) .names{
    height:180px!important;
    min-height:180px!important;
    max-height:180px!important;
    overflow-y:auto!important;
  }
  body:has(.wrap.public) .public-credit{
    position:static!important;
    display:block!important;
    width:100%!important;
    margin:20px 0 0!important;
    text-align:right!important;
  }
}

/* Phones / very narrow tablets: single-column form/details and roomy controls. */
@media (max-width:700px){
  body:has(.admin-grid),
  body:has(.wrap.public){
    padding:16px!important;
  }

  body:has(.admin-grid) .topbar,
  body:has(.wrap.public) .topbar{
    padding:13px 14px!important;
    border-radius:16px!important;
  }
  .brand-lockup{gap:8px!important;min-width:0!important;}
  .brand-logo{height:22px!important;max-width:138px!important;}
  .brand-product{font-size:11px!important;white-space:normal!important;line-height:1.2!important;}
  .brand-divider{height:20px!important;}

  body:has(.admin-grid) .compact-hero h1{
    font-size:clamp(30px,9vw,40px)!important;
  }
  body:has(.admin-grid) .compact-hero p{
    font-size:13px!important;
  }
  body:has(.admin-grid) .admin-grid>.card{
    padding:19px!important;
  }
  body:has(.admin-grid) #raffleForm .row{
    grid-template-columns:1fr!important;
    gap:15px!important;
  }
  body:has(.admin-grid) #raffleForm .input{
    min-height:48px!important;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    height:180px!important;
    min-height:180px!important;
  }
  body:has(.admin-grid) #raffleForm .actions{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }
  body:has(.admin-grid) #raffleForm .actions .btn{
    width:100%!important;
  }
  body:has(.admin-grid) #raffleList{
    max-height:460px!important;
  }

  body:has(.wrap.public) .event-head h1{
    font-size:clamp(32px,10vw,44px)!important;
  }
  body:has(.wrap.public) .wheel-card{
    padding:22px 14px 26px!important;
  }
  body:has(.wrap.public) .wheel-wrap{
    width:min(82vw,520px)!important;
  }
  body:has(.wrap.public) .details-column .details{
    grid-template-columns:1fr!important;
    padding:16px!important;
    gap:11px!important;
  }
  body:has(.wrap.public) .details .detail:nth-child(n){
    grid-column:1!important;
  }
  body:has(.wrap.public) .details .detail:nth-child(7) .names{
    height:160px!important;
    min-height:160px!important;
    max-height:160px!important;
  }
  .verification-status{
    position:static!important;
    display:inline-flex!important;
    max-width:100%!important;
    white-space:normal!important;
    margin:0 0 8px!important;
  }
  .details .detail:nth-child(8)>b{
    padding-right:0!important;
  }
}

@media (max-width:430px){
  body:has(.admin-grid),
  body:has(.wrap.public){padding:12px!important;}
  body:has(.admin-grid) .admin-grid>.card,
  body:has(.wrap.public) .details-column .details{padding:15px!important;}
  body:has(.wrap.public) .wheel-wrap{width:min(86vw,440px)!important;}
}

/* v44 — wide above-the-fold viewport frame
   On desktop/MacBook-class viewports with enough room, reserve a true
   50px top/bottom and 150px left/right safe area. Smaller/shorter screens
   keep the responsive scrolling rules from v43. */
@media (min-width:1280px) and (min-height:800px){
  body:has(.admin-grid),
  body:has(.wrap.public){
    padding:0!important;
  }

  body:has(.admin-grid) .wrap,
  .wrap.public{
    width:calc(100vw - 300px)!important;
    max-width:none!important;
    height:100vh!important;
    min-height:0!important;
    margin:0 auto!important;
    padding:50px 0!important;
    box-sizing:border-box!important;
  }

  /* Keep the internal workspace inside the newly reduced usable height. */
  body:has(.admin-grid) .wrap{
    grid-template-rows:auto auto minmax(0,1fr) auto!important;
    gap:14px!important;
  }
  body:has(.admin-grid) .topbar{
    margin:0!important;
  }
  body:has(.admin-grid) .compact-hero{
    margin:0!important;
    padding:0 2px!important;
  }
  body:has(.admin-grid) .compact-hero h1{
    margin-top:5px!important;
    margin-bottom:5px!important;
  }
  body:has(.admin-grid) .compact-hero p{
    margin:0!important;
  }
  body:has(.admin-grid) .admin-grid{
    min-height:0!important;
    height:100%!important;
    gap:20px!important;
  }
  body:has(.admin-grid) .admin-grid>.card{
    min-height:0!important;
  }
  body:has(.admin-grid) #raffleList{
    min-height:0!important;
    max-height:none!important;
    height:100%!important;
  }

  .wrap.public{
    grid-template-rows:auto auto minmax(0,1fr) auto!important;
    gap:12px!important;
  }
  .public .topbar{
    margin:0!important;
  }
  .public .event-head{
    margin:0!important;
  }
  .public .stage{
    min-height:0!important;
    height:100%!important;
  }
  .public .wheel-card,
  .public .details-column,
  .public .details-column .details{
    min-height:0!important;
    height:100%!important;
  }
  .public .wheel-wrap{
    width:min(52vh,620px,92%)!important;
    max-width:92%!important;
  }
  .public-credit,
  .admin-credit{
    margin-top:0!important;
  }
}

/* v45 — corrected viewport gutters
   Horizontal gutters depend on width only, so browser chrome / short viewport
   does not disable the 150px left/right safe area. */
@media (min-width:1280px){
  body:has(.admin-grid),
  body:has(.wrap.public){
    padding-left:150px!important;
    padding-right:150px!important;
    box-sizing:border-box!important;
  }

  body:has(.admin-grid) .wrap,
  body:has(.wrap.public) .wrap.public{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }
}

/* True above-the-fold frame when there is enough usable browser height. */
@media (min-width:1280px) and (min-height:760px){
  body:has(.admin-grid),
  body:has(.wrap.public){
    padding-top:0!important;
    padding-bottom:0!important;
  }

  body:has(.admin-grid) .wrap,
  body:has(.wrap.public) .wrap.public{
    height:100vh!important;
    min-height:0!important;
    padding-top:50px!important;
    padding-bottom:50px!important;
  }
}

/* Wide but short screens keep the same 150px side gutters and use normal
   vertical scrolling, with 50px page breathing room instead of clipping. */
@media (min-width:1280px) and (max-height:759px){
  body:has(.admin-grid),
  body:has(.wrap.public){
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }

  body:has(.admin-grid) .wrap,
  body:has(.wrap.public) .wrap.public{
    height:auto!important;
    min-height:100vh!important;
    padding-top:50px!important;
    padding-bottom:50px!important;
  }
}

/* v46 — rebalance public event header after viewport gutter changes */
@media (min-width:1280px){
  body:has(.wrap.public) .event-head{
    width:min(1180px,100%)!important;
    margin:0 auto 16px!important;
    padding:10px 0 14px!important;
  }

  body:has(.wrap.public) .event-kicker{
    padding:7px 13px!important;
    font-size:10px!important;
    margin-bottom:2px!important;
  }

  body:has(.wrap.public) .event-head h1{
    width:auto!important;
    max-width:100%!important;
    margin:12px auto 11px!important;
    padding:0 56px!important;
    font-size:clamp(44px,4vw,64px)!important;
    line-height:1!important;
    letter-spacing:-.055em!important;
  }

  body:has(.wrap.public) .event-head h1::before,
  body:has(.wrap.public) .event-head h1::after{
    width:42px!important;
  }

  body:has(.wrap.public) .event-state{
    min-width:420px!important;
    max-width:min(760px,100%)!important;
    padding:11px 34px 13px!important;
  }

  body:has(.wrap.public) .event-state .count-label{
    margin:0 0 4px!important;
    font-size:10px!important;
    letter-spacing:.18em!important;
  }

  body:has(.wrap.public) .event-state .countdown{
    margin:0!important;
    line-height:1!important;
  }

  body:has(.wrap.public) .event-state .statusline{
    margin:6px 0 0!important;
    max-width:700px!important;
    line-height:1.45!important;
  }
}

/* MacBook/shorter desktop: keep the header roomy, but slightly more compact. */
@media (min-width:1280px) and (max-height:860px){
  body:has(.wrap.public) .event-head{
    margin-bottom:12px!important;
    padding:6px 0 10px!important;
  }
  body:has(.wrap.public) .event-head h1{
    margin:9px auto 8px!important;
    font-size:clamp(40px,3.6vw,56px)!important;
  }
  body:has(.wrap.public) .event-state{
    min-width:380px!important;
    padding:8px 28px 10px!important;
  }
  body:has(.wrap.public) .event-state .statusline{
    margin-top:4px!important;
  }
}

/* Narrow responsive layouts should use the full width naturally. */
@media (max-width:1279px){
  body:has(.wrap.public) .event-head{
    width:100%!important;
  }
}

/* v47 — fixed public event sizing and reclaimed stage height */
@media (min-width:1280px){
  body:has(.wrap.public) #eventTitle{
    font-size:44px!important;
    line-height:1!important;
  }
  body:has(.wrap.public) .event-state .countdown{
    font-size:34px!important;
    line-height:1!important;
  }
  body:has(.wrap.public) .event-head{
    padding-top:6px!important;
    padding-bottom:8px!important;
    margin-bottom:8px!important;
  }
  body:has(.wrap.public) .event-head h1{
    margin-top:8px!important;
    margin-bottom:7px!important;
  }
  body:has(.wrap.public) .event-state{
    padding-top:7px!important;
    padding-bottom:8px!important;
  }
  body:has(.wrap.public) .stage{
    min-height:0!important;
    height:100%!important;
  }
}

/* v48 — compact verification explanation so Result Proof stays fully visible */
@media (min-width:881px){
  body:has(.wrap.public) .verification-copy{
    font-size:8px!important;
    line-height:1.4!important;
    gap:7px!important;
    margin-bottom:0!important;
  }
  body:has(.wrap.public) #verification{
    gap:8px!important;
  }
  body:has(.wrap.public) .verification-proof{
    margin-top:0!important;
  }
}


/* v49 — dedicated verification audit explainer sizing */
body:has(.wrap.public) .verification-audit-explainer{
  font-size:8px !important;
  line-height:1.45 !important;
  margin:0 !important;
  padding:0 !important;
  display:block;
}


/* v52 — balance verification card vertical padding */
@media (min-width: 881px){
  body:has(.wrap.public) .details .detail:nth-child(8){
    padding:14px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
  }
  body:has(.wrap.public) .details .detail:nth-child(8) > b{
    min-height:24px !important;
    margin-bottom:10px !important;
    display:flex !important;
    align-items:center !important;
  }
  body:has(.wrap.public) .verification-status{
    top:14px !important;
    right:14px !important;
  }
  body:has(.wrap.public) #verification{
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    gap:10px !important;
  }
  body:has(.wrap.public) .verification-proof{
    margin-top:0 !important;
  }
}


/* v53 — admin public view count */
.raffle-stats{display:flex;align-items:center;gap:6px;white-space:nowrap}
.raffle-stats span{color:#b4c0c2}


/* v55 — multi-winner admin controls */
.compact-textarea{min-height:72px!important;height:72px!important;resize:vertical}
.winner-settings-row{align-items:start}
@media(min-width:881px){body:has(.admin-grid) .winner-settings-row .help{font-size:9px;line-height:1.35;margin-top:2px}}
@media(max-width:880px){.compact-textarea{min-height:96px!important;height:96px!important}}
.multi-winner-list{display:grid;gap:8px;margin-top:10px;width:min(420px,92%)}
.multi-winner-row{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;padding:8px 10px;border:1px solid #d7e8e7;border-radius:11px;background:#f7fbfb;text-align:left}
.multi-winner-rank{font-family:"JetBrains Mono",monospace;font-size:9px;color:#6f8090;text-transform:uppercase;letter-spacing:.08em}
.multi-winner-name{font-family:"Space Grotesk",sans-serif;font-size:18px;font-weight:700;color:#16263a}
.multi-winner-prize{font-family:"Inter",sans-serif;font-size:11px;color:#6f8090;margin-top:1px}


/* v56 — roomier admin form spacing */
@media (min-width: 881px){
  body:has(.admin-grid) #raffleForm{
    gap:16px !important;
  }
  body:has(.admin-grid) #raffleForm .row{
    gap:18px !important;
  }
  body:has(.admin-grid) #raffleForm .field{
    gap:0 !important;
  }
  body:has(.admin-grid) #raffleForm .field label{
    padding:2px 0 4px !important;
    margin:0 !important;
    line-height:1.08 !important;
  }
  body:has(.admin-grid) #raffleForm .input,
  body:has(.admin-grid) #raffleForm .textarea,
  body:has(.admin-grid) #raffleForm select.input{
    padding:13px 14px !important;
  }
  body:has(.admin-grid) #raffleForm .textarea{
    min-height:132px !important;
  }
  body:has(.admin-grid) .draft-actions{
    margin-top:2px !important;
  }
  body:has(.admin-grid) .entry-summary,
  body:has(.admin-grid) .duplicates-note{
    margin-top:6px !important;
  }
}

/* v58 — keep admin actions visible after multi-winner fields */
@media (min-width:1280px) and (min-height:760px){
  body:has(.admin-grid) #raffleForm{
    gap:12px !important;
    flex:0 1 auto !important;
    min-height:0 !important;
  }
  body:has(.admin-grid) #raffleForm .field label{
    padding:2px 0 4px !important;
    margin:0 !important;
  }
  body:has(.admin-grid) #raffleForm #participants{
    height:clamp(92px,12vh,118px) !important;
    min-height:92px !important;
    max-height:118px !important;
  }
  body:has(.admin-grid) #raffleForm #winnerPrizes{
    height:74px !important;
    min-height:74px !important;
    max-height:74px !important;
  }
  body:has(.admin-grid) #raffleForm .actions{
    display:flex !important;
    flex:0 0 auto !important;
    min-height:42px !important;
    margin-top:8px !important;
    position:relative !important;
    z-index:2 !important;
  }
  body:has(.admin-grid) #raffleForm .actions .btn{
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
  }
  body:has(.admin-grid) .admin-grid>.card:first-child>.notice{
    flex:0 0 auto !important;
    margin-top:10px !important;
    position:relative !important;
    z-index:1 !important;
  }
}


/* v59 — explicit per-winner prize assignment + corrected multi-winner result layout */
.winner-prize-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 10px;
  max-height:116px;
  overflow-y:auto;
  padding:1px 5px 1px 0;
  scrollbar-width:thin;
}
.winner-prize-slot{
  display:grid;
  gap:3px;
  min-width:0;
}
.winner-prize-slot>span{
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:8.5px;
  line-height:1.15;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
body:has(.admin-grid) #raffleForm .winner-prize-input{
  min-height:35px!important;
  height:35px!important;
  padding:8px 10px!important;
  font-size:12px!important;
}
body:has(.admin-grid) #raffleForm .field label{
  padding:2px 0 4px!important;
}

/* Do not let the large single-winner name typography leak into the winners list. */
.winner-box .multi-winner-list{
  display:grid!important;
  gap:10px!important;
  width:min(460px,94%)!important;
  margin:14px auto 8px!important;
  font-size:initial!important;
  line-height:1.25!important;
  letter-spacing:normal!important;
  font-weight:400!important;
  text-align:left!important;
}
.winner-box .multi-winner-row{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  min-height:64px!important;
  padding:11px 14px!important;
  line-height:1.2!important;
}
.winner-box .multi-winner-row>span:last-child{
  display:grid!important;
  gap:5px!important;
  min-width:0!important;
}
.winner-box .multi-winner-rank{
  display:block!important;
  line-height:1!important;
}
.winner-box .multi-winner-name{
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:18px!important;
  line-height:1.15!important;
  letter-spacing:-.02em!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.winner-box .multi-winner-prize{
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:11px!important;
  line-height:1.3!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
@media(max-width:880px){
  .winner-prize-fields{grid-template-columns:1fr;max-height:none;overflow:visible}
  .winner-box .multi-winner-list{width:94%!important}
  .winner-box .multi-winner-row{min-height:60px!important;padding:10px 12px!important}
}


/* v60 — admin form footer is always visible */
@media (min-width: 1280px) and (min-height: 720px){
  body:has(.admin-grid) .create-raffle-card{
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
    overflow:hidden !important;
    padding:18px 20px !important;
  }
  body:has(.admin-grid) .create-raffle-card > h2{
    flex:0 0 auto !important;
    margin:0 0 10px !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm{
    flex:1 1 auto !important;
    min-height:0 !important;
    display:grid !important;
    grid-template-rows:auto auto auto auto auto minmax(72px,1fr) auto !important;
    gap:8px !important;
    overflow:hidden !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .field,
  body:has(.admin-grid) .create-raffle-card #raffleForm .row{
    min-height:0 !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .field label{
    padding:2px 0 4px !important;
    margin:0 !important;
    line-height:1.05 !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .input{
    min-height:38px !important;
    height:38px !important;
    padding:8px 12px !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .winner-settings-row{
    align-items:start !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .winner-prize-fields{
    max-height:72px !important;
    gap:6px 8px !important;
    padding-right:4px !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .winner-prize-input{
    min-height:32px !important;
    height:32px !important;
    padding:6px 9px !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .help{
    margin-top:2px !important;
    font-size:8px !important;
    line-height:1.25 !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm > .field:has(#participants){
    min-height:0 !important;
    display:grid !important;
    grid-template-rows:auto minmax(54px,1fr) auto !important;
  }
  body:has(.admin-grid) .create-raffle-card #participants{
    height:100% !important;
    min-height:54px !important;
    max-height:none !important;
    resize:none !important;
    padding:9px 12px !important;
  }
  body:has(.admin-grid) .create-raffle-card .entry-summary{
    margin-top:4px !important;
    line-height:1.15 !important;
  }
  body:has(.admin-grid) .create-raffle-card .form-footer{
    flex:0 0 auto !important;
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) !important;
    align-items:center !important;
    gap:10px !important;
    padding-top:8px !important;
    border-top:1px solid var(--line) !important;
    background:var(--surface) !important;
    position:relative !important;
    z-index:5 !important;
  }
  body:has(.admin-grid) .create-raffle-card .form-footer .actions{
    margin:0 !important;
    min-height:40px !important;
    display:flex !important;
    align-items:center !important;
    flex-wrap:nowrap !important;
  }
  body:has(.admin-grid) .create-raffle-card .form-footer .btn{
    min-height:40px !important;
    padding:9px 15px !important;
    visibility:visible !important;
    opacity:1 !important;
  }
  body:has(.admin-grid) .create-raffle-card .form-footer .notice{
    margin:0 !important;
    min-height:40px !important;
    padding:8px 11px !important;
    display:flex !important;
    align-items:center !important;
    line-height:1.3 !important;
    font-size:9px !important;
  }
}

/* Shorter desktop/MacBook: keep footer visible, allow the form body to breathe by shrinking flexible fields. */
@media (min-width: 1280px) and (min-height: 620px) and (max-height: 719px){
  body:has(.admin-grid) .create-raffle-card{
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
    padding:16px 18px !important;
  }
  body:has(.admin-grid) .create-raffle-card > h2{margin:0 0 8px !important;}
  body:has(.admin-grid) .create-raffle-card #raffleForm{
    flex:1 1 auto !important;
    min-height:0 !important;
    display:grid !important;
    grid-template-rows:auto auto auto auto auto minmax(48px,1fr) auto !important;
    gap:6px !important;
    overflow:hidden !important;
  }
  body:has(.admin-grid) .create-raffle-card #raffleForm .field label{padding:2px 0 4px !important;}
  body:has(.admin-grid) .create-raffle-card #raffleForm .input{height:34px !important;min-height:34px !important;padding:6px 10px !important;}
  body:has(.admin-grid) .create-raffle-card #raffleForm .winner-prize-fields{max-height:58px !important;}
  body:has(.admin-grid) .create-raffle-card #raffleForm .winner-prize-input{height:29px !important;min-height:29px !important;padding:5px 8px !important;}
  body:has(.admin-grid) .create-raffle-card #raffleForm .help{font-size:7.5px !important;line-height:1.15 !important;margin-top:1px !important;}
  body:has(.admin-grid) .create-raffle-card #raffleForm > .field:has(#participants){display:grid !important;grid-template-rows:auto minmax(42px,1fr) auto !important;min-height:0 !important;}
  body:has(.admin-grid) .create-raffle-card #participants{height:100% !important;min-height:42px !important;max-height:none !important;resize:none !important;padding:7px 10px !important;}
  body:has(.admin-grid) .create-raffle-card .entry-summary{margin-top:2px !important;font-size:7.5px !important;}
  body:has(.admin-grid) .create-raffle-card .form-footer{display:grid !important;grid-template-columns:auto minmax(0,1fr) !important;align-items:center !important;gap:8px !important;padding-top:6px !important;border-top:1px solid var(--line) !important;background:var(--surface) !important;position:relative !important;z-index:5 !important;}
  body:has(.admin-grid) .create-raffle-card .form-footer .actions{margin:0 !important;min-height:36px !important;}
  body:has(.admin-grid) .create-raffle-card .form-footer .btn{min-height:36px !important;padding:7px 12px !important;visibility:visible !important;opacity:1 !important;}
  body:has(.admin-grid) .create-raffle-card .form-footer .notice{margin:0 !important;min-height:36px !important;padding:6px 9px !important;display:flex !important;align-items:center !important;font-size:8px !important;line-height:1.2 !important;}
}

/* Responsive/mobile: footer returns to natural document flow. */
@media (max-width:1279px), (max-height:619px){
  .create-raffle-card .form-footer{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    margin-top:6px;
  }
  .create-raffle-card .form-footer .actions{margin:0;}
  .create-raffle-card .form-footer .notice{margin:0;}
}

/* v64 — final Sep 11 admin polish */
body:has(.admin-grid) .wrap{
  width:min(1240px,calc(100% - 34px));
  padding:18px 0 24px;
}
body:has(.admin-grid) .topbar{margin-bottom:14px;padding:11px 15px}
body:has(.admin-grid) .compact-hero{margin-bottom:14px}
body:has(.admin-grid) .compact-hero h1{font-size:clamp(30px,3.4vw,44px);margin:7px 0 8px}
body:has(.admin-grid) .compact-hero p{margin:0;font-size:13px;line-height:1.45}
body:has(.admin-grid) .admin-grid{gap:16px;align-items:stretch}

/* Keep every form control visually uniform, including selects. */
body:has(.admin-grid) #raffleForm .input,
body:has(.admin-grid) #raffleForm .textarea,
body:has(.admin-grid) #raffleForm select.input{
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important;
  font-size:12px!important;
  line-height:1.25!important;
}
body:has(.admin-grid) #raffleForm select.input{appearance:auto}
body:has(.admin-grid) #raffleForm .field{gap:4px!important}
body:has(.admin-grid) #raffleForm .row{gap:10px!important;align-items:start}

/* Winner prize assignment shows five rows, then scrolls. */
body:has(.admin-grid) #winnerPrizeFields{
  grid-template-columns:1fr!important;
  max-height:205px!important;
  overflow-y:auto!important;
  padding:2px 6px 2px 0!important;
}

/* Upcoming/completed stays contained as the history grows. */
body:has(.admin-grid) #raffleList{
  max-height:520px;
  overflow-y:auto;
  padding-right:6px;
  scrollbar-width:thin;
}

/* Deletion guidance: compact, readable, separated from the list. */
body:has(.admin-grid) .delete-guidance{
  margin:0 0 12px!important;
  padding:10px 12px!important;
  border:1px solid #efcdc7!important;
  border-radius:12px!important;
  background:var(--danger-soft)!important;
  color:#8e493f!important;
  font-size:10.5px!important;
  line-height:1.4!important;
}
body:has(.admin-grid) .delete-guidance strong{display:inline;margin-right:3px}

/* Make both cards line up and stay usable without page scrolling on common desktop screens. */
@media (min-width:1280px) and (min-height:700px){
  body:has(.admin-grid){overflow:hidden}
  body:has(.admin-grid) .wrap{height:100vh;display:flex;flex-direction:column}
  body:has(.admin-grid) .admin-grid{flex:1 1 auto;min-height:0}
  body:has(.admin-grid) .admin-grid>.card{min-height:0;overflow:hidden}
  body:has(.admin-grid) .admin-grid>.card:last-child{display:flex;flex-direction:column}
  body:has(.admin-grid) #raffleList{flex:1 1 auto;min-height:0;max-height:none}
  body:has(.admin-grid) .build-credit{flex:0 0 auto}
}
@media(max-width:1279px), (max-height:699px){
  body:has(.admin-grid){overflow:auto}
  body:has(.admin-grid) #raffleList{max-height:520px}
}
