:root{
  --bg:#130b07;
  --bg2:#24130a;
  --cream:#fff4df;
  --muted:#d5bfa0;
  --red:#e3362f;
  --red2:#b71916;
  --gold:#f2b94e;
  --green:#76b343;
  --line:rgba(255,220,158,.24);
  --card:rgba(15,9,7,.74);
  --shadow:0 30px 90px rgba(0,0,0,.42);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--bg)}
body{
  margin:0;
  min-height:100vh;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--cream);
  background:
    radial-gradient(circle at 50% 8%, rgba(218,133,48,.36), transparent 34rem),
    radial-gradient(circle at 80% 34%, rgba(170,40,27,.14), transparent 30rem),
    linear-gradient(180deg, #170d08 0%, #0d0705 54%, #1c0f08 100%);
  overflow-x:hidden;
}
body:before{
  content:"";
  position:fixed; inset:0; pointer-events:none; opacity:.34;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size:34px 34px;
  mask-image:linear-gradient(180deg,#000,transparent 70%);
}
.page{width:min(1720px, calc(100% - 32px)); margin:0 auto; padding:18px 0 56px;}
.hero-head{display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin:0 auto 20px;}
.eyebrow{display:flex; align-items:center; gap:10px; color:#ffc86f; text-transform:uppercase; letter-spacing:.22em; font-weight:900; font-size:13px;}
.eyebrow span,.section-kicker span{display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--red); box-shadow:0 0 15px var(--red)}
h1{font-size:clamp(34px,4.1vw,70px); line-height:.95; margin:10px 0 0; letter-spacing:-.06em; color:#fff9ed; text-shadow:0 16px 40px rgba(0,0,0,.45)}
.top-actions{display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end; padding-top:2px}
.pill-btn,.small-dark,.ghost-btn,.primary-btn{
  border:1px solid rgba(255,220,158,.32);
  color:#fff6e7; background:rgba(255,255,255,.045);
  border-radius:999px; font-weight:900; cursor:pointer; transition:.18s ease;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07), 0 12px 34px rgba(0,0,0,.26);
}
.pill-btn{padding:14px 22px; font-size:15px}
.pill-btn:hover,.ghost-btn:hover,.small-dark:hover{transform:translateY(-1px); border-color:rgba(255,220,158,.62); background:rgba(255,255,255,.09)}
.hud-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin:0 0 20px;}
.hud-card{display:flex; gap:18px; align-items:center; min-height:76px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(180deg,rgba(19,10,6,.82),rgba(8,5,4,.62)); box-shadow:var(--shadow); padding:18px 22px; overflow:hidden;}
.hud-ico{font-size:34px; filter:drop-shadow(0 4px 14px rgba(242,185,78,.28))}.hud-ico.heart{color:#ff6b61}
.hud-card b{display:block; color:#eac68d; text-transform:uppercase; letter-spacing:.15em; font-size:11px; margin-bottom:4px}
.hud-card strong{display:block; color:#fff; font-size:clamp(22px,2vw,32px); line-height:1}.hearts{letter-spacing:4px;color:#ff695f!important;font-size:22px!important}
.game-shell{position:relative; border:1px solid rgba(255,204,118,.36); border-radius:22px; background:#130b07; box-shadow:0 28px 100px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05); overflow:hidden; height:clamp(460px, 52vw, 760px); min-height:420px;}
#gameCanvas{display:block; width:100%; height:100%; background:#120a07; touch-action:pan-y;}
.game-shell.playing #gameCanvas{touch-action:none}
.game-overlay{position:absolute; inset:0; display:grid; place-items:center; padding:24px; background:linear-gradient(180deg, rgba(7,4,3,.12), rgba(7,4,3,.28)); pointer-events:auto;}
.game-overlay.hidden{display:none}
.start-card{width:min(620px,92%); padding:32px; border:1px solid rgba(255,221,159,.28); border-radius:24px; background:rgba(18,10,6,.82); backdrop-filter:blur(18px); box-shadow:0 28px 90px rgba(0,0,0,.5); text-align:center;}
.start-card h2{margin:8px 0 10px; font-size:clamp(32px,4vw,56px); letter-spacing:-.05em; line-height:.95}
.start-card p{margin:0 auto 22px; color:#ead6bc; max-width:500px; font-size:17px; line-height:1.45}
.start-card small{display:block; color:#c5a984; line-height:1.45; margin-top:18px}.mini-logo{display:inline-block; color:#fff7e8; font-family:Georgia,serif; font-style:italic; font-size:32px; font-weight:900}.mini-logo span{display:block; font-family:Inter, sans-serif; font-style:normal; letter-spacing:.18em; color:var(--red); font-size:12px; text-transform:uppercase}
.start-actions,.form-actions{display:flex; gap:14px; justify-content:center; flex-wrap:wrap}.primary-btn{background:linear-gradient(180deg,#ff4a38,#b81814); border-color:rgba(255,133,94,.6); padding:16px 26px; font-size:17px}.ghost-btn{padding:16px 24px; font-size:16px;background:rgba(255,255,255,.06)}
.primary-btn:hover{transform:translateY(-1px); filter:brightness(1.08)}
.end-card{width:min(700px,94%)}.score-form{display:grid; gap:14px; text-align:left; margin-top:16px}.score-form label{font-weight:800; color:#f5d9ad; letter-spacing:.02em}.score-form input{margin-top:7px; width:100%; border:1px solid rgba(255,221,159,.3); background:rgba(255,255,255,.07); border-radius:14px; color:#fff; padding:15px 16px; font-size:16px; outline:none}.score-form input:focus{border-color:#ffc871; box-shadow:0 0 0 4px rgba(255,200,113,.12)}.form-msg{min-height:24px;color:#ffe0a0;text-align:center!important;margin:6px 0 0!important}.under-grid{display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-top:22px; align-items:start}.content-card{background:linear-gradient(180deg,#fff9ee,#fff3df); color:#1b110b; border-radius:24px; box-shadow:0 25px 80px rgba(0,0,0,.3); padding:28px; min-height:260px}.section-kicker{display:flex; align-items:center; gap:10px; font-weight:950; letter-spacing:.22em; color:#7c4d32; text-transform:uppercase; font-size:12px}.content-card h2{font-size:clamp(28px,3vw,42px); margin:14px 0 16px; letter-spacing:-.05em}.card-head{display:flex; justify-content:space-between; gap:14px; align-items:center}.small-dark{padding:12px 18px; background:#1a100c; color:#fff8ea; border-color:rgba(0,0,0,.22); white-space:nowrap}.ranking-list{list-style:none; padding:0; margin:18px 0 0; display:grid; gap:10px}.ranking-list li{display:grid; grid-template-columns:46px 1fr auto; align-items:center; gap:12px; padding:13px 14px; background:#fffaf1; border:1px solid #efdfc7; border-radius:15px; font-weight:850}.ranking-list .place{display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#f2b94e; color:#1d120a}.ranking-list .score{color:#b31e18}.muted-row{display:block!important; color:#775c44!important}.rules-card p,.rules-card li{font-size:17px; line-height:1.55; color:#4d3b2a}.rules-card ul{padding-left:20px}.order-cta{display:inline-flex; margin-top:8px; padding:15px 22px; border-radius:999px; background:#1b100c; color:#fff5df; text-decoration:none; font-weight:950}
@media(max-width:900px){
  .page{width:min(100% - 18px,1720px); padding-top:12px}.hero-head{display:block}.top-actions{justify-content:flex-start; margin-top:14px}.hud-grid{grid-template-columns:1fr 1fr; gap:10px}.hud-card{min-height:64px; padding:13px 14px; gap:10px}.hud-ico{font-size:24px}.hud-card strong{font-size:22px}.game-shell{height:min(72vh,620px); min-height:420px; border-radius:18px}.under-grid{grid-template-columns:1fr}.content-card{padding:22px}.card-head{display:block}.small-dark{margin-top:8px}.pill-btn{padding:12px 16px}.start-card{padding:24px 18px}.start-actions{display:grid}.primary-btn,.ghost-btn{width:100%}
}
@media(max-width:560px){
  h1{font-size:38px}.eyebrow{font-size:11px}.hud-grid{grid-template-columns:1fr 1fr}.hud-card b{font-size:9px}.hud-card strong{font-size:20px}.game-shell{height:68vh; min-height:430px}.top-actions{position:relative}.content-card h2{font-size:31px}
}
@media(orientation:landscape) and (max-height:620px){
  .page{width:100%; padding:6px 8px}.hero-head{margin-bottom:8px}.hero-head h1{font-size:30px;margin-top:4px}.eyebrow{font-size:10px}.hud-grid{gap:8px;margin-bottom:8px}.hud-card{min-height:50px;padding:8px 12px}.hud-card strong{font-size:19px}.game-shell{height:calc(100vh - 152px); min-height:300px}.under-grid{margin-left:8px;margin-right:8px}
}
:fullscreen .page{width:100%; max-width:100%; padding:8px; height:100vh; overflow:hidden}
:fullscreen .under-grid{display:none}
:fullscreen .hero-head{margin-bottom:8px}
:fullscreen h1{font-size:34px}
:fullscreen .hud-grid{gap:10px;margin-bottom:10px}
:fullscreen .hud-card{min-height:58px;padding:10px 14px}
:fullscreen .game-shell{height:calc(100vh - 150px); min-height:0}


/* PATCH: fixed mobile canvas ratio and canvas fill */
.game-shell{
  position:relative;
}

#gameCanvas{
  position:absolute;
  inset:0;
  width:100% !important;
  height:100% !important;
  display:block;
}

@media(max-width:900px){
  .game-shell{
    height:calc((100vw - 18px) * 0.5625) !important;
    min-height:0 !important;
    max-height:390px !important;
    aspect-ratio:auto !important;
  }
}

@media(max-width:560px){
  .game-shell{
    height:calc((100vw - 18px) * 0.5625) !important;
    min-height:0 !important;
    max-height:360px !important;
    aspect-ratio:auto !important;
    border-radius:18px;
  }
}

@media(orientation:portrait) and (max-width:900px){
  .game-shell{
    height:calc((100vw - 18px) * 0.5625) !important;
    min-height:0 !important;
    max-height:390px !important;
    aspect-ratio:auto !important;
  }
}

@media(orientation:landscape) and (max-height:620px){
  .game-shell{
    height:calc(100vh - 152px) !important;
    min-height:300px !important;
    max-height:none !important;
    aspect-ratio:auto !important;
  }
}

:fullscreen .game-shell{
  height:calc(100vh - 150px) !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
}


/* PATCH v4: compact mobile fullscreen + no bottom crop */
@media(orientation:portrait) and (max-width:900px){
  :fullscreen .page{
    width:100%;
    padding:6px 8px;
    height:100vh;
    overflow:hidden;
  }

  :fullscreen .hero-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:6px;
  }

  :fullscreen .eyebrow{
    font-size:9px;
    letter-spacing:.15em;
  }

  :fullscreen h1{
    font-size:22px;
    line-height:1;
    margin-top:3px;
    letter-spacing:-.04em;
  }

  :fullscreen .top-actions{
    display:none;
  }

  :fullscreen .hud-grid{
    grid-template-columns:repeat(4,1fr) !important;
    gap:5px;
    margin-bottom:6px;
  }

  :fullscreen .hud-card{
    min-height:42px;
    padding:6px 6px;
    gap:4px;
    border-radius:12px;
  }

  :fullscreen .hud-ico{
    font-size:15px;
  }

  :fullscreen .hud-card b{
    font-size:7px;
    letter-spacing:.08em;
    margin-bottom:2px;
  }

  :fullscreen .hud-card strong{
    font-size:14px !important;
  }

  :fullscreen .hearts{
    font-size:12px !important;
    letter-spacing:1px;
  }

  :fullscreen .game-shell{
    height:calc(100vh - 104px) !important;
    min-height:0 !important;
    max-height:none !important;
    border-radius:14px;
  }
}

@media(orientation:portrait) and (max-width:380px){
  :fullscreen .game-shell{
    height:calc(100vh - 98px) !important;
  }
  :fullscreen h1{
    font-size:20px;
  }
}


/* PATCH v7: iPhone playable mode + visible start button */
@media(max-width:900px){
  .page{
    padding-top:10px;
  }

  .game-shell{
    height:clamp(300px, 78vw, 520px) !important;
    min-height:300px !important;
    max-height:none !important;
    aspect-ratio:auto !important;
  }

  .start-card{
    width:calc(100% - 22px);
    max-height:calc(100% - 22px);
    overflow:auto;
    padding:18px 14px;
    border-radius:20px;
  }

  .start-card h2{
    font-size:30px;
    margin:6px 0 8px;
  }

  .start-card p{
    font-size:14px;
    margin-bottom:12px;
  }

  .start-card small{
    font-size:11px;
    margin-top:10px;
  }

  .start-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
  }

  .primary-btn,
  .ghost-btn{
    min-height:48px;
    padding:13px 16px;
    font-size:15px;
  }
}

@media(max-width:430px){
  h1{
    font-size:34px;
  }

  .hero-head{
    margin-bottom:10px;
  }

  .hud-grid{
    gap:8px;
    margin-bottom:10px;
  }

  .game-shell{
    height:clamp(315px, 88vw, 520px) !important;
  }
}

/* iPhone fallback zamiast systemowego fullscreen */
body.ios-game-mode{
  overflow:hidden;
}

body.ios-game-mode .page{
  width:100%;
  height:100dvh;
  padding:7px 8px;
  overflow:hidden;
}

body.ios-game-mode .hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:5px;
}

body.ios-game-mode .eyebrow{
  font-size:9px;
  letter-spacing:.14em;
}

body.ios-game-mode h1{
  font-size:22px;
  line-height:1;
  margin-top:2px;
}

body.ios-game-mode .top-actions{
  display:block;
  padding:0;
}

body.ios-game-mode .top-actions .pill-btn:first-child{
  display:none;
}

body.ios-game-mode .pill-btn{
  padding:8px 10px;
  font-size:12px;
}

body.ios-game-mode .hud-grid{
  grid-template-columns:repeat(4,1fr);
  gap:5px;
  margin-bottom:6px;
}

body.ios-game-mode .hud-card{
  min-height:40px;
  padding:5px 5px;
  gap:3px;
  border-radius:12px;
}

body.ios-game-mode .hud-ico{
  font-size:15px;
}

body.ios-game-mode .hud-card b{
  font-size:7px;
  letter-spacing:.07em;
  margin-bottom:1px;
}

body.ios-game-mode .hud-card strong{
  font-size:13px !important;
}

body.ios-game-mode .hearts{
  font-size:11px !important;
  letter-spacing:0;
}

body.ios-game-mode .game-shell{
  height:calc(100dvh - 98px) !important;
  min-height:0 !important;
  max-height:none !important;
  border-radius:14px;
}

body.ios-game-mode .under-grid{
  display:none;
}

body.ios-game-mode .start-card{
  width:calc(100% - 18px);
  max-height:calc(100% - 18px);
  padding:16px 14px;
}

body.ios-game-mode .start-card h2{
  font-size:29px;
}

body.ios-game-mode .mini-logo{
  font-size:25px;
}


/* PATCH v9: hard mobile game fix */
body.ios-game-mode .game-shell{
  height:calc(100dvh - 100px) !important;
}

@media(max-width:430px){
  .game-shell{
    height:clamp(360px, 96vw, 560px) !important;
  }
}


/* PATCH v10: mobile plays horizontally */
.rotate-phone-overlay{
  position:absolute;
  inset:0;
  z-index:30;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(10,5,3,.82);
  backdrop-filter:blur(10px);
}

.rotate-phone-overlay.hidden,
.rotate-phone-overlay.manual-hidden{
  display:none;
}

.rotate-card{
  width:min(420px, 92%);
  border:1px solid rgba(255,220,158,.35);
  border-radius:22px;
  background:rgba(20,10,6,.92);
  box-shadow:0 24px 80px rgba(0,0,0,.52);
  text-align:center;
  padding:24px 18px;
  color:#fff5df;
}

.rotate-icon{
  display:grid;
  place-items:center;
  width:64px;
  height:64px;
  margin:0 auto 12px;
  border-radius:50%;
  background:#e3362f;
  font-size:36px;
  font-weight:900;
}

.rotate-card h2{
  margin:0 0 8px;
  font-size:28px;
  letter-spacing:-.04em;
}

.rotate-card p{
  margin:0 0 16px;
  color:#e8cda6;
  line-height:1.4;
}

.rotate-card button{
  border:1px solid rgba(255,220,158,.35);
  background:#fff3df;
  color:#1b100a;
  font-weight:900;
  border-radius:999px;
  padding:13px 18px;
}

@media(max-width:900px) and (orientation:portrait){
  .game-shell{
    height:56vw !important;
    min-height:220px !important;
    max-height:360px !important;
    aspect-ratio:16 / 9 !important;
  }
}

@media(max-width:900px) and (orientation:landscape){
  .page{
    width:100%;
    padding:6px 8px;
  }

  .hero-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:6px;
  }

  .eyebrow{
    font-size:9px;
  }

  h1{
    font-size:24px;
    margin-top:2px;
  }

  .top-actions{
    padding-top:0;
  }

  .pill-btn{
    padding:8px 12px;
    font-size:12px;
  }

  .hud-grid{
    grid-template-columns:repeat(4,1fr);
    gap:6px;
    margin-bottom:6px;
  }

  .hud-card{
    min-height:44px;
    padding:6px 8px;
    border-radius:12px;
    gap:6px;
  }

  .hud-ico{
    font-size:18px;
  }

  .hud-card b{
    font-size:7px;
    margin-bottom:1px;
    letter-spacing:.08em;
  }

  .hud-card strong{
    font-size:15px !important;
  }

  .hearts{
    font-size:13px !important;
    letter-spacing:1px;
  }

  .game-shell{
    height:calc(100vh - 112px) !important;
    min-height:250px !important;
    max-height:none !important;
    aspect-ratio:auto !important;
  }

  .under-grid{
    display:none;
  }

  .start-card{
    width:min(520px, 88%);
    padding:18px;
  }

  .start-card h2{
    font-size:34px;
  }

  .start-card p{
    font-size:14px;
    margin-bottom:12px;
  }

  .start-card small{
    display:none;
  }

  .start-actions{
    display:flex;
  }

  .primary-btn,
  .ghost-btn{
    width:auto;
    min-height:44px;
    padding:12px 16px;
    font-size:14px;
  }
}

body.ios-game-mode .game-shell{
  height:calc(100dvh - 112px) !important;
}


/* PATCH v11: prawdziwy poziomy tryb gry na telefonie */
@media(max-width:900px) and (orientation:landscape){
  html,
  body{
    height:100%;
    overflow:hidden;
  }

  body{
    background:#120907;
  }

  .page{
    width:100%;
    max-width:none;
    height:100dvh;
    padding:4px 6px;
    display:grid;
    grid-template-rows:auto 1fr;
    gap:4px;
    overflow:hidden;
  }

  .hero-head{
    display:none !important;
  }

  .top-actions{
    display:none !important;
  }

  .hud-grid{
    grid-row:1;
    grid-template-columns:repeat(4,1fr);
    gap:5px;
    margin:0;
  }

  .hud-card{
    min-height:30px;
    height:34px;
    padding:3px 7px;
    border-radius:10px;
    gap:5px;
    background:rgba(18,9,5,.72);
    backdrop-filter:blur(8px);
  }

  .hud-ico{
    font-size:14px;
    line-height:1;
  }

  .hud-card b{
    font-size:6px;
    letter-spacing:.08em;
    margin:0;
    line-height:1;
  }

  .hud-card strong{
    font-size:13px !important;
    line-height:1;
  }

  .hearts{
    font-size:11px !important;
    letter-spacing:0;
    white-space:nowrap;
  }

  .game-shell{
    grid-row:2;
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    border-radius:12px;
  }

  .under-grid{
    display:none !important;
  }

  .rotate-phone-overlay{
    display:none !important;
  }

  .start-card{
    width:min(460px, 86%);
    max-height:calc(100% - 16px);
    overflow:auto;
    padding:14px 16px;
    border-radius:18px;
  }

  .mini-logo{
    font-size:22px;
  }

  .start-card h2{
    font-size:28px;
    margin:4px 0 6px;
  }

  .start-card p{
    font-size:13px;
    margin:0 0 10px;
  }

  .start-card small{
    display:none;
  }

  .start-actions{
    display:flex;
    gap:8px;
  }

  .primary-btn,
  .ghost-btn{
    min-height:40px;
    padding:10px 14px;
    font-size:13px;
  }
}

/* Android fullscreen in landscape: almost all screen is game */
@media(max-width:900px) and (orientation:landscape){
  :fullscreen .page,
  body.ios-game-mode .page{
    width:100%;
    height:100dvh;
    padding:4px 6px;
    display:grid;
    grid-template-rows:auto 1fr;
    gap:4px;
    overflow:hidden;
  }

  :fullscreen .game-shell,
  body.ios-game-mode .game-shell{
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
  }
}


/* PATCH v12: start in portrait + PWA install card */
.install-card{
  grid-column:1 / -1;
}

.install-card h2{
  margin:0 0 10px;
}

.install-card .install-btn{
  border:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
}

.install-help{
  margin:12px 0 0;
  color:#7a6758;
  font-weight:700;
  line-height:1.45;
}

.rotate-card small{
  display:block;
  margin-top:10px;
  color:#d9b98d;
  font-weight:800;
  line-height:1.35;
}

.rotate-card #rotateContinueBtn{
  font-size:17px;
  min-width:180px;
}

@media(max-width:900px) and (orientation:portrait){
  .rotate-phone-overlay{
    background:rgba(10,5,3,.58);
  }

  .rotate-card{
    padding:22px 18px;
  }

  .rotate-card h2{
    font-size:34px;
  }

  .rotate-card p{
    font-size:15px;
  }

  .rotate-card #rotateContinueBtn{
    width:100%;
    min-height:52px;
    font-size:18px;
  }
}

@media(max-width:900px){
  .install-card{
    order:9;
  }

  .install-card .install-btn{
    width:100%;
  }
}


/* PATCH v13: mobile in-game ranking/info/share menu */
.mobile-game-actions{
  position:absolute;
  z-index:12;
  left:12px;
  top:12px;
  display:none;
  gap:6px;
  pointer-events:auto;
}

.mobile-game-actions button{
  border:1px solid rgba(255,222,171,.34);
  background:rgba(18,9,5,.72);
  color:#fff4de;
  border-radius:999px;
  padding:8px 10px;
  font-weight:900;
  font-size:12px;
  backdrop-filter:blur(10px);
  box-shadow:0 8px 24px rgba(0,0,0,.28);
}

.mobile-info-panel{
  position:absolute;
  inset:0;
  z-index:34;
  display:grid;
  place-items:center;
  padding:14px;
  background:rgba(10,5,3,.72);
  backdrop-filter:blur(9px);
}

.mobile-info-panel.hidden{
  display:none;
}

.mobile-info-card{
  position:relative;
  width:min(560px, 94%);
  max-height:calc(100% - 20px);
  overflow:auto;
  border-radius:22px;
  background:#fff7eb;
  color:#1b100a;
  padding:22px;
  box-shadow:0 24px 90px rgba(0,0,0,.55);
}

.mobile-info-card h2{
  margin:0 0 8px;
  font-size:30px;
  letter-spacing:-.04em;
}

.mobile-info-card p{
  margin:0 0 10px;
  color:#5c4a3e;
  line-height:1.45;
  font-weight:700;
}

.mobile-close{
  position:absolute;
  top:10px;
  right:10px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#1b100a;
  color:#fff4de;
  font-size:26px;
  font-weight:900;
  line-height:1;
}

.mobile-info-actions{
  display:flex;
  gap:10px;
  margin-top:14px;
}

.mobile-info-actions .ghost-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

@media(max-width:900px){
  .mobile-game-actions{
    display:flex;
  }

  .start-card{
    pointer-events:auto;
  }

  #startBtn,
  #rotateContinueBtn,
  .primary-btn{
    touch-action:manipulation;
  }
}

@media(max-width:900px) and (orientation:landscape){
  .mobile-game-actions{
    top:8px;
    left:8px;
  }

  .mobile-game-actions button{
    padding:6px 8px;
    font-size:11px;
  }

  .mobile-info-card{
    width:min(620px, 92%);
    padding:16px;
  }

  .mobile-info-card h2{
    font-size:24px;
  }

  .mobile-info-card p{
    font-size:13px;
  }

  .mobile-info-actions{
    gap:8px;
  }

  .mobile-info-actions .primary-btn,
  .mobile-info-actions .ghost-btn{
    min-height:38px;
    padding:9px 12px;
    font-size:12px;
  }
}


/* PATCH v14: persistent share/x2 buttons */
.share-pill{
  background:linear-gradient(135deg, rgba(227,54,47,.88), rgba(255,189,89,.18)) !important;
  border-color:rgba(255,222,171,.52) !important;
}

.mobile-share-row{
  display:none;
}

.share-card{
  grid-column:1 / -1;
}

.share-card h2{
  margin:0 0 10px;
}

.share-card .install-btn{
  border:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
}

#shareBoostStatus{
  margin-top:12px;
}

@media(max-width:900px){
  .mobile-share-row{
    display:block;
    margin:-2px 0 10px;
  }

  .mobile-share-row button{
    width:100%;
    border:1px solid rgba(255,222,171,.38);
    border-radius:999px;
    background:linear-gradient(135deg, #e3362f, #9e241d);
    color:#fff5df;
    font-weight:950;
    padding:13px 14px;
    box-shadow:0 12px 30px rgba(0,0,0,.26);
  }

  .mobile-game-actions{
    display:flex !important;
    z-index:42;
  }

  .mobile-game-actions #mobileShareBoostBtn{
    background:linear-gradient(135deg, #e3362f, #9e241d);
    color:#fff5df;
    border-color:rgba(255,222,171,.50);
  }
}

@media(max-width:900px) and (orientation:landscape){
  .mobile-share-row{
    display:none !important;
  }

  .mobile-game-actions{
    top:8px;
    left:8px;
    display:flex !important;
  }

  .mobile-game-actions button{
    background:rgba(18,9,5,.78);
  }

  .mobile-game-actions #mobileShareBoostBtn{
    background:linear-gradient(135deg, #e3362f, #9e241d);
  }
}

body.ios-game-mode .mobile-game-actions{
  display:flex !important;
}


/* PATCH v15: mobile share card immediately under game */
.mobile-bonus-card{
  display:none;
}

@media(max-width:900px){
  .mobile-bonus-card{
    display:block;
    margin:14px 0 16px;
  }

  .mobile-share-card{
    border:1px solid rgba(227,54,47,.28);
    box-shadow:0 18px 45px rgba(227,54,47,.12), 0 18px 45px rgba(0,0,0,.12);
  }

  .mobile-share-card h2{
    font-size:30px;
    line-height:1.05;
    margin:0 0 10px;
  }

  .mobile-share-card p{
    font-size:15px;
    line-height:1.45;
  }

  .mobile-share-card .install-btn{
    width:100%;
    margin-top:12px;
    font-size:16px;
    min-height:52px;
    background:linear-gradient(135deg, #e3362f, #9e241d);
    color:#fff5df;
  }

  .mobile-share-card .install-help{
    text-align:center;
    font-size:13px;
  }

  /* Na telefonie karta x2 w zwykłym rankingu też idzie wysoko */
  #shareBoostCard{
    order:-1;
  }

  #shareBoostCard .install-btn{
    width:100%;
  }
}

@media(max-width:900px) and (orientation:landscape){
  .mobile-bonus-card{
    display:none !important;
  }
}


/* PATCH v16: Facebook-only x2 confirmation */
.fb-confirm-panel{
  position:absolute;
  inset:0;
  z-index:50;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(10,5,3,.74);
  backdrop-filter:blur(10px);
}

.fb-confirm-panel.hidden{
  display:none;
}

.fb-confirm-card{
  position:relative;
  width:min(560px, 94%);
  border-radius:24px;
  background:#fff7eb;
  color:#1b100a;
  padding:28px;
  box-shadow:0 28px 100px rgba(0,0,0,.58);
}

.fb-confirm-card h2{
  margin:12px 0 10px;
  font-size:clamp(28px,4vw,44px);
  letter-spacing:-.05em;
  line-height:1;
}

.fb-confirm-card p{
  margin:0 0 18px;
  color:#5c4a3e;
  font-weight:750;
  line-height:1.45;
}

.fb-confirm-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.fb-confirm-actions .primary-btn,
.fb-confirm-actions .ghost-btn{
  min-height:48px;
}

@media(max-width:900px){
  .fb-confirm-card{
    padding:22px 16px;
  }

  .fb-confirm-card h2{
    font-size:30px;
  }

  .fb-confirm-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .fb-confirm-actions .primary-btn,
  .fb-confirm-actions .ghost-btn{
    width:100%;
  }
}


/* PATCH v17: iPhone start + rotated game mode + no duplicate share card */
@media(max-width:900px){
  /* Na telefonie zostaje jedna karta x2 od razu pod grą.
     Druga karta z sekcji niżej była zdublowana. */
  #shareBoostCard{
    display:none !important;
  }
}

