/* Stay Weird | Weird Username Generator
   BRAND VARIABLES: change these to match the main theme exactly. */
:root {
  --bg: #fbf7ff;
  --paper: #ffffff;
  --ink: #22103b;
  --muted: #5d4f73;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --pop: #ffe14d;
  --pink: #ff5ca8;
  --mint: #3ddbb0;
  --sky: #8fd3ff;
  --footer-bg: #22103b;
  --footer-ink: #f4eeff;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --tilt: 0deg;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: .5rem; top: .5rem; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 2px solid var(--ink); }
.bar { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding-top: .8rem; padding-bottom: .6rem; }
.logo img { display: block; width: 160px; height: auto; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .3rem; }
.site-header nav a { display: inline-block; padding: .55rem .55rem; font-weight: 700; font-size: .9rem; white-space: nowrap; color: var(--ink); text-decoration: none; border-radius: 999px; }
.site-header nav a:hover { background: var(--pop); }
@media (min-width: 700px) {
  .site-header nav a { padding: .5rem .7rem; font-size: .95rem; }
  .bar { flex-direction: row; justify-content: space-between; }
  .logo img { width: 190px; }
}

/* ---------- hero ---------- */
.hero { padding: 1.6rem 0 1rem; text-align: center; }
h1 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(2.1rem, 8.5vw, 3.7rem); line-height: 1.08; margin: 0 0 .6rem;
}
h1 mark {
  background: var(--pop); color: var(--ink); padding: .02em .22em; border-radius: .2em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  display: inline-block;
}
.lede { max-width: 34rem; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }

/* ---------- tool panel ---------- */
.tool { padding-bottom: 1.5rem; }
.panel {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink); padding: 1.1rem; margin-top: 1rem;
  display: grid; gap: 1.1rem;
}
.lbl { display: block; font-weight: 800; font-size: 1.02rem; margin-bottom: .3rem; }
.opt { font-weight: 500; color: var(--muted); }

.readout { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .6rem; min-height: 3.3rem; }
#w-emoji { font-size: 1.7rem; line-height: 1; }
#w-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; }
#w-desc { color: var(--muted); font-size: .95rem; flex-basis: 100%; }
@media (min-width: 560px) { #w-desc { flex-basis: auto; } .readout { min-height: 2.2rem; } }

/* the slider */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 48px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track {
  height: 16px; border-radius: 99px; border: 2px solid var(--ink);
  background: linear-gradient(90deg, var(--mint), var(--pop) 35%, var(--pink) 70%, var(--accent));
}
input[type=range]::-moz-range-track {
  height: 12px; border-radius: 99px; border: 2px solid var(--ink);
  background: linear-gradient(90deg, var(--mint), var(--pop) 35%, var(--pink) 70%, var(--accent));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 36px; height: 36px; border-radius: 50%; margin-top: -13px;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
input[type=range]::-moz-range-thumb {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
input[type=range]:active::-webkit-slider-thumb { background: var(--pop); }
.ticks { display: flex; justify-content: space-between; padding: 0 7px; margin-top: -.2rem; }
.ticks span { width: 22px; text-align: center; font-size: 1.15rem; filter: grayscale(1); opacity: .55; transition: transform .15s, opacity .15s; }
.ticks span.on { filter: none; opacity: 1; transform: scale(1.35); }

/* keyword row */
.kw-row { display: grid; gap: .5rem; }
@media (min-width: 560px) { .kw-row { grid-template-columns: 1fr 12rem; align-items: end; } .kw-row .lbl { grid-column: 1 / -1; margin-bottom: 0; } }
input[type=text], select {
  width: 100%; min-height: 48px; padding: .55rem .8rem; font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
}
input[type=text]::placeholder { color: #9a8db0; }
input[aria-invalid=true] { border-color: #c0265a; background: #fff1f6; }
#kw-msg { margin: 0; min-height: 0; color: #a3164a; font-weight: 600; font-size: .92rem; grid-column: 1 / -1; }
#kw-msg:empty { display: none; }

/* switches */
.toggles { display: grid; gap: .5rem; }
@media (min-width: 560px) { .toggles { grid-template-columns: 1fr 1fr; } }
.switch { display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .3rem .2rem; cursor: pointer; font-weight: 700; }
.switch input {
  -webkit-appearance: none; appearance: none; flex: none; position: relative;
  width: 54px; height: 32px; margin: 0; border-radius: 99px; cursor: pointer;
  background: #e5dcf3; border: 2px solid var(--ink); transition: background .15s;
}
.switch input::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); transition: transform .15s;
}
.switch input:checked { background: var(--mint); }
.switch input:checked::before { transform: translateX(22px); }
.switch small { display: block; font-weight: 500; color: var(--muted); font-size: .85rem; line-height: 1.3; }

/* more options */
details.more > summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; margin-left: .5rem; font-size: 1.3rem; }
details.more[open] > summary::after { content: "\2212"; }
.opts-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; padding-top: .3rem; }
@media (min-width: 560px) { .opts-grid { grid-template-columns: repeat(3, 1fr); } }
.opts-grid label { font-weight: 700; font-size: .92rem; display: grid; gap: .3rem; }

/* buttons */
.btn {
  font: inherit; font-weight: 800; font-size: 1rem; min-height: 54px; padding: .6rem 1rem; white-space: nowrap; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--accent); color: #fff; flex: 1 1 auto; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost:hover { background: var(--pop); }

/* sticky action bar, thumb reachable */
.dock {
  position: sticky; bottom: 0; z-index: 20; display: flex; gap: .6rem; margin: 1rem -1rem 0;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(251, 247, 255, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 2px solid var(--ink);
}
@media (min-width: 920px) { .dock { margin-left: 0; margin-right: 0; border: 2px solid var(--ink); border-radius: 999px; bottom: .8rem; } }

/* ---------- results ---------- */
.results-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem 1rem; margin: 1.6rem 0 .6rem; scroll-margin-top: .8rem; }
.results-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; font-weight: 900; }
#resmeta { margin: 0; color: var(--muted); font-size: .95rem; }
#hint { margin: 0 0 .6rem; padding: .6rem .8rem; background: #fff7d1; border: 2px solid var(--ink); border-radius: 12px; font-weight: 600; }

