@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

#lp-game{
  --sea1:#0b4f7c; --sea2:#1479b8; --sea3:#4fb3e8; --foam:#e8f7ff;
  --sand:#fff6e3; --ink:#12324a; --muted:#5a7388; --card:#ffffff;
  --lob:#e8452c; --lob2:#ff7a45; --gold:#f5b700;
  --hur:#6b3fa0; --sto:#3d5a99; --bad:#7f97ad; --good:#2fa866; --glo:#f2a900;
  --radius:18px;
  font-family:'Fredoka','Trebuchet MS',system-ui,sans-serif;
  color:var(--ink); max-width:1180px; margin:0 auto; line-height:1.35;
  -webkit-font-smoothing:antialiased;
}
#lp-game *{box-sizing:border-box}
#lp-game button{font-family:inherit;cursor:pointer;border:0;line-height:1.2;text-transform:none;letter-spacing:0;box-shadow:none}
#lp-game button:disabled{opacity:.45;cursor:not-allowed}
#lp-game input,#lp-game select{font-family:inherit;font-size:16px;color:var(--ink)}
#lp-game h2,#lp-game h3,#lp-game h4{font-family:inherit;color:var(--ink);margin:0;line-height:1.2;font-weight:600}
#lp-game p{margin:0 0 .5em}

/* ---------- banner ---------- */
#lp-game .lp-banner{position:relative;overflow:hidden;border-radius:var(--radius);
  background:linear-gradient(180deg,#8fd3ff 0%,#c9ecff 48%,var(--sea3) 49%,var(--sea2) 75%,var(--sea1) 100%);
  height:190px;margin-bottom:16px;box-shadow:0 6px 18px rgba(11,79,124,.25)}
#lp-game .lp-banner.lp-w-bad{background:linear-gradient(180deg,#a9b8c6 0%,#d2dbe3 48%,#5f8fb0 49%,#3f6f93 75%,#284d6b 100%)}
#lp-game .lp-banner.lp-w-storm{background:linear-gradient(180deg,#4a5670 0%,#77839a 48%,#3c5f80 49%,#2a4763 75%,#18304a 100%)}
#lp-game .lp-banner.lp-w-hurricane{background:linear-gradient(180deg,#2c2140 0%,#56467a 48%,#2f3f63 49%,#1f2b48 75%,#111a30 100%)}
#lp-game .lp-banner.lp-w-glorious{background:linear-gradient(180deg,#ffd76b 0%,#fff1b8 48%,#3fc1f0 49%,#1a8fd0 75%,#0b5f95 100%)}
#lp-game .lp-title{position:absolute;left:24px;top:18px;z-index:5}
#lp-game .lp-title h2{font-size:42px;color:#fff;text-shadow:0 3px 0 var(--lob),0 6px 14px rgba(0,0,0,.25);font-weight:700}
#lp-game .lp-title p{color:#0b3553;font-weight:500;margin-top:4px;font-size:17px;background:rgba(255,255,255,.7);display:inline-block;padding:2px 10px;border-radius:20px}
#lp-game .lp-sun{position:absolute;right:60px;top:16px;width:64px;height:64px;border-radius:50%;
  background:radial-gradient(circle,#fff3a8 0 40%,#ffd23f 41% 100%);box-shadow:0 0 30px 10px rgba(255,214,64,.6);
  animation:lp-spin 18s linear infinite}
#lp-game .lp-cloud{position:absolute;top:24px;width:110px;height:36px;background:#fff;border-radius:40px;opacity:.9;animation:lp-drift 40s linear infinite}
#lp-game .lp-cloud:before,#lp-game .lp-cloud:after{content:"";position:absolute;background:#fff;border-radius:50%}
#lp-game .lp-cloud:before{width:50px;height:50px;left:16px;top:-24px}
#lp-game .lp-cloud:after{width:38px;height:38px;left:56px;top:-16px}
#lp-game .lp-w-storm .lp-cloud,#lp-game .lp-w-hurricane .lp-cloud,#lp-game .lp-w-storm .lp-cloud:before,#lp-game .lp-w-storm .lp-cloud:after,#lp-game .lp-w-hurricane .lp-cloud:before,#lp-game .lp-w-hurricane .lp-cloud:after{background:#55607a}
#lp-game .lp-w-bad .lp-cloud,#lp-game .lp-w-bad .lp-cloud:before,#lp-game .lp-w-bad .lp-cloud:after{background:#c3ccd6}
#lp-game .lp-w-bad .lp-sun,#lp-game .lp-w-storm .lp-sun,#lp-game .lp-w-hurricane .lp-sun{opacity:0}
#lp-game .lp-waves{position:absolute;left:0;bottom:0;width:200%;height:110px;animation:lp-wave 9s linear infinite}
#lp-game .lp-waves.lp-back{animation-duration:14s;bottom:12px;opacity:.55}
#lp-game .lp-w-storm .lp-waves,#lp-game .lp-w-hurricane .lp-waves{animation-duration:3.5s}
#lp-game .lp-w-storm .lp-waves.lp-back,#lp-game .lp-w-hurricane .lp-waves.lp-back{animation-duration:5s}
#lp-game .lp-boat{position:absolute;bottom:58px;left:46%;width:120px;animation:lp-bob 3s ease-in-out infinite;z-index:3}
#lp-game .lp-w-storm .lp-boat,#lp-game .lp-w-hurricane .lp-boat{animation:lp-toss 1.1s ease-in-out infinite}
#lp-game .lp-buoy{position:absolute;bottom:40px;width:22px;animation:lp-bob 2.4s ease-in-out infinite;z-index:3}
#lp-game .lp-lobster{position:absolute;right:28px;bottom:14px;width:88px;z-index:4;animation:lp-wiggle 2.6s ease-in-out infinite;transform-origin:50% 90%}
#lp-game .lp-rain{position:absolute;inset:0;pointer-events:none;z-index:4;opacity:0;transition:opacity .6s;
  background-image:repeating-linear-gradient(105deg,rgba(255,255,255,.0) 0 14px,rgba(255,255,255,.45) 14px 15px);
  background-size:60px 60px;animation:lp-rain .5s linear infinite}
#lp-game .lp-w-bad .lp-rain{opacity:.35}
#lp-game .lp-w-storm .lp-rain,#lp-game .lp-w-hurricane .lp-rain{opacity:.8}
#lp-game .lp-flash{position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none;z-index:6}
#lp-game .lp-w-storm .lp-flash,#lp-game .lp-w-hurricane .lp-flash{animation:lp-flash 4s infinite}
#lp-game .lp-swirl{position:absolute;left:20%;top:-60px;width:240px;height:240px;border-radius:50%;opacity:0;z-index:2;
  background:repeating-conic-gradient(rgba(255,255,255,.35) 0 12deg,transparent 12deg 40deg);animation:lp-spin 2.2s linear infinite}
#lp-game .lp-w-hurricane .lp-swirl{opacity:.8}
#lp-game .lp-rays{position:absolute;right:20px;top:-30px;width:170px;height:170px;border-radius:50%;opacity:0;
  background:repeating-conic-gradient(rgba(255,230,120,.55) 0 8deg,transparent 8deg 24deg);animation:lp-spin 12s linear infinite}
#lp-game .lp-w-glorious .lp-rays{opacity:1}

