/* «Охота за яйцами» (0.55 «Сезоны» P, public/egg-hunt.js): «Сезонное» in «Игры», the start dialog, the meadow card.
   Spring colours: fresh green, pink and butter yellow; the bunnies pink, the chicks yellow. */
.eh-card, .eh-modal, .eh-season { --eh-a: #e57fae; --eh-b: #e9b51c; --eh-ink: #22301f; --eh-leaf: #5fae45; }

/* «Сезонное» in the «Игры» dialog (only while spring is on) */
.eh-season { margin: 4px 0 12px; padding: 10px; border-radius: 14px; background: linear-gradient(180deg, rgba(140, 210, 120, .16), rgba(255, 170, 205, .06)); border: 1px solid rgba(170, 230, 150, .25); }
.eh-season[hidden] { display: none; }
.eh-season-l { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #c4ecb0; margin-bottom: 6px; }
.eh-entry-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.eh-entry-btn:hover, .eh-entry-btn:focus-visible { border-color: #a8e08f; background: rgba(255, 255, 255, .08); }
.eh-entry-ico { font-size: 28px; line-height: 1; }
.eh-entry-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eh-entry-text small { color: var(--muted); font-size: 12px; }

/* The start dialog */
.eh-msheet { max-width: 560px; }
.eh-mhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 18px; }
.eh-x { width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.eh-mart { border-radius: 12px; overflow: hidden; margin-bottom: 10px; border: 1px solid rgba(255, 255, 255, .1); }
.eh-mcanvas { display: block; width: 100%; height: auto; }
.eh-how { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.eh-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.eh-mode { min-height: 48px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.eh-mode.on { border-color: var(--accent); background: rgba(229, 160, 13, .12); }
.eh-mode:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.eh-mnote { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.eh-mwarn { margin: 0 0 8px; color: var(--bad, #e5484d); font-size: 13px; }
.eh-mwarn[hidden] { display: none; }
.eh-mbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.eh-mbtns button { min-height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.eh-cancel { border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: var(--text); }
.eh-go { border: 0; background: var(--accent); color: #111; font-size: 15px; min-width: 120px; }

/* The card */
.eh-card { position: fixed; inset: 10px; margin: auto; z-index: 1800; width: min(1100px, calc(100vw - 20px)); height: min(760px, calc(100vh - 20px)); height: min(760px, calc(100dvh - 20px)); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #1d2a1b; border: 1px solid rgba(170, 230, 150, .25); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.eh-card.hidden { display: none; }
.eh-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 12px; background: #23361f; min-height: 52px; }
.eh-score { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; font-size: 13px; }
.eh-score-r { justify-content: flex-end; }
.eh-score em { font-style: normal; font-weight: 800; font-size: 18px; color: #fff; }
.eh-top { display: inline-flex; align-items: baseline; gap: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d8f0cc; }
.eh-top.me { color: #ffe27a; }
.eh-top em { font-size: 15px; }
.eh-team { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.eh-team[data-team="a"] b { color: var(--eh-a); } .eh-team[data-team="b"] b { color: var(--eh-b); }
.eh-clock { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.eh-time { font-size: 22px; font-variant-numeric: tabular-nums; color: #fff; }
.eh-step { font-size: 11px; color: #b9d8aa; min-height: 13px; }
.eh-card.eh-hurry .eh-time { color: #ffb38a; }
.eh-stage { position: relative; flex: 1 1 0; min-height: 0; touch-action: none; overflow: hidden; }
.eh-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.eh-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--accent-2); }
.eh-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; }
.eh-tools button { min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(34, 48, 31, .25); background: rgba(255, 255, 255, .86); color: var(--eh-ink); font: inherit; font-weight: 700; cursor: pointer; }
.eh-tools button[hidden] { display: none; }
.eh-rush { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 6px 14px; border-radius: 999px; background: #ff79b0; color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); pointer-events: none; }
.eh-rush[hidden] { display: none; }
.eh-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(20, 40, 20, .25); pointer-events: none; }
.eh-over[hidden] { display: none; }
.eh-card[data-phase="podium"] .eh-over { pointer-events: auto; overflow: auto; align-items: flex-start; padding-top: 22px; background: rgba(18, 30, 16, .88); }
.eh-prep { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; width: min(620px, 100%); }
.eh-prep1 { grid-template-columns: auto minmax(0, 320px); justify-content: center; }
.eh-tm { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .93); color: var(--eh-ink); box-shadow: 0 6px 20px rgba(20, 40, 20, .25); }
.eh-tm b { display: block; margin-bottom: 4px; }
.eh-tm[data-team="a"] b { color: #b8457a; } .eh-tm[data-team="b"] b { color: #9a7406; }
.eh-tm ul { margin: 0; padding: 0; list-style: none; font-size: 13px; display: grid; gap: 2px; }
.eh-count { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #fff8e8; color: var(--eh-ink); font-size: 34px; font-weight: 800; box-shadow: 0 6px 20px rgba(20, 40, 20, .3); }
.eh-big { padding: 12px 20px; border-radius: 16px; background: rgba(255, 255, 255, .94); color: var(--eh-ink); font-size: 22px; font-weight: 800; text-align: center; box-shadow: 0 8px 24px rgba(20, 40, 20, .3); }
.eh-podium { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(560px, 100%); }
.eh-final { display: flex; align-items: center; gap: 6px; color: #e6f5dc; font-size: 15px; }
.eh-final b { margin: 0 10px; font-size: 20px; }
.eh-titles { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: #e6f5dc; font-size: 14px; text-align: center; }
.eh-titles small { color: #b9d8aa; }
.eh-rows { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; width: 100%; }
.eh-rows li { display: grid; grid-template-columns: 30px 24px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #eef8e8; }
.eh-rows li.me { background: rgba(255, 226, 122, .18); }
.eh-rows li[data-team="a"] { box-shadow: inset 3px 0 0 var(--eh-a); } .eh-rows li[data-team="b"] { box-shadow: inset 3px 0 0 var(--eh-b); }
.eh-rows img, .eh-ava { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .2); object-fit: cover; }
.eh-rows b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eh-rows small { color: #cfe8c2; }
.eh-rows em { font-style: normal; font-weight: 800; color: #ffe27a; }
.eh-place { text-align: center; font-weight: 800; }
.eh-why { margin: 0; color: #cfe8c2; font-size: 13px; }
.eh-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: #23361f; min-height: 64px; }
.eh-basket { display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.eh-basket[hidden] { display: none; }
.eh-bico { font-size: 26px; }
.eh-bnum { font-size: 24px; color: #ffe27a; font-variant-numeric: tabular-nums; min-width: 1.4em; }
.eh-basket small { color: #b9d8aa; font-size: 11px; }
.eh-hint { flex: 1; min-width: 0; color: #d8f0cc; font-size: 14px; }
.eh-seat { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.eh-seat[hidden] { display: none; }
.eh-card[data-phase="over"] .eh-bar, .eh-card[data-phase="podium"] .eh-bar { display: none; }
.eh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eh-pill { position: fixed; left: 14px; bottom: 90px; z-index: 1801; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #a8e08f; background: rgba(24, 36, 22, .96); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.eh-pill.hidden { display: none; }
body.eh-on { overflow: hidden; }

@media (max-width: 760px) {
  .eh-card { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; z-index: 1900; }
  .eh-head { gap: 6px; padding: 6px 8px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
  .eh-top { font-size: 12px; }
  .eh-prep { grid-template-columns: 1fr 1fr; } .eh-prep .eh-count { grid-column: 1 / -1; justify-self: center; order: -1; }
  .eh-prep1 { grid-template-columns: 1fr; justify-items: center; }
}
@media (max-width: 340px) { .eh-hint { font-size: 12px; } .eh-basket small { display: none; } .eh-modes { grid-template-columns: 1fr; } }
