/* Shared UI for the gamer couple tools (assets/tools/engine-u23-gamer.js). Tokens only, so dark mode works. */
.tool { position: relative; }

/* Segmented control */
.tool .u23-seg { display: flex; padding: 4px; border-radius: 20px; background: rgb(var(--ink) / .06); gap: 2px; }
.tool .u23-seg button {
  flex: 1; min-height: 40px; padding: 0 10px; border-radius: 16px; font-size: 14px; font-weight: 800; color: rgb(var(--ink) / .6);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .16s var(--ease-out); -webkit-tap-highlight-color: transparent;
}
.tool .u23-seg button[aria-checked="true"] { background: var(--surface); color: rgb(var(--ink)); box-shadow: 0 2px 8px rgb(var(--ink) / .12); }
.tool .u23-seg button:active { transform: scale(.96); }
.tool .u23-seg button:focus-visible, .tool .u23-switch:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

/* Switch */
.tool .u23-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; font-weight: 800; color: rgb(var(--ink) / .75); -webkit-tap-highlight-color: transparent; }
.tool .u23-switch-track { width: 40px; height: 24px; border-radius: 12px; background: rgb(var(--ink) / .15); position: relative; transition: background-color .2s ease; flex: none; }
.tool .u23-switch-track span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 9px; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .25s var(--ease-out); }
.tool .u23-switch[aria-pressed="true"] .u23-switch-track { background: rgb(var(--accent)); }
.tool .u23-switch[aria-pressed="true"] .u23-switch-track span { transform: translateX(16px); }

/* Toast */
.tool .u23-toast {
  position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; z-index: 5;
  padding: 10px 16px; border-radius: 16px; background: rgb(var(--ink)); color: var(--bg, #fff); font-size: 14px; line-height: 20px; font-weight: 800;
  transition: opacity .2s ease, transform .25s var(--ease-out); white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis;
}
.tool .u23-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Hearts burst */
.tool .u23-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.tool .u23-burst-p { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; color: rgb(var(--accent)); fill: currentColor; animation: u23-burst .8s var(--ease-out) both; }
@keyframes u23-burst { from { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--r)); opacity: 0; } }

/* Icon buttons */
.tool .u23-icon-btn {
  width: 44px; height: 44px; border-radius: 22px; display: inline-grid; place-items: center; flex: none; color: rgb(var(--ink) / .7);
  background: var(--surface); box-shadow: 0 2px 8px rgb(var(--ink) / .08); transition: transform .16s var(--ease-out), color .2s ease; -webkit-tap-highlight-color: transparent;
}
.tool .u23-icon-btn:active { transform: scale(.94); }
.tool .u23-icon-btn[aria-pressed="true"] { color: #C0237A; }
.tool .u23-icon-btn[aria-pressed="true"] .tool-icon { fill: currentColor; }
.tool .u23-icon-btn:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
.tool .btn:focus-visible, .tool .tool-chips button:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

.tool .u23-label { font-size: 13px; line-height: 18px; font-weight: 850; letter-spacing: .02em; color: rgb(var(--ink) / .6); margin: 0; }
.tool .btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (hover: none) { .tool .btn:hover { transform: none; } }

@media (prefers-color-scheme: dark) {
  .tool .u23-toast { color: #12061F; }
  .tool .u23-seg { background: rgb(var(--ink) / .1); }
}
@media (prefers-reduced-motion: reduce) {
  .tool .u23-toast, .tool .u23-switch-track span, .tool .u23-seg button { transition: none; }
}
