:root {
  --ink: #102a43;
  --muted: #5d7286;
  --blue: #1378d1;
  --blue-deep: #075b9e;
  --cyan: #30bdd1;
  --cream: #f7fbfc;
  --line: rgba(16, 42, 67, .13);
  --shadow: 0 18px 55px rgba(11, 57, 87, .14);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eaf6f7;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% 0%, #fff 0, transparent 34%), linear-gradient(165deg, #f7fcfd 0%, #dff1f1 100%); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1160px, 100%); margin: 0 auto; padding: 24px clamp(18px, 4vw, 52px) 54px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 50% 50% 46% 54%; background: linear-gradient(145deg, var(--cyan), var(--blue)); box-shadow: inset 0 -7px 0 rgba(0,0,0,.08); }
.round-badge { padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.76); border: 1px solid var(--line); font-weight: 700; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(22px, 5vw, 70px); align-items: center; min-height: 310px; }
.eyebrow { color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: .13em; font-size: 13px; }
h1 { font-size: clamp(42px, 7vw, 78px); line-height: .97; letter-spacing: -.055em; margin: 10px 0 18px; }
.lead { color: var(--muted); font-size: clamp(18px, 2.2vw, 23px); line-height: 1.45; max-width: 620px; }
.lake-card { position: relative; min-height: 290px; border-radius: 42% 58% 48% 52% / 52% 45% 55% 48%; overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.9); }
.lake-sky { position: absolute; inset: 0; background: linear-gradient(#e9fbff 0 44%, #b9e6e8 44% 48%, #42b8d2 48% 100%); }
.lake-water { position: absolute; left: 0; right: 0; bottom: 0; height: var(--lake, 100%); max-height: 52%; min-height: 5%; background: linear-gradient(180deg, rgba(57,191,216,.92), #0a73bd); transition: height .8s ease; }
.lake-water::before, .lake-water::after { content: ""; position: absolute; width: 160%; height: 30px; left: -30%; top: -13px; border-radius: 45%; border-top: 4px solid rgba(255,255,255,.58); transform: rotate(-2deg); }
.lake-water::after { top: 8px; left: -20%; opacity: .4; transform: rotate(2deg); }
.hill { position: absolute; bottom: 43%; width: 66%; height: 44%; border-radius: 50% 55% 0 0; background: #79ae86; }
.hill.one { left: -17%; transform: rotate(8deg); }
.hill.two { right: -22%; background: #5d9b79; transform: rotate(-9deg); }
.factory { position: absolute; right: 15%; bottom: 35%; font-size: 58px; filter: drop-shadow(0 6px 3px rgba(0,0,0,.12)); }
.lake-score { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; text-shadow: 0 2px 12px rgba(0,40,70,.35); z-index: 4; transform: translateY(70px); }
.lake-score strong { font-size: 56px; line-height: 1; }
.lake-score span { font-weight: 700; }
.panel { margin-top: 28px; background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.95); border-radius: 26px; box-shadow: var(--shadow); padding: clamp(22px, 4vw, 38px); backdrop-filter: blur(18px); }
.join { max-width: 680px; margin: 34px auto 0; text-align: center; }
.join h2, .section-head h2 { margin: 0; font-size: clamp(27px, 4vw, 42px); letter-spacing: -.035em; }
.join p, .section-head p { color: var(--muted); line-height: 1.5; }
.join-form { display: flex; gap: 10px; margin-top: 22px; }
input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 15px; padding: 15px 17px; color: var(--ink); background: #fff; outline: none; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(19,120,209,.13); }
.primary { border: 0; border-radius: 15px; background: var(--blue); color: #fff; font-weight: 800; padding: 14px 22px; box-shadow: 0 8px 20px rgba(19,120,209,.22); }
.primary:hover { background: var(--blue-deep); }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 20px; }
.status-line { color: var(--muted); text-align: right; }
.strategies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.strategy { position: relative; min-height: 225px; border: 2px solid transparent; border-radius: 22px; padding: 21px; text-align: left; color: var(--ink); background: #f4f8fa; transition: .18s ease; }
.strategy:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(12,64,91,.11); }
.strategy.selected { border-color: var(--blue); background: #edf7ff; box-shadow: 0 0 0 4px rgba(19,120,209,.1); }
.strategy .icon { display: block; font-size: 38px; margin-bottom: 20px; }
.strategy strong { display: block; font-size: 21px; margin-bottom: 8px; }
.strategy small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.payoff { display: inline-block; margin-top: 14px; color: var(--blue-deep); font-weight: 850; font-size: 18px; }
.message { min-height: 24px; margin: 16px 0 0; color: var(--blue-deep); font-weight: 700; }
.waiting { text-align: center; padding: 35px 15px; }
.waiting .pulse { display: inline-block; width: 13px; height: 13px; background: var(--cyan); border-radius: 50%; margin-right: 8px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 125px 1fr 38px; gap: 10px; align-items: center; }
.track { height: 13px; background: #e5eef2; border-radius: 99px; overflow: hidden; }
.fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.score-card { background: #0d3555; color: white; padding: 24px; border-radius: 22px; display: grid; gap: 18px; }
.score-card strong { font-size: 44px; }
.score-card span { color: #c9deea; }
.hidden { display: none !important; }
.rule { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.5; }
.error { color: #ad2442; }

/* Host */
.host .hero { min-height: auto; grid-template-columns: 1fr auto; }
.host h1 { font-size: clamp(40px, 6vw, 70px); }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.metric { background: rgba(255,255,255,.86); border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px rgba(11,57,87,.09); }
.metric span { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; font-size: 32px; margin-top: 7px; }
.host-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.secondary, .danger { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 13px; padding: 12px 16px; font-weight: 750; }
.danger { color: #a1263c; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #bdcbd2; margin-right: 8px; }
.dot.on { background: #2aac75; }
.qr { width: 210px; height: 210px; padding: 10px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.public-url { margin-top: 12px; max-width: 250px; word-break: break-all; text-align: center; font-weight: 750; color: var(--blue-deep); }
@media (max-width: 850px) {
  .hero, .host .hero, .host-grid { grid-template-columns: 1fr; }
  .strategies { grid-template-columns: 1fr 1fr; }
  .lake-card { min-height: 250px; order: -1; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .qr-wrap { display: none; }
}
@media (max-width: 540px) {
  .shell { padding-top: 16px; }
  .topbar { margin-bottom: 10px; }
  .hero { gap: 12px; }
  .lake-card { min-height: 205px; }
  .factory { font-size: 43px; }
  .lake-score { transform: translateY(48px); }
  .lake-score strong { font-size: 44px; }
  .join-form, .section-head { display: grid; }
  .status-line { text-align: left; }
  .strategies { grid-template-columns: 1fr; }
  .strategy { min-height: 150px; }
  .strategy .icon { display: inline-block; margin: 0 13px 12px 0; }
  .result-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 105px 1fr 28px; }
}