@keyframes lp-wave{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes lp-bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-7px) rotate(2deg)}}
@keyframes lp-toss{0%,100%{transform:translateY(0) rotate(-12deg)}50%{transform:translateY(-14px) rotate(12deg)}}
@keyframes lp-wiggle{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(5deg)}}
@keyframes lp-spin{to{transform:rotate(360deg)}}
@keyframes lp-drift{from{left:-140px}to{left:110%}}
@keyframes lp-rain{from{background-position:0 0}to{background-position:-20px 60px}}
@keyframes lp-flash{0%,88%,92%,96%,100%{opacity:0}90%,94%{opacity:.75}}
@keyframes lp-pop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}100%{transform:scale(1)}}
@keyframes lp-tumble{0%{transform:rotate(0) translateY(0)}25%{transform:rotate(100deg) translateY(-26px)}50%{transform:rotate(200deg) translateY(0)}75%{transform:rotate(300deg) translateY(-10px)}100%{transform:rotate(360deg) translateY(0)}}
@keyframes lp-pulse{0%,100%{box-shadow:0 0 0 0 rgba(232,69,44,.55)}50%{box-shadow:0 0 0 10px rgba(232,69,44,0)}}

/* ---------- start screen ---------- */
#lp-game .lp-start{display:grid;grid-template-columns:1fr 1fr;gap:16px}
#lp-game .lp-choice{background:var(--card);border-radius:var(--radius);padding:22px;text-align:left;box-shadow:0 4px 14px rgba(18,50,74,.12);border:3px solid transparent;transition:transform .15s,border-color .15s}
#lp-game .lp-choice:hover{transform:translateY(-3px);border-color:var(--sea3)}
#lp-game .lp-choice .lp-big{font-size:40px}
#lp-game .lp-choice h3{font-size:24px;margin:6px 0}
#lp-game .lp-choice p{color:var(--muted);font-size:16px}
#lp-game .lp-rules{grid-column:1/-1;background:var(--sand);border-radius:var(--radius);padding:16px 20px;font-size:16px}
#lp-game .lp-rules ul{margin:6px 0 0 18px;padding:0}
#lp-game .lp-rules li{margin:3px 0}

/* ---------- layout ---------- */
#lp-game .lp-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
#lp-game .lp-days{display:flex;gap:5px;flex-wrap:wrap;flex:1}
#lp-game .lp-day{min-width:52px;padding:4px 6px;border-radius:12px;background:#e6f3fb;text-align:center;font-size:13px;color:var(--muted)}
#lp-game .lp-day b{display:block;font-size:18px;line-height:1.1}
#lp-game .lp-day.lp-now{background:var(--lob);color:#fff;animation:lp-pulse 2s infinite}
#lp-game .lp-day.lp-done{background:#fff;border:2px solid #d5e7f3}
#lp-game .lp-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:16px;align-items:start}
#lp-game .lp-card{background:var(--card);border-radius:var(--radius);padding:16px 18px;box-shadow:0 4px 14px rgba(18,50,74,.10);margin-bottom:16px}
#lp-game .lp-card h3{font-size:21px;margin-bottom:8px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#lp-game .lp-sub{color:var(--muted);font-size:15px}

#lp-game .lp-btn{background:var(--lob);color:#fff;padding:10px 18px;border-radius:40px;font-size:17px;font-weight:600;box-shadow:0 3px 0 #b02e1a;transition:transform .1s}
#lp-game .lp-btn:hover:not(:disabled){transform:translateY(-1px)}
#lp-game .lp-btn:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #b02e1a}
#lp-game .lp-btn.lp-blue{background:var(--sea2);box-shadow:0 3px 0 #0b4f7c}
#lp-game .lp-btn.lp-green{background:var(--good);box-shadow:0 3px 0 #1d7445}
#lp-game .lp-btn.lp-ghost{background:#eef6fb;color:var(--ink);box-shadow:0 3px 0 #c9dde9}
#lp-game .lp-btn.lp-small{padding:6px 12px;font-size:15px}
#lp-game .lp-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* ---------- forecast ---------- */
#lp-game .lp-headline{font-size:24px;font-weight:600;color:#fff;background:linear-gradient(90deg,var(--sea1),var(--sea2));padding:10px 16px;border-radius:14px;margin-bottom:12px;display:flex;align-items:center;gap:10px}
#lp-game .lp-headline .lp-tv{font-size:28px}
#lp-game .lp-strip{display:flex;border-radius:12px;overflow:hidden;margin:4px 0 12px;box-shadow:inset 0 0 0 2px rgba(0,0,0,.05)}
#lp-game .lp-strip span{flex:1;text-align:center;color:#fff;font-weight:600;font-size:15px;padding:8px 0;min-width:0;border-right:1px solid rgba(255,255,255,.35);transition:background .4s}
#lp-game .lp-strip span:last-child{border-right:0}
#lp-game .lp-strip span.lp-hit{outline:4px solid var(--ink);outline-offset:-4px;animation:lp-pop .5s}
#lp-game .lp-bands{display:grid;gap:8px}
#lp-game .lp-band{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:10px;padding:8px 12px;border-radius:14px;color:#fff;transition:transform .3s}
#lp-game .lp-band .lp-ico{font-size:30px;text-align:center}
#lp-game .lp-band b{font-size:19px;display:block}
#lp-game .lp-band small{font-size:14px;opacity:.95}
#lp-game .lp-band .lp-prob{font-size:22px;font-weight:700;text-align:right;white-space:nowrap}
#lp-game .lp-band .lp-prob small{display:block;font-size:13px;font-weight:500}
#lp-game .lp-band.lp-hit{transform:scale(1.03);box-shadow:0 0 0 4px #fff,0 0 0 7px var(--ink)}
#lp-game .lp-b-hurricane{background:var(--hur)} #lp-game .lp-b-storm{background:var(--sto)}
#lp-game .lp-b-bad{background:var(--bad)} #lp-game .lp-b-good{background:var(--good)}
#lp-game .lp-b-glorious{background:var(--glo);color:#3a2a00}
#lp-game .lp-fmt{display:inline-flex;background:#eef6fb;border-radius:30px;padding:3px;margin-left:auto}
#lp-game .lp-fmt button{background:transparent;padding:4px 10px;border-radius:30px;font-size:14px;color:var(--ink)}
#lp-game .lp-fmt button.lp-on{background:var(--sea2);color:#fff}

/* ---------- pay table ---------- */
#lp-game table.lp-pay{width:100%;border-collapse:separate;border-spacing:0 5px;font-size:16px;margin:0}
#lp-game table.lp-pay th{font-size:14px;color:var(--muted);font-weight:500;text-align:center;padding:2px 4px;border:0;background:none}
#lp-game table.lp-pay td{text-align:center;padding:7px 4px;background:#f2f8fc;border:0}
#lp-game table.lp-pay td:first-child{text-align:left;border-radius:10px 0 0 10px;font-weight:600;padding-left:10px}
#lp-game table.lp-pay td:last-child{border-radius:0 10px 10px 0;font-size:14px;color:var(--muted)}
#lp-game table.lp-pay tr.lp-hit td{background:#ffe9a8}
#lp-game .lp-dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px;vertical-align:middle}

