@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Syne:wght@600;700;800&display=swap");

:root {
  --ink: #12151a;
  --ink-soft: #3a4250;
  --muted: #6b7380;
  --line: #d8dde5;
  --line-strong: #b8c0cc;
  --paper: #f3f1ec;
  --paper-2: #ebe7df;
  --surface: #faf9f6;
  --accent: #1f4b99;
  --accent-hover: #163a78;
  --accent-soft: #e8eef8;
  --danger: #b42318;
  --danger-bg: #f8e8e6;
  --ok: #1f6b45;
  --ok-bg: #e6f2eb;
  --font-brand: "Syne", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --radius: 6px;
  --control-h: 2.65rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  max-width: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 28%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(18, 21, 26, 0.015) 11px,
      rgba(18, 21, 26, 0.015) 12px
    );
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(8px);
  padding-top: env(safe-area-inset-top, 0);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav > a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav > a:hover {
  color: var(--ink);
}

.site-nav > a.btn {
  color: #fff;
  font-weight: 600;
}

.site-nav > a.btn:hover {
  color: #fff;
}

.nav-logout {
  display: inline;
}

.emoji {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  object-fit: contain;
  flex-shrink: 0;
}

.btn .emoji,
.feature-row .emoji {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.28rem;
  object-fit: contain;
}

.feature-row img.emoji {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.32rem;
}

.oauth-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.oauth-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  flex-shrink: 0;
}

.oauth-logo-btn {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.3rem;
  flex-shrink: 0;
  object-fit: contain;
}

