/* coach — the hidden personal coach (unlocked by drawing an 8 on the table).
 * A compact night-ink card docked just above the hand (app.js coachPlace sets `bottom`),
 * a slim pill when minimised, and "Show me" beacons over the hand / pile / deck.
 * Overrides the generic .sheet look; keeps .sheet so swipe-down / Escape still work.
 * Honours prefers-reduced-motion and html[data-quality="low"]. */

:root {
  --cz-bg: rgba(27, 22, 46, 0.95);
  --cz-bg-solid: #1d1731;
  --cz-raise: rgba(255, 255, 255, 0.06);
  --cz-line: rgba(255, 214, 128, 0.22);
  --cz-ink: #fff6e4;
  --cz-dim: rgba(255, 240, 216, 0.68);
  --cz-faint: rgba(255, 240, 216, 0.45);
  --cz-gold: #ffd36a;
  --cz-gold-deep: #e39a1e;
  --cz-safe: #5fd68f;
  --cz-risky: #ffc24a;
  --cz-danger: #ff6f5e;
  --cz-far: #c9a96a;
  --cz-ease: cubic-bezier(0.2, 0.9, 0.25, 1.12);
}

/* ------------------------------------------------------------------ panel */
#coachSheet.coach-panel {
  left: 0; right: 0; bottom: 210px; top: auto;
  width: min(calc(100% - 20px), 420px);
  margin: 0 auto;
  z-index: 58;
  max-height: 60%;
  padding: 5px 12px 12px;
  border: 1px solid var(--cz-line);
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 205, 96, 0.13), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(120, 90, 255, 0.14), transparent 60%),
    var(--cz-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 18px 40px rgba(14, 8, 28, 0.5), 0 2px 0 rgba(255, 235, 190, 0.08) inset;
  color: var(--cz-ink);
  font-family: "Fredoka", system-ui, sans-serif;
  animation: czIn 0.34s var(--cz-ease) both;
  overflow: hidden;
}
#coachSheet.coach-panel.cz-mine { border-color: rgba(255, 214, 128, 0.38); }
#coachSheet.coach-panel.cz-yaniv {
  border-color: rgba(255, 214, 128, 0.7);
  box-shadow: 0 18px 40px rgba(14, 8, 28, 0.5), 0 0 0 3px rgba(255, 205, 96, 0.18), 0 0 30px rgba(255, 190, 60, 0.35);
}
#coachSheet.cz-leaving,
#coachSheet.sheet-leaving {
  opacity: 0 !important;
  transform: translate3d(0, 26px, 0) scale(0.96) !important;
  transition: transform 0.19s cubic-bezier(0.4, 0, 1, 1), opacity 0.19s ease !important;
}
@keyframes czIn {
  from { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.97); }
  to { opacity: 1; transform: none; }
}