/* iPhone / Safari fallback: obracamy stronę w CSS po kliknięciu Pełny ekran */
body.phone-landscape-mode{
  width:100vw;
  height:100dvh;
  overflow:hidden !important;
  background:#120907;
}

body.phone-landscape-mode .page{
  position:fixed;
  left:50%;
  top:50%;
  width:100dvh;
  height:100dvw;
  max-width:none;
  padding:4px 6px;
  margin:0;
  transform:translate(-50%, -50%) rotate(90deg);
  transform-origin:center center;
  display:grid;
  grid-template-rows:auto 1fr;
  gap:4px;
  overflow:hidden;
}

body.phone-landscape-mode .hero-head,
body.phone-landscape-mode .top-actions,
body.phone-landscape-mode .under-grid,
body.phone-landscape-mode .mobile-bonus-card,
body.phone-landscape-mode .mobile-share-row{
  display:none !important;
}

body.phone-landscape-mode .hud-grid{
  grid-row:1;
  grid-template-columns:repeat(4,1fr);
  gap:5px;
  margin:0;
}

body.phone-landscape-mode .hud-card{
  min-height:30px;
  height:34px;
  padding:3px 7px;
  border-radius:10px;
  gap:5px;
  background:rgba(18,9,5,.72);
  backdrop-filter:blur(8px);
}