/* ---------- dice ---------- */
#lp-game .lp-dice{display:flex;gap:24px;justify-content:center;align-items:center;min-height:130px;margin:6px 0 10px}
#lp-game .lp-die{width:104px;height:104px;border-radius:22px;background:linear-gradient(145deg,#fff,#e7eef4);box-shadow:0 6px 0 #b9c9d6,0 10px 20px rgba(0,0,0,.15);position:relative;display:flex;align-items:center;justify-content:center}
#lp-game .lp-die.lp-poly{border-radius:16px;background:linear-gradient(145deg,#ff8a5b,var(--lob));box-shadow:0 6px 0 #a3301c,0 10px 20px rgba(0,0,0,.15);color:#fff}
#lp-game .lp-die.lp-poly.lp-d2nd{background:linear-gradient(145deg,#53c3ff,var(--sea2));box-shadow:0 6px 0 #0b4f7c,0 10px 20px rgba(0,0,0,.15)}
#lp-game .lp-die .lp-num{font-size:48px;font-weight:700}
#lp-game .lp-die .lp-tag{position:absolute;bottom:6px;right:10px;font-size:13px;opacity:.85}
#lp-game .lp-die.lp-rolling{animation:lp-tumble .9s ease-in-out}
#lp-game .lp-pips{position:absolute;inset:14px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr)}
#lp-game .lp-pips i{width:18px;height:18px;border-radius:50%;background:var(--ink);place-self:center;visibility:hidden}
#lp-game .lp-pips i.lp-on{visibility:visible}
#lp-game .lp-plus{font-size:34px;font-weight:700;color:var(--muted)}
#lp-game .lp-total{font-size:42px;font-weight:700;min-width:70px;text-align:center}
#lp-game .lp-verdict{text-align:center;border-radius:16px;padding:12px;font-size:26px;font-weight:700;color:#fff;animation:lp-pop .5s;margin-bottom:10px}
#lp-game .lp-verdict small{display:block;font-size:16px;font-weight:500}
#lp-game .lp-live{background:#f4f9fc;border-radius:14px;padding:10px 12px;margin-top:10px}
#lp-game .lp-live .lp-nums{display:flex;flex-wrap:wrap;gap:5px;margin:4px 0 8px}
#lp-game .lp-live .lp-nums button{width:38px;height:38px;border-radius:10px;background:#fff;border:2px solid #cfe2ee;font-size:17px;font-weight:600;color:var(--ink)}
#lp-game .lp-live .lp-nums button.lp-on{background:var(--sea2);border-color:var(--sea2);color:#fff}

/* ---------- sample space ---------- */
#lp-game .lp-ss-wrap{overflow-x:auto;padding-bottom:4px}
#lp-game table.lp-ss{border-collapse:separate;border-spacing:3px;margin:0 auto;font-size:15px}
#lp-game table.lp-ss th{background:none;border:0;color:var(--muted);font-weight:600;padding:2px;min-width:30px;text-align:center}
#lp-game table.lp-ss td{width:34px;height:30px;text-align:center;color:#fff;font-weight:600;border-radius:7px;border:0;padding:0}
#lp-game table.lp-ss td.lp-hit{outline:3px solid var(--ink);animation:lp-pop .5s}
#lp-game table.lp-ss.lp-small td{width:24px;height:22px;font-size:12px;border-radius:5px}
#lp-game table.lp-ss.lp-small th{min-width:22px;font-size:12px}
#lp-game .lp-ss-cap{text-align:center;color:var(--muted);font-size:14px;margin-top:6px}

/* ---------- teacher panel ---------- */
#lp-game details.lp-teacher{background:#fff8ec;border:2px dashed #f0c27a;border-radius:var(--radius);padding:12px 16px;margin-bottom:16px}
#lp-game details.lp-teacher>summary{font-size:19px;font-weight:600;cursor:pointer;list-style:none}
#lp-game details.lp-teacher summary::-webkit-details-marker{display:none}
#lp-game details summary:before{content:"▸ ";color:var(--lob)}
#lp-game details[open]>summary:before{content:"▾ "}
#lp-game .lp-presets{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
#lp-game .lp-presets button{background:#fff;border:2px solid #f0c27a;border-radius:30px;padding:6px 12px;font-size:15px;color:var(--ink)}
#lp-game .lp-presets button:hover{background:#ffefcf}
#lp-game .lp-set{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px;margin-top:8px}
#lp-game .lp-setrow{display:flex;align-items:center;gap:8px;background:#fff;border-radius:12px;padding:6px 10px}
#lp-game .lp-setrow label{flex:1;font-size:15px}
#lp-game .lp-step{display:inline-flex;align-items:center;gap:4px}
#lp-game .lp-step button{width:30px;height:30px;border-radius:50%;background:#eef6fb;font-size:18px;font-weight:700;color:var(--ink)}
#lp-game .lp-step span{min-width:30px;text-align:center;font-weight:700;font-size:17px}
#lp-game .lp-toggle{display:inline-flex;align-items:center;gap:6px;font-size:15px;cursor:pointer}
#lp-game .lp-toggle input{width:18px;height:18px;accent-color:var(--lob)}
#lp-game select.lp-sel{border:2px solid #cfe2ee;border-radius:10px;padding:4px 8px;background:#fff}
#lp-game input.lp-text{border:2px solid #cfe2ee;border-radius:10px;padding:6px 10px;width:100%;background:#fff}
#lp-game .lp-note{font-size:14px;color:var(--muted);margin-top:6px}

/* ---------- fleet ---------- */
#lp-game .lp-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
#lp-game .lp-stat{background:#eef6fb;border-radius:14px;padding:8px;text-align:center}
#lp-game .lp-stat b{display:block;font-size:26px}
#lp-game .lp-stat span{font-size:14px;color:var(--muted)}
#lp-game .lp-split{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;margin:8px 0}
#lp-game .lp-side{border-radius:14px;padding:10px;text-align:center;color:#fff}
#lp-game .lp-side.lp-in{background:linear-gradient(160deg,#5fc8b0,#2f9e88)}
#lp-game .lp-side.lp-off{background:linear-gradient(160deg,#3a8fd1,#1b5c95)}
#lp-game .lp-side b{display:block;font-size:34px}
#lp-game .lp-side small{font-size:14px}
#lp-game .lp-arrows{display:flex;flex-direction:column;gap:6px}
#lp-game .lp-arrows button{width:46px;height:38px;border-radius:12px;background:#eef6fb;font-size:18px;font-weight:700;color:var(--ink)}
#lp-game input[type=range].lp-range{width:100%;accent-color:var(--sea2)}
#lp-game .lp-msg{background:#fff3cd;border-radius:12px;padding:8px 12px;font-size:16px;margin:8px 0;animation:lp-pop .4s}
#lp-game .lp-msg.lp-good{background:#d9f5e5}
#lp-game .lp-msg.lp-bad{background:#fde1dc}

/* ---------- sheet ---------- */
#lp-game .lp-sheet-wrap{overflow-x:auto}
#lp-game table.lp-sheet{border-collapse:collapse;width:100%;font-size:14px;min-width:820px;margin:0}
#lp-game table.lp-sheet th{background:var(--sea1);color:#fff;font-weight:500;padding:6px 4px;font-size:13px;border:1px solid #0a4268;text-align:center;vertical-align:bottom}
#lp-game table.lp-sheet td{border:1px solid #d5e4ee;padding:5px 4px;text-align:center;background:#fff}
#lp-game table.lp-sheet tr:nth-child(even) td{background:#f6fbfe}
#lp-game table.lp-sheet td.lp-neg{color:#c0392b;font-weight:600}
#lp-game table.lp-sheet tfoot td{font-weight:700;background:var(--sand)!important}

/* ---------- end ---------- */
#lp-game .lp-final{text-align:center;padding:10px}
#lp-game .lp-final .lp-money{font-size:56px;font-weight:700;color:var(--good)}
#lp-game .lp-rivals{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-top:12px}
#lp-game .lp-rival{background:#eef6fb;border-radius:14px;padding:10px;text-align:center}
#lp-game .lp-rival.lp-you{background:#ffe9a8}
#lp-game .lp-rival b{display:block;font-size:22px}
#lp-game .lp-confetti{position:fixed;top:-20px;width:10px;height:14px;z-index:99999;pointer-events:none;animation:lp-fall linear forwards}
@keyframes lp-fall{to{transform:translateY(110vh) rotate(720deg)}}
#lp-game .lp-hide{display:none!important}

