/* «Таблички» (0.39, club-signs.js): the 🪧 in the reactions panel and its picker, a sign over the picture (#react-layer)
   and under its owner's chip in the header, the shop's card with a live preview, the profile's line. Everything in
   boxes of its own (sgn-*); the signs move by transform and opacity only and never take pointer events. */

/* The sign itself: a cream board with the emoji and the words, on a stick. */
.sgn-board { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 11px; border: 1.5px solid #3a2a17; border-radius: 7px; background: #fff6dd; color: #23190e; font-size: 15px; font-weight: 800; line-height: 1.2; letter-spacing: .01em; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.sgn-board .sgn-em { flex: none; font-size: 1.12em; line-height: 1; }
.sgn-board .sgn-tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sgn-stick { display: block; width: 5px; height: 14px; border-radius: 0 0 2px 2px; background: linear-gradient(90deg, #8a5a2c, #b98348 55%, #7a4f26); box-shadow: 0 2px 4px rgba(0, 0, 0, .35); }

/* Over the picture: in the reactions' layer (which clips and takes no pointer), placed by club-signs.js in the upper
   part — under the top bar, above the subtitles and the controls. */
.sgn-float { position: absolute; z-index: 1; pointer-events: none; max-width: min(300px, calc(100% - 12px)); }
.sgn-raise { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 100%; will-change: transform, opacity; animation: sgn-raise var(--sgn-ms, 5000ms) linear both; }
.sgn-raise .sgn-board { max-width: 100%; }
.sgn-who { margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@keyframes sgn-raise {
  0% { opacity: 0; transform: translateY(22px) rotate(0deg) scale(.86); }
  6% { opacity: 1; transform: translateY(-4px) rotate(var(--tilt, -3deg)) scale(1.04); }
  10% { transform: translateY(0) rotate(var(--tilt, -3deg)) scale(1); }
  38% { transform: translateY(0) rotate(calc(var(--tilt, -3deg) * -.55)) scale(1); }
  66% { transform: translateY(0) rotate(var(--tilt, -3deg)) scale(1); }
  91% { opacity: 1; transform: translateY(0) rotate(calc(var(--tilt, -3deg) * -.3)) scale(1); }
  100% { opacity: 0; transform: translateY(16px) rotate(0deg) scale(.94); }
}

/* Under the owner's chip: a small board with a notch pointing up at the face (the strip is the top of the page). */
.sgn-strip { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 2; }
.sgn-tag { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; transition: opacity .15s; }
.sgn-tag.off { opacity: 0; }
.sgn-tag-in { position: relative; display: block; transform-origin: var(--nx, 50%) 0; animation: sgn-tag var(--sgn-ms, 5000ms) linear both; }
.sgn-tag-in::before { content: ""; position: absolute; top: -5px; left: calc(var(--nx, 50%) - 5px); width: 9px; height: 9px; background: #fff6dd; border-left: 1.5px solid #3a2a17; border-top: 1.5px solid #3a2a17; transform: rotate(45deg); }
.sgn-tag .sgn-board { position: relative; max-width: 190px; padding: 3px 9px; font-size: 12.5px; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
@keyframes sgn-tag {
  0% { opacity: 0; transform: translateY(-6px) scale(.7); }
  6% { opacity: 1; transform: translateY(0) scale(1.06); }
  10% { transform: translateY(0) scale(1); }
  92% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(.9); }
}

/* Reduced motion: the sign simply stands there, then goes. */
.sgn-still .sgn-raise, .sgn-still .sgn-tag-in { animation: none; }
.sgn-still .sgn-raise { transform: rotate(var(--tilt, -3deg)); }

/* For screen readers only: who raised what. */
.sgn-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The 🪧 in the reactions panel (a react-tool like «Супер-реакция»), with the seconds left before the next sign. */
.sgn-tool { position: relative; font-size: 16px; }
.sgn-tool.waiting .sgn-tool-ico { opacity: .45; }
.sgn-tool .sgn-wait { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--panel-2, #20242c); border: 1px solid var(--line); color: var(--text); font-size: 10px; line-height: 14px; font-weight: 700; }
.sgn-tool .sgn-wait:empty { display: none; }
/* With «Супер-реакция» and the signs both there, a phone's narrow panel takes two rows of tools, not an overflow. */
.react-tools:has(> .sgn-tool:not(.hidden)) { flex-wrap: wrap; }

/* The picker: a sheet at the bottom of the screen, like «Супер-реакция»'s. */
.sgn-sheet { position: fixed; z-index: 1300; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(560px, calc(100vw - 20px)); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 12px; border-radius: 14px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); color: var(--text); }
.sgn-sheet.hidden { display: none; }
.sgn-sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.sgn-sheet-note { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.sgn-sheet-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.sgn-sheet-x:hover { color: var(--text); background: var(--line); }
.sgn-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sgn-pick { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 44px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; line-height: 1.2; text-align: left; cursor: pointer; }
.sgn-pick-em { flex: none; font-size: 18px; line-height: 1; }
.sgn-pick-tx { min-width: 0; overflow-wrap: anywhere; }
.sgn-pick:hover:not(:disabled) { border-color: var(--accent); }
.sgn-pick:disabled { opacity: .45; cursor: default; }
.sgn-sheet-foot { margin: 8px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.sgn-pick:focus-visible, .sgn-sheet-x:focus-visible, .sgn-tool:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* The shop's card: one's own face with a sign going up above it, and the phrases one gets. */
.sgn-demo { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 132px; margin-top: 10px; padding-bottom: 12px; overflow: hidden; border-radius: 10px; background: radial-gradient(ellipse at 50% 115%, #1c2634 0%, #0b0f15 72%); contain: content; }
.sgn-demo-sign { display: flex; flex-direction: column; align-items: center; max-width: calc(100% - 16px); transform-origin: 50% 100%; }
.sgn-demo-sign .sgn-stick { height: 16px; }
.sgn-demo-sign.go { animation: sgn-demo .6s ease-out both; }
@keyframes sgn-demo { from { opacity: 0; transform: translateY(20px) scale(.85); } to { opacity: 1; transform: none; } }
.sgn-demo-face { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; background: var(--accent-2); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 0 0 2px #0b0f15; }
.sgn-demo-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sgn-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.sgn-chip { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .03); font-size: 12.5px; white-space: nowrap; }

/* The shop page's tile, once one holds a week (club-shop-page.js previewOf). */
.sgn-tpv { display: flex; flex-direction: column; align-items: center; transform: rotate(-4deg); }
.sgn-tpv .sgn-board { padding: 3px 8px; font-size: 12px; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); }
.sgn-tpv .sgn-stick { height: 10px; width: 4px; }

/* Anybody's profile: the signs they hold. */
.sgn-pp { display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.sgn-pp-ico { font-size: 16px; line-height: 1; }
.sgn-mi-ico { justify-content: center; font-size: 14px; line-height: 1; }

@media (max-width: 760px) {
  .sgn-board { font-size: 14px; padding: 4px 9px; }
  .sgn-tag .sgn-board { max-width: 150px; font-size: 12px; }
}
@media (max-width: 520px) {
  .sgn-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .sgn-raise, .sgn-tag-in, .sgn-demo-sign.go { animation: none; }
}