#coachSheet .sheet-grip { width: 34px; height: 4px; margin: 0 auto 3px; border-radius: 2px; background: rgba(255, 230, 180, 0.22); }
#coachSheet .cz-head { display: flex; align-items: center; gap: 4px; margin: 0 -4px 6px 0; }
.cz-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.cz-name {
  font-weight: 600; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--cz-gold);
}
.cz-status {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.2px;
  color: var(--cz-dim); background: var(--cz-raise);
}
.cz-status:empty { display: none; }
.cz-status.busy {
  color: var(--cz-ink);
  background: linear-gradient(90deg, rgba(255, 211, 106, 0.08), rgba(255, 211, 106, 0.28), rgba(255, 211, 106, 0.08)) 0 0 / 200% 100%;
  animation: czShimmer 1.3s linear infinite;
}
.cz-status.conf-high { color: #c9f7d9; background: rgba(95, 214, 143, 0.16); }
.cz-status.conf-medium { color: #ffe7ad; background: rgba(255, 211, 106, 0.15); }
.cz-status.conf-low { color: #ffd9a0; background: rgba(255, 168, 60, 0.14); }
@keyframes czShimmer { to { background-position: -200% 0; } }

.cz-icon {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 10px; color: var(--cz-dim); background: transparent;
}
.cz-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cz-icon:focus-visible, .cz-btn:focus-visible, .cz-alt:focus-visible, .coach-mini:focus-visible { outline: 2px solid var(--cz-gold); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .cz-icon:hover { color: var(--cz-ink); background: var(--cz-raise); }
  .cz-btn:hover { filter: brightness(1.08); }
  .cz-alt:hover { background: rgba(255, 255, 255, 0.08); }
}

/* the orb: the coach's "presence" */
.cz-orb {
  flex: none; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe6 0 18%, #ffd36a 40%, #e39a1e 75%, #8a4f06 100%);
  box-shadow: 0 0 8px rgba(255, 200, 80, 0.75), 0 0 0 2px rgba(255, 211, 106, 0.15);
}
.coach-panel:has(.cz-status.busy) .cz-orb, .coach-mini.busy .cz-orb { animation: czOrb 1.1s ease-in-out infinite; }
@keyframes czOrb {
  50% { transform: scale(0.78); box-shadow: 0 0 14px rgba(255, 200, 80, 0.95), 0 0 0 5px rgba(255, 211, 106, 0.1); }
}

.cz-body { overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; }

/* ------------------------------------------------------------ recommendation */
.cz-main { display: flex; align-items: center; gap: 10px; }
.cz-words { flex: 1; min-width: 0; }
.cz-headline {
  font-size: 15.5px; line-height: 1.22; font-weight: 600; color: var(--cz-ink);
  text-wrap: balance;
}
.cz-headline.small { font-size: 14px; font-weight: 500; }
.cz-headline.cz-swap { animation: czSwap 0.36s var(--cz-ease) both; }
@keyframes czSwap { from { opacity: 0; transform: translate3d(0, 6px, 0); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.cz-why {
  margin-top: 3px; font-size: 12.3px; line-height: 1.35; color: var(--cz-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cz-why b { color: var(--cz-gold); font-weight: 600; }

/* move strip: what to throw -> what to take */
.cz-strip {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 7px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--cz-line);
}
.cz-strip .tiny-card { width: 22px; height: 31px; font-size: 11.5px; border-radius: 4px; }
.cz-strip .tiny-card svg { width: 10px; height: 10px; }
.cz-throw { display: inline-flex; }
.cz-throw .tiny-card + .tiny-card { margin-left: -7px; box-shadow: -2px 0 3px rgba(0, 0, 0, 0.25), 0 0 0 0.5px rgba(30, 20, 10, 0.32); }
.cz-arrow { width: 12px; height: 12px; position: relative; }
.cz-arrow::before {
  content: ""; position: absolute; inset: 2px 3px 2px 0;
  border-right: 2px solid var(--cz-gold); border-bottom: 2px solid var(--cz-gold);
  transform: rotate(-45deg); border-radius: 1px;
}
.cz-tgt { display: inline-flex; }
.cz-deckico i {
  display: block; width: 22px; height: 31px; border-radius: 4px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 5px),
    linear-gradient(160deg, #6fd3ff, #1c8fd1 60%, #0b5e95);
  box-shadow: 0 0 0 1.5px #fff inset, 0 0 0 0.5px rgba(0, 30, 60, 0.6), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.cz-yv {
  font-family: Bangers, Impact, sans-serif; font-size: 19px; letter-spacing: 1px; line-height: 31px; padding: 0 3px;
  color: var(--cz-gold); text-shadow: 0 0 10px rgba(255, 190, 60, 0.7);
}

/* skeleton while the first answer is computed (<150ms, rarely seen) */
.cz-skel i { display: block; width: 22px; height: 31px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.cz-skel-line { height: 16px; width: 78%; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)) 0 0 / 200% 100%; animation: czShimmer 1.1s linear infinite; }

/* left column: move strip + its numbers */
.cz-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cz-stats { font-size: 10.5px; color: var(--cz-faint); white-space: nowrap; }
.cz-stats b { font-size: 11.5px; font-weight: 600; color: var(--cz-ink); font-variant-numeric: tabular-nums; }
.cz-stats.is-thinking b { opacity: 0.7; }

/* footer: Yaniv meter + actions on one row */
.cz-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cz-foot .cz-meter { flex: 1; min-width: 0; }
.cz-foot .cz-acts { flex: none; margin: 0; }

/* Yaniv meter: label + verdict over a bar */
.cz-row { margin-top: 9px; }
.cz-meter { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 8px; font-size: 11px; }
.cz-meter .cz-ml { grid-area: 1 / 1; }
.cz-meter .cz-mv { grid-area: 1 / 2; justify-self: end; overflow: hidden; text-overflow: ellipsis; }
.cz-meter .cz-mbar { grid-area: 2 / 1 / 3 / 3; }
.cz-ml { font-size: 9.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cz-faint); white-space: nowrap; }
.cz-mbar { position: relative; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.cz-mbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--zc, var(--cz-far)); transition: width 0.5s var(--cz-ease); }
.cz-mbar b { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.28); }
.cz-mv { font-weight: 600; color: var(--zc, var(--cz-far)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cz-meter.safe { --zc: var(--cz-safe); }
.cz-meter.risky { --zc: var(--cz-risky); }
.cz-meter.danger { --zc: var(--cz-danger); }
.cz-meter.far { --zc: var(--cz-far); }
.cz-meter.safe .cz-mbar i { box-shadow: 0 0 10px rgba(95, 214, 143, 0.6); }

/* actions */
.cz-acts { display: flex; gap: 6px; margin-top: 10px; }
.cz-btn {
  flex: none; min-height: 38px; min-width: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; border: 1px solid var(--cz-line); background: var(--cz-raise);
  color: var(--cz-ink); font: 600 13.5px/1 "Fredoka", system-ui, sans-serif; letter-spacing: 0.2px;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cz-btn:active { transform: scale(0.97); }
.cz-btn.primary {
  color: #3a2306; border-color: rgba(255, 240, 200, 0.55);
  background: linear-gradient(180deg, #ffe395, #f6bb45 58%, #dd8f17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 5px 14px rgba(240, 170, 40, 0.32);
}
.cz-btn.ghost { background: transparent; color: var(--cz-dim); }
.cz-btn.icon { padding: 0; width: 38px; }
.cz-bars { display: grid; gap: 2.5px; width: 14px; }
.cz-bars i { display: block; height: 2.5px; border-radius: 2px; background: currentColor; }
.cz-bars i:nth-child(2) { width: 75%; }
.cz-bars i:nth-child(3) { width: 45%; }
.cz-btn.ghost[aria-expanded="true"] { color: var(--cz-gold); border-color: rgba(255, 214, 128, 0.45); }
.cz-spark {
  width: 12px; height: 12px; background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* alternatives with bars */
.cz-alts { display: grid; gap: 4px; margin-top: 10px; }
.cz-alt {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px;
  padding: 5px 8px 5px 5px; border-radius: 11px; text-align: left;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.04); color: var(--cz-ink);
  font: 500 12px/1.2 "Fredoka", system-ui, sans-serif;
}
.cz-alt.is-best { border-color: var(--cz-line); background: rgba(255, 211, 106, 0.08); }
.cz-alt .cz-strip { padding: 3px 4px; border-radius: 8px; gap: 3px; }
.cz-alt .cz-strip .tiny-card, .cz-alt .cz-deckico i { width: 17px; height: 24px; font-size: 9.5px; }
.cz-alt .cz-strip .tiny-card svg { width: 8px; height: 8px; }
.cz-alt .cz-yv { font-size: 14px; line-height: 24px; }
.cz-alt .cz-arrow { width: 9px; }
.cz-alt-l { color: var(--cz-dim); white-space: nowrap; }
.cz-alt-bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.cz-alt-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e39a1e, #ffd36a); }
.cz-alt:not(.is-best) .cz-alt-bar i { background: linear-gradient(90deg, rgba(255, 211, 106, 0.35), rgba(255, 211, 106, 0.6)); }
.cz-alt-d { min-width: 52px; text-align: right; font-size: 11px; color: var(--cz-faint); font-variant-numeric: tabular-nums; }
.cz-alt.is-best .cz-alt-d { color: var(--cz-gold); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 10px; }
.cz-more { margin: 8px 0 0; padding-left: 16px; font-size: 11.5px; line-height: 1.4; color: var(--cz-dim); }
.cz-more li::marker { color: var(--cz-gold); }

/* ------------------------------------------------------- opponents' turns */
.cz-main.idle .cz-headline { color: var(--cz-ink); }
.cz-opps { display: flex; gap: 6px; margin-top: 9px; }
.cz-opp {
  flex: 1 1 0; min-width: 0;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 4px 6px;
  padding: 6px 7px; border-radius: 11px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.06);
}
.cz-opp.is-turn { border-color: rgba(255, 214, 128, 0.4); background: rgba(255, 211, 106, 0.07); }
.cz-ava {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: #fff;
  background: linear-gradient(160deg, hsl(var(--hue) 48% 52%), hsl(var(--hue) 52% 34%));
}
.cz-on { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.cz-on b { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-on small { font-size: 10px; color: var(--cz-faint); white-space: nowrap; }
.cz-known { display: inline-flex; gap: 2px; }
.cz-known .tiny-card { width: 15px; height: 21px; font-size: 8.5px; border-radius: 3px; }
.cz-known .tiny-card svg { width: 7px; height: 7px; }
.cz-risk { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.cz-risk i { display: block; height: 100%; border-radius: inherit; background: var(--zc, var(--cz-safe)); }
.cz-risk.safe { --zc: var(--cz-safe); }
.cz-risk.risky { --zc: var(--cz-risky); }
.cz-risk.danger { --zc: var(--cz-danger); }

/* ------------------------------------------------------------- mini pill */
.coach-mini {
  position: absolute; left: 0; right: 0; bottom: 210px; z-index: 58;
  width: max-content; max-width: calc(100% - 24px); margin: 0 auto;
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 11px;
  border-radius: 99px; border: 1px solid var(--cz-line);
  background: var(--cz-bg); color: var(--cz-ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(14, 8, 28, 0.45);
  font: 600 13px/1 "Fredoka", system-ui, sans-serif;
  animation: czPill 0.32s var(--cz-ease) both;
}
.coach-mini.cz-mine { border-color: rgba(255, 214, 128, 0.5); box-shadow: 0 10px 26px rgba(14, 8, 28, 0.45), 0 0 0 3px rgba(255, 205, 96, 0.12); }
.cz-mini-text { min-width: 0; max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coach-mini:not(.cz-mine) .cz-mini-text { font-weight: 500; color: var(--cz-dim); }
.cz-mini-up { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--cz-gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes czPill { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.92); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------- Show-me beacons */
.coach-beacons { position: absolute; inset: 0; z-index: 57; pointer-events: none; }
.coach-beacon {
  position: absolute; border-radius: 14px;
  border: 2px solid rgba(255, 214, 100, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 214, 100, 0.22), 0 0 24px rgba(255, 196, 60, 0.6), inset 0 0 14px rgba(255, 214, 100, 0.25);
  animation: czBeacon 1.25s ease-in-out infinite, czBeaconIn 0.32s var(--cz-ease) both;
}
.coach-beacon.deck { border-radius: 50%; }
.coach-beacon.yaniv { border-radius: 22px; }
.cb-tip {
  position: absolute; left: 50%; top: -13px; transform: translate(-50%, -50%);
  padding: 3px 9px; border-radius: 99px; white-space: nowrap;
  background: var(--cz-bg-solid); color: var(--cz-gold); border: 1px solid rgba(255, 214, 128, 0.5);
  font: 600 11px/1.2 "Fredoka", system-ui, sans-serif; letter-spacing: 0.4px;
  box-shadow: 0 4px 10px rgba(14, 8, 28, 0.4);
}
@keyframes czBeacon {
  50% { box-shadow: 0 0 0 6px rgba(255, 214, 100, 0.1), 0 0 34px rgba(255, 196, 60, 0.8), inset 0 0 18px rgba(255, 214, 100, 0.35); }
}
@keyframes czBeaconIn { from { opacity: 0; transform: scale(1.15); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- quality */
:root[data-quality="low"] #coachSheet.coach-panel,
:root[data-quality="low"] .coach-mini { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--cz-bg-solid); }
:root[data-quality="low"] .coach-beacon { animation: none; box-shadow: 0 0 0 3px rgba(255, 214, 100, 0.3); }
:root[data-quality="low"] .cz-orb,
:root[data-quality="low"] .cz-status.busy,
:root[data-quality="low"] .cz-skel-line { animation: none; }
:root[data-quality="low"] .cz-headline.cz-swap { animation: none; }

@media (prefers-reduced-motion: reduce) {
  #coachSheet.coach-panel, .coach-mini, .coach-beacon, .cz-orb, .cz-status.busy, .cz-headline.cz-swap, .cz-skel-line { animation: none !important; }
  .cz-mbar i, .cz-btn { transition: none; }
  #coachSheet.cz-leaving, #coachSheet.sheet-leaving { transition: none !important; }
}

/* tight: set by coachPlace when the panel would cover the deck / pile */
#coachSheet.cz-tight .cz-why { -webkit-line-clamp: 1; }
#coachSheet.cz-tight .cz-stats, #coachSheet.cz-tight .sheet-grip { display: none; }
#coachSheet.cz-tight { padding-top: 7px; padding-bottom: 10px; }
#coachSheet.cz-tight .cz-head { margin-bottom: 3px; }
#coachSheet.cz-tight .cz-icon { width: 28px; height: 28px; }
#coachSheet.cz-tight .cz-foot { margin-top: 7px; }
#coachSheet.cz-tight .cz-btn { min-height: 34px; }
#coachSheet.cz-tight .cz-btn.icon { width: 34px; }
#coachSheet.cz-tight .cz-headline { font-size: 14.5px; }

/* slim: one row (move, headline, action) when even tight would cover the take cards */
#coachSheet.cz-slim { padding: 7px 8px 7px 8px; border-radius: 16px; }
#coachSheet.cz-slim .sheet-grip, #coachSheet.cz-slim .cz-title, #coachSheet.cz-slim .cz-icon[data-coach-action="close"],
#coachSheet.cz-slim .cz-why, #coachSheet.cz-slim .cz-stats, #coachSheet.cz-slim .cz-meter,
#coachSheet.cz-slim .cz-alts, #coachSheet.cz-slim .cz-more { display: none; }
#coachSheet.cz-slim .cz-acts { gap: 4px; }
#coachSheet.cz-slim .cz-head { position: absolute; top: 0; right: 0; bottom: 0; margin: 0; width: 36px; justify-content: center; }
#coachSheet.cz-slim .cz-body { display: flex; align-items: center; gap: 8px; margin: 0 34px 0 0; padding: 0; overflow: visible; }
#coachSheet.cz-slim .cz-main { flex: 1; min-width: 0; gap: 8px; }
#coachSheet.cz-slim .cz-strip { padding: 4px 5px; }
#coachSheet.cz-slim .cz-headline { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#coachSheet.cz-slim .cz-foot { margin: 0; flex: none; }
#coachSheet.cz-slim .cz-btn { min-height: 34px; padding: 0 12px; }
#coachSheet.cz-slim .cz-btn.icon { width: 34px; padding: 0; }

/* the hand beacon's tag goes under the cards (the panel sits above them) */
.coach-beacon.hand .cb-tip { top: auto; bottom: -13px; transform: translate(-50%, 50%); }

/* short screens: keep the panel tight */
@media (max-height: 700px) {
  .cz-why { -webkit-line-clamp: 1; }
  .cz-foot { margin-top: 8px; }
  .cz-btn { min-height: 34px; }
  .cz-btn.icon { width: 34px; }
}

/* Minimal coach: a small note pinned top-right, below nothing and over nothing important.
   Just the instruction; tapping it does the move (Show me / Take / Call YANIV). */
#coachSheet.coach-panel {
  position: fixed !important; top: calc(env(safe-area-inset-top, 0px) + 56px) !important; right: 10px !important;
  left: auto !important; bottom: auto !important; width: min(150px, 36vw) !important; max-height: none !important;
  margin: 0 !important; padding: 7px 10px !important; border-radius: 12px !important; cursor: pointer; z-index: 40;
  transform: none !important;
}
#coachSheet .sheet-grip, #coachSheet .cz-head, #coachSheet .cz-foot { display: none !important; }
#coachSheet .cz-main { display: block !important; margin: 0 !important; }
#coachSheet .cz-headline { font-size: 12.5px !important; line-height: 1.28 !important; font-weight: 600; margin: 0 !important; }
#coachSheet .cz-headline.small { font-size: 12px !important; opacity: 0.88; }
#coachMini { display: none !important; }
@media (min-width: 700px) { #coachSheet.coach-panel { width: 220px !important; } #coachSheet .cz-headline { font-size: 14px !important; } }

/* The only visible trace of the coach: a small "+" top-right, shown only to whoever drew the 8. */
#coachToggle.coach-plus {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 12px; z-index: 41;
  width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(20, 14, 32, 0.55); color: #ffe7b0; font: 600 10px/12px Fredoka, system-ui, sans-serif;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#coachToggle.coach-plus.hidden { display: none; }
#coachToggle.coach-plus[aria-expanded="true"] { background: rgba(20, 14, 32, 0.8); }
#coachToggle.coach-plus:active { scale: 0.92; }
#coachToggle.coach-plus::after { content: ""; position: absolute; inset: -14px; }
/* No visible button: an invisible tap zone in the top-right corner (owner only). */
#coachToggle.coach-plus { width: 48px !important; height: 48px !important; top: 0 !important; right: 0 !important;
  background: transparent !important; box-shadow: none !important; color: transparent !important; font-size: 0 !important; }
#coachToggle.coach-plus::after { display: none; }
