/* The Skins page (skin-gallery.js): the same in the app (ui/) and on the website (public/), over each one's tokens and its .btn, .wt-tabs,
   .wt-sel and .sk-find. Every skin a tile with its little picture; one opened in a dialog with its bigger one. */
.sg-page [hidden] { display: none !important; }
.sg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sg-head h1 { margin: 0; }
.sg-lead { margin: 6px 0 0; max-width: 60ch; }
.sg-up .btn { display: inline-flex; align-items: center; gap: 8px; }
.sg-up .ic { width: 18px; height: 18px; }
.sg-tools { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sg-find { flex: 1; min-width: 200px; max-width: 380px; height: 38px; }
.sg-find .ic { width: 16px; height: 16px; flex: none; }
.sg-msg { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.sg-tile { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 8px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .2s cubic-bezier(.2, 0, 0, 1), box-shadow .2s; }
.sg-tile:hover { border-color: color-mix(in srgb, var(--pink) 55%, transparent); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.sg-tile:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.sg-tile.on { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink) inset; }
.sg-pic { display: block; width: 100%; height: auto; aspect-ratio: 384 / 224; margin-bottom: 5px; border-radius: 9px; background: repeating-conic-gradient(#221b1e 0 25%, #2c2427 0 50%) 0 0 / 14px 14px; }
.sg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.sg-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.sg-badge { position: absolute; top: 14px; left: 14px; padding: 2px 8px; border-radius: 99px; background: var(--pink); color: var(--on-pink, #1a0d14); font-size: 11.5px; font-style: normal; font-weight: 800; }
.sg-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 44px 20px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }
.sg-empty b { font-size: 16px; } .sg-empty p { margin: 0; max-width: 46ch; }
.sg-foot { display: flex; justify-content: center; margin-top: 18px; }

.sg-dlg { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.sg-dlg::backdrop { background: rgba(8, 5, 7, .72); }
.sg-dlg[open] { animation: sg-in .22s cubic-bezier(.2, 0, 0, 1); }
@keyframes sg-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.sg-x { position: absolute; top: 14px; right: 16px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; } /* (beside its name, under the picture: off the replay's score) */
.sg-x:hover { border-color: var(--pink); } .sg-x:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.sg-big { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; opacity: 0; transition: opacity .35s ease; } /* (shown once the replay is drawn on it) */
.sg-info { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px 22px; }
.sg-title { padding-right: 44px; } .sg-title h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; } .sg-by { margin: 2px 0 0; }
.sg-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sg-facts span { padding: 3px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-btns .sg-flag { margin-left: auto; }
.sg-dmsg { margin: 0; min-height: 1.3em; font-size: 13px; }
/* who sees a skin of yours: private, by its link, public */
.sg-vis { display: grid; gap: 9px; padding-top: 14px; border-top: 1px solid var(--line); } .sg-vis[hidden] { display: none; }
.sg-vis-h { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.sg-vis-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-vis-o { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.sg-vis-o .ic { width: 16px; height: 16px; } .sg-vis-o:hover { border-color: color-mix(in srgb, var(--pink) 55%, var(--line)); }
.sg-vis-o.on { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 16%, transparent); color: var(--pink); }
.sg-vis-note { margin: 0; font-size: 13px; }
.sg-copy { justify-self: start; display: inline-flex; align-items: center; gap: 7px; } .sg-copy .ic { width: 16px; height: 16px; }
.sg-v-public { color: var(--pink); }
@media (max-width: 560px) { .sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .sg-big { aspect-ratio: 4 / 3; } .sg-info { padding: 14px 16px 18px; } .sg-btns .btn { flex: 1 1 auto; } .sg-btns .sg-flag { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .sg-tile { transition: border-color .15s; } .sg-tile:hover { transform: none; } .sg-dlg[open] { animation: none; } }
html.calm .sg-tile { transition: border-color .15s; } html.calm .sg-tile:hover { transform: none; } html.calm .sg-dlg[open] { animation: none; }
/* likes: over a tile's picture, and the dialog's Like (lit: yours) */
.sg-likes { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 99px; background: rgba(14, 10, 12, .78); color: #fff; font-size: 12px; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.sg-likes .ic { width: 13px; height: 13px; color: rgba(255, 255, 255, .7); } .sg-likes.on .ic { color: var(--pink); }
.sg-like { display: inline-flex; align-items: center; gap: 7px; } .sg-like .ic { width: 17px; height: 17px; color: var(--muted); } .sg-like b { font-variant-numeric: tabular-nums; color: var(--muted); }
.sg-like.on { border-color: color-mix(in srgb, var(--pink) 55%, transparent); background: color-mix(in srgb, var(--pink) 16%, transparent); color: var(--pink); } .sg-like.on .ic { color: var(--pink); }
/* the big picture's stage: dark until the replay is drawn (a line says it is coming) */
.sg-stage { position: relative; background: radial-gradient(circle at 50% 45%, #221c20, #0e0b0d 75%); }
.sg-stage.on .sg-big { opacity: 1; }
.sg-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; color: #bcaea6; font-size: 14px; font-weight: 600; text-align: center; transition: opacity .25s ease; }
.sg-wait.busy { animation: sg-wait 1.6s ease-in-out infinite; } @keyframes sg-wait { 50% { opacity: .4; } }
.sg-stage.on .sg-wait { opacity: 0; animation: none; pointer-events: none; }
.sg-tag { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 12px; border-radius: 99px; background: rgba(14, 10, 12, .8); color: #fff; font-size: 12px; font-weight: 700; } /* (the plain look while the skin comes) */
.sg-tag.busy { animation: sg-wait 1.6s ease-in-out infinite; }
html.calm .sg-big, html.calm .sg-wait { transition: none; } html.calm .sg-wait.busy, html.calm .sg-tag.busy { animation: none; }
.sg-on { margin: -4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; } /* (the map it plays on, under its facts) */