body.phone-landscape-mode .hud-ico{
  font-size:14px;
  line-height:1;
}

body.phone-landscape-mode .hud-card b{
  font-size:6px;
  letter-spacing:.08em;
  margin:0;
  line-height:1;
}

body.phone-landscape-mode .hud-card strong{
  font-size:13px !important;
  line-height:1;
}

body.phone-landscape-mode .hearts{
  font-size:11px !important;
  letter-spacing:0;
  white-space:nowrap;
}

body.phone-landscape-mode .game-shell{
  grid-row:2;
  width:100%;
  height:100% !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  border-radius:12px;
}

body.phone-landscape-mode .mobile-game-actions{
  display:flex !important;
  top:8px;
  left:8px;
  z-index:42;
}

body.phone-landscape-mode .mobile-game-actions button{
  padding:6px 8px;
  font-size:11px;
}

body.phone-landscape-mode .rotate-phone-overlay{
  display:none !important;
}

body.phone-landscape-mode .start-card{
  width:min(460px, 86%);
  max-height:calc(100% - 16px);
  overflow:auto;
  padding:14px 16px;
  border-radius:18px;
}

body.phone-landscape-mode .start-card h2{
  font-size:28px;
  margin:4px 0 6px;
}

body.phone-landscape-mode .start-card p{
  font-size:13px;
  margin:0 0 10px;
}