@media (max-width:860px){
  #lp-game .lp-grid,#lp-game .lp-start{grid-template-columns:1fr}
  #lp-game .lp-title h2{font-size:32px}
  #lp-game .lp-banner{height:160px}
  #lp-game .lp-boat{left:38%;width:96px}
  #lp-game .lp-sun{right:24px;width:48px;height:48px}
}
@media (max-width:520px){
  #lp-game .lp-title{left:14px;top:12px}
  #lp-game .lp-title h2{font-size:28px}
  #lp-game .lp-title p{font-size:14px}
  #lp-game .lp-lobster{width:64px;right:10px}
  #lp-game .lp-die{width:84px;height:84px}
  #lp-game .lp-die .lp-num{font-size:38px}
  #lp-game .lp-pips i{width:14px;height:14px}
  #lp-game .lp-dice{gap:12px}
  #lp-game .lp-headline{font-size:19px}
  #lp-game .lp-band{grid-template-columns:34px 1fr auto;padding:7px 9px}
  #lp-game .lp-band .lp-ico{font-size:24px}
  #lp-game .lp-band b{font-size:17px}
  #lp-game .lp-band .lp-prob{font-size:18px}
  #lp-game .lp-strip span{font-size:12px}
  #lp-game .lp-day{min-width:40px;font-size:11px}
  #lp-game .lp-day b{font-size:15px}
  #lp-game .lp-card{padding:14px 12px}
}
@media (prefers-reduced-motion:reduce){
  #lp-game *{animation-duration:.01s!important;animation-iteration-count:1!important}
}

