/* funyo-kit shared shell styles — neutral, readable on any dark game background.
   Tint the share hover per game by setting --funyo-accent on the share container. */
.funyo-nav { position: fixed; top: 8px; left: 10px; z-index: 9; display: flex; gap: 8px; }
.funyo-back { font: 600 12px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: 1px;
  color: #fff; text-decoration: none; background: rgba(8, 12, 20, 0.66); border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px; padding: 7px 11px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: border-color .12s, color .12s, background .12s; }
.funyo-back:hover { border-color: #9fe8ff; color: #fff; background: rgba(8, 12, 20, 0.85); }

/* top-right sound menu (+ optional reset-scores) */
.funyo-audio { position: fixed; top: 8px; right: 10px; z-index: 9; display: flex; flex-direction: row; align-items: flex-start; gap: 6px; }
.funyo-au-btn { font-size: 14px; line-height: 0; width: 38px; height: 34px; cursor: pointer; color: #fff;
  background: rgba(8, 12, 20, 0.66); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 8px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: inline-flex; align-items: center; justify-content: center; }
.funyo-au-btn:hover { border-color: #9fe8ff; }
.funyo-au-panel { display: none; position: absolute; top: 42px; right: 0; flex-direction: column; gap: 10px; min-width: 178px; padding: 12px;
  background: rgba(8, 12, 20, 0.92); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 10px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.funyo-au-panel.open { display: flex; }
.funyo-au-row { display: flex; align-items: center; gap: 10px; }
.funyo-au-toggle { font-size: 15px; line-height: 0; width: 30px; height: 30px; cursor: pointer; flex: 0 0 auto; color: #fff;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; }
.funyo-au-toggle:hover { border-color: #9fe8ff; }
.funyo-au-slider { flex: 1; min-width: 92px; accent-color: #9fe8ff; cursor: pointer; }
/* reset-scores is its own button (top-right, below the sound button) — NOT part of the sound panel */
.funyo-au-resetbtn { font-size: 15px; line-height: 0; width: 38px; height: 34px; cursor: pointer; color: #ffb4b4;
  background: rgba(8, 12, 20, 0.66); border: 1px solid rgba(255, 120, 120, 0.4); border-radius: 8px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: inline-flex; align-items: center; justify-content: center; }
.funyo-au-resetbtn:hover { color: #fff; background: rgba(255, 90, 90, 0.25); border-color: #ff8a8a; }

/* standard center-top HUD — clears the left nav and the right sound menu; wraps when busy */
.funyo-hud { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: center;
  max-width: calc(100vw - 240px); padding: 6px 16px; border-radius: 10px;
  background: rgba(8, 12, 20, 0.6); border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font: 600 13px/1.1 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: 1px; color: #fff; pointer-events: none; text-align: center; }
.funyo-hud .lbl { display: block; font-size: 9px; letter-spacing: 1.5px; opacity: .5; margin-bottom: 2px; }
@media (max-width: 560px) { .funyo-hud { top: 50px; max-width: calc(100vw - 16px); gap: 8px 14px; padding: 5px 12px; font-size: 12px; } }

/* in-page confirm dialog (reset scores) */
.funyo-confirm { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(5, 8, 13, 0.66); }
.funyo-confirm-box { background: rgba(16, 22, 34, 0.98); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 14px; padding: 20px 22px;
  max-width: min(340px, calc(100vw - 32px)); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  color: #eef2f8; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.funyo-confirm-box p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.funyo-confirm-btns { display: flex; gap: 10px; justify-content: center; }
.funyo-confirm-btns button { font: 600 12px/1 ui-monospace, monospace; letter-spacing: 1px; cursor: pointer; padding: 9px 16px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); color: #eef2f8; }
.funyo-confirm-btns button:hover { border-color: #9fe8ff; }
.funyo-cf-yes { background: rgba(255, 90, 90, 0.2) !important; border-color: #ff8a8a !important; color: #fff !important; }

.funyo-share { display: flex; gap: 9px; justify-content: center; align-items: center; flex-wrap: wrap; --funyo-accent: #9fe8ff; }
/* visual props are !important so a game's broad `#overlay button {…}` rule can't clobber these icon
   buttons (that was collapsing the copy <button>'s icon to zero width). */
.funyo-share .sbtn { appearance: none !important; -webkit-appearance: none !important; font: inherit !important; margin: 0 !important;
  line-height: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 38px !important; height: 38px !important; padding: 0 !important; cursor: pointer !important;
  color: #eaf2fb !important; background: rgba(8, 12, 20, 0.55) !important; border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 9px !important; box-shadow: none !important; text-decoration: none !important; transition: color .12s, border-color .12s, background .12s; }
.funyo-share .sbtn svg { width: 18px !important; height: 18px !important; fill: currentColor !important; display: block !important; }
.funyo-share .sbtn:hover { color: #fff !important; border-color: var(--funyo-accent) !important; background: rgba(8, 12, 20, 0.8) !important; }
.funyo-share .sbtn.ok { color: #7fe0a0 !important; border-color: #7fe0a0 !important; }
