/* ============================== tokens ============================== */
:root {
  --bg: #07070a;
  --bg-soft: #0c0c12;
  --panel: #101018;
  --panel-2: #15151f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f7;
  --muted: #9092a3;
  --muted-2: #6a6c7d;
  --accent: #ff2e55;
  --accent-2: #ff6a3d;
  --ok: #35d07f;
  --warn: #ffc247;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(255, 46, 85, 0.16), transparent 62%),
    radial-gradient(760px 520px at 4% 4%, rgba(120, 92, 255, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ============================== brand mark ============================== */
.brand-mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 26%;
  overflow: hidden;
  background: #0b0b10;
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-mark--lg {
  width: 96px;
  height: 96px;
}

.brand-mark--md {
  width: 76px;
  height: 76px;
}

.brand-mark--sm {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.brand-mark__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.brand-mark__img.is-loaded {
  display: block;
}

.brand-mark__img.is-loaded + .brand-mark__fallback {
  display: none;
}

.brand-mark__fallback {
  width: 100%;
  height: 100%;
}

/* ============================== splash ============================== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.splash.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  filter: saturate(0.9) contrast(1.05);
}

.splash__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 46% at 50% 44%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72) 78%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.92));
}

.splash__brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash__title {
  margin: 6px 0 0;
  font-size: clamp(24px, 8vw, 34px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  line-height: 1;
}

.splash__title span {
  color: var(--accent);
  margin-left: 0.18em;
}

.splash__tag {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.42em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.splash__bar {
  margin-top: 10px;
  width: 132px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.splash__bar i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: slide 1.1s ease-in-out infinite;
}

.splash__skip {
  position: absolute;
  right: 16px;
  bottom: calc(20px + var(--safe-b));
  z-index: 3;
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

@keyframes slide {
  0% { transform: translateX(-45%); }
  100% { transform: translateX(290%); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ============================== lock ============================== */
.lock {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 20px calc(28px + var(--safe-b));
}

.lock__card {
  width: 100%;
  max-width: 380px;
  padding: 28px 22px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24, 24, 34, 0.9), rgba(12, 12, 18, 0.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: rise 0.5s ease both;
}

.lock__card h2 {
  margin: 6px 0 0;
  font-size: 21px;
  font-weight: 700;
}

.lock__hint {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  max-width: 26ch;
}

.lock__form {
  width: 100%;
  display: grid;
  gap: 12px;
  text-align: left;
}

/* ============================== topbar ============================== */
.app {
  min-height: 100dvh;
  padding-bottom: calc(100px + var(--safe-b));
  animation: fade 0.4s ease both;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: linear-gradient(180deg, rgba(7, 7, 10, 0.94), rgba(7, 7, 10, 0.72));
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__name {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.topbar__name span {
  color: var(--accent);
}

.topbar__status {
  margin: 1px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar__status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(255, 194, 71, 0.14);
}

.topbar__status.is-live i {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.16);
}

.topbar__status.is-down i {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 46, 85, 0.16);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s ease;
}

.chip:active {
  transform: scale(0.97);
}

.chip svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.chip__flag {
  font-size: 14px;
  line-height: 1;
}

/* ============================== content ============================== */
.content {
  padding: 16px 16px 8px;
  max-width: 640px;
  margin: 0 auto;
}

.panel {
  animation: fade 0.3s ease both;
}

.panel__head {
  margin-bottom: 14px;
}

.panel__head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card {
  display: grid;
  gap: 16px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(22, 22, 32, 0.9), rgba(13, 13, 20, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* ============================== fields ============================== */
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field__label {
  font-size: 12.5px;
  font-weight: 600;
  color: #cfd0da;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.field__label em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.field__box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field__box:focus-within {
  border-color: rgba(255, 46, 85, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 46, 85, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.field__box.is-bad {
  border-color: rgba(255, 46, 85, 0.6);
}

.field__icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted-2);
}

.field__box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field__box input::placeholder {
  color: var(--muted-2);
  font-weight: 500;
}

.field__reveal {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--muted-2);
}

.field__reveal svg {
  width: 18px;
  height: 18px;
}

.field__reveal:hover {
  color: var(--text);
}

.field__error {
  margin: -4px 0 0;
  font-size: 12.5px;
  color: #ff7d8f;
}

.is-shake {
  animation: shake 0.36s ease;
}

@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  80% { transform: translateX(-3px); }
}

/* ============================== buttons ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  padding: 0 20px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.14s ease, filter 0.2s ease, opacity 0.2s ease;
}

.btn svg {
  width: 19px;
  height: 19px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff4f3a);
  box-shadow: 0 14px 30px -14px rgba(255, 46, 85, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn--primary:active {
  transform: scale(0.985);
}

.btn[disabled] {
  opacity: 0.6;
  filter: saturate(0.7);
  pointer-events: none;
}

.btn.is-loading svg {
  display: none;
}

.btn.is-loading span::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 9px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 8px 12px;
  margin-top: 2px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: #cfd0da;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--line-strong);
}

.ghost-btn svg {
  width: 15px;
  height: 15px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================== uid rows ============================== */
.uids {
  display: grid;
  gap: 8px;
}

.uid-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.uid-row .field__box {
  flex: 1;
  height: 48px;
}

.uid-row__remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.uid-row__remove svg {
  width: 16px;
  height: 16px;
}

/* ============================== picker ============================== */
.picker {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.picker:active {
  background: rgba(255, 255, 255, 0.07);
}

.picker__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(255, 46, 85, 0.12);
  border: 1px solid rgba(255, 46, 85, 0.22);
}

.picker__icon svg {
  width: 20px;
  height: 20px;
}

.picker__body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.picker__label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.picker__value {
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker__value.is-empty {
  color: var(--muted-2);
  font-weight: 500;
}

.picker__chev {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted-2);
}

/* ============================== badges / segmented ============================== */
.badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.badge-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 11px;
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.badge-opt:active {
  transform: scale(0.98);
}

.badge-opt__dot {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #0b0b10;
  background: linear-gradient(145deg, #f3f3f7, #b9b9c6);
}

.badge-opt__name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}

.badge-opt.is-active {
  border-color: rgba(255, 46, 85, 0.55);
  background: linear-gradient(180deg, rgba(255, 46, 85, 0.16), rgba(255, 46, 85, 0.06));
  box-shadow: 0 0 0 3px rgba(255, 46, 85, 0.1);
}

.badge-opt.is-active .badge-opt__dot {
  background: linear-gradient(145deg, #ff6a7f, #ff2e55);
  color: #fff;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.segmented button {
  height: 42px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.segmented button.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.segmented--sm {
  margin: 12px 0 14px;
}

.segmented--sm button {
  height: 36px;
  font-size: 12.5px;
}

/* ============================== library ============================== */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.searchbar svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted-2);
}

.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
}

.searchbar input::placeholder {
  color: var(--muted-2);
}

.emote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
  gap: 8px;
}

.emote-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  transition: transform 0.12s ease, border-color 0.18s ease;
}

.emote-card:active {
  transform: scale(0.98);
  border-color: var(--line-strong);
}

.emote-card__name {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emote-card__id {
  font-size: 10px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.emote-card__id svg {
  width: 11px;
  height: 11px;
  opacity: 0.7;
}

.emote-card.is-upcoming {
  border-color: rgba(255, 194, 71, 0.24);
}

.emote-card.is-upcoming .emote-card__id {
  color: rgba(255, 194, 71, 0.85);
}

.empty {
  grid-column: 1 / -1;
  padding: 26px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ============================== tabbar ============================== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(8, 8, 12, 0.86);
  backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tab {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 7px 4px 5px;
  border-radius: 13px;
  color: var(--muted-2);
  transition: color 0.18s ease, background 0.18s ease;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 46, 85, 0.18), rgba(255, 46, 85, 0.05));
}

/* ============================== sheet ============================== */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

.sheet.is-open {
  visibility: visible;
  pointer-events: auto;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.24s ease;
  backdrop-filter: blur(3px);
}

.sheet.is-open .sheet__backdrop {
  opacity: 1;
}

.sheet__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #14141d, #0b0b11);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.9);
  transform: translateY(102%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: var(--safe-b);
}

.sheet.is-open .sheet__panel {
  transform: none;
}

.sheet__grip {
  width: 42px;
  height: 4px;
  margin: 9px auto 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
}

.sheet__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.sheet__body {
  padding: 0 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* sheets: server list, emote list, result */
.server-list {
  display: grid;
  gap: 8px;
}

.server-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  text-align: left;
}

.server-row__flag {
  font-size: 19px;
}

.server-row__name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.server-row__check {
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0;
}

.server-row.is-active {
  border-color: rgba(255, 46, 85, 0.45);
  background: rgba(255, 46, 85, 0.08);
}

.server-row.is-active .server-row__check {
  opacity: 1;
}

.emote-list {
  display: grid;
  gap: 6px;
}

.emote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
  text-align: left;
}

.emote-row:active {
  background: rgba(255, 255, 255, 0.07);
}

.emote-row__name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emote-row__id {
  font-size: 11px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.result {
  display: grid;
  gap: 14px;
  padding: 4px 0 2px;
}

.result__banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.result__banner.is-ok {
  border-color: rgba(53, 208, 127, 0.34);
  background: rgba(53, 208, 127, 0.09);
}

.result__banner.is-bad {
  border-color: rgba(255, 46, 85, 0.4);
  background: rgba(255, 46, 85, 0.09);
}

.result__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.result__icon svg {
  width: 20px;
  height: 20px;
}

.result__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
}

.result__msg {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.result__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.meta-cell {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  min-width: 0;
}

.meta-cell dt {
  margin: 0;
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-cell dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================== toast ============================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  z-index: 95;
  transform: translate(-50%, 18px);
  max-width: min(88vw, 420px);
  padding: 11px 16px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(24, 24, 34, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  text-align: center;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-bad {
  border-color: rgba(255, 46, 85, 0.5);
}

.toast.is-good {
  border-color: rgba(53, 208, 127, 0.45);
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================== wider screens ============================== */
@media (min-width: 700px) {
  body {
    font-size: 16px;
  }

  .content {
    padding-top: 24px;
  }

  .card {
    padding: 22px 20px;
  }

  .badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tabbar {
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, 100%);
    bottom: 14px;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  }

  .app {
    padding-bottom: 110px;
  }

  .sheet {
    align-items: center;
  }

  .sheet__panel {
    border-radius: 24px;
    max-height: 82dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================== emote artwork ============================== */
.emote-row__thumb,
.picker__thumb {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 11px;
  object-fit: cover;
  background: linear-gradient(160deg, #1d1d29, #101018);
  border: 1px solid var(--line);
}

.picker__thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.emote-row {
  align-items: center;
  gap: 10px;
}

.emote-row__body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.emote-card {
  padding: 7px;
  gap: 2px;
}

.emote-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 11px;
  object-fit: cover;
  background: linear-gradient(160deg, #1d1d29, #101018);
  border: 1px solid var(--line);
  margin-bottom: 4px;
}

.emote-card.is-missing-shot .emote-card__img {
  display: none;
}

.emote-card.is-missing-shot {
  padding-top: 12px;
}

.emote-thumb-fallback {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  background: linear-gradient(160deg, #1d1d29, #101018);
  border: 1px solid var(--line);
  text-transform: uppercase;
}

/* ============================== badge icons ============================== */
.badge-opt {
  align-items: center;
  gap: 10px;
}

.badge-opt__icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #0a0a10;
  background: linear-gradient(145deg, #f4f4f8, #b6b6c4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 14px -10px rgba(0, 0, 0, 0.9);
}

.badge-opt__icon svg {
  width: 21px;
  height: 21px;
}

.badge-opt__icon--gold { background: linear-gradient(145deg, #ffe08a, #d99b2b); }
.badge-opt__icon--blue { background: linear-gradient(145deg, #9fd0ff, #2f7fe0); }
.badge-opt__icon--green { background: linear-gradient(145deg, #9df0c4, #17a766); }
.badge-opt__icon--violet { background: linear-gradient(145deg, #d3c2ff, #7b58e8); }
.badge-opt__icon--red { background: linear-gradient(145deg, #ffb3b3, #e0303f); }

.badge-opt.is-active .badge-opt__icon {
  box-shadow: 0 0 0 2px rgba(255, 46, 85, 0.45), 0 6px 14px -10px rgba(0, 0, 0, 0.9);
}
