/* 0.60 «Сезоны» Halloween — «Страшилка по кругу» (public/scary-tale.js): a night page by a candle — a deep blue-violet
   night with a few stars, the storytellers' circle round a candle whose wax is the turn's time, a parchment page with the
   story, one's secret object on a small card. Phones first: the circle above the page, the page scrolls; reduced motion:
   no flicker, the lines appear at once. Also the Halloween row in «Игры в зале» (.htq-*, shared with horror-quiz.js). */
.htq-season { margin: 4px 0 12px; padding: 10px; border-radius: 14px; background: linear-gradient(180deg, rgba(240, 122, 26, .16), rgba(120, 60, 190, .08)); border: 1px solid rgba(255, 170, 90, .3); display: flex; flex-direction: column; gap: 8px; }
.htq-season-l { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #ffb35c; }
.htq-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, .05); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.htq-entry-btn:hover, .htq-entry-btn:focus-visible { border-color: #ffb35c; background: rgba(255, 255, 255, .08); }
.htq-entry-ico { width: 40px; height: 40px; flex: none; object-fit: contain; }
.htq-entry-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.htq-entry-t small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }

.st-board { position: fixed; inset: 0; z-index: 2650; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(4, 4, 12, .8); }
.st-board.hidden { display: none; }
.st-room {
  position: relative; display: flex; flex-direction: column; width: min(820px, 100%); max-height: calc(100dvh - 36px); overflow: hidden; border-radius: 18px; color: #eef0ff;
  background: radial-gradient(70% 50% at 50% 32%, rgba(255, 176, 80, .14), transparent 70%), linear-gradient(180deg, #0e1124 0%, #17142e 60%, #120d20 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(170, 160, 255, .16);
}
.st-stars { position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent), radial-gradient(1.4px 1.4px at 71% 14%, #fff, transparent),
    radial-gradient(1px 1px at 86% 26%, #fff, transparent), radial-gradient(1px 1px at 52% 6%, #fff, transparent), radial-gradient(1.2px 1.2px at 93% 9%, #fff, transparent); }
.st-top { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px 6px; }
.st-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 20px; letter-spacing: .01em; color: #ffd9a0; }
.st-title img { width: 26px; height: 26px; object-fit: contain; }
.st-where { margin-left: auto; color: #b9b6dc; font-size: 13px; white-space: nowrap; }
.st-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.st-x:focus-visible, .st-go:focus-visible, .st-say:focus-visible, .st-end:focus-visible, .st-pick:focus-visible, .st-goose:focus-visible { outline: 2px solid #ffc46b; outline-offset: 2px; }
.st-main { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 6px 16px 16px; overflow-y: auto; min-height: 0; }
.st-h { margin: 6px 0 2px; font-family: 'Playfair Display', Georgia, serif; font-size: 20px; color: #ffd9a0; text-align: center; }
.st-p { margin: 0; color: #dcdaf5; line-height: 1.45; }
.st-note { margin: 0; color: #b9b6dc; font-size: 13px; text-align: center; }
.st-intro { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 6px 4px 10px; }
.st-rules { margin: 0; padding: 0 0 0 20px; text-align: left; color: #dcdaf5; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
.st-go, .st-say { min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; color: #2a1606; cursor: pointer; background: linear-gradient(180deg, #ffd387, #f0a03c); box-shadow: 0 6px 18px rgba(240, 160, 60, .35); }
.st-end { align-self: center; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #c9c6ea; font: inherit; font-size: 13px; cursor: pointer; }

/* the stage: the circle round the candle + the secret object */
.st-stage { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.st-circle { position: relative; width: 240px; height: 190px; flex: none; }
.st-seats { list-style: none; margin: 0; padding: 0; }
.st-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; transition: transform .3s ease; }
.st-seat.away { opacity: .45; }
.st-sn { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #c9c6ea; }
.st-av { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #3a3466; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14); flex: none; }
.st-av.sm { width: 26px; height: 26px; font-size: 12px; }
.st-av img { width: 100%; height: 100%; object-fit: cover; }
.st-seat.me .st-av { box-shadow: 0 0 0 2px #9fa8ff; }
.st-seat.now { transform: translate(-50%, -50%) scale(1.14); }
.st-seat.now .st-av { box-shadow: 0 0 0 3px #ffc46b, 0 0 18px rgba(255, 190, 90, .8); }
.st-seat.now .st-sn { color: #ffd9a0; font-weight: 700; }
.st-candle { position: absolute; left: 50%; top: 50%; width: 22px; height: 64px; transform: translate(-50%, -8%); }
.st-flame { position: absolute; left: 50%; top: -18px; width: 14px; height: 22px; margin-left: -7px; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 70%, #fff7d6 0 22%, #ffd06a 40%, #ff8a1e 72%, transparent 74%); filter: drop-shadow(0 0 10px rgba(255, 170, 60, .9)); animation: st-flick 1.6s ease-in-out infinite; }
.st-wax { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; }
.st-wax > b { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; border-radius: 5px 5px 3px 3px; background: linear-gradient(90deg, #e8dcc0, #fff6e2 45%, #d8c8a4); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5); transform-origin: 50% 100%; transition: transform .25s linear; }
@keyframes st-flick { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.06, .94) rotate(2deg); } }
.st-object { display: flex; flex-direction: column; gap: 2px; min-width: 180px; max-width: 260px; padding: 10px 14px; border-radius: 12px; border: 1px dashed rgba(255, 196, 107, .55); background: rgba(255, 196, 107, .08); }
.st-object small { color: #b9b6dc; font-size: 12px; }
.st-object b { font-size: 17px; color: #ffd9a0; }
.st-object span { font-size: 12.5px; color: #dcdaf5; display: flex; align-items: center; gap: 4px; }
.st-object.used { border-style: solid; border-color: #8fd08a; background: rgba(120, 200, 110, .1); }
.st-object.used span { color: #b8f0b0; }
.st-object svg, .st-objects svg { width: 16px; height: 16px; flex: none; }

/* the parchment page */
.st-page { border-radius: 12px; padding: 12px 14px; max-height: 44vh; overflow-y: auto; color: #2b1d10;
  background: radial-gradient(120% 90% at 50% 0%, #f8eed6, #ecdcb6 70%, #e1cc9e); box-shadow: inset 0 0 30px rgba(120, 80, 30, .25), 0 8px 24px rgba(0, 0, 0, .4); }
.st-page.small { max-height: 30vh; }
.st-story { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-family: 'Playfair Display', Georgia, serif; }
.st-story > li { margin: 0; }
.st-line { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px; border-radius: 8px; }
.st-by { font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a6a3e; }
.st-by i { font-style: normal; text-transform: none; font-weight: 600; }
.st-text { font-size: 17px; line-height: 1.45; color: #2b1d10; overflow-wrap: anywhere; }
.st-line.opening .st-text { font-style: italic; }
.st-line.stand .st-text { font-style: italic; color: #5c4a33; }
.st-line.blown .st-text { font-style: italic; color: #8a7a62; }
.st-line.final { border-left: 3px solid #a6462a; padding-left: 9px; }
.st-line.mine .st-by { color: #4a4fae; }
.st-line.best { background: rgba(255, 196, 70, .35); box-shadow: 0 0 0 2px #d99b2b; }
.st-line.fresh { animation: st-in .6s ease both; }
.st-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-meta:empty { display: none; }
.st-goose { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; min-width: 44px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(90, 60, 140, .35); background: rgba(255, 255, 255, .5); color: #5d4a86; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.st-goose .st-g { width: 18px; height: 18px; }
.st-goose.on, .st-goose.static { background: #6b4bb0; color: #fff; border-color: #6b4bb0; }
.st-goose.static { min-height: 24px; padding: 0 8px; cursor: default; }
.st-goose:disabled { cursor: default; }
.st-goose.pop { animation: st-pop .45s ease; }
.st-votes { font: 700 12px system-ui, sans-serif; color: #7a3d14; }
.st-tag { font: 700 11px system-ui, sans-serif; padding: 2px 8px; border-radius: 999px; }
.st-tag.best { background: #d99b2b; color: #2b1606; }
.st-tag.fan { background: #6b4bb0; color: #fff; }
button.st-pick { width: 100%; text-align: left; font: inherit; border: 2px solid transparent; background: rgba(255, 255, 255, .35); cursor: pointer; }
button.st-pick:hover { border-color: rgba(166, 70, 42, .4); }
button.st-pick.picked { border-color: #a6462a; background: rgba(255, 210, 140, .55); }
.st-story.reading > li { animation: st-in .7s ease both; }
@keyframes st-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes st-pop { 50% { transform: scale(1.2); } }

/* the status, the writer's form */
.st-status:empty { display: none; }
.st-now { margin: 0; text-align: center; color: #ffd9a0; font-size: 15px; }
.st-dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.st-dots b { width: 5px; height: 5px; border-radius: 50%; background: #ffd9a0; animation: st-dot 1.2s ease-in-out infinite; }
.st-dots b:nth-child(2) { animation-delay: .2s; } .st-dots b:nth-child(3) { animation-delay: .4s; }
@keyframes st-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.st-ask { display: flex; flex-direction: column; gap: 6px; }
.st-lbl { color: #ffd9a0; font-weight: 700; font-size: 14px; }
.st-row { display: flex; gap: 8px; align-items: stretch; }
.st-in { flex: 1; min-width: 0; min-height: 52px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 196, 107, .45); background: rgba(10, 8, 24, .65); color: #fff; font: inherit; font-size: 16px; resize: none; }
.st-in:focus { outline: 2px solid #ffc46b; outline-offset: 1px; }
.st-len { align-self: flex-end; color: #9d9ac4; font-size: 12px; }

/* the reveal's objects, the podium */
.st-objects ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.st-objects li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.st-ob { display: flex; flex-direction: column; min-width: 0; }
.st-ob b { font-size: 13px; }
.st-ob span { font-size: 13px; color: #ffd9a0; }
.st-ob small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #9d9ac4; }
.st-objects li.used .st-ob small { color: #b8f0b0; }
.st-steps { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; align-items: flex-end; gap: 12px; }
.st-step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 12px; min-width: 92px; border-radius: 12px 12px 4px 4px; background: rgba(255, 255, 255, .06); text-align: center; }
.st-step.p1 { order: 2; padding-top: 18px; background: linear-gradient(180deg, rgba(255, 196, 107, .3), rgba(255, 196, 107, .06)); }
.st-step.p2 { order: 1; } .st-step.p3 { order: 3; }
.st-step b { font-size: 14px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-step small { color: #c9c6ea; }
.st-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.st-rowp { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); font-size: 14px; }
.st-rowp.me { box-shadow: inset 0 0 0 1px #9fa8ff; }

@media (max-width: 560px) {
  .st-board { padding: 0; }
  .st-room { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .st-title { font-size: 17px; }
  .st-top { padding: 10px 10px 4px; gap: 8px; }
  .st-circle { width: 220px; height: 172px; }
  .st-object { max-width: none; width: 100%; }
  .st-page { max-height: 42dvh; padding: 10px; }
  .st-text { font-size: 16px; }
  .st-steps { gap: 6px; } .st-step { min-width: 0; flex: 1; }
}
@media (max-width: 360px) { .st-title { font-size: 15px; } .st-title img { display: none; } .st-where { font-size: 12px; } }
/* 0.66 «Сюжет по кругу» on this engine all year (.st-board.story): likes instead of goosebumps (the heart, red when
   given). Out of Halloween also the ordinary skin (.st-board.plain): the hall's dark panel, a light page in the app's own
   font, no stars and no flame — the candle's wax becomes a plain amber time bar in the circle. Flat accent buttons. */
.st-board.story .st-goose.on, .st-board.story .st-goose.static { background: #e0475b; border-color: #e0475b; }
.st-ti { font-size: 22px; line-height: 1; }
.st-board.plain { background: rgba(6, 8, 12, .74); }
.st-board.plain .st-room { color: var(--text); background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: 0 30px 90px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line); }
.st-board.plain .st-stars, .st-board.plain .st-flame { display: none; }
.st-board.plain .st-title, .st-board.plain .st-h { font-family: inherit; font-weight: 800; color: var(--text); }
.st-board.plain .st-page { color: #1b1e25; background: #eef0f4; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.st-board.plain .st-story { font-family: inherit; }
.st-board.plain .st-by { color: #5d6472; }
.st-board.plain .st-line.stand .st-text, .st-board.plain .st-line.blown .st-text { color: #5d6472; }
.st-board.plain .st-line.final { border-left-color: var(--accent); }
.st-board.plain .st-line.best { background: rgba(229, 160, 13, .22); box-shadow: 0 0 0 2px var(--accent); }
.st-board.plain .st-go, .st-board.plain .st-say { background: var(--accent); color: #14171e; box-shadow: none; }
.st-board.plain .st-candle { width: 12px; height: 70px; transform: translate(-50%, -50%); }
.st-board.plain .st-wax { height: 70px; border-radius: 6px; background: rgba(255, 255, 255, .08); }
.st-board.plain .st-wax > b { border-radius: 6px; background: var(--accent); box-shadow: none; }
.st-board.plain .st-seat.now .st-av { box-shadow: 0 0 0 3px var(--accent); }
.st-board.plain .st-seat.now .st-sn { color: var(--text); }
.st-board.plain .st-object { border-color: rgba(229, 160, 13, .55); background: rgba(229, 160, 13, .06); }
.st-board.plain .st-object b { color: var(--text); }
.st-board.plain .st-object small, .st-board.plain .st-object span { color: var(--muted); }
.st-board.plain .st-in { border-color: var(--line); background: rgba(0, 0, 0, .35); }
.st-board.plain .st-in:focus { outline-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .st-flame, .st-dots b, .st-line.fresh, .st-story.reading > li, .st-goose.pop { animation: none; }
  .st-wax > b, .st-seat { transition: none; }
}