.oauth-logo-btn--mark {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0.1rem 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

.btn-discord {
  background: #5865F2;
  border-color: #5865F2;
  color: #fff;
  gap: 0.55rem;
}

.btn-discord:hover,
.btn-discord:focus-visible {
  background: #4752c4;
  border-color: #4752c4;
  color: #fff;
}

.btn-roblox {
  background: #121212;
  border-color: #121212;
  gap: 0.55rem;
}

.btn-roblox:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.emoji-lg {
  width: 1.75rem;
  height: 1.75rem;
  vertical-align: middle;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  position: relative;
}

.brand::after {
  display: none;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  object-fit: contain;
}

.footer-brand {
  display: inline-flex;
  text-decoration: none;
}

.footer-logo {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
}

.hero-logo-wrap {
  margin: 0 0 1.15rem;
  animation: rise 0.7s var(--ease) both;
}

.hero-logo {
  display: block;
  width: min(200px, 48vw);
  height: auto;
  object-fit: contain;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.85rem;
}

.feature-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.container {
  width: min(720px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
  flex: 1;
  max-width: 100%;
}

.container-wide {
  width: min(880px, calc(100% - 2.5rem));
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  background: var(--surface);
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

h1,
h2,
h3 {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.35rem, 5.5vw, 3.6rem);
  margin: 0 0 0.85rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.65rem;
  font-weight: 700;
}

.lead {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* —— Landing —— */
.hero {
  min-height: calc(100vh - 8.5rem);
  display: grid;
  align-content: center;
  gap: 0;
  padding: 1rem 0 3rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% -8% auto auto;
  width: min(42vw, 380px);
  aspect-ratio: 1;
  background:
    linear-gradient(145deg, var(--accent) 0%, transparent 62%),
    linear-gradient(320deg, rgba(18, 21, 26, 0.08), transparent 55%);
  opacity: 0.14;
  pointer-events: none;
  animation: plane-in 1.1s var(--ease) both;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  max-width: 100%;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 1.1rem;
  color: var(--ink);
  animation: rise 0.7s var(--ease) both;
}

.hero-brand .emoji-hero {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
}

.hero .lead {
  animation: rise 0.7s var(--ease) 0.08s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  animation: rise 0.7s var(--ease) 0.16s both;
}

.hero-note {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 28rem;
  animation: rise 0.7s var(--ease) 0.24s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes plane-in {
  from {
    opacity: 0;
    transform: translate(12px, -8px) rotate(4deg);
  }
  to {
    opacity: 0.14;
    transform: none;
  }
}

/* —— Controls —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--control-h);
  padding: 0 1.15rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: 600 0.92rem/1 var(--font-body);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(31, 75, 153, 0.18);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}

.btn-secondary:hover {
  background: #fff;
  color: var(--ink);
  border-color: #9aa3b2;
  box-shadow: 0 4px 12px rgba(18, 21, 26, 0.06);
}

.btn:focus,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  box-shadow: 0 6px 16px rgba(180, 35, 24, 0.2);
}

.btn-sm {
  min-height: 2.1rem;
  padding: 0 0.85rem;
  font-size: 0.84rem;
}

.page-head {
  margin-bottom: 1.5rem;
}

.page-head h1 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page-head .lead {
  margin-top: 0.35rem;
}

.section-label {
  display: block;
  margin: 1.75rem 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.list-plain a,
.list-plain .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.list-plain a:last-child,
.list-plain .row:last-child {
  border-bottom: 0;
}

.list-plain a:hover {
  background: var(--accent-soft);
}

.list-plain strong {
  font-weight: 600;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--paper-2);
  color: var(--ink-soft);
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge-off {
  background: var(--danger-bg);
  color: var(--danger);
}

.form-shell {
  margin-top: 1rem;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}

.form-block {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.stack {
  display: grid;
  gap: 1.1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1rem;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

label:not(.inline-check):not(.field) {
  display: grid;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 500;
}

label.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}

label.inline-check:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

label.inline-check:has(input:checked) {
  border-color: rgba(31, 75, 153, 0.45);
  background: var(--accent-soft);
}

label.inline-check:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(31, 75, 153, 0.18);
}

label.inline-check span {
  flex: 1;
  min-width: 0;
}

label.inline-check a {
  font-weight: 600;
}

label.inline-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.12rem 0 0;
  flex-shrink: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease), transform 0.12s var(--ease);
}

label.inline-check input[type="checkbox"]:hover {
  border-color: var(--accent);
}

label.inline-check input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2L6.6 11.2L12.5 4.8' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 0.85rem 0.85rem;
  background-position: center;
  background-repeat: no-repeat;
}

label.inline-check input[type="checkbox"]:checked:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

label.inline-check input[type="checkbox"]:active {
  transform: scale(0.94);
}

label.inline-check input[type="checkbox"]:focus {
  outline: none;
}

label.inline-check input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.checklist {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
}

.control,
input:not([type="checkbox"]):not([type="hidden"]):not([type="color"]):not([type="file"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: var(--control-h);
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 500 0.92rem/1.3 var(--font-body);
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
  box-shadow: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
  min-height: 5.5rem;
  resize: vertical;
  padding-top: 0.7rem;
}

input:not([type="checkbox"]):not([type="hidden"]):not([type="color"]):not([type="file"]):hover,
select:hover,
textarea:hover {
  border-color: #9aa3b2;
  background: #fff;
}

input:not([type="checkbox"]):not([type="hidden"]):not([type="color"]):not([type="file"]):focus,
input:not([type="checkbox"]):not([type="hidden"]):not([type="color"]):not([type="file"]):focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
  background-image: none;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  opacity: 0.85;
}

.select-wrap:focus-within::after {
  border-color: var(--accent);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.field__label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.field--full {
  grid-column: 1 / -1;
}

label.field,
.field > .mode-hint {
  margin: 0;
}

.mode-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.link-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid #c9d6ee;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.link-box a {
  word-break: break-all;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
  margin-top: 0.25rem;
  padding-top: 1rem;
}

.help-line {
  margin: 1rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  max-width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface);
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.alert {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.alert-danger {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.alert-ok {
  border-left-color: var(--ok);
  background: var(--ok-bg);
}

.inline {
  display: inline;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  font: 500 0.92rem var(--font-body);
  cursor: pointer;
}

.linkish:hover {
  color: var(--ink);
}

.identity {
  margin: 1.25rem 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.legal-doc {
  max-width: 42rem;
}

.legal-doc h2 {
  margin-top: 1.75rem;
}

.legal-doc p,
.legal-doc li {
  color: var(--ink-soft);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0.75rem;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mt-xl { margin-top: 1.75rem; }
.mb-0 { margin-bottom: 0; }
.alert > p:first-child { margin-top: 0; }
.alert > p:last-child { margin-bottom: 0; }
.form-actions--flush {
  align-self: end;
  border: 0;
  margin: 0;
  padding: 0;
}
.form-actions--span {
  grid-column: 1 / -1;
}
.identity-title {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-body);
}

/* —— Admin lookup —— */
.lookup-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem 1rem;
  align-items: end;
}

.lookup-search__field {
  margin: 0;
}

@media (max-width: 640px) {
  .lookup-search {
    grid-template-columns: 1fr;
  }
}

.lookup-card {
  margin-top: 1.15rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(18, 21, 26, 0.03);
}

.lookup-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.lookup-card__name {
  margin: 0;
  font-size: 1.2rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
}

.lookup-card__id {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.lookup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1.25rem;
  margin: 0;
}

@media (max-width: 640px) {
  .lookup-grid {
    grid-template-columns: 1fr;
  }
}

.lookup-grid__item {
  min-width: 0;
}

.lookup-grid dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lookup-grid dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  word-break: break-word;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-pill--verified {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: rgba(31, 107, 69, 0.2);
}

.status-pill--pending {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(31, 75, 153, 0.2);
}

.status-pill--blocked,
.status-pill--deleted {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.2);
}

.state-chip {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--paper-2);
  font-size: 0.84rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.lookup-verifs {
  margin-top: 0.5rem;
}

/* —— Mobile / phone —— */
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header__bar {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.75rem 1rem;
  }

  .brand-logo {
    height: 36px;
  }

  .footer-logo {
    height: 34px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.35rem 0.75rem;
  }

  .site-nav > a:not(.btn) {
    font-size: 0.88rem;
    min-height: 2.4rem;
  }

  .site-nav > a.btn {
    margin-left: auto;
  }

  .site-nav > a {
    display: inline-flex;
    align-items: center;
  }

  .nav-logout {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
  }

  .container {
    width: 100%;
    padding: 1.35rem 1rem 2.75rem;
  }

  .container-wide {
    width: 100%;
  }

  h1 {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .page-head {
    margin-bottom: 1.15rem;
  }

  .page-head h1 {
    font-size: clamp(1.35rem, 6vw, 1.7rem);
  }

  .lead {
    font-size: 1rem;
    max-width: none;
  }

  .hero {
    min-height: auto;
    padding: 1.25rem 0 2rem;
  }

  .hero::before {
    width: min(70vw, 260px);
    inset: 0 -12% auto auto;
    opacity: 0.1;
  }

  .hero-logo {
    width: min(160px, 55vw);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.35rem;
    gap: 0.65rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-note {
    margin-top: 1.75rem;
    max-width: none;
  }

  .feature-row {
    gap: 0.65rem 1rem;
  }

  .feature-row span {
    font-size: 0.88rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom));
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .toolbar .btn {
    width: 100%;
  }

  .toolbar .help-line {
    margin: 0;
  }

  .list-plain a,
  .list-plain .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.95rem 1rem;
  }

  .meta {
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .form-shell {
    padding: 1rem;
    margin-top: 0.75rem;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
  }

  .form-actions--flush {
    width: 100%;
  }

  .form-actions--flush .btn {
    width: 100%;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .lookup-search {
    grid-template-columns: 1fr;
  }

  .lookup-grid {
    grid-template-columns: 1fr;
  }

  .lookup-card {
    padding: 1rem;
  }

  .lookup-card__head {
    flex-wrap: wrap;
  }

  .link-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .oauth-title {
    flex-wrap: wrap;
  }

  .identity {
    font-size: 0.9rem;
    word-break: break-word;
  }

  .mono {
    word-break: break-all;
  }

  .table {
    min-width: 32rem;
    font-size: 0.84rem;
  }

  .table th,
  .table td {
    padding: 0.65rem 0.7rem;
  }

  .legal-doc {
    max-width: none;
  }

  .legal-doc h2 {
    font-size: 1.05rem;
  }

  label.inline-check {
    padding: 0.8rem 0.9rem;
    font-size: 0.92rem;
  }

  input:not([type="checkbox"]):not([type="hidden"]),
  select,
  textarea,
  .control {
    font-size: 16px; /* avoid iOS zoom on focus */
  }
}

@media (max-width: 380px) {
  .site-nav > a:not(.btn) {
    font-size: 0.82rem;
  }

  .hero-logo {
    width: min(140px, 60vw);
  }
}

/* --- Dashboard stats / status / verify branding --- */
.stats-live {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.stat-tile {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-tile__value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-tile__label {
  font-size: 0.78rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-tile--ok .stat-tile__value { color: #3dd68c; }
.stat-tile--wait .stat-tile__value { color: #f0c14a; }
.stat-tile--bad .stat-tile__value { color: #f07178; }

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.role-multi {
  min-height: 9rem;
  width: 100%;
}

.dash-guild .grid-2 {
  align-items: start;
}

.unverify-box {
  margin-top: 1.75rem;
}

.unverify-box .field input {
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: none;
}

.unverify-box .form-actions {
  border-top-color: var(--line);
}

.unverify-head .section-title {
  margin-bottom: 0.25rem;
}

.unverify-head .mode-hint {
  margin-bottom: 0.85rem;
}

/* Channel picker */
.channel-picker {
  position: relative;
}

.cp-control {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: var(--control-h);
  margin: 0;
  padding: 0.55rem 2.4rem 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 550 0.92rem/1.3 var(--font-body);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cp-control:hover {
  border-color: #9aa3b2;
}

.cp-control.is-open,
.cp-control:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cp-hash {
  color: var(--accent);
  font-weight: 700;
}

.cp-hash.is-muted {
  color: var(--muted);
}

.cp-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-label.is-placeholder {
  color: var(--muted);
  font-weight: 500;
}

.cp-chevron {
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.channel-picker .cp-control {
  position: relative;
}

.cp-dropdown {
  position: absolute;
  z-index: 45;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 28, 45, 0.14);
  overflow: hidden;
}

.cp-search {
  width: 100%;
  min-height: 2.4rem !important;
  margin: 0;
  padding: 0.65rem 0.85rem !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #f8fafc !important;
}

.cp-list {
  max-height: 14rem;
  overflow: auto;
  padding: 0.35rem;
}

.cp-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: 550 0.9rem/1.25 var(--font-body);
  text-align: left;
  cursor: pointer;
}

.cp-option:hover {
  background: #f3f6fb;
}

.cp-option.is-selected {
  background: var(--accent-soft);
}

.cp-option__hash {
  color: var(--accent);
  font-weight: 700;
}

.cp-empty {
  padding: 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Branding */
.brand-panel {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.brand-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

@media (max-width: 720px) {
  .brand-grid {
    grid-template-columns: 1fr;
  }
}

.brand-sublabel {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.color-picker-row {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.55rem;
  align-items: center;
}

.color-picker-row input[type="color"],
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  box-shadow: none;
  outline: none;
}

.color-picker-row input[type="color"]::-webkit-color-swatch-wrapper,
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 3px;
  border-radius: 50%;
}

.color-picker-row input[type="color"]::-webkit-color-swatch,
input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-picker-row input[type="color"]::-moz-color-swatch,
input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-picker-row input[type="color"]:focus-visible,
input[type="color"]:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.color-swatch {
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  outline: none;
}

.color-swatch:hover {
  box-shadow: 0 0 0 2px rgba(31, 75, 153, 0.2);
}

.color-swatch.is-active,
.color-swatch:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}

.logo-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 7.5rem;
  padding: 0.9rem 1rem;
  border: 1.5px dashed #c5ccd8;
  border-radius: 14px;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.logo-drop.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.logo-drop.has-preview {
  border-style: solid;
  border-color: var(--line-strong);
  background: #fff;
}

.logo-preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}

.logo-drop__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.logo-drop__body strong {
  font-size: 0.92rem;
}

.logo-drop__body span {
  font-size: 0.8rem;
  color: var(--muted);
}

.logo-browse {
  margin-top: 0.45rem;
  width: fit-content;
  cursor: pointer;
}

.logo-clear {
  margin-top: 0.65rem;
}

.logo-url-alt {
  margin-top: 0.65rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.logo-url-alt summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
}

.logo-url-alt input {
  margin-top: 0.45rem;
}

.btn-sm {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
}

.section-title {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.flash-ok {
  background: rgba(61, 214, 140, 0.12);
  border: 1px solid rgba(61, 214, 140, 0.35);
}

.flash-warn {
  background: rgba(240, 193, 74, 0.12);
  border: 1px solid rgba(240, 193, 74, 0.35);
}

.status-page .status-overall {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  margin: 1rem 0 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.status-overall__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-overall.is-ok {
  background: #edf9f2;
  border: 1px solid #b8e6cb;
  color: #176b42;
}

.status-overall.is-ok .status-overall__dot {
  background: #22a06b;
  box-shadow: 0 0 0 4px rgba(34, 160, 107, 0.15);
}

.status-overall.is-down {
  background: #fdf1f1;
  border: 1px solid #f0c2c5;
  color: #9b2c2c;
}

.status-overall.is-down .status-overall__dot {
  background: #e55353;
  box-shadow: 0 0 0 4px rgba(229, 83, 83, 0.15);
}

.status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.status-list li {
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.status-list__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-list__main strong {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.98rem;
}

.status-list li.is-ok .status-list__main strong::before,
.status-list li.is-down .status-list__main strong::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-list li.is-ok .status-list__main strong::before {
  background: #22a06b;
}

.status-list li.is-down .status-list__main strong::before {
  background: #e55353;
}

.status-badge {
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.status-list li.is-ok .status-badge {
  background: #edf9f2;
  color: #176b42;
  border: 1px solid #b8e6cb;
}

.status-list li.is-down .status-badge {
  background: #fdf1f1;
  color: #9b2c2c;
  border: 1px solid #f0c2c5;
}

.status-list__hint {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Role picker (pill multi-select) */
.role-picker {
  position: relative;
}

.rp-control {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.4rem 2.2rem 0.4rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: text;
  box-shadow: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rp-control:hover {
  border-color: #9aa3b2;
}

.rp-control.is-open,
.rp-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.rp-tags {
  display: contents;
}

.rp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.22rem 0.3rem 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role-color, #99a2b3) 35%, #d8dee8);
  background: color-mix(in srgb, var(--role-color, #99a2b3) 10%, #fff);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.rp-chip.is-warn {
  border-color: #f0b4b4;
  background: #fff7f7;
}

.rp-chip__dot,
.rp-option__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--role-color, #99a2b3);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.rp-chip__name,
.rp-option__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.rp-chip__x:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.rp-search {
  flex: 1 1 7rem;
  min-width: 6rem;
  min-height: 1.7rem !important;
  margin: 0;
  padding: 0.2rem 0.35rem !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  font: 500 0.9rem/1.3 var(--font-body);
}

.rp-chevron {
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.rp-dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 28, 45, 0.12);
}

.rp-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: 550 0.9rem/1.25 var(--font-body);
  text-align: left;
  cursor: pointer;
}

.rp-option:hover {
  background: #f3f6fb;
}

.rp-option.is-selected {
  background: var(--accent-soft);
}

.rp-option__left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.rp-option__check {
  width: 0.95rem;
  height: 0.95rem;
  border: 1.5px solid #c5ccd8;
  border-radius: 4px;
  flex-shrink: 0;
  background: #fff;
}

.rp-option.is-selected .rp-option__check {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 2px #fff;
}

.rp-warn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border: 0;
  border-radius: 50%;
  background: #e55353;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
  box-shadow: none;
  outline: none;
}

.rp-warn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border: 0;
  border-radius: 50%;
  background: #e55353;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: middle;
  box-shadow: none;
  outline: none;
}

.rp-empty {
  padding: 0.85rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.rp-hidden {
  display: none;
}

.rate-pill {
  display: inline-block;
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  margin: 0 0 1rem;
}

.verify-branded {
  --guild-brand: transparent;
}

.verify-branded .btn {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--guild-brand) 40%, transparent);
}

.guild-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  border: 2px solid color-mix(in srgb, var(--guild-brand) 55%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
