/* ── Honey — hex-pipe puzzle ─────────────────────────────────────────────── */

#canvas-wrap {
  background: #1C1200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;
}

.hn-hide { display: none !important; }

/* ── Screen wrapper ───────────────────────────────────────────────────────── */

.hn-screen {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}

/* ── Start screen ─────────────────────────────────────────────────────────── */

#hn-start {
  justify-content: center;
  padding: 40px 24px 48px;
}

.hn-start-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.hn-start-logo {
  display: block;
  width: 180px;
  max-width: 80%;
  margin: 0 auto 18px;
  filter: drop-shadow(0 0 20px rgba(245, 200, 66, 0.35));
}

.hn-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: rgba(245, 200, 66, 0.55);
  line-height: 1.6;
  margin: 0 0 36px;
  text-align: center;
}

.hn-start-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* ── HUD ──────────────────────────────────────────────────────────────────── */

.hn-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 18px 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(245, 200, 66, 0.4);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Game screen / board ──────────────────────────────────────────────────── */

#hn-game {
  justify-content: flex-start;
}

.hn-board-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 12px 16px;
  box-sizing: border-box;
  min-height: 0;
  position: relative;
}

.hn-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  overflow: visible;
}

/* ── Hex cells ────────────────────────────────────────────────────────────── */

.hn-hex {
  fill: #261500;
  stroke: #C88500;
  stroke-opacity: 0.32;
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.12s;
}

.hn-hex:hover {
  fill: #361e00;
  stroke-opacity: 0.55;
}

/* ── Win screen ───────────────────────────────────────────────────────────── */

#hn-win {
  justify-content: center;
  padding: 40px 24px 48px;
}

.hn-win-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hn-win-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 2.8rem;
  color: #F5C842;
  margin: 0 0 4px;
  text-shadow: 0 0 24px rgba(245, 200, 66, 0.4);
}

.hn-win-headline {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  color: #F5C842;
  margin: 0 0 12px;
}

.hn-win-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: rgba(245, 200, 66, 0.55);
  margin: 0 0 36px;
}

.hn-win-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
  width: 100%;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.hn-btn-primary {
  display: block;
  width: 100%;
  background: #C88500;
  color: #1C1200;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  padding: 15px 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 0 #7a5000, 0 6px 16px rgba(0,0,0,0.5);
  transition: transform 0.07s, box-shadow 0.07s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.hn-btn-primary:hover  { background: #d99200; }
.hn-btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a5000; }

.hn-btn-ghost {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(200, 133, 0, 0.3);
  color: rgba(245, 200, 66, 0.5);
  padding: 14px 0;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.hn-btn-ghost:hover { border-color: rgba(200, 133, 0, 0.6); color: rgba(245, 200, 66, 0.8); }

/* ── Win flash (one-time, triggers once on solve) ────────────────────────── */

.hn-board-wrap.hn-flash .hn-svg {
  animation: hn-board-flash 0.75s ease-out forwards;
}

.hn-board-wrap.hn-flash .hn-hex {
  fill: #2D1800;
  stroke: #F5C842;
  stroke-opacity: 0.9;
}

@keyframes hn-board-flash {
  0%   { filter: none; }
  20%  { filter: brightness(1.9) drop-shadow(0 0 40px rgba(255, 215, 60, 0.95)); }
  55%  { filter: brightness(1.5) drop-shadow(0 0 22px rgba(255, 200, 55, 0.7)); }
  100% { filter: brightness(1.0) drop-shadow(0 0 8px rgba(255, 200, 55, 0.3)); }
}

/* ── Congratulations overlay ─────────────────────────────────────────────── */

.hn-congrats {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: rgba(28, 18, 0, 0.90);
  z-index: 20;
  padding: 40px 32px;
  box-sizing: border-box;
}

.hn-congrats-head {
  font-family: 'DM Serif Display', serif;
  font-size: 2.6rem;
  color: #F5C842;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 32px rgba(245, 200, 66, 0.5);
}

#hn-next-level {
  max-width: 240px;
  width: 100%;
}