/* ---------- class rooms ---------- */
#lp-game .lp-start.lp-start3{grid-template-columns:repeat(3,1fr)}
#lp-game .lp-joinbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:linear-gradient(90deg,#fff3e0,#ffe2d6);border:3px solid var(--lob2);border-radius:var(--radius);padding:12px 16px;margin-bottom:16px;font-size:17px}
#lp-game .lp-joinbar .lp-text{width:auto}
#lp-game .lp-err{flex-basis:100%;color:#b02e1a;font-weight:600}
#lp-game .lp-msg.lp-pir{background:#2b2b3a;color:#ffe08a}
#lp-game .lp-roompanel{border:3px solid var(--sea3)}
#lp-game .lp-codebox{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
#lp-game .lp-url{font-size:18px;font-weight:600;word-break:break-all}
#lp-game .lp-code{font-size:56px;font-weight:700;letter-spacing:8px;color:#fff;background:linear-gradient(135deg,var(--lob),var(--lob2));padding:4px 22px;border-radius:16px;box-shadow:0 4px 0 #b02e1a}
#lp-game .lp-net{background:#fde1dc;color:#8a2a1a;border-radius:10px;padding:6px 10px;margin:6px 0;font-weight:600}
#lp-game .lp-teams{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
#lp-game .lp-team{display:grid;grid-template-columns:auto 1fr auto;gap:2px 8px;align-items:center;background:#f2f8fc;border-radius:12px;padding:8px 10px;border:2px solid transparent;font-size:15px}
#lp-game .lp-team b{grid-column:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#lp-game .lp-roompanel .lp-team>span:nth-of-type(2){grid-column:2}
#lp-game .lp-roompanel .lp-team .lp-sub{grid-column:2;font-size:13px}
#lp-game .lp-team.lp-ready{background:#e2f7ea;border-color:#9ddcb5}
#lp-game .lp-team.lp-wait{background:#fff6e5;border-color:#f3d39a}
#lp-game .lp-seen{width:12px;height:12px;border-radius:50%;background:#b8c4cc;grid-row:1/span 3}
#lp-game .lp-seen.lp-on{background:#2fa866;box-shadow:0 0 0 3px rgba(47,168,102,.25)}
#lp-game .lp-seen.lp-idle{background:#f2a900}
#lp-game .lp-kick{grid-column:3;grid-row:1;background:transparent!important;color:#9aa9b5;font-size:16px;padding:2px 6px}
#lp-game .lp-kick:hover{color:var(--lob)}
#lp-game .lp-teamhead{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
#lp-game .lp-teamname{font-size:26px;font-weight:700;color:var(--sea1)}
#lp-game .lp-pirbox{background:#2b2b3a;color:#fff;border-radius:14px;padding:10px 12px;margin-top:12px}
#lp-game .lp-pirbox .lp-sub{color:#cfd6e6}
#lp-game .lp-pirbox .lp-toggle{color:#fff}
#lp-game .lp-pirbox .lp-nums button{background:#3c3c52;border-color:#55557a;color:#fff}
#lp-game .lp-pirbox .lp-nums button.lp-on{background:#ffd166;border-color:#ffd166;color:#2b2b3a}
#lp-game .lp-pirbox select{max-width:100%}
#lp-game .lp-facts{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
#lp-game .lp-facts span{background:#eef6fb;border-radius:10px;padding:5px 9px;font-size:14px}
#lp-game .lp-cells{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:6px}
#lp-game .lp-cells label{display:flex;flex-direction:column;gap:3px;font-size:14px;background:#f6fbfe;border-radius:12px;padding:7px 8px;border:2px solid transparent}
#lp-game .lp-cells label.lp-wrong{border-color:#e8452c;background:#fde1dc}
#lp-game .lp-inwrap{display:flex;align-items:center;gap:4px}
#lp-game .lp-inwrap i{font-style:normal;font-weight:600}
#lp-game .lp-cells .lp-text{padding:6px 8px;font-size:17px}
@media (max-width:860px){#lp-game .lp-start.lp-start3{grid-template-columns:1fr}#lp-game .lp-code{font-size:40px}}

@media (max-width:520px){
  #lp-game .lp-title p{display:none}
  #lp-game .lp-boat{left:52%;width:80px;bottom:62px}
  #lp-game .lp-banner{height:130px}
  #lp-game .lp-days{flex-wrap:nowrap;overflow-x:auto;padding:4px 2px 6px}
  #lp-game .lp-day{flex:0 0 auto}
  #lp-game .lp-teamname{font-size:22px}
}

/* theme overrides found on the live site */
#lp-game details>summary{list-style:none}
#lp-game details>summary::-webkit-details-marker{display:none}
#lp-game details>summary::marker{content:""}
#lp-game table.lp-sheet{min-width:880px!important;table-layout:auto!important;width:100%!important;max-width:none!important}
#lp-game table.lp-sheet th,#lp-game table.lp-sheet td{word-break:normal!important;overflow-wrap:normal!important}
#lp-game table.lp-sheet td:first-child{white-space:nowrap}
#lp-game .lp-sheet-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
#lp-game .lp-board .lp-team{grid-template-columns:1fr auto}
#lp-game .lp-board .lp-team b{grid-column:1;grid-row:1}
#lp-game .lp-board .lp-team .lp-sub{grid-column:1;grid-row:2;font-size:13px}
#lp-game .lp-board .lp-team>span:last-child{grid-column:2;grid-row:1/span 2;font-size:17px}
/* editable row in the sheet */
#lp-game table.lp-sheet tr.lp-editrow td{background:#fff8e1!important}
#lp-game table.lp-sheet td.lp-edit{white-space:nowrap;padding:4px 3px}
#lp-game table.lp-sheet td.lp-edit i{font-style:normal;font-weight:600;margin-right:2px}
#lp-game table.lp-sheet td.lp-edit input{width:62px!important;max-width:62px!important;min-width:0!important;display:inline-block!important;padding:5px 4px!important;margin:0!important;font-size:15px!important;border:2px solid var(--sea3)!important;border-radius:8px!important;text-align:center;background:#fff!important;height:auto!important;box-shadow:none!important}
#lp-game table.lp-sheet td.lp-edit.lp-wrong{background:#fde1dc!important}
#lp-game table.lp-sheet td.lp-edit.lp-wrong input{border-color:#e8452c!important}
#lp-game .lp-checkbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:10px}
#lp-game .lp-checkbar .lp-msg{flex-basis:100%;margin:0}

#lp-game table.lp-sheet td.lp-mk-ok{background:#dcf5e3!important;color:#11693a;font-weight:600}
#lp-game table.lp-sheet td.lp-mk-bad{background:#fde1dc!important;color:#b3261e;line-height:1.25}
#lp-game table.lp-sheet td.lp-mk-bad s{display:block;opacity:.75;font-size:.85em}
#lp-game table.lp-sheet td.lp-mk-bad b{display:block;color:#1f2a3a}
#lp-game table.lp-sheet td.lp-mk-ok small.lp-plusb{display:block;font-size:.78em;font-weight:500;color:#7a5a00;white-space:nowrap}
#lp-game table.lp-sheet td.lp-mk-ok small.lp-plusb b{color:#11693a}
#lp-game table.lp-sheet td.lp-mk small.lp-kn{display:block;font-size:.72em;font-weight:500;color:#8a5a00}
#lp-game table.lp-sheet td.lp-mk-bad small.lp-plusb{display:block;font-size:.78em;font-weight:500;color:#7a5a00;white-space:nowrap}

/* ---------- pupil island scene ---------- */
#lp-game .lp-island{position:relative;border-radius:var(--radius);overflow:hidden;margin-bottom:14px;box-shadow:0 6px 20px rgba(11,79,124,.25);background:#0b4f7c}
#lp-game .lp-isl-svg{display:block;width:100%;height:auto}
#lp-game .lp-isl-svg text{font-family:inherit}
#lp-game .lp-isl-zone{font-size:20px;font-weight:800;letter-spacing:4px;fill:rgba(255,255,255,.55)}
#lp-game .lp-bob{animation:lpBob 3.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes lpBob{0%,100%{transform:translateY(0) rotate(-1.5deg)}50%{transform:translateY(5px) rotate(1.5deg)}}
#lp-game .lp-isl-cloud{animation:lpDrift 40s linear infinite}
@keyframes lpDrift{from{transform:translateX(-60px)}to{transform:translateX(60px)}}
#lp-game .lp-isl-sun{animation:lpPulse 4s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes lpPulse{50%{transform:scale(1.08)}}
#lp-game .lp-isl-wave{animation:lpWave 6s linear infinite}
@keyframes lpWave{from{transform:translateX(0)}to{transform:translateX(-40px)}}
#lp-game .lp-isl-rain{animation:lpRainFall .6s linear infinite}
@keyframes lpRainFall{from{transform:translateY(-40px)}to{transform:translateY(0)}}
#lp-game .lp-isl-hurricane .lp-bob{animation-duration:1.4s}
#lp-game .lp-isl-storm .lp-bob{animation-duration:2s}
#lp-game .lp-isl-top{position:absolute;left:10px;right:10px;top:10px;display:flex;flex-wrap:wrap;gap:6px}
#lp-game .lp-isl-bottom{position:absolute;left:10px;right:10px;bottom:10px;display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between;align-items:flex-end}
#lp-game .lp-isl-chip,#lp-game .lp-isl-fc,#lp-game .lp-isl-key{background:rgba(255,255,255,.9);color:#12324a;border-radius:999px;padding:5px 12px;font-weight:700;font-size:14px;box-shadow:0 2px 6px rgba(0,0,0,.15)}
#lp-game .lp-isl-name{background:#e8452c;color:#fff}
#lp-game .lp-isl-fc{border-radius:12px;max-width:70%}
#lp-game .lp-isl-res{color:#fff;border-radius:12px;padding:7px 14px;font-weight:800;font-size:17px;box-shadow:0 2px 8px rgba(0,0,0,.25);animation:lpPop .5s ease-out}
@keyframes lpPop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08)}100%{transform:scale(1);opacity:1}}
#lp-game .lp-isl-key i{display:inline-block;width:11px;height:11px;border-radius:50%;margin:0 4px 0 8px;vertical-align:-1px}
#lp-game .lp-isl-key i:first-child{margin-left:0}
/* drop-down sections under the sheet */
#lp-game details.lp-drop{background:#fff;border-radius:var(--radius);margin:0 0 10px;box-shadow:0 3px 12px rgba(11,79,124,.12);overflow:hidden}
#lp-game details.lp-drop>summary{list-style:none;cursor:pointer;display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;justify-content:space-between;padding:13px 16px;font-weight:800;font-size:17px;color:#12324a}
#lp-game details.lp-drop>summary::-webkit-details-marker{display:none}
#lp-game details.lp-drop>summary::marker{content:''}
#lp-game details.lp-drop>summary::after{content:'▾';transition:transform .2s;color:var(--sea2)}
#lp-game details.lp-drop[open]>summary::after{transform:rotate(180deg)}
#lp-game details.lp-drop>summary .lp-drop-t{flex:1}
#lp-game details.lp-drop>summary .lp-drop-h{font-weight:600;font-size:13px;color:#5d7486;background:#eef6fb;border-radius:999px;padding:3px 10px}
#lp-game details.lp-drop>.lp-card{box-shadow:none;margin:0;border-radius:0;border-top:1px solid #e3eef5}
#lp-game details.lp-drop>.lp-card>h3:first-child{display:none}
@media (max-width:620px){
  #lp-game .lp-isl-chip,#lp-game .lp-isl-fc,#lp-game .lp-isl-key{font-size:12px;padding:4px 9px}
  #lp-game .lp-isl-fc{max-width:100%}
  #lp-game .lp-isl-res{font-size:14px}
  #lp-game .lp-isl-zone{font-size:22px}
}
#lp-game details.lp-drop>summary::before{display:none!important;content:none!important}
#lp-game details.lp-drop>summary{position:relative;padding-right:40px}
#lp-game details.lp-drop>summary::after{position:absolute;right:16px;top:14px}
@media (max-width:620px){#lp-game details.lp-drop>summary{flex-direction:column;align-items:flex-start}#lp-game details.lp-drop>summary .lp-drop-h{max-width:100%}}

/* ---------- HUD over the island ---------- */
#lp-game .lp-island .lp-isl-svg{position:absolute;inset:0;width:100%;height:100%}
#lp-game .lp-isl-top{z-index:2;pointer-events:none}
#lp-game .lp-isl-top>*{pointer-events:auto}
#lp-game .lp-isl-line{flex-basis:100%;display:flex}
#lp-game .lp-isl-key{position:absolute;right:0;top:0}
#lp-game .lp-hud{position:absolute;left:50%;transform:translateX(-50%);bottom:12px;z-index:3;display:flex;gap:6px;flex-wrap:wrap;justify-content:center;width:max-content;max-width:calc(100% - 16px)}
#lp-game .lp-hud-btn{position:relative;border:0;cursor:pointer;background:rgba(255,255,255,.94);color:#12324a;font:inherit;font-weight:800;font-size:15px;padding:9px 14px;border-radius:999px;box-shadow:0 3px 0 rgba(11,79,124,.35),0 4px 12px rgba(0,0,0,.2);text-decoration:none;line-height:1.1}
#lp-game .lp-hud-btn:hover{transform:translateY(-1px)}
#lp-game .lp-hud-btn.lp-on{background:#12324a;color:#fff}
#lp-game .lp-hud-btn i{font-style:normal;position:absolute;top:-7px;right:-5px;background:#2fa866;color:#fff;font-size:11px;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px}
#lp-game .lp-hud-btn.lp-hud-need i{background:#e8452c}
#lp-game .lp-hud-btn.lp-hud-need:not(.lp-on){animation:lpNeed 1.6s ease-in-out infinite}
@keyframes lpNeed{50%{box-shadow:0 3px 0 rgba(11,79,124,.35),0 0 0 6px rgba(255,209,102,.7)}}
#lp-game .lp-hud-panel{position:absolute;z-index:4;right:12px;top:12px;max-height:calc(100% - 80px);width:min(400px,calc(100% - 24px));overflow:auto;background:#fff;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.3)}
@keyframes lpPanel{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
#lp-game .lp-hud-panel>.lp-card{box-shadow:none;margin:0;border-radius:16px}
#lp-game .lp-hud-panel .lp-grid{display:block}
#lp-game .lp-hud-x{position:sticky;top:8px;float:right;margin:8px 8px 0 0;z-index:2;border:0;background:#eef6fb;color:#12324a;width:32px;height:32px;border-radius:50%;font-size:16px;cursor:pointer}
@media (max-width:620px){
  #lp-game .lp-hud-panel{left:8px;right:8px;width:auto;top:auto;bottom:58px;max-height:64%}
  #lp-game .lp-hud{flex-wrap:nowrap;gap:4px;bottom:10px}
  #lp-game .lp-hud-btn{font-size:12px;padding:8px 9px;white-space:nowrap}
  #lp-game .lp-hud-btn .lp-long{display:none}
  #lp-game .lp-isl-key{display:none}
  #lp-game .lp-island{margin-left:-6px;margin-right:-6px}
}

/* dice falling onto pupils' screens */
#lp-game .lp-drop-ov{position:fixed;inset:0;z-index:99999;background:rgba(8,30,50,.45);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;cursor:pointer;animation:lpOvIn .25s ease-out;transition:opacity .4s}
#lp-game .lp-drop-ov.lp-gone{opacity:0}
@keyframes lpOvIn{from{background:rgba(8,30,50,0)}}
#lp-game .lp-drop-dice{display:flex;gap:34px}
#lp-game .lp-fall .lp-die{width:110px;height:110px;font-size:52px;box-shadow:0 14px 26px rgba(0,0,0,.35)}
#lp-game .lp-fall-a{animation:lpFall 1.35s cubic-bezier(.3,.1,.5,1) both}
#lp-game .lp-fall-b{animation:lpFall 1.35s cubic-bezier(.3,.1,.5,1) .12s both}
@keyframes lpFall{0%{transform:translateY(-75vh) rotate(-260deg) scale(.7)}62%{transform:translateY(0) rotate(12deg) scale(1)}74%{transform:translateY(-38px) rotate(-6deg)}86%{transform:translateY(0) rotate(3deg)}93%{transform:translateY(-10px)}100%{transform:translateY(0) rotate(0)}}
#lp-game .lp-drop-res{opacity:0;transform:scale(.6);color:#fff;border-radius:18px;padding:14px 26px;text-align:center;font-weight:800;font-size:22px;box-shadow:0 10px 30px rgba(0,0,0,.35);max-width:min(90vw,460px)}
#lp-game .lp-drop-res b{font-size:34px}
#lp-game .lp-drop-res span{display:block;font-size:30px;margin-top:4px}
#lp-game .lp-drop-res small{display:block;font-size:15px;font-weight:600;margin-top:4px;opacity:.95}
#lp-game .lp-landed .lp-drop-res{animation:lpPop .45s ease-out forwards}
#lp-game .lp-drop-tap{color:#fff;font-weight:700;opacity:0;font-size:14px}
#lp-game .lp-landed .lp-drop-tap{opacity:.8;transition:opacity .6s .8s}
@media (max-width:620px){#lp-game .lp-fall .lp-die{width:84px;height:84px;font-size:40px}#lp-game .lp-drop-res{font-size:18px}#lp-game .lp-drop-res span{font-size:24px}}

/* piracy pop-ups and raid animation */
#lp-game .lp-crews{flex-basis:100%;display:flex;flex-wrap:wrap;gap:6px;align-items:center;background:#2b2f3a;color:#fff;border-radius:12px;padding:10px 12px}
#lp-game .lp-crews .lp-sub{color:#dfe6ee}
#lp-game .lp-crew{border:2px solid #556;background:#3a3f4d;color:#fff;border-radius:999px;padding:6px 12px;font:inherit;font-weight:700;cursor:pointer}
#lp-game .lp-crew.lp-on{background:#111;border-color:#f2a900}
#lp-game .lp-crew:disabled{opacity:.45;cursor:default}
#lp-game .lp-modal{position:absolute;inset:0;z-index:6;background:rgba(10,20,35,.55);display:flex;align-items:center;justify-content:center;padding:14px}
#lp-game .lp-modal-card{background:#fff;border-radius:18px;max-width:440px;width:100%;max-height:100%;overflow:auto;padding:18px 18px 16px;text-align:center;box-shadow:0 14px 40px rgba(0,0,0,.4)}
#lp-game .lp-modal-pir{background:linear-gradient(180deg,#2b2f3a,#16181f);color:#fff}
#lp-game .lp-modal-pir h3{color:#f2c94c;justify-content:center;margin:2px 0 6px;font-size:24px}
#lp-game .lp-modal-pir p{color:#dfe6ee;margin:0 0 10px}
#lp-game .lp-modal-flag{font-size:44px;animation:lpBob 2s ease-in-out infinite}
#lp-game .lp-pirnums{justify-content:center;margin:10px 0 14px}
#lp-game .lp-pirnums button{min-width:46px;height:46px;font-size:20px}
#lp-game .lp-tgs{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:6px 0 12px}
#lp-game .lp-tg{border:2px solid #556;background:#3a3f4d;color:#fff;border-radius:12px;padding:8px 12px;font:inherit;font-weight:700;cursor:pointer}
#lp-game .lp-tg.lp-on{border-color:#f2c94c;background:#111}
#lp-game .lp-tg:disabled{opacity:.4;cursor:default}
#lp-game .lp-acts{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:14px}
#lp-game .lp-act{border:2px solid #556;background:#3a3f4d;color:#fff;border-radius:12px;padding:8px 6px;font:inherit;cursor:pointer}
#lp-game .lp-act b{display:block;font-size:14px}
#lp-game .lp-act small{display:block;font-size:11px;opacity:.8;margin-top:3px}
#lp-game .lp-act.lp-on{border-color:#f2c94c;background:#111}
#lp-game .lp-raid-ov{position:fixed;inset:0;z-index:99998;background:rgba(8,20,35,.6);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;cursor:pointer;transition:opacity .4s}
#lp-game .lp-raid-ov.lp-gone{opacity:0}
#lp-game .lp-raid-sea{position:relative;width:min(92vw,620px);height:230px;border-radius:20px;overflow:hidden;background:linear-gradient(180deg,#5b6b8c 0%,#8fa3c0 40%,#1f5f8f 41%,#0b2f4f 100%);box-shadow:0 14px 40px rgba(0,0,0,.45)}
#lp-game .lp-raid-me .lp-raid-sea{box-shadow:0 0 0 4px #e8452c,0 14px 40px rgba(0,0,0,.45)}
#lp-game .lp-raid-ship{position:absolute;width:170px;bottom:22px;left:-180px;animation:lpSail 2.2s cubic-bezier(.4,.1,.4,1) forwards}
@keyframes lpSail{0%{left:-180px;transform:rotate(-3deg)}50%{transform:rotate(3deg)}100%{left:calc(100% - 330px);transform:rotate(0)}}
#lp-game .lp-raid-target{position:absolute;width:120px;bottom:26px;right:30px;animation:lpBob 2.4s ease-in-out infinite}
#lp-game .lp-raid-boom{position:absolute;right:120px;bottom:70px;font-size:64px;opacity:0;animation:lpBoom .7s ease-out 2.1s forwards}
@keyframes lpBoom{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.25)}100%{opacity:0;transform:scale(1.6)}}
#lp-game .lp-raid-loot{position:absolute;right:60px;bottom:90px;font-size:30px;opacity:0;animation:lpLoot 1.1s ease-in 2.6s forwards}
@keyframes lpLoot{0%{opacity:1;transform:translate(0,0)}100%{opacity:0;transform:translate(-220px,-30px)}}
#lp-game .lp-raid-names{position:absolute;left:12px;right:12px;top:10px;display:flex;justify-content:space-between;font-weight:800;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.5)}
#lp-game .lp-raid-cap{opacity:0;background:#111;color:#fff;border:3px solid #f2c94c;border-radius:16px;padding:12px 20px;font-size:20px;text-align:center;max-width:min(92vw,560px);animation:lpPop .45s ease-out 2.7s forwards}
#lp-game .lp-raid-cap b{color:#f2c94c}
#lp-game .lp-raid-ov .lp-drop-tap{opacity:.8}
@media (max-width:620px){#lp-game .lp-raid-sea{height:190px}#lp-game .lp-raid-ship{width:130px}#lp-game .lp-raid-target{width:90px;right:14px}@keyframes lpSail{0%{left:-140px}100%{left:calc(100% - 250px)}}#lp-game .lp-acts{grid-template-columns:1fr}}
#lp-game .lp-pirnums{display:flex;flex-wrap:wrap;gap:6px}
#lp-game .lp-pirnums button{border:2px solid #556;background:#3a3f4d;color:#fff;border-radius:12px;font:inherit;font-weight:800;cursor:pointer}
#lp-game .lp-pirnums button.lp-on{background:#f2c94c;color:#111;border-color:#f2c94c}

#lp-game .lp-falls{animation:lpFalls 1s linear infinite}
@keyframes lpFalls{from{transform:translateY(-20px)}to{transform:translateY(0)}}
#lp-game .lp-spark{animation:lpSpark 2.4s ease-in-out infinite}
@keyframes lpSpark{50%{opacity:.1}}
#lp-game .lp-fire{animation:lpFire .5s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:bottom}
@keyframes lpFire{to{transform:scaleY(1.25) scaleX(.85)}}
#lp-game .lp-smoke{animation:lpSmoke 2.5s ease-out infinite}
@keyframes lpSmoke{0%{transform:translateY(0);opacity:.6}100%{transform:translateY(-40px);opacity:0}}
#lp-game .lp-birds{animation:lpBirds 14s linear infinite}
@keyframes lpBirds{0%{transform:translateX(-120px)}50%{transform:translate(60px,-10px)}100%{transform:translateX(240px)}}

/* teacher island scene */
#lp-game .lp-hud-panel.lp-hud-wide{width:min(540px,calc(100% - 24px));top:96px;max-height:calc(100% - 156px)}
@media (max-width:620px){#lp-game .lp-hud-panel.lp-hud-wide{top:12px;max-height:calc(100% - 80px)}}
#lp-game .lp-hud-panel .lp-card{margin:0;box-shadow:none}
#lp-game .lp-hud-panel .lp-roompanel{border:0}
#lp-game .lp-isl-code b{font-size:20px;letter-spacing:3px;margin-left:4px}
#lp-game .lp-isl-code small{font-weight:600;opacity:.9}
@media (max-width:620px){#lp-game .lp-isl-code b{font-size:16px}#lp-game .lp-isl-code small{display:none}}

/* draggable pop-ups */
#lp-game .lp-hud-grip{display:block;text-align:center;font-size:11px;font-weight:700;letter-spacing:.04em;color:#8aa0b4;padding:5px 40px 0;cursor:move;user-select:none}
#lp-game .lp-hud-panel{cursor:move}
#lp-game .lp-hud-panel .lp-card{cursor:auto}
#lp-game .lp-hud-panel h3,#lp-game .lp-hud-panel .lp-headline{cursor:move}
#lp-game .lp-hud-panel.lp-dragging{opacity:.92;box-shadow:0 16px 40px rgba(0,0,0,.4);user-select:none}
#lp-game .lp-hud-panel>.lp-card{padding-top:4px}
#lp-game .lp-hud-x{z-index:2}
/* forecast pop-up: a bit bigger, compact bands so it opens without a scroll bar */
#lp-game .lp-hud-panel.lp-hud-fc{top:70px;width:min(580px,calc(100% - 24px));max-height:calc(100% - 128px)}
#lp-game .lp-hud-panel .lp-bands{gap:6px}
#lp-game .lp-hud-panel .lp-band{padding:5px 12px;grid-template-columns:36px 1fr auto}
#lp-game .lp-hud-panel .lp-band .lp-ico{font-size:24px}
#lp-game .lp-hud-panel .lp-band b{font-size:17px}
#lp-game .lp-hud-panel .lp-headline{font-size:21px;padding:8px 14px;margin-right:34px}
@media (max-width:620px){#lp-game .lp-hud-grip{display:none}#lp-game .lp-hud-panel,#lp-game .lp-hud-panel h3,#lp-game .lp-hud-panel .lp-headline{cursor:auto}#lp-game .lp-hud-panel.lp-hud-fc{top:12px;max-height:calc(100% - 80px)}}
#lp-game .lp-hud-panel .lp-band b{display:inline}
#lp-game .lp-hud-panel .lp-band small{display:inline;margin-left:8px;opacity:.9}
#lp-game .lp-hud-panel.lp-hud-fc{top:64px;max-height:calc(100% - 120px)}
@media (max-height:780px){#lp-game .lp-hud-panel .lp-headline{font-size:18px;padding:6px 12px;margin-bottom:8px}#lp-game .lp-hud-panel h3{margin:4px 0}#lp-game .lp-hud-panel .lp-strip{margin:2px 0 8px}#lp-game .lp-hud-panel .lp-strip span{padding:6px 0}}
@media (max-height:740px){#lp-game .lp-hud-panel .lp-bands{gap:4px}#lp-game .lp-hud-panel .lp-band{padding:3px 12px}#lp-game .lp-hud-panel.lp-hud-fc{top:58px;max-height:calc(100% - 112px)}}
/* weather settings: one row per weather type */
#lp-game .lp-wset{display:grid;gap:6px;margin-top:8px}
#lp-game .lp-wdice{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#lp-game .lp-wdice .lp-sub{margin-left:auto}
#lp-game .lp-wstrip{margin:4px 0 2px}
#lp-game .lp-wrow{display:grid;grid-template-columns:minmax(150px,1.3fr) 1fr auto;align-items:center;gap:10px;background:#fff;border-radius:12px;padding:6px 10px;border-left:8px solid var(--wc);box-shadow:0 1px 3px rgba(18,50,74,.08)}
#lp-game .lp-wrow.lp-woff{opacity:.55;border-left-color:#d5dde4}
#lp-game .lp-wname{display:flex;align-items:center;gap:8px;font-size:16px;white-space:nowrap}
#lp-game .lp-wname input{width:18px;height:18px;margin:0}
#lp-game .lp-wfix{display:inline-block;width:18px}
#lp-game .lp-wico{font-size:20px}
#lp-game .lp-wrange{font-weight:700;color:#12324a}
#lp-game .lp-wctl{display:flex;align-items:center;gap:6px;justify-content:flex-end;min-width:120px}
#lp-game .lp-wctl small{color:#5d7286}
@media (max-width:520px){#lp-game .lp-wrow{grid-template-columns:1fr auto}#lp-game .lp-wrange{grid-column:1}#lp-game .lp-wctl{grid-column:2;grid-row:1/3}}

/* boat choice in the sheet row */
#lp-game .lp-sheet td.lp-bsel{min-width:200px;font-size:13px}
#lp-game .lp-sheet td.lp-bsel select{width:100%;font:inherit;font-size:13px;padding:5px 4px;border:2px solid #f0a35a;border-radius:8px;background:#fff8ef}
#lp-game .lp-sheet td.lp-bsel small{display:block;margin-top:3px;color:#5d7286}
#lp-game .lp-sheet th.lp-bth{background:#c86a1d}

/* sheet fits the screen (Gareth: the right-hand columns got cut off) */
#lp-game table.lp-sheet{min-width:0!important;font-size:13px}
#lp-game table.lp-sheet th{font-size:12px;padding:5px 2px;line-height:1.15}
#lp-game table.lp-sheet td{padding:4px 2px}
#lp-game table.lp-sheet td.lp-edit{padding:3px 2px}
#lp-game table.lp-sheet td.lp-edit i{margin-right:1px;font-size:12px}
#lp-game table.lp-sheet td.lp-edit input{width:50px!important;max-width:50px!important;font-size:14px!important;padding:4px 2px!important}
#lp-game .lp-sheet td.lp-bsel{min-width:0!important;width:96px;font-size:12px}
#lp-game .lp-sheet td.lp-bsel select{font-size:12px;padding:4px 2px;max-width:96px}
#lp-game .lp-sheet td.lp-bsel small{font-size:11px}
#lp-game table.lp-sheet td.lp-blank{background:#ffe9a8!important}
#lp-game table.lp-sheet td.lp-blank input{border-color:#e8a400!important;box-shadow:0 0 0 3px rgba(232,164,0,.35)!important}
@media (max-width:900px){#lp-game table.lp-sheet{min-width:860px!important}#lp-game .lp-sheet-wrap{box-shadow:inset -14px 0 12px -12px rgba(18,50,74,.35)}}
/* warning pop-ups */
#lp-game .lp-ask{position:fixed;inset:0;z-index:100000;background:rgba(10,20,35,.55);display:flex;align-items:center;justify-content:center;padding:16px}
#lp-game .lp-ask-card{background:#fff;border-radius:18px;max-width:460px;width:100%;padding:20px;box-shadow:0 14px 40px rgba(0,0,0,.4);text-align:center}
#lp-game .lp-ask-card h3{margin:0 0 8px;font-size:22px;justify-content:center}
#lp-game .lp-ask-body p{margin:6px 0;font-size:16px;line-height:1.45}
#lp-game .lp-ask-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:14px}
/* ---------- cards (10 Nov 2026) ---------- */
#lp-game .lp-pc{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:44px;height:62px;border-radius:7px;background:#fff;border:1.5px solid #c9d3db;box-shadow:0 2px 5px rgba(0,0,0,.15);color:#1d1d1f;font-family:Georgia,serif;line-height:1;flex:none;vertical-align:middle}
#lp-game .lp-pc b{font-size:20px}
#lp-game .lp-pc i{font-style:normal;font-size:20px}
#lp-game .lp-pc.lp-red{color:#c8102e}
#lp-game .lp-pc-jok{background:linear-gradient(135deg,#fff 0%,#fff2c2 100%)}
#lp-game .lp-pc-jok i{font-size:9px;font-family:inherit;font-weight:800;letter-spacing:.06em;color:#6b3fa0}
#lp-game .lp-pc-back{background:repeating-linear-gradient(45deg,#1479b8 0 6px,#2d8fd0 6px 12px);color:#fff;border-color:#0b4f7c}
#lp-game .lp-pc-big{width:66px;height:94px;border-radius:10px}
#lp-game .lp-pc-big b{font-size:30px}#lp-game .lp-pc-big i{font-size:30px}
#lp-game .lp-pc-big.lp-pc-jok i{font-size:12px}
#lp-game .lp-cref{display:flex;align-items:center;gap:14px;margin:10px 0}
#lp-game .lp-cpair{display:flex;align-items:center;justify-content:center;gap:12px;margin:8px 0 12px}
#lp-game .lp-crules{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
#lp-game .lp-crule{font-size:13px;background:#f4f8fb;border-left:5px solid var(--wc);border-radius:6px;padding:4px 8px}
#lp-game .lp-chips{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0}
#lp-game .lp-chip{min-width:26px;height:30px;padding:0 3px;border-radius:5px;background:#fff;border:1px solid #d5dde4;border-bottom:5px solid var(--wc);display:inline-flex;align-items:center;justify-content:center;font:700 13px Georgia,serif;color:#1d1d1f}
#lp-game .lp-chip.lp-red{color:#c8102e}
#lp-game .lp-seg{display:inline-flex;flex-wrap:wrap;background:#eef6fb;border-radius:20px;padding:3px;gap:2px}
#lp-game .lp-seg button{background:transparent;padding:5px 11px;border-radius:20px;font-size:14px;color:var(--ink)}
#lp-game .lp-seg button.lp-on{background:var(--sea2);color:#fff}
#lp-game .lp-seg button:disabled{opacity:.5}
#lp-game .lp-csrc{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:4px 0 10px;padding:10px;border-radius:12px;background:#fff7e6;border:1px solid #f2d79b}
#lp-game .lp-cset{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
#lp-game .lp-cset .lp-setrow{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#lp-game .lp-cset .lp-setrow>label:first-child{min-width:54px;font-weight:700}
#lp-game .lp-ctab-wrap{overflow-x:auto}
#lp-game table.lp-ctab{border-collapse:collapse;font-size:13px;min-width:640px}
#lp-game .lp-ctab th,#lp-game .lp-ctab td{padding:4px 5px;border-bottom:1px solid #e6edf3;text-align:center}
#lp-game .lp-ctab tr>th:first-child{text-align:left;border-left:5px solid var(--wc,#fff);white-space:nowrap}
#lp-game .lp-cranks{display:flex;flex-wrap:wrap;gap:2px;justify-content:flex-start}
#lp-game .lp-cranks button{min-width:24px;padding:2px 4px;font-size:12px;border-radius:5px;background:#eef2f5;color:var(--ink)}
#lp-game .lp-cranks button.lp-on{background:var(--sea2);color:#fff}
#lp-game .lp-cgrid{display:grid;grid-template-columns:repeat(13,minmax(30px,1fr));gap:3px;margin-top:6px}
#lp-game .lp-cgrid button{padding:5px 0;font:700 13px Georgia,serif;border-radius:5px;background:#fff;border:1px solid #c9d3db;color:#1d1d1f}
#lp-game .lp-cgrid button.lp-red{color:#c8102e}
#lp-game .lp-cgrid button:disabled{opacity:.25}
@media (max-width:620px){#lp-game .lp-cgrid{grid-template-columns:repeat(7,1fr)}}
/* card flip on every screen */
#lp-game .lp-flip{perspective:900px}
#lp-game .lp-flip-in{position:relative;width:150px;height:212px;transform-style:preserve-3d;animation:lpFlip .8s ease-out forwards}
#lp-game .lp-pc-huge{position:absolute;inset:0;width:150px;height:212px;border-radius:16px;backface-visibility:hidden}
#lp-game .lp-pc-huge b{font-size:64px}#lp-game .lp-pc-huge i{font-size:58px}
#lp-game .lp-pc-huge.lp-pc-jok i{font-size:18px}
#lp-game .lp-flip-face{transform:rotateY(180deg)}
@keyframes lpFlip{0%{transform:translateY(-40vh) rotateY(0) rotate(-12deg)}60%{transform:translateY(0) rotateY(0) rotate(4deg)}100%{transform:translateY(0) rotateY(180deg) rotate(0)}}