body.phone-landscape-mode .start-card small{
  display:none;
}

body.phone-landscape-mode .start-actions{
  display:flex;
  gap:8px;
}

body.phone-landscape-mode .primary-btn,
body.phone-landscape-mode .ghost-btn{
  min-height:40px;
  padding:10px 14px;
  font-size:13px;
}


/* PATCH v26: prawdziwy przycisk pełnego ekranu przeniesiony do środka okna gry */
.mobile-play-holder{
  display:none;
}

@media(max-width:900px){
  .mobile-play-holder{
    position:absolute;
    inset:0;
    z-index:240;
    display:grid;
    place-items:center;
    pointer-events:none;
  }

  .mobile-play-holder #fullScreenBtn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:210px !important;
    min-height:66px !important;
    padding:20px 48px !important;
    border:0 !important;
    border-radius:999px !important;
    background:linear-gradient(135deg, #e3362f, #9e241d) !important;
    color:#fff6e8 !important;
    font-size:28px !important;
    font-weight:1000 !important;
    letter-spacing:.02em !important;
    box-shadow:0 20px 60px rgba(227,54,47,.35), 0 24px 80px rgba(0,0,0,.45) !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
    -webkit-tap-highlight-color:rgba(255,255,255,.22);
  }

  body.phone-landscape-mode .mobile-play-holder,
  :fullscreen .mobile-play-holder,
  .game-shell.playing .mobile-play-holder{
    display:none !important;
  }

  body.phone-landscape-mode #gameCanvas{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
  }
}

/* Nie pokazujemy starego okna startowego nad grą */
#startOverlay,
.rotate-phone-overlay{
  display:none !important;
}