.results { list-style: none; margin: 0; padding: 0 2px; display: grid; gap: .95rem; }
@media (min-width: 700px) { .results { grid-template-columns: 1fr 1fr; gap: .9rem; } }
.results li {
  display: flex; align-items: stretch; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink); overflow: hidden; transition: background .2s;
  animation: pop .22s ease-out both; animation-delay: calc(var(--i, 0) * 12ms);
}
.results li:nth-child(odd) { transform: rotate(calc(var(--tilt) * -1)); }
.results li:nth-child(even) { transform: rotate(var(--tilt)); }
.results li.copied { background: var(--mint); }
.name {
  flex: 1 1 auto; min-width: 0; min-height: 58px; text-align: left; cursor: pointer;
  font: 800 clamp(1.08rem, 4.8vw, 1.3rem)/1.25 var(--font-display); letter-spacing: -.005em; color: var(--ink);
  background: transparent; border: 0; padding: .6rem .5rem .6rem .9rem; overflow-wrap: anywhere;
}
.icon {
  flex: none; width: 48px; min-height: 58px; display: grid; place-items: center; cursor: pointer;
  color: var(--muted); background: transparent; border: 0; border-left: 2px solid rgba(34, 16, 59, .12);
}
.icon:hover { color: var(--ink); background: var(--pop); }
.icon.fav svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.icon.fav[aria-pressed=true] { color: #e0246f; }
.icon.fav[aria-pressed=true] svg { fill: currentColor; }
.more-wrap { display: flex; justify-content: center; margin-top: 1.2rem; }

/* favorites */
.favs { margin-top: 2rem; padding: 1rem; background: var(--paper); border: 2px dashed var(--ink); border-radius: 16px; }
.favs-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.favs h2 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; }
.linkbtn { font: inherit; font-weight: 700; color: var(--accent-dark); background: none; border: 0; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 .4rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; background: var(--pop); overflow: hidden; }
.chip { font: 800 .98rem var(--font-display); min-height: 44px; padding: 0 .5rem 0 .9rem; background: transparent; border: 0; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.chip-x { width: 40px; min-height: 44px; font-size: 1.3rem; background: transparent; border: 0; border-left: 2px solid rgba(34, 16, 59, .2); cursor: pointer; color: var(--ink); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; max-width: 90vw;
  background: var(--ink); color: #fff; padding: .55rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
  transition: opacity .18s, transform .18s; overflow-wrap: anywhere; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the slider changes the mood of the page ---------- */
body[data-weird="0"] { --tilt: 0deg; }
body[data-weird="1"] { --tilt: .25deg; }
body[data-weird="2"] { --tilt: .55deg; }
body[data-weird="3"] { --tilt: 1deg; }
body[data-weird="4"] { --tilt: 1.6deg; }
body[data-weird="3"] .results li:nth-child(3n+1), body[data-weird="4"] .results li:nth-child(3n+1) { background: #fff6bf; }
body[data-weird="3"] .results li:nth-child(3n+2), body[data-weird="4"] .results li:nth-child(3n+2) { background: #ffe6f2; }
body[data-weird="4"] .results li:nth-child(3n) { background: #dffbf2; }
body[data-weird="3"] .results li.copied, body[data-weird="4"] .results li.copied { background: var(--mint); }
body[data-weird="4"] h1 mark { animation: wob 2.4s ease-in-out infinite; }

@keyframes pop { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes wob { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg) scale(1.02); } }

/* ---------- content ---------- */
.prose { padding: 1.5rem 0 1rem; }
.prose .wrap > * { max-width: 68ch; margin-left: auto; margin-right: auto; }
.prose h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; line-height: 1.2; margin: 2.2rem auto .6rem; }
.prose p, .prose li { color: #35244f; }
.levels { display: grid; gap: .6rem; padding: 0; list-style: none; margin: 1rem auto; }
.levels li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: .6rem .9rem; }
.levels b { font-family: var(--font-display); }
.levels code { font: 800 1rem var(--font-display); background: var(--pop); padding: .05rem .5rem; border-radius: 8px; }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 800; padding: .85rem 0; min-height: 48px; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1rem; }
.related { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem auto; }
.related a { display: inline-block; padding: .55rem 1rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 700; color: var(--ink); text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.related a:hover { background: var(--pop); }

/* ---------- footer ---------- */
.site-footer { margin-top: 3rem; background: var(--footer-bg); color: var(--footer-ink); padding: 2rem 0 2.4rem; text-align: center; }
.site-footer a { color: var(--footer-ink); }
.site-footer img { width: 150px; height: auto; margin: 0 auto 1rem; display: block; }
.site-footer ul { list-style: none; padding: 0; margin: .6rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .4rem; }
.site-footer ul a { display: inline-block; padding: .5rem .7rem; text-decoration: none; font-weight: 700; }
.site-footer ul a:hover { text-decoration: underline; }
.site-footer h2 { font-size: 1rem; margin: 1.2rem 0 0; font-family: var(--font-display); }
.site-footer small { display: block; margin-top: 1rem; opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@supports not (translate: 0 0) { @keyframes pop { from { opacity: 0; } to { opacity: 1; } } }
