:root{--red:#b3202a;--red-d:#8a141d;--cream:#fdf3e1;--cream-d:#f3e2c3;--green:#2e7d32;--green-d:#1f5a23;--ink:#3b2314}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden;background:var(--cream);color:var(--ink);
  font-family:"Trebuchet MS","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
#app{position:fixed;inset:0;bottom:76px;bottom:calc(76px + env(safe-area-inset-bottom, 0px));display:flex;flex-direction:column;max-width:640px;margin:0 auto;
  box-shadow:0 0 30px rgba(0,0,0,.15)}
#hud{display:flex;align-items:center;gap:6px;padding:8px 10px;padding-top:max(8px,env(safe-area-inset-top));
  background:var(--red);color:#fff;border-bottom:4px solid var(--green);z-index:6;position:relative}
.hud-box{flex:1;display:flex;flex-direction:column;align-items:center;line-height:1.05;min-width:0}
.hud-label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.85}
#score,#best{font-size:22px;font-weight:800}
#lives{font-size:18px;color:#ffd7d7;letter-spacing:2px;white-space:nowrap}
.icon-btn{flex:0 0 44px;height:44px;border-radius:50%;border:2px solid #fff;background:var(--red-d);
  color:#fff;font-size:20px;cursor:pointer}
.back-btn{display:flex;align-items:center;justify-content:center;text-decoration:none;font-weight:800;font-size:22px}
.btn.btn-back{margin-top:10px;background:#fff;color:var(--ink);border:2px solid var(--cream-d);box-shadow:0 4px 0 var(--cream-d);display:flex;align-items:center;justify-content:center;text-decoration:none;font-size:18px;min-height:46px}
.icon-btn[aria-pressed="true"]{background:var(--green)}
#game{flex:1;display:block;width:100%;touch-action:none;cursor:grab;min-height:0}
#foot{font-size:11px;text-align:center;padding:4px 0;
  background:var(--green);color:var(--cream)}
.overlay{position:absolute;inset:0;display:none;padding:18px;padding-top:calc(max(8px,env(safe-area-inset-top)) + 70px);overflow-y:auto;
  background:rgba(59,35,20,.45);z-index:5}
.overlay.show{display:flex}
.overlay .card{margin:auto}
.card{width:100%;max-width:400px;background:var(--cream);border:4px solid var(--red);border-radius:18px;
  padding:0 20px 20px;text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.3);overflow:hidden;
  background-image:repeating-linear-gradient(45deg,transparent 0 14px,rgba(179,32,42,.04) 14px 28px)}
.stripe{display:flex;height:10px;margin:0 -20px 14px}
.logo{display:block;margin:0 auto 8px;height:auto;filter:drop-shadow(0 3px 4px rgba(0,0,0,.25))}
.logo-lg{width:clamp(84px,27vw,112px)}
.logo-sm{width:58px}
.stripe i{flex:1}.stripe i:nth-child(1){background:var(--green)}.stripe i:nth-child(2){background:#fff}.stripe i:nth-child(3){background:var(--red)}
h1,h2{color:var(--red);font-family:Georgia,"Times New Roman",serif;font-style:italic;line-height:1.05}
h1{font-size:clamp(32px,10vw,44px);text-shadow:2px 2px 0 var(--cream-d)}
h2{font-size:34px}
.sub{color:var(--green-d);font-weight:700;margin:8px 0 14px;font-size:15px}
.legend{list-style:none;text-align:left;font-size:14px;margin:0 0 16px;display:grid;gap:8px}
.legend li{background:#fff;border-radius:10px;padding:8px 10px;border:1px solid var(--cream-d)}
.good{color:var(--green);font-weight:800}.bad{color:var(--red);font-weight:800}
.btn{display:block;width:100%;min-height:54px;border:0;border-radius:999px;background:var(--green);color:#fff;
  font-size:22px;font-weight:800;cursor:pointer;box-shadow:0 5px 0 var(--green-d);letter-spacing:.03em}
.btn:active{transform:translateY(3px);box-shadow:0 2px 0 var(--green-d)}
.btn:focus-visible,.icon-btn:focus-visible{outline:3px solid #f2b705;outline-offset:3px}
.best-line{margin-top:12px;font-size:14px}
.final{font-size:20px;margin:10px 0 4px}.final b{color:var(--red);font-size:30px}
.newbest{color:var(--green-d);font-weight:800;margin:4px 0}
.ready{font-size:18px;font-weight:700;color:var(--green-d);margin:12px 0 16px;font-style:italic}
.offer{margin:0 0 14px}
.btn.btn-back:active{box-shadow:0 2px 0 var(--cream-d)}
@media (max-height:680px){.legend{gap:5px;margin-bottom:10px}.legend li{padding:6px 9px;font-size:13px}.sub{margin:6px 0 10px}}
/* Netlify badge safe zone: #app stops 76px (+ safe-area inset) above the bottom so the fixed
   "Powered by Netlify" badge (192x64, bottom-right) never covers the play area or the peel. */
@media (max-height:700px){
  .overlay{padding-top:calc(max(8px,env(safe-area-inset-top)) + 66px);padding-bottom:8px}
  .card{padding:0 16px 14px}
  .stripe{margin-bottom:10px}
  .logo-lg{width:62px}.logo-sm{width:46px}
  h1{font-size:30px}h2{font-size:28px}
  .sub{margin:5px 0 8px;font-size:14px}
  .legend{gap:4px;margin-bottom:10px}.legend li{padding:5px 8px;font-size:12.5px;line-height:1.3}
  .btn{min-height:48px;font-size:20px}
  .btn.btn-back{min-height:42px;font-size:16px;margin-top:8px}
  .best-line{margin-top:8px}
  .final{margin:6px 0 2px}.ready{margin:8px 0 10px;font-size:16px}
}
/* Topping legend on the start card (icons from shared/pizza-art.js) */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tlist{display:grid;grid-template-columns:repeat(6,1fr);gap:3px 1px;margin-top:5px}
.tlist span{display:flex;flex-direction:column;align-items:center;font-size:9.5px;font-weight:700;line-height:1.1;color:var(--ink)}
.tlist svg{width:25px;height:25px;display:block}
@media (max-height:700px){.tlist{grid-template-columns:repeat(6,1fr);gap:2px}.tlist svg{width:24px;height:24px}.tlist span{font-size:9px}}
.tlist span{white-space:nowrap}
@media (max-height:860px){.legend li:nth-child(3){display:none}}
@media (max-height:660px){.logo-lg{width:54px}}
