:root {
  color-scheme: light;
  --pokemon-yellow: #ffcb05;
  --pokemon-yellow-soft: #ffe46b;
  --pokemon-blue: #2a75bb;
  --pokemon-blue-deep: #003a70;
  --pokemon-red: #ee1515;
  --pokemon-red-deep: #cc0000;
  --type-water: #6390f0;
  --type-psychic: #f95587;
  --pokeball-black: #202124;
  --pokeball-white: #f7f8fb;
  --bg: #f2f5fa;
  --bg-alt: #eaf1fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f8fafd;
  --ink: #151923;
  --ink-soft: #354052;
  --muted: #687487;
  --line: #d8deea;
  --line-strong: #1f2a3b;
  --focus: #0b63ce;
  --success: #2eb872;
  --warning: #ffb800;
  --danger: #df2f2f;
  --radius-card: 8px;
  --radius-control: 8px;
  --radius-small: 6px;
  --shadow-control: 0 3px 0 var(--line-strong);
  --shadow-soft: 0 8px 22px rgba(23, 35, 54, 0.09);
  --shadow-raised: 0 14px 32px rgba(23, 35, 54, 0.13);
  --container: 1240px;
  --font-sans:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --font-display: "Arial Rounded MT Bold", "Nunito", "Avenir Next Rounded", var(--font-sans);

  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

body.lock-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.ui-icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  transition: grid-template-columns 0.18s ease;
}

.container {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 24px;
}

.site-sidebar-scrim {
  display: none;
}

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  grid-column: 2;
  border-bottom: 1px solid rgba(31, 42, 59, 0.12);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px);
}

.site-topbar__inner {
  width: min(100%, var(--container));
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto;
  padding: 10px 24px;
}

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

.sidebar-toggle {
  display: none;
}

.site-topbar__spacer {
  flex: 1 1 auto;
}

.site-topbar__search {
  flex: 0 1 520px;
}

.global-search {
  position: relative;
  min-width: 220px;
}

.global-search__toggle {
  display: none;
}

.global-search__form {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line-strong);
  padding: 0 10px;
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.global-search__form:focus-within {
  border-color: var(--pokemon-blue);
  box-shadow: 0 3px 0 var(--pokemon-blue-deep);
}

.global-search__form-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.global-search__input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.global-search__input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.global-search__clear {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.global-search__clear:hover {
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.global-search__panel {
  position: absolute;
  inset: calc(100% + 8px) 0 auto 0;
  z-index: 80;
  max-height: min(70dvh, 620px);
  overflow: auto;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: var(--shadow-raised);
  padding: 10px;
}

.global-search__group + .global-search__group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.global-search__group-title {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.global-search__result {
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-control);
  color: var(--ink);
}

.global-search__result:hover {
  background: var(--surface-soft);
}

.global-search__result-image,
.global-search__result-mark {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
}

.global-search__result-image {
  object-fit: contain;
}

.global-search__result-mark {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
}

.global-search__result-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.global-search__result-title,
.global-search__result-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search__result-title {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.global-search__result-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.global-search__message {
  margin: 0;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.global-search__skeleton {
  display: grid;
  gap: 8px;
}

.global-search__skeleton span {
  height: 48px;
  border-radius: var(--radius-control);
  background: linear-gradient(90deg, var(--surface-soft), var(--line), var(--surface-soft));
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

.topbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-actions__icon-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}

.view-as-banner {
  position: sticky;
  top: 64px;
  z-index: 44;
  grid-column: 2;
  border-bottom: 1px solid rgba(31, 42, 59, 0.14);
  background: #fff7cc;
}

.view-as-banner__inner {
  width: min(100%, var(--container));
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto;
  padding: 8px 24px;
}

.view-as-banner__label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pokemon-blue-deep);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.view-as-banner__button {
  flex: 0 0 auto;
}

.site-sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  height: 100dvh;
  border-right: 1px solid rgba(31, 42, 59, 0.12);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
}

.site-sidebar__inner {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 18px 14px;
}

.site-sidebar__header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-lockup {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.site-sidebar__header .brand-lockup {
  flex: 1 1 auto;
}

.sidebar-collapse-toggle {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease;
}

.sidebar-collapse-toggle:hover {
  border-color: var(--pokemon-blue);
  background: rgba(255, 203, 5, 0.22);
  color: var(--pokemon-blue-deep);
}

.sidebar-collapse-toggle__icon {
  width: 20px;
  height: 20px;
  transition: transform 0.14s ease;
}

.sidebar-collapse-toggle__icon--expanded {
  transform: rotate(180deg);
}

.pokemon-word {
  display: inline-block;
  color: var(--pokemon-yellow);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 0.9;
  -webkit-text-stroke: 2px var(--pokemon-blue-deep);
  text-shadow: 2px 3px 0 var(--pokemon-blue);
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.side-nav {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0;
  scrollbar-color: rgba(104, 116, 135, 0.2) transparent;
  scrollbar-width: thin;
}

.side-nav:hover,
.side-nav:focus-within {
  scrollbar-color: rgba(104, 116, 135, 0.42) transparent;
}

.side-nav::-webkit-scrollbar {
  width: 6px;
}

.side-nav::-webkit-scrollbar-track {
  background: transparent;
}

.side-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(104, 116, 135, 0.18);
}

.side-nav:hover::-webkit-scrollbar-thumb,
.side-nav:focus-within::-webkit-scrollbar-thumb {
  background: rgba(104, 116, 135, 0.38);
}

.side-nav__link {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-control);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.side-nav__link:hover {
  background: rgba(255, 203, 5, 0.24);
  color: var(--ink);
}

.side-nav__link.router-link-active {
  background: var(--pokemon-blue);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--line-strong);
}

.side-nav__group {
  display: grid;
  gap: 4px;
}

.side-nav__group-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.side-nav__group-trigger.router-link-active {
  background: rgba(42, 117, 187, 0.12);
  color: var(--pokemon-blue-deep);
  box-shadow: inset 0 0 0 1px rgba(42, 117, 187, 0.18);
}

.side-nav__chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  transition: transform 0.14s ease;
}

.side-nav__children {
  display: grid;
  gap: 4px;
  margin-left: 15px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.side-nav__link--child {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

.side-nav__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-nav__icon {
  width: 19px;
  height: 19px;
}

.side-nav__badge {
  margin-left: auto;
  flex: 0 0 auto;
}

.side-nav__link.router-link-active .status-badge {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.side-nav__link.router-link-active .status-badge__dot {
  background: var(--pokemon-yellow);
}

.language-menu {
  position: relative;
}

.notification-menu {
  position: relative;
}

.notification-menu__trigger {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    color 0.14s ease;
}

.notification-menu__trigger:hover,
.notification-menu__trigger[aria-expanded="true"] {
  border-color: var(--pokemon-blue);
  background: rgba(255, 203, 5, 0.22);
  color: var(--pokemon-blue-deep);
}

.notification-menu__trigger:focus-visible {
  outline: none;
  border-color: var(--pokemon-blue);
  box-shadow: 0 0 0 4px rgba(42, 117, 187, 0.16);
}

.notification-menu__icon-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.notification-menu__icon {
  width: 18px;
  height: 18px;
}

.notification-menu__label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notification-menu__badge {
  position: absolute;
  top: -9px;
  right: -11px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--pokemon-red);
  color: #ffffff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.notification-menu__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 62;
  width: min(370px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.notification-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.notification-menu__header h2,
.notification-menu__empty h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.2;
}

.notification-menu__header p,
.notification-menu__empty p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.notification-menu__mark-all,
.notification-menu__load-more,
.notification-item__read-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--pokemon-blue-deep);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.notification-menu__mark-all {
  padding: 6px 8px;
  white-space: nowrap;
}

.notification-menu__mark-all:hover,
.notification-menu__load-more:hover,
.notification-item__read-button:hover {
  background: rgba(255, 203, 5, 0.24);
}

.notification-list {
  display: grid;
  align-content: start;
  max-height: 420px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item--unread {
  background: rgba(42, 117, 187, 0.06);
}

.notification-item--skeleton {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.notification-item__main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notification-item__main:hover {
  background: rgba(255, 203, 5, 0.16);
}

.notification-item__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--pokemon-blue-deep);
}

.notification-item--unread .notification-item__icon {
  border-color: var(--pokemon-blue);
  background: rgba(255, 203, 5, 0.28);
}

.notification-item__icon .ui-icon {
  width: 18px;
  height: 18px;
}

.notification-item__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.notification-item__copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.notification-item__detail {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notification-item__copy time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.notification-item__read-button {
  width: 38px;
  min-height: 100%;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.notification-item__read-button .ui-icon {
  width: 17px;
  height: 17px;
}

.notification-menu__empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 18px;
  text-align: center;
}

.notification-menu__empty-icon {
  width: 30px;
  height: 30px;
  color: var(--pokemon-blue);
}

.notification-menu__load-more {
  width: 100%;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.language-menu__trigger {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    color 0.14s ease;
}

.language-menu__trigger:hover,
.language-menu__trigger[aria-expanded="true"] {
  border-color: var(--pokemon-blue);
  background: rgba(255, 203, 5, 0.22);
  color: var(--pokemon-blue-deep);
}

.language-menu__trigger:focus-visible {
  outline: none;
  border-color: var(--pokemon-blue);
  box-shadow: 0 0 0 4px rgba(42, 117, 187, 0.16);
}

.language-menu__icon {
  width: 18px;
  height: 18px;
}

.language-menu__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 8px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.language-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.language-menu__item:hover,
.language-menu__item.active {
  background: rgba(255, 203, 5, 0.22);
  color: var(--pokemon-blue-deep);
}

.language-menu__item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.language-menu__item.active {
  box-shadow: inset 0 0 0 2px rgba(42, 117, 187, 0.2);
}

.language-menu__code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-user {
  min-height: 44px;
  max-width: min(220px, 32vw);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}

.auth-user:hover,
.auth-user.router-link-active {
  border-color: var(--pokemon-blue);
  background: rgba(255, 203, 5, 0.22);
  color: var(--pokemon-blue-deep);
}

.auth-user__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.auth-user__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tooltip {
  position: fixed;
  z-index: 95;
  max-width: min(230px, calc(100vw - 96px));
  padding: 7px 10px;
  border-radius: var(--radius-small);
  background: #172036;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
  pointer-events: none;
  transform: translateY(-50%);
}

.sidebar-tooltip::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-right: 6px solid #172036;
  border-bottom: 6px solid transparent;
}

@media (min-width: 901px) {
  .app-shell--sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app-shell--sidebar-collapsed .site-sidebar__inner {
    gap: 14px;
    padding: 14px 10px;
  }

  .app-shell--sidebar-collapsed .site-topbar__brand {
    flex: 0 1 auto;
    display: flex;
  }

  .app-shell--sidebar-collapsed .site-sidebar__header {
    display: grid;
    justify-items: center;
  }

  .app-shell--sidebar-collapsed .site-sidebar__header .brand-lockup {
    width: 44px;
    justify-content: center;
    gap: 0;
  }

  .app-shell--sidebar-collapsed .site-sidebar__header .brand-lockup > span,
  .app-shell--sidebar-collapsed .side-nav__label {
    width: 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
  }

  .app-shell--sidebar-collapsed .side-nav__link,
  .app-shell--sidebar-collapsed .side-nav__group-trigger {
    justify-content: center;
    gap: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .app-shell--sidebar-collapsed .side-nav__chevron {
    width: 14px;
    height: 14px;
    margin-left: 0;
  }

  .app-shell--sidebar-collapsed .side-nav__children {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .app-shell--sidebar-collapsed .side-nav__link--child {
    min-height: 38px;
    padding: 8px;
  }

  .app-shell--sidebar-collapsed .side-nav__badge {
    display: none;
  }

}

.page {
  position: relative;
  grid-column: 2;
  --page-padding-x: 24px;
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 30px var(--page-padding-x) 58px;
}

.site-footer {
  grid-column: 2;
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 24px 34px;
}

.site-footer__inner {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer__copyright,
.site-footer__notice {
  margin: 0;
}

.site-footer__copyright {
  color: var(--ink-soft);
  font-weight: 850;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.site-footer__links a {
  color: var(--pokemon-blue-deep);
  font-weight: 850;
}

.site-footer__links a:hover {
  color: var(--pokemon-blue);
}

.page-stack {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.page-header__copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--pokemon-blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-kicker::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(to bottom, var(--pokemon-red) 0 44%, var(--line-strong) 44% 56%, var(--surface) 56% 100%);
}

.page-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 950;
  line-height: 1.08;
}

.page-subtitle {
  margin: 0;
  color: var(--ink-soft);
}

.pokeball-mark {
  position: relative;
  width: var(--ball-size, 34px);
  height: var(--ball-size, 34px);
  display: inline-block;
  flex: 0 0 auto;
  border: calc(var(--ball-size, 34px) * 0.07) solid var(--pokeball-black);
  border-radius: 50%;
  background:
    linear-gradient(
      to bottom,
      var(--pokemon-red) 0 45%,
      var(--pokeball-black) 45% 55%,
      var(--pokeball-white) 55% 100%
    );
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.45), 0 3px 0 rgba(0, 0, 0, 0.18);
}

.pokeball-mark::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: calc(var(--ball-size, 34px) * 0.34);
  height: calc(var(--ball-size, 34px) * 0.34);
  transform: translate(-50%, -50%);
  border: calc(var(--ball-size, 34px) * 0.055) solid var(--pokeball-black);
  border-radius: 50%;
  background: var(--pokeball-white);
  box-shadow: inset 0 0 0 calc(var(--ball-size, 34px) * 0.055) #dfe5ef;
}

.ui-button,
.primary-button,
.link-button,
.plain-button,
.row-actions button,
.inline-row > button,
.appearance-row__delete {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
  min-height: 42px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 2px solid var(--btn-border);
  border-radius: var(--radius-control);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--shadow-control);
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease;
  white-space: nowrap;
}

.ui-button:hover,
.primary-button:hover,
.link-button:hover,
.plain-button:hover,
.row-actions button:hover,
.inline-row > button:hover,
.appearance-row__delete:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--line-strong);
}

.ui-button:active,
.primary-button:active,
.link-button:active,
.plain-button:active,
.row-actions button:active,
.inline-row > button:active,
.appearance-row__delete:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--line-strong);
}

.ui-button--primary,
.primary-button {
  --btn-bg: var(--pokemon-yellow);
  --btn-fg: #172036;
}

.ui-button--blue,
.link-button {
  --btn-bg: var(--pokemon-blue);
  --btn-fg: #ffffff;
}

.ui-button--red {
  --btn-bg: var(--pokemon-red);
  --btn-fg: #ffffff;
}

.link-button--danger {
  --btn-bg: var(--danger);
  --btn-fg: #ffffff;
}

.ui-button--ghost,
.plain-button,
.row-actions button,
.inline-row > button,
.appearance-row__delete {
  --btn-bg: var(--surface);
  --btn-border: var(--line);
  box-shadow: none;
}

.ui-button--small {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 14px;
  box-shadow: 0 2px 0 var(--line-strong);
}

.plain-button--icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
}

button:disabled,
.ui-button:disabled,
.primary-button:disabled,
.link-button:disabled,
.plain-button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
  box-shadow: 0 2px 0 var(--line);
}

.item-create-action {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}

.item-create-action__control {
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius-control);
  box-shadow: 0 2px 0 var(--line-strong);
}

.item-create-action__control .ui-button {
  box-shadow: none;
}

.item-create-action__control .ui-button:hover,
.item-create-action__control .ui-button:active {
  transform: none;
  box-shadow: none;
}

.item-create-action__control .ui-button:disabled {
  box-shadow: none;
}

.item-create-action__primary {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.item-create-action__menu-button {
  position: relative;
  min-width: 38px;
  padding-inline: 8px;
  border-left-width: 1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.item-create-action__control.has-defaults .item-create-action__menu-button::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--pokemon-blue);
}

.item-create-defaults-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 12px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.item-create-defaults-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.item-create-defaults-menu__header strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.item-create-defaults-menu .field {
  min-width: 0;
}

.item-create-defaults-menu__checks {
  display: grid;
  gap: 8px;
}

.filter-panel,
.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.field {
  display: grid;
  gap: 7px;
  align-content: start;
}

.field label,
.field-label {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
}

.field input,
.field select,
.field textarea,
.tags-select__search {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.tags-select__search:focus {
  border-color: var(--pokemon-blue);
  box-shadow: 0 0 0 4px rgba(42, 117, 187, 0.16);
  outline: none;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(8, 13, 22, 0.56);
}

.modal-backdrop.is-open {
  display: grid;
}

.modal {
  width: min(var(--modal-width, 560px), 100%);
  max-height: min(100%, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}

.modal--wide {
  --modal-width: 980px;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-soft);
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.modal-header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.modal-close-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.modal-close-button .ui-icon {
  width: 20px;
  height: 20px;
}

.modal-body {
  min-width: 0;
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.modal-edit-form {
  display: grid;
  gap: 12px;
}

.modal-edit-form--tabbed {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.modal-edit-form--tabbed > .pokemon-edit-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.ai-moderation-form {
  max-width: 680px;
}

.rate-limit-list {
  display: grid;
  gap: 0;
}

.rate-limit-row {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.rate-limit-row:last-child {
  border-bottom: 0;
}

.rate-limit-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.rate-limit-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}

.data-tool-grid {
  display: grid;
  gap: 0;
}

.data-tool-panel {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.data-tool-panel:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.data-tool-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.data-tool-panel__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.data-tool-scope-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.data-tool-scope {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.data-tool-scope input {
  width: 18px;
  height: 18px;
}

.pokemon-edit-form {
  height: clamp(420px, calc(100dvh - 188px), 640px);
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.pokemon-fetch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.pokemon-fetch-panel__input {
  position: relative;
  min-width: 0;
}

.pokemon-fetch-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pokemon-fetch-panel__button {
  min-width: 118px;
  justify-content: center;
}

.pokemon-fetch-results {
  position: fixed;
  top: auto;
  right: auto;
  left: auto;
  z-index: 80;
  max-height: var(--pokemon-fetch-results-max-height, 260px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.pokemon-fetch-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.pokemon-fetch-option:hover,
.pokemon-fetch-option:focus-visible {
  background: color-mix(in srgb, var(--pokemon-blue) 10%, var(--surface));
}

.pokemon-fetch-option__name {
  min-width: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.pokemon-fetch-option__identifier {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.pokemon-fetch-results__status {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.pokemon-image-picker {
  display: grid;
  gap: 14px;
}

.pokemon-image-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 4px solid #172036;
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    #eef9ff;
  color: #172036;
}

.pokemon-image-preview__screen {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
}

.pokemon-image-preview__screen img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.pokemon-image-preview__caption {
  display: grid;
  gap: 4px;
}

.pokemon-image-preview__caption strong {
  color: #172036;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1.15;
}

.pokemon-image-preview__caption span {
  color: #354052;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pokemon-image-preview__caption p {
  margin: 0;
  color: #354052;
}

.pokemon-image-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.pokemon-image-thumbnail {
  min-height: 128px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 2px 0 var(--line-strong);
  color: var(--ink);
  cursor: pointer;
}

.pokemon-image-thumbnail:hover,
.pokemon-image-thumbnail:focus-visible {
  border-color: var(--pokemon-blue);
}

.pokemon-image-thumbnail.active {
  background: color-mix(in srgb, var(--pokemon-yellow) 24%, var(--surface));
  border-color: var(--pokemon-blue-deep);
}

.pokemon-image-thumbnail img {
  width: 86px;
  height: 76px;
  object-fit: contain;
}

.pokemon-image-thumbnail span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}

.pokemon-image-clear {
  justify-self: start;
}

.image-upload-field {
  gap: 12px;
}

.image-upload-field__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.image-upload-field__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.image-upload-field__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.image-upload-field__preview .pokemon-image-preview__screen {
  min-height: 180px;
}

.image-upload-field__preview .pokemon-image-preview__screen img {
  max-height: 180px;
}

.image-upload-field__empty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pokemon-edit-panel {
  min-height: 0;
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  padding-right: 2px;
}

.pokemon-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.pokemon-measurement-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.pokemon-measurement-control {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.pokemon-measurement-control > .field-label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.pokemon-measurement-control > .field {
  min-width: 96px;
  flex: 1 1 110px;
}

.pokemon-measurement-control > .pokemon-measurement-fields {
  min-width: 0;
  flex: 1 1 220px;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 8px;
}

.pokemon-measurement-fields,
.pokemon-stats-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 12px;
}

.modal-footer {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.tags-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.tags-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tags-select__trigger.open {
  border-color: var(--pokemon-blue);
  box-shadow: 0 0 0 4px rgba(42, 117, 187, 0.16);
}

.tags-select__selected {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.tags-select--single .tags-select__trigger {
  padding: 10px 12px;
}

.tags-select--single .tags-select__selected {
  align-items: center;
}

.tags-select__single-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
}

.tags-select__single-value span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags-select__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(42, 117, 187, 0.28);
  border-radius: 999px;
  background: rgba(42, 117, 187, 0.1);
  color: var(--pokemon-blue-deep);
  font-size: 13px;
  font-weight: 850;
}

.tags-select__tag > span:first-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tags-select__thumb {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  object-fit: contain;
}

.tags-select__thumb--tag {
  width: 20px;
  height: 20px;
}

.tags-select__remove {
  min-width: 18px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
}

.tags-select__remove .ui-icon {
  width: 14px;
  height: 14px;
}

.tags-select__remove:hover {
  background: rgba(42, 117, 187, 0.14);
}

.tags-select__placeholder {
  color: var(--muted);
}

.tags-select__arrow {
  flex: 0 0 auto;
  color: var(--muted);
  width: 18px;
  height: 18px;
  transition: transform 0.14s ease;
}

.tags-select__trigger.open .tags-select__arrow {
  transform: rotate(180deg);
}

.tags-select__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 240px;
  padding: 8px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.tags-select__dropdown--fixed {
  position: fixed;
  top: auto;
  left: auto;
  z-index: 80;
}

.tags-select__options {
  display: grid;
  max-height: var(--tags-select-options-max-height, 240px);
  overflow: auto;
}

.tags-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tags-select__option-label {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

.tags-select__option-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tags-select__option:hover,
.tags-select__option.active,
.tags-select__option.selected {
  background: rgba(255, 203, 5, 0.22);
  color: var(--pokemon-blue-deep);
}

.tags-select__option.active {
  box-shadow: inset 0 0 0 2px rgba(42, 117, 187, 0.2);
}

.tags-select__option.selected {
  font-weight: 850;
}

.tags-select__create {
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--pokemon-blue);
  font-weight: 850;
}

.tags-select__option:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.tags-select__state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--pokemon-blue);
  font-size: 12px;
  font-weight: 850;
}

.tags-select__state .ui-icon {
  width: 14px;
  height: 14px;
}

.tags-select__empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.segmented button {
  min-width: 52px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 850;
  cursor: pointer;
}

.segmented button.active {
  background: var(--pokemon-blue);
  color: #ffffff;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs > button {
  min-height: 42px;
  padding: 9px 13px;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 900;
  cursor: pointer;
}

.tabs > button.active {
  border-color: var(--line-strong);
  background: var(--pokemon-yellow);
  color: #172036;
  box-shadow: 0 2px 0 var(--line-strong);
}

.tabs--component {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-column: 1 / -1;
  flex: 1 0 100%;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 2px solid var(--line);
}

.tab-button {
  min-height: 42px;
  padding: 9px 13px;
  border-bottom: 3px solid transparent;
  border-radius: var(--radius-control) var(--radius-control) 0 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 900;
  cursor: pointer;
}

.tab-button[aria-selected="true"] {
  border-color: var(--pokemon-yellow);
  background: var(--surface);
  color: var(--pokemon-blue-deep);
}

.skeleton {
  display: grid;
  gap: 10px;
}

.skeleton-line,
.skeleton-box {
  display: block;
  background: linear-gradient(90deg, var(--line), var(--surface), var(--line));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton-line {
  height: 14px;
  border-radius: 999px;
}

.skeleton-box {
  height: 128px;
  border-radius: var(--radius-card);
}

.tab-list--skeleton {
  padding-bottom: 0;
}

.skeleton-tab {
  border-radius: var(--radius-control) var(--radius-control) 0 0;
}

.filter-panel--skeleton {
  pointer-events: none;
}

.entity-card--skeleton {
  pointer-events: none;
}

.skeleton-entity-mark {
  border-radius: var(--radius-control);
  box-shadow: 0 3px 0 var(--line);
}

.skeleton-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skeleton-chip {
  height: 28px;
}

.page-header--skeleton {
  pointer-events: none;
}

.skeleton-detail-section {
  pointer-events: none;
}

.skeleton-detail-section .detail-section__body {
  gap: 14px;
}

.skeleton-row-list li {
  min-height: 43px;
}

.skeleton-appearance-row {
  display: grid;
  grid-template-columns: clamp(140px, 20%, 220px) minmax(0, 1fr);
  gap: 12px;
}

.skeleton-summary {
  display: grid;
  gap: 6px;
  width: 100%;
}

.skeleton-summary div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.skeleton-form-stack {
  display: grid;
  gap: 14px;
}

.skeleton-auth-state {
  display: grid;
  gap: 12px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.entity-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.entity-card {
  position: relative;
  min-height: 164px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
  color: var(--ink);
  overflow: hidden;
}

.entity-card--link {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.entity-card--link:hover {
  transform: translateY(-2px);
  border-color: var(--pokemon-blue);
  box-shadow: 0 5px 0 var(--line-strong);
}

.entity-card__mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--pokemon-yellow);
  box-shadow: 0 3px 0 var(--line-strong);
  color: #172036;
  font-family: var(--font-display);
  font-weight: 950;
}

.entity-card__mark.entity-card__mark--image {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.entity-card__icon {
  width: 26px;
  height: 26px;
}

.entity-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.entity-card__ribbon-clip {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 2px);
  pointer-events: none;
}

.entity-card__ribbon {
  position: absolute;
  top: 14px;
  left: -38px;
  width: 132px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  transform: rotate(-35deg);
  border: 2px solid var(--line-strong);
  background: var(--pokemon-blue);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--line-strong);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.entity-card__content {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.entity-card__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.entity-card__subtitle,
.meta-line {
  margin: 0;
  color: var(--muted);
}

.catalog-card-grid .entity-card {
  min-height: 224px;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  gap: 14px;
  padding: 18px 16px 16px;
  text-align: center;
}

.pokemon-list-grid .entity-card {
  min-height: 168px;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
}

.pokemon-list-grid .entity-card__mark,
.catalog-card-grid .entity-card__mark {
  width: 92px;
  height: 92px;
}

.pokemon-list-grid .pokeball-mark,
.catalog-card-grid .pokeball-mark {
  --ball-size: 64px !important;
}

.catalog-card-grid .entity-card__content {
  justify-items: center;
  gap: 7px;
}

.pokemon-list-grid .entity-card__content {
  justify-items: center;
  gap: 0;
}

.pokemon-list-grid .entity-card__title,
.catalog-card-grid .entity-card__title {
  font-size: 20px;
}

.catalog-card-grid .entity-card__subtitle {
  min-height: 20px;
  font-weight: 850;
}

.collections-card-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.collections-card-grid .entity-card--collection-compact {
  min-height: 0;
  aspect-ratio: 1;
  align-content: center;
  justify-content: center;
  gap: 0;
  padding: 10px;
  overflow: visible;
}

.collections-card-grid .entity-card--collection-compact:hover,
.collections-card-grid .entity-card--collection-compact:focus-visible {
  z-index: 4;
}

.collections-card-grid .entity-card--collection-compact .entity-card__mark {
  width: min(100%, 72px);
  height: auto;
  aspect-ratio: 1;
}

.collections-card-grid .entity-card--collection-compact .skeleton-entity-mark {
  width: min(100%, 72px) !important;
  height: auto !important;
  aspect-ratio: 1;
}

.collections-card-grid .entity-card--collection-compact .entity-card__content {
  display: none;
}

.entity-card__tooltip {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  transform: translate(-50%, 4px);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--line-strong);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.entity-card__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -4px) rotate(45deg);
  border-right: 2px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
  background: var(--surface-raised);
}

.entity-card--collection-compact:hover .entity-card__tooltip,
.entity-card--collection-compact:focus-visible .entity-card__tooltip {
  transform: translate(-50%, 0);
  opacity: 1;
}

.item-grid-slot {
  position: relative;
  min-width: 0;
}

.item-grid-slot .entity-card {
  width: 100%;
  height: 100%;
}

.item-grid-slot .entity-card,
.item-grid-slot .entity-card__image {
  -webkit-user-drag: none;
}

.item-grid-card--interactive {
  cursor: grab;
  touch-action: manipulation;
  user-select: none;
}

.item-grid-card--interactive:active {
  cursor: grabbing;
}

.item-grid-slot.is-dragging {
  z-index: 4;
  opacity: 0.72;
  transform: scale(0.99);
}

.item-grid-slot.is-dragging .entity-card {
  background: color-mix(in srgb, var(--pokemon-yellow) 12%, var(--surface));
  box-shadow: var(--shadow-soft);
}

.item-grid-slot.is-drop-target::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 6;
  height: 3px;
  border-radius: 999px;
  background: var(--pokemon-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pokemon-blue) 18%, transparent);
}

.item-grid-slot.is-drop-before::before {
  top: 0;
}

.item-grid-slot.is-drop-after::before {
  bottom: 0;
}

.item-grid-move,
.item-grid-enter-active,
.item-grid-leave-active {
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.18s ease;
}

.item-grid-enter-from,
.item-grid-leave-to {
  opacity: 0;
  transform: scale(0.94);
}

.item-grid-leave-active {
  position: absolute;
}

.item-context-menu {
  position: fixed;
  z-index: 60;
  width: min(216px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.item-context-menu__option {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-weight: 850;
  cursor: pointer;
  text-align: left;
}

.item-context-menu__option:hover,
.item-context-menu__option:focus-visible {
  border-color: var(--pokemon-blue);
  background: color-mix(in srgb, var(--pokemon-blue) 9%, var(--surface-soft));
  color: var(--pokemon-blue-deep);
}

.item-context-menu__option .ui-icon {
  width: 20px;
  height: 20px;
}

.catalog-card-action {
  min-height: 36px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

.catalog-card-action--hidden {
  visibility: hidden;
}

.edit-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.edit-meta .user-profile-link {
  color: var(--ink-soft);
  font-weight: 850;
}

.confirm-dialog__message {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.5;
}

.checklist-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.checklist-check {
  min-height: 34px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.checklist-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--pokemon-blue);
}

.checklist-check span {
  overflow-wrap: anywhere;
}

.checklist-item.is-checked .checklist-check span {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist-skeleton-list li {
  justify-content: flex-start;
}

.life-toolbar {
  grid-template-columns: minmax(240px, 1.2fr) minmax(300px, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.life-toolbar__search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.life-toolbar__field {
  min-width: 0;
}

.life-toolbar__filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
  min-width: 0;
}

.life-toolbar__select {
  min-width: 0;
}

.life-toolbar__select select {
  width: 100%;
}

.life-search-control {
  position: relative;
}

.life-search-control input {
  padding-right: 48px;
}

.life-search-control__clear {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.life-search-control__clear:hover {
  background: color-mix(in srgb, var(--pokemon-blue) 9%, transparent);
  color: var(--pokemon-blue-deep);
}

.life-search-control__clear .ui-icon {
  width: 18px;
  height: 18px;
}

.life-toolbar__actions {
  display: flex;
  justify-content: flex-end;
}

.life-toolbar .ui-button {
  min-height: 44px;
}

.life-composer,
.life-post {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.life-composer__header {
  display: grid;
  gap: 4px;
}

.life-composer__header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.15;
}

.life-composer__header p,
.life-form__counter {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.life-composer__auth-skeleton,
.life-form,
.life-feed__list {
  display: grid;
  gap: 14px;
}

.life-feed {
  display: grid;
  min-width: 0;
}

.life-detail-page {
  display: grid;
  gap: 18px;
}

.life-detail-layout {
  width: min(100%, 880px);
  display: grid;
  gap: 14px;
}

.life-feed__list {
  width: 100%;
  justify-self: stretch;
}

.life-feed__sentinel {
  min-height: 1px;
}

.load-more-sentinel {
  min-height: 1px;
}

.life-feed__retry {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}

.life-form__counter {
  justify-self: end;
}

.life-form__error {
  margin: 0;
  color: var(--danger);
  font-weight: 850;
}

.life-moderation-detail {
  display: grid;
  gap: 4px;
  max-width: 72ch;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--line));
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.life-moderation-detail strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.life-moderation-detail--comment {
  max-width: 100%;
  padding: 8px 10px;
  font-size: 12px;
}

.life-form__actions,
.life-auth-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.life-auth-note {
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.life-auth-note p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 850;
}

.life-post {
  gap: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.life-post__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.life-post__avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--pokemon-yellow);
  box-shadow: 0 3px 0 var(--line-strong);
  color: #172036;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 950;
}

.life-post__byline {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.life-post__byline strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-post__byline .user-profile-link {
  overflow: hidden;
  color: var(--ink);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-post__byline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.life-post__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.life-post__body {
  max-width: 72ch;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.life-post__moderation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.life-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.life-post__tag {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--pokemon-blue) 38%, var(--line));
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--pokemon-blue) 9%, var(--surface));
  color: var(--pokemon-blue-deep);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.life-post__tag .ui-icon {
  width: 16px;
  height: 16px;
}

.life-post__tag--version {
  border-color: color-mix(in srgb, var(--pokemon-yellow) 70%, var(--line));
  background: color-mix(in srgb, var(--pokemon-yellow) 24%, var(--surface));
  color: var(--ink-soft);
}

[data-theme="night"] .life-post__tag {
  color: var(--pokemon-yellow);
}

.life-version-note {
  max-width: 72ch;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.life-version-note summary {
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.life-version-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.life-post__engagement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.life-post__engagement-actions,
.life-post__metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.life-post__engagement-actions {
  flex: 1 1 520px;
}

.life-post__metrics {
  justify-content: flex-end;
  min-width: 0;
}

.life-rating-control {
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 0 8px 0 0;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  font-weight: 900;
}

.life-rating-control__stars {
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
  overflow: hidden;
  border-radius: calc(var(--radius-control) - 1px) 0 0 calc(var(--radius-control) - 1px);
}

.life-rating-control__star {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--warning) 78%, var(--ink-soft));
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease;
}

.life-rating-control__star:hover,
.life-rating-control__star:focus-visible,
.life-rating-control__star.is-active {
  border-color: transparent;
  background: color-mix(in srgb, var(--warning) 16%, var(--surface-soft));
  color: color-mix(in srgb, var(--warning) 86%, var(--ink));
}

.life-rating-control__star:hover {
  transform: none;
}

.life-rating-control__star:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.life-rating-control__star .ui-icon {
  width: 19px;
  height: 19px;
}

.life-rating-control__summary {
  min-width: 24px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.life-icon-button,
.life-metric-button {
  position: relative;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 900;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.life-icon-button {
  width: 44px;
  min-width: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.life-metric-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  padding: 7px 10px;
}

.life-metric-button--static {
  cursor: default;
}

.life-icon-button:hover,
.life-icon-button[aria-expanded="true"],
.life-icon-button.is-active,
.life-metric-button:hover,
.life-metric-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--pokemon-blue) 45%, var(--line));
  background: color-mix(in srgb, var(--pokemon-blue) 10%, var(--surface-soft));
  color: var(--pokemon-blue-deep);
}

.life-metric-button--static:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.life-icon-button--flat {
  border-color: transparent;
  background: transparent;
}

.life-icon-button--danger:hover,
.life-icon-button--danger:focus-visible {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-soft));
  color: var(--danger);
}

.life-icon-button:disabled,
.life-metric-button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  box-shadow: none;
}

.life-icon-button .ui-icon,
.life-metric-button .ui-icon {
  width: 20px;
  height: 20px;
}

.life-reactions {
  position: relative;
}

.life-post__review-actions {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.life-review-button {
  height: 44px;
  min-height: 44px;
}

.life-reaction-control {
  height: 44px;
  display: inline-flex;
  align-items: stretch;
  overflow: visible;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.life-reaction-control .life-icon-button {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.life-reaction-menu-button {
  border-left: 1px solid var(--line);
}

.life-reaction-control .life-icon-button:hover,
.life-reaction-control .life-icon-button[aria-expanded="true"],
.life-reaction-control .life-icon-button.is-active,
.life-reaction-menu-button:hover,
.life-reaction-menu-button[aria-expanded="true"] {
  background: color-mix(in srgb, var(--pokemon-blue) 10%, var(--surface-soft));
  color: var(--pokemon-blue-deep);
}

.life-reaction-picker {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  width: min(280px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.life-reaction-option {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.life-reaction-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-reaction-option:hover,
.life-reaction-option.is-active {
  border-color: color-mix(in srgb, var(--pokemon-blue) 50%, var(--line));
  background: color-mix(in srgb, var(--pokemon-blue) 12%, var(--surface-soft));
  color: var(--pokemon-blue-deep);
}

.life-reaction-option .ui-icon,
.life-reaction-summary .ui-icon {
  width: 20px;
  height: 20px;
}

.life-reaction-summary {
  min-height: 44px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.life-reaction-summary__item {
  position: relative;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.life-reaction-summary--button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.life-reaction-summary--button:hover .life-reaction-summary__item,
.life-reaction-summary--button:focus-visible .life-reaction-summary__item {
  border-color: color-mix(in srgb, var(--pokemon-blue) 45%, var(--line));
  background: color-mix(in srgb, var(--pokemon-blue) 10%, var(--surface-soft));
  color: var(--pokemon-blue-deep);
}

.life-action-tooltip {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 8px);
  left: 50%;
  min-width: max-content;
  max-width: 220px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--ink);
  box-shadow: var(--shadow-soft);
  color: var(--surface);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  visibility: hidden;
  white-space: nowrap;
}

.life-action-tooltip::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--ink);
  content: '';
  transform: translate(-50%, -4px) rotate(45deg);
}

.life-icon-button:hover .life-action-tooltip,
.life-icon-button:focus-visible .life-action-tooltip,
.life-metric-button:hover .life-action-tooltip,
.life-metric-button:focus-visible .life-action-tooltip,
.life-reaction-summary__item:hover .life-action-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.life-comments {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.life-comments__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.life-comments__header h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 950;
}

.life-comments__header > span,
.life-comments__header > div > span {
  min-width: 32px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.life-comments__sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.life-comments__sort select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.life-comment-form {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.life-comment-form textarea {
  min-height: 78px;
}

.life-comment-form--reply {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 3px solid color-mix(in srgb, var(--pokemon-blue) 34%, var(--line));
}

.life-comment-list,
.life-comment-replies {
  display: grid;
  gap: 10px;
}

.life-comment {
  min-width: 0;
}

.life-comment__main,
.life-comment--reply {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.life-comment-replies {
  margin-top: 10px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.life-comment__avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--pokemon-blue-deep);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 950;
}

.life-comment.is-deleted .life-comment__avatar {
  color: var(--muted);
}

.life-comment__content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.life-comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.life-comment__meta strong {
  color: var(--ink);
  font-weight: 950;
}

.life-comment__meta .user-profile-link {
  color: var(--ink);
  font-weight: 950;
}

.life-comment.is-deleted .life-comment__meta strong {
  color: var(--muted);
  font-style: italic;
}

.life-comment__meta time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.life-comment__body {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.life-comment.is-deleted .life-comment__body,
.life-comments__empty {
  color: var(--muted);
  font-style: italic;
}

.life-comment__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.life-comment__action-count {
  min-width: 1ch;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.life-comments__empty {
  margin: 0;
}

.life-reaction-users-modal {
  display: grid;
  gap: 14px;
}

.life-reaction-users-modal__count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.life-reaction-user-list {
  display: grid;
  gap: 10px;
}

.life-reaction-user {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.life-reaction-user__avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--pokemon-blue-deep);
  font-family: var(--font-display);
  font-weight: 950;
  text-decoration: none;
}

.life-reaction-user__avatar:hover {
  border-color: color-mix(in srgb, var(--pokemon-blue) 45%, var(--line));
  background: color-mix(in srgb, var(--pokemon-blue) 10%, var(--surface));
}

.life-reaction-user__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.life-reaction-user__copy > span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.life-reaction-user__copy .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--pokemon-blue);
}

.life-reaction-users-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  text-align: center;
}

.life-reaction-users-empty h3 {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 950;
}

.life-reaction-users-empty__icon {
  width: 34px;
  height: 34px;
  color: var(--pokemon-blue);
}

.life-empty {
  width: min(100%, 680px);
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 20px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
  text-align: center;
}

.life-empty__icon {
  width: 38px;
  height: 38px;
  color: var(--pokemon-blue);
}

.life-empty__copy {
  display: grid;
  gap: 4px;
}

.life-empty__copy h2,
.life-empty__copy p {
  margin: 0;
}

.life-empty__copy h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.15;
}

.life-empty__copy p {
  color: var(--muted);
  font-weight: 800;
}

.status-badge {
  --status-color: var(--muted);
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--status-color) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-color) 10%, var(--surface-soft));
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge--compact {
  min-height: 22px;
  gap: 4px;
  padding: 3px 6px;
  font-size: 10px;
  letter-spacing: 0;
}

.status-badge__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--status-color);
}

.status-badge__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge--info {
  --status-color: var(--pokemon-blue);
}

.status-badge--success {
  --status-color: var(--success);
}

.status-badge--warning {
  --status-color: var(--warning);
}

.status-badge--danger {
  --status-color: var(--danger);
}

.status-badge--neutral {
  --status-color: var(--muted);
}

.coming-soon-panel {
  --soon-accent: var(--pokemon-blue);
  --soon-accent-soft: color-mix(in srgb, var(--soon-accent) 14%, var(--surface));
  position: relative;
  min-height: 300px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, 0.32fr);
  align-items: center;
  gap: 20px;
  overflow: hidden;
  padding: 24px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, var(--soon-accent-soft), transparent 62%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  box-shadow: var(--shadow-control);
}

.coming-soon-panel--dish {
  --soon-accent: var(--pokemon-yellow);
}

.coming-soon-panel--automation {
  --soon-accent: var(--type-steel);
}

.coming-soon-panel--events {
  --soon-accent: var(--pokemon-red);
}

.coming-soon-panel--actions {
  --soon-accent: var(--pokemon-blue);
}

.coming-soon-panel--dream {
  --soon-accent: var(--success);
}

.coming-soon-panel--clothes {
  --soon-accent: var(--type-psychic);
}

.coming-soon-panel__icon {
  width: clamp(76px, 11vw, 118px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--soon-accent);
  box-shadow: 0 5px 0 var(--line-strong);
  color: #172036;
}

.coming-soon-panel--events .coming-soon-panel__icon,
.coming-soon-panel--actions .coming-soon-panel__icon,
.coming-soon-panel--dream .coming-soon-panel__icon,
.coming-soon-panel--clothes .coming-soon-panel__icon {
  color: #ffffff;
}

.coming-soon-panel__icon .ui-icon {
  width: 54%;
  height: 54%;
}

.coming-soon-panel__copy {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.coming-soon-panel__copy h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 950;
  line-height: 1.05;
}

.coming-soon-panel__copy p {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.coming-soon-panel__signal {
  height: 100%;
  min-height: 180px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
}

.coming-soon-panel__signal span {
  display: block;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-small);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--soon-accent) 72%, #ffffff), var(--soon-accent)),
    var(--soon-accent);
  box-shadow: 0 3px 0 var(--line-strong);
}

.coming-soon-panel__signal span:nth-child(1) {
  height: 46%;
}

.coming-soon-panel__signal span:nth-child(2) {
  height: 72%;
}

.coming-soon-panel__signal span:nth-child(3) {
  height: 58%;
}

.coming-soon-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.coming-soon-preview__item {
  min-height: 128px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.coming-soon-preview__index {
  width: 42px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--pokemon-blue-deep);
  font-size: 13px;
  font-weight: 950;
}

.coming-soon-preview__item p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
  line-height: 1.5;
}

.reorderable-row {
  position: relative;
  flex-wrap: wrap;
  align-items: flex-start;
  border-radius: var(--radius-card);
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease,
    transform 0.16s ease;
}

.reorderable-row.is-dragging {
  z-index: 2;
  background: color-mix(in srgb, var(--pokemon-yellow) 12%, var(--surface));
  box-shadow: var(--shadow-soft);
  opacity: 0.68;
  transform: scale(0.99);
}

.reorderable-row.is-drop-target::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--pokemon-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pokemon-blue) 18%, transparent);
}

.reorderable-row.is-drop-before::before {
  top: -2px;
}

.reorderable-row.is-drop-after::before {
  bottom: -2px;
}

.reorderable-list-move {
  transition: transform 0.18s ease;
}

.drag-handle {
  width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--muted);
  cursor: grab;
  touch-action: manipulation;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease;
}

.drag-handle:hover,
.drag-handle:focus-visible {
  border-color: var(--pokemon-blue);
  background: color-mix(in srgb, var(--pokemon-blue) 9%, var(--surface));
  color: var(--pokemon-blue-deep);
}

.drag-handle:active {
  cursor: grabbing;
  transform: scale(0.96);
}

.drag-handle:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.drag-handle .ui-icon {
  width: 22px;
  height: 22px;
}

.reorderable-row-title {
  flex: 1 1 180px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 850;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .life-page .ui-button,
  .life-icon-button,
  .life-metric-button,
  .life-reaction-option,
  .life-action-tooltip,
  .life-search-control__clear,
  .app-shell,
  .sidebar-collapse-toggle,
  .sidebar-collapse-toggle__icon,
  .sidebar-tooltip,
  .side-nav__link,
  .side-nav__chevron,
  .item-grid-slot,
  .item-grid-move,
  .item-grid-enter-active,
  .item-grid-leave-active,
  .reorderable-row,
  .reorderable-list-move,
  .drag-handle {
    transition: none;
  }

  .life-page .ui-button:hover,
  .item-grid-enter-from,
  .item-grid-leave-to,
  .item-grid-slot.is-dragging,
  .reorderable-row.is-dragging,
  .drag-handle:active {
    transform: none;
  }
}

.config-flag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(42, 117, 187, 0.24);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--pokemon-blue-deep);
  font-size: 12px;
  font-weight: 850;
}

.system-wording-header {
  align-items: end;
}

.system-wording-header__locale {
  width: min(260px, 100%);
}

.system-wording-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.system-wording-sidebar {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.system-wording-sidebar__title {
  padding: 2px 4px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.system-wording-sidebar__button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 850;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.system-wording-sidebar__button:hover {
  border-color: rgba(42, 117, 187, 0.24);
  background: rgba(255, 203, 5, 0.2);
  color: var(--pokemon-blue-deep);
}

.system-wording-sidebar__button.active {
  border-color: var(--line-strong);
  background: var(--pokemon-blue);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--line-strong);
}

.system-wording-sidebar__button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.system-wording-content {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.system-wording-controls {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.system-wording-controls .tabs--component {
  flex: 1 1 320px;
  min-width: 0;
}

.system-wording-toolbar__check {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.system-wording-list li {
  align-items: flex-start;
}

.system-wording-row {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.system-wording-row strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.system-wording-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.system-wording-row__meta .config-flag {
  margin-left: 0;
}

.system-wording-row__value {
  color: var(--ink-soft);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.access-list li {
  align-items: flex-start;
}

.access-row,
.access-modal-heading {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.access-row strong,
.access-modal-heading strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.permission-groups {
  display: grid;
  gap: 14px;
}

.permission-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.permission-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.permission-toggle {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}

.permission-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--pokemon-blue);
}

.permission-toggle strong,
.permission-toggle small {
  display: block;
  overflow-wrap: anywhere;
}

.permission-toggle strong {
  color: var(--ink);
  font-size: 14px;
}

.permission-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(42, 117, 187, 0.28);
  border-radius: 999px;
  background: rgba(42, 117, 187, 0.1);
  color: var(--pokemon-blue-deep);
  font-size: 13px;
  font-weight: 800;
}

.chip--with-media {
  gap: 6px;
  padding-left: 4px;
}

.chip__media {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(31, 42, 59, 0.22);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--pokemon-blue-deep);
}

.chip__media img {
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: contain;
}

.chip__icon {
  width: 15px;
  height: 15px;
}

.detail-tabs,
.detail-tab-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.detail-tabs > .detail-tab-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.habitat-detail-stack {
  display: grid;
  gap: 16px;
}

.detail-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.detail-section__header,
.detail-section > h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-section h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 950;
  line-height: 1.12;
}

.section-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 900;
}

.detail-section__body {
  display: grid;
  gap: 12px;
}

.detail-section a:not(.ui-button) {
  color: var(--pokemon-blue-deep);
  font-weight: 850;
}

.legal-page__updated {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.legal-section__body {
  color: var(--ink-soft);
  line-height: 1.7;
}

.legal-section__body p {
  margin: 0;
}

.legal-source-list {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding-left: 22px;
}

.legal-source-list a {
  word-break: break-word;
}

.edit-history-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.edit-history-panel__header h2,
.edit-history-list h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 950;
  line-height: 1.12;
}

.edit-history-panel__header h2 {
  font-size: 21px;
}

.edit-history-list h3 {
  font-size: 16px;
}

.edit-history-summary {
  display: grid;
  gap: 0;
  margin: 0;
}

.edit-history-summary div {
  display: grid;
  gap: 5px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.edit-history-summary div:first-child {
  padding-top: 0;
}

.edit-history-summary div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.edit-history-summary dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.edit-history-summary dd {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--ink);
}

.edit-history-summary .user-profile-link {
  color: var(--ink);
  font-weight: 950;
}

.edit-history-summary time,
.edit-timeline time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.edit-history-list {
  display: grid;
  gap: 12px;
}

.edit-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.edit-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.edit-timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 0;
  left: 17px;
  width: 2px;
  background: var(--line);
}

.edit-timeline__avatar {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--pokemon-yellow);
  box-shadow: 0 2px 0 var(--line-strong);
  color: #172036;
  font-size: 13px;
  font-weight: 950;
}

.edit-timeline__body {
  min-width: 0;
  display: grid;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.edit-timeline li:last-child .edit-timeline__body {
  padding-bottom: 0;
  border-bottom: 0;
}

.edit-history-entry {
  min-width: 0;
}

.edit-history-entry summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  margin: 0;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.edit-history-entry summary::-webkit-details-marker {
  display: none;
}

.edit-history-entry summary::after {
  content: "";
  width: 9px;
  height: 9px;
  justify-self: center;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.edit-history-entry[open] summary::after {
  transform: rotate(45deg);
}

.edit-history-entry__title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.edit-history-entry__content {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.edit-change-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.edit-change-list div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
}

.edit-change-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.edit-change-list dd {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 3px 8px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.edit-change-list dd span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.edit-change-list__label {
  color: var(--muted);
  font-size: 12px;
}

.edit-history-detail-meta {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.edit-history-detail-meta div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.edit-history-detail-meta dt,
.edit-history-detail-meta dd {
  margin: 0;
  font-size: 12px;
}

.edit-history-detail-meta dt {
  color: var(--muted);
  font-weight: 850;
}

.edit-history-detail-meta dd {
  color: var(--ink-soft);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.edit-history-detail-meta .user-profile-link {
  color: var(--ink-soft);
  font-weight: 850;
}

.entity-discussion-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.entity-discussion-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entity-discussion-panel__header h2,
.entity-discussion-empty h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 950;
  line-height: 1.12;
}

.entity-discussion-panel__header h2 {
  font-size: 21px;
}

.entity-discussion-panel__header p,
.entity-discussion-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.entity-discussion-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.entity-discussion-sort select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.entity-discussion-skeleton,
.entity-discussion-form,
.entity-discussion-list {
  display: grid;
  gap: 12px;
}

.entity-discussion-form textarea {
  min-height: 106px;
  resize: vertical;
}

.entity-discussion-form--reply {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.entity-discussion-form__counter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.entity-discussion-form__error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 850;
}

.entity-discussion-form__actions,
.entity-discussion-auth-note {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.entity-discussion-auth-note {
  justify-content: space-between;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.entity-discussion-auth-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
}

.entity-discussion-comment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.entity-discussion-comment:last-child {
  border-bottom: 0;
}

.entity-discussion-comment--skeleton {
  align-items: start;
}

.entity-discussion-comment__avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--pokemon-blue);
  box-shadow: 0 2px 0 var(--line-strong);
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.entity-discussion-comment.is-deleted .entity-discussion-comment__avatar {
  background: var(--muted);
}

.entity-discussion-comment__content {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.entity-discussion-comment__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.entity-discussion-comment__meta strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.entity-discussion-comment__meta .user-profile-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.entity-discussion-comment.is-deleted .entity-discussion-comment__meta strong {
  color: var(--muted);
}

.entity-discussion-comment__meta time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.entity-discussion-comment__body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.entity-discussion-comment__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.entity-discussion-replies {
  display: grid;
  gap: 0;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.entity-discussion-comment--reply {
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 10px 0;
}

.entity-discussion-comment--reply .entity-discussion-comment__avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.entity-discussion-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.entity-discussion-empty__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--pokemon-blue);
}

.row-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.row-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.row-list li:last-child {
  border-bottom: 0;
}

.skill-drop-summary li {
  align-items: flex-start;
}

.skill-drop-summary .chips {
  justify-content: flex-end;
}

.trading-manager__panel,
.trading-selected-group,
.possible-tags-evidence {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.trading-detail-grid,
.possible-tags-grid,
.possible-tags-evidence__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  min-width: 0;
}

.trading-detail-group,
.possible-tags-group,
.possible-tags-evidence__group {
  min-width: 0;
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.trading-detail-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trading-detail-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.trading-manager {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.trading-manager__panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  align-content: start;
}

.trading-manager__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: end;
}

.trading-manager__target {
  display: grid;
  gap: 8px;
}

.trading-manager__list-frame {
  min-height: 420px;
  display: grid;
  gap: 12px;
}

.trading-manager__list-frame--selected {
  align-content: start;
}

.trading-default-toggle {
  justify-content: flex-start;
}

.trading-item-list,
.trading-selected-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.trading-item-list {
  min-height: 360px;
  max-height: 420px;
}

.trading-selected-list {
  max-height: 220px;
}

.trading-item-list--loading {
  align-content: start;
}

.trading-pick-row,
.trading-selected-list li {
  width: 100%;
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.trading-pick-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.trading-pick-row--selected {
  background: var(--surface-soft);
}

.trading-pick-row--active {
  border-color: var(--pokemon-blue);
  box-shadow: 0 0 0 2px rgba(42, 117, 187, .16);
}

.trading-pick-row__copy,
.trading-selected-list__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.trading-pick-row__copy strong,
.trading-selected-list__copy strong,
.possible-tags-evidence__group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.trading-pick-row__copy span,
.trading-selected-list__copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trading-pick-row__state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pokemon-blue-deep);
  font-size: 12px;
  font-weight: 950;
}

.trading-selected-list li {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.trading-preference-toggle {
  justify-content: flex-end;
}

.trading-preference-toggle button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
}

.trading-item-list__skeleton {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.possible-tags-evidence__list li {
  align-items: flex-start;
}

.possible-tags-evidence__list .chips {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .trading-manager {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .trading-manager__toolbar {
    grid-template-columns: 1fr;
  }

  .trading-selected-list li {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .trading-manager__list-frame,
  .trading-item-list {
    min-height: 280px;
    max-height: 360px;
  }

  .trading-selected-list {
    max-height: 240px;
  }

  .trading-detail-list {
    max-height: 280px;
  }

  .trading-preference-toggle,
  .trading-selected-list .plain-button--icon {
    grid-column: 2;
    justify-self: start;
  }
}

.pokemon-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.pokemon-related-grid > .detail-section {
  min-width: 0;
}

.related-pokemon-list li {
  display: block;
}

.related-pokemon-list-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.related-pokemon-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.related-pokemon-row__summary {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(0, auto);
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}

.related-pokemon-row__traits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.related-pokemon-row__skills {
  flex: 0 1 auto;
  min-width: 0;
}

.related-pokemon-row__skills.chips {
  min-width: 0;
}

.related-pokemon-row__name {
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-pokemon-row__environment {
  flex: 0 0 auto;
}

.related-pokemon-row__environment--match,
.related-favourite-chip--match {
  border-color: rgba(255, 203, 5, 0.9);
  background: rgba(255, 203, 5, 0.34);
  color: #172036;
}

.related-favourite-chip {
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.related-pokemon-row__favourites {
  min-width: 0;
}

.related-entity-link {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.related-entity-link > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.related-entity-link--compact {
  line-height: 1.2;
}

.related-entity-media {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-control);
  background:
    linear-gradient(135deg, rgba(255, 203, 5, 0.22), rgba(42, 117, 187, 0.12)),
    #ffffff;
  color: #172036;
}

.related-entity-media img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.related-entity-media--inline {
  width: 28px;
  height: 28px;
  border-width: 1px;
  border-color: rgba(31, 42, 59, 0.22);
  border-radius: var(--radius-small);
}

.related-entity-media--pokemon {
  border-radius: 50%;
}

.related-entity-media--appearance {
  width: 44px;
  height: 44px;
}

.related-entity-media__icon {
  width: 18px;
  height: 18px;
}

.related-entity-media--appearance .related-entity-media__icon {
  width: 22px;
  height: 22px;
}

.detail-text {
  margin: 0;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.entity-detail-image {
  display: grid;
  gap: 12px;
}

.entity-detail-image__frame {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--surface-soft);
}

.detail-section a.entity-detail-image__frame {
  color: inherit;
  font-weight: inherit;
}

.entity-detail-image__frame--link {
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.entity-detail-image__frame--link:hover {
  transform: translateY(-2px);
  border-color: var(--pokemon-blue);
  box-shadow: 0 5px 0 var(--line-strong);
}

.entity-detail-image__frame--placeholder {
  background:
    linear-gradient(135deg, rgba(255, 203, 5, 0.26), rgba(42, 117, 187, 0.14)),
    var(--surface-soft);
}

.entity-detail-image__frame:not(.entity-detail-image__frame--placeholder) {
  padding: 0;
  border: 0;
  background: transparent;
}

.entity-detail-image__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.entity-detail-image__mark.entity-card__mark {
  width: 92px;
  height: 92px;
}

.entity-detail-image__mark .entity-card__icon {
  width: 42px;
  height: 42px;
}

.entity-profile-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.entity-profile-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.entity-profile-media-section,
.entity-profile-overview {
  align-content: start;
  min-width: 0;
}

.entity-profile-groups,
.entity-profile-group {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.preserve-lines {
  margin: 0;
  max-width: 72ch;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.entity-profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--line);
}

.entity-profile-facts div {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.entity-profile-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
}

.entity-profile-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.entity-profile-title-link {
  justify-self: center;
  color: var(--pokemon-blue-deep);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.detail-section .entity-profile-title-link {
  font-weight: 950;
}

.pokemon-image-detail {
  display: grid;
  grid-template-columns: minmax(220px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.pokemon-image-detail__screen {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
}

.pokemon-image-detail__screen img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.pokemon-image-detail__caption {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pokemon-image-detail__caption strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pokemon-image-detail__caption span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pokemon-image-detail__caption p {
  margin: 0;
  color: var(--ink-soft);
}

.pokemon-description-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.pokemon-description-image {
  width: 100%;
  min-height: 260px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
  border: 3px solid var(--line-strong);
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    #eef9ff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.pokemon-description-image:not(.pokemon-description-image--placeholder) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pokemon-description-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pokemon-description-image--placeholder {
  cursor: default;
}

.pokemon-description-card {
  align-content: start;
}

.pokemon-description-card .detail-text {
  max-width: 78ch;
  font-size: 1rem;
  line-height: 1.7;
}

.pokemon-core-grid,
.pokemon-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pokemon-core-card {
  align-content: start;
}

.pokemon-core-note {
  margin: 0;
}

.pokemon-core-value,
.pokemon-favourite-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.pokemon-favourite-chip {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.related-pokemon-row__environment--opposite,
.related-favourite-chip--opposite {
  border-color: color-mix(in srgb, var(--danger) 62%, var(--line));
  background: color-mix(in srgb, var(--danger) 16%, var(--surface));
  color: #8f1717;
}

.pokemon-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: stretch;
}

.pokemon-profile-grid--with-image {
  grid-template-columns: minmax(0, 1fr) minmax(430px, 560px);
}

.pokemon-profile-side {
  display: grid;
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.pokemon-profile-side--with-image {
  grid-template-columns: minmax(0, 1fr) clamp(112px, 12vw, 164px);
}

.pokemon-profile-main,
.pokemon-profile-row {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.pokemon-profile-row {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.pokemon-profile-card,
.pokemon-profile-stats {
  gap: 12px;
  min-width: 0;
}

.pokemon-profile-stats {
  align-self: stretch;
}

.pokemon-profile-image {
  width: clamp(112px, 12vw, 164px);
  aspect-ratio: 1 / 1;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 4px solid #172036;
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    #eef9ff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.pokemon-profile-image:not(.pokemon-profile-image--placeholder) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pokemon-profile-image:not(.pokemon-profile-image--placeholder):hover,
.pokemon-profile-image:not(.pokemon-profile-image--placeholder):focus-visible {
  border-color: var(--pokemon-blue);
}

.pokemon-profile-image--placeholder {
  cursor: default;
}

.pokemon-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.pokemon-types-card {
  align-content: center;
  justify-items: center;
}

.pokemon-genus {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.pokemon-profile-divider {
  height: 1px;
  background: var(--line);
}

.pokemon-measurement-display {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.pokemon-measurement-item {
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 0;
  padding: 4px 18px;
}

.pokemon-measurement-item + .pokemon-measurement-item {
  border-left: 1px solid var(--line);
}

.pokemon-measurement-stack {
  width: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  text-align: center;
}

.pokemon-measurement-value {
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 950;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.pokemon-measurement-divider {
  width: min(92px, 72%);
  height: 1px;
  background: var(--line);
}

.pokemon-measurement-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
}

.pokemon-stats-panel {
  display: grid;
  gap: 12px;
}

.pokemon-profile-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.pokemon-profile-facts div {
  display: grid;
  gap: 2px;
}

.pokemon-profile-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.pokemon-profile-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.pokemon-type-slots {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  align-content: center;
  justify-items: center;
}

.pokemon-type-slots--single {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.pokemon-type-slot {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.pokemon-type-chip {
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px 5px 7px;
}

.pokemon-type-chip__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.progress {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.progress-label span {
  min-width: 0;
}

.progress-label span:last-child {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pokemon-blue);
}

.appearance-list li {
  display: grid;
  grid-template-columns: clamp(140px, 20%, 220px) minmax(0, 1fr);
  align-items: start;
  justify-content: stretch;
}

.appearance-list--with-media li {
  grid-template-columns: 48px clamp(132px, 20%, 220px) minmax(0, 1fr);
}

.appearance-list--with-media .appearance-name {
  align-self: center;
}

.appearance-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appearance-summary {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 0;
  color: var(--muted);
  text-align: left;
}

.appearance-summary div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.appearance-summary dt,
.appearance-summary dd {
  margin: 0;
}

.appearance-summary dt {
  color: var(--ink-soft);
  font-weight: 850;
}

.status-message {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 80;
  display: flex;
  align-items: start;
  gap: 10px;
  width: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--status-line, var(--line));
  border-left: 6px solid var(--status-accent, var(--pokemon-blue));
  border-radius: var(--radius-card);
  background: var(--status-bg, var(--surface));
  box-shadow: var(--shadow-raised);
  color: var(--ink-soft);
  font-weight: 800;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.page > .status-message {
  right: var(--page-padding-x);
  left: var(--page-padding-x);
}

.status-message--hidden {
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
}

.status-message__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--status-accent, var(--pokemon-blue));
}

.status-message--success {
  --status-accent: var(--success);
  --status-line: color-mix(in srgb, var(--success) 38%, var(--line));
  --status-bg: color-mix(in srgb, var(--success) 10%, var(--surface));
}

.status-message--warning {
  --status-accent: var(--warning);
  --status-line: color-mix(in srgb, var(--warning) 42%, var(--line));
  --status-bg: color-mix(in srgb, var(--warning) 12%, var(--surface));
}

.status-message--danger {
  --status-accent: var(--danger);
  --status-line: color-mix(in srgb, var(--danger) 38%, var(--line));
  --status-bg: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.status {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--muted);
}

.home-page {
  display: grid;
  gap: 28px;
}

.home-hero {
  min-height: min(720px, calc(100dvh - 88px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 28px;
  align-items: center;
}

.home-hero__copy,
.home-section,
.home-section__header,
.home-dex__screen,
.home-dex__copy {
  display: grid;
}

.home-hero__copy {
  gap: 18px;
  align-content: center;
}

.home-hero__title {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 950;
  line-height: 0.98;
}

.home-hero__subtitle {
  max-width: 68ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.62;
}

.home-hero__actions,
.home-quick-index,
.home-card-grid {
  display: grid;
}

.home-hero__actions {
  grid-template-columns: repeat(3, max-content);
  gap: 10px;
  align-items: center;
}

.home-quick-index {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.home-quick-index a {
  min-height: 72px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
  font-weight: 900;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.home-quick-index a:hover,
.home-card:hover {
  transform: translateY(-2px);
  border-color: var(--pokemon-blue);
  box-shadow: 0 5px 0 var(--line-strong);
}

.home-quick-index .ui-icon {
  width: 23px;
  height: 23px;
  color: var(--pokemon-blue);
}

.home-dex {
  border: 4px solid #7b0f16;
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 20%, transparent 20% 100%),
    linear-gradient(180deg, var(--pokemon-red) 0%, var(--pokemon-red-deep) 100%);
  box-shadow: 0 8px 0 #7b0f16, var(--shadow-raised);
  overflow: hidden;
}

.home-dex__head {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 4px solid #7b0f16;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.home-dex__lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-dex__lights span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--pokemon-yellow);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38);
}

.home-dex__lights span:first-child {
  width: 30px;
  height: 30px;
  background: var(--pokemon-blue);
}

.home-dex__lights span:last-child {
  background: var(--success);
}

.home-dex__screen {
  gap: 18px;
  justify-items: center;
  margin: 16px;
  min-height: 460px;
  padding: 22px;
  border: 4px solid #172036;
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(42, 117, 187, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    #eef9ff;
  color: #172036;
  text-align: center;
}

.home-dex__copy {
  gap: 8px;
  max-width: 32ch;
}

.home-dex__copy strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.08;
}

.home-dex__copy p {
  margin: 0;
  color: #354052;
  line-height: 1.55;
}

.home-dex__tiles {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-dex__tiles a {
  min-height: 74px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  padding: 10px;
  border: 2px solid rgba(23, 32, 54, 0.34);
  border-radius: var(--radius-card);
  background: #ffffff;
  color: #172036;
  font-weight: 950;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.home-dex__tiles a:hover {
  transform: translateY(-2px);
  border-color: var(--pokemon-blue);
  box-shadow: 0 3px 0 #172036;
}

.home-dex__tiles .ui-icon {
  width: 24px;
  height: 24px;
  color: var(--pokemon-blue);
}

.home-section {
  gap: 16px;
}

.home-section__header {
  gap: 8px;
}

.home-section__header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  line-height: 1.08;
}

.home-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-card-grid--community {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.home-card {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
  color: var(--ink);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.home-card--wide {
  min-height: 148px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.home-card--future {
  min-height: 154px;
}

.home-card__icon {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--pokemon-yellow);
  box-shadow: 0 3px 0 var(--line-strong);
  color: #172036;
}

.home-card:nth-child(2n) .home-card__icon {
  background: var(--pokemon-blue);
  color: #ffffff;
}

.home-card:nth-child(3n) .home-card__icon {
  background: var(--surface-soft);
  color: var(--pokemon-blue-deep);
}

.home-card__icon .ui-icon {
  width: 27px;
  height: 27px;
}

.home-card__copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.home-card__copy strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.home-card__copy span {
  color: var(--ink-soft);
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.home-card--future .status-badge {
  align-self: end;
}

.home-project-updates__panel {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.home-project-updates__repo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.home-project-updates__repo-label,
.home-project-updates__updated {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.home-project-updates__repo a {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pokemon-blue-deep);
  font-weight: 950;
  overflow-wrap: anywhere;
}

.home-project-updates__repo a:hover {
  color: var(--pokemon-blue);
}

.home-project-updates__updated {
  margin-left: auto;
}

.home-project-updates__skeleton,
.home-project-updates__content,
.home-project-updates__group,
.home-project-updates__commit {
  display: grid;
}

.home-project-updates__skeleton,
.home-project-updates__content {
  gap: 18px;
}

.home-project-updates__skeleton {
  padding: 8px 0;
}

.home-project-updates__group {
  gap: 10px;
}

.home-project-updates__group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.home-project-updates__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-project-updates__item {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.home-project-updates__item:first-child {
  border-top: 0;
}

.home-project-updates__commit {
  min-width: 0;
  gap: 8px;
}

.home-project-updates__title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.home-project-updates__title strong {
  min-width: 0;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.home-project-updates__sha {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--pokemon-blue-deep);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.home-project-updates__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-project-updates__link {
  white-space: nowrap;
}

.home-project-updates__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.project-updates-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.project-updates-panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.12;
}

.project-updates-repo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.project-updates-repo__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--pokemon-yellow);
  box-shadow: 0 3px 0 var(--line-strong);
  color: #172036;
}

.project-updates-repo__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.project-updates-repo__copy span,
.project-updates-repo__meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.project-updates-repo__copy a {
  color: var(--pokemon-blue-deep);
  font-weight: 950;
  overflow-wrap: anywhere;
}

.project-updates-repo__copy a:hover {
  color: var(--pokemon-blue);
}

.project-updates-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-updates-list__item {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.project-updates-list__item:first-child {
  border-top: 0;
}

.project-updates-list__row,
.project-updates-list__item:not(.project-updates-list__item--commit) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.project-updates-list__main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.project-updates-list__title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.project-updates-list__title strong {
  min-width: 0;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.project-updates-list__sha {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--pokemon-blue-deep);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.project-updates-list__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.project-updates-list__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-updates-message {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.project-updates-message span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.project-updates-message pre {
  margin: 0;
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-updates-more-skeleton {
  display: grid;
  gap: 10px;
  padding: 8px 0 2px;
}

.project-updates-sentinel {
  min-height: 1px;
}

.project-updates-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.auth-page {
  display: grid;
  justify-items: center;
  padding: 24px 0;
}

.auth-panel {
  position: relative;
  width: min(480px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.auth-panel .page-header {
  display: block;
}

.auth-panel .page-title {
  font-size: 34px;
}

.auth-form {
  position: relative;
  display: grid;
  gap: 14px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.auth-options__remember {
  margin: 0;
  min-width: 0;
}

.auth-options a {
  color: var(--pokemon-blue-deep);
  font-weight: 900;
  white-space: nowrap;
}

.auth-switch {
  margin: 0;
  color: var(--muted);
}

.auth-switch a {
  color: var(--pokemon-blue-deep);
  font-weight: 900;
}

.auth-message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--success) 38%, var(--line));
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  color: var(--ink-soft);
  font-weight: 800;
}

.auth-message.error {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.auth-field-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.profile-page {
  display: grid;
  gap: 18px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.profile-card--identity {
  align-content: start;
}

.profile-card--referral {
  grid-column: 2;
}

.profile-card--password {
  grid-column: 1 / -1;
}

.profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(to bottom, var(--pokemon-red) 0 45%, var(--line-strong) 45% 55%, var(--pokeball-white) 55% 100%);
  color: var(--line-strong);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.38), 0 3px 0 rgba(0, 0, 0, 0.16);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-identity__copy {
  min-width: 0;
}

.profile-identity h2,
.profile-card__header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.profile-identity p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.profile-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-card__icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: var(--pokemon-blue);
}

.profile-field-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.profile-readonly-input {
  color: var(--muted);
  cursor: default;
}

.profile-referral {
  display: grid;
  gap: 14px;
}

.profile-referral__metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.profile-referral__metric span {
  color: var(--muted);
  font-weight: 850;
}

.profile-referral__metric strong {
  color: var(--pokemon-blue-deep);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.profile-code-input {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-weight: 900;
}

.profile-referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.profile-referral-link-row .ui-button {
  min-height: 44px;
  white-space: nowrap;
}

.profile-public-layout,
.profile-tab-panel,
.profile-activity-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.profile-public-layout > .profile-tab-panel {
  grid-column: 1 / -1;
}

.profile-secondary-tabs .tab-list {
  border-bottom-color: color-mix(in srgb, var(--line) 72%, transparent);
}

.profile-layout--loading {
  grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1fr);
}

.profile-card--wide {
  grid-column: 1 / -1;
}

.profile-card--soft {
  box-shadow: var(--shadow-soft);
}

.profile-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.profile-hero .profile-identity {
  min-width: 0;
}

.profile-stat-strip,
.profile-stat-grid {
  display: grid;
  gap: 10px;
}

.profile-stat-strip {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-stat-strip--social {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-follow-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.profile-stat-strip div,
.profile-stat-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.profile-stat-strip dt,
.profile-stat-grid dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.profile-stat-strip dd,
.profile-stat-grid dd {
  margin: 4px 0 0;
  color: var(--pokemon-blue-deep);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.profile-referral-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.profile-referral-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-referral-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.profile-referral-summary strong {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.profile-referral-summary .ui-button {
  min-height: 44px;
  white-space: nowrap;
}

.profile-referral-summary .status-message {
  position: static;
  grid-column: 1 / -1;
  box-shadow: none;
}

.profile-section-grid,
.profile-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.profile-feed-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.profile-feed-card__metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-reaction-open-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: inherit;
  text-align: left;
}

.profile-reaction-open-button:hover {
  color: var(--pokemon-blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-feed-card__detail-link,
.profile-post-preview__detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pokemon-blue-deep);
  font-weight: 950;
  text-decoration: none;
}

.profile-feed-card__metrics .ui-icon,
.profile-post-preview__detail .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--pokemon-blue);
}

.profile-feed-card__detail-link:hover,
.profile-post-preview__detail:hover {
  color: var(--pokemon-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-load-more {
  display: flex;
  justify-content: center;
}

.profile-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  text-align: center;
}

.profile-empty--compact {
  min-height: 150px;
}

.profile-empty h2 {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 950;
}

.profile-empty__icon {
  width: 42px;
  height: 42px;
  color: var(--pokemon-blue);
}

.profile-contribution-list,
.profile-contribution-row,
.profile-activity-card,
.profile-post-preview {
  display: grid;
  gap: 10px;
}

.profile-contribution-row,
.profile-activity-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.profile-contribution-row > div,
.profile-activity-card__header,
.profile-post-preview__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-width: 0;
}

.profile-contribution-row strong,
.profile-post-preview strong,
.profile-post-preview .user-profile-link {
  color: var(--ink);
  font-weight: 950;
}

.profile-contribution-row span,
.profile-activity-card time,
.profile-post-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.profile-contribution-row dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.profile-contribution-row dl div {
  min-width: 0;
  padding: 8px;
  border-radius: var(--radius-small);
  background: var(--surface);
}

.profile-contribution-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.profile-contribution-row dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.profile-activity-card__header span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 950;
}

.profile-activity-card__header .ui-icon {
  width: 20px;
  height: 20px;
  color: var(--pokemon-blue);
}

.profile-post-preview {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.profile-post-preview p,
.profile-comment-body,
.profile-comment-excerpt {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.profile-comment-target {
  justify-self: start;
  color: var(--pokemon-blue-deep);
  font-weight: 950;
}

.profile-comment-excerpt {
  padding: 10px 12px;
  border-left: 3px solid var(--pokemon-yellow);
  background: var(--surface);
  color: var(--ink-soft);
}

.user-profile-link,
.profile-comment-target {
  text-decoration: none;
}

.user-profile-link:hover,
.profile-comment-target:hover {
  color: var(--pokemon-blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-layout--loading {
  grid-template-columns: 1fr;
}

.admin-secondary-nav {
  position: sticky;
  top: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.admin-secondary-nav__group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-secondary-nav__group + .admin-secondary-nav__group {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-secondary-nav__title {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-secondary-nav__items {
  display: grid;
  gap: 6px;
}

.admin-secondary-nav__item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.admin-secondary-nav__item:hover {
  border-color: rgba(42, 117, 187, 0.24);
  background: rgba(255, 203, 5, 0.2);
  color: var(--pokemon-blue-deep);
}

.admin-secondary-nav__item.active {
  border-color: var(--line-strong);
  background: var(--pokemon-blue);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--line-strong);
}

.admin-secondary-nav__item span {
  min-width: 0;
}

.admin-secondary-nav__icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.admin-content {
  min-width: 0;
}

.form-actions,
.row-actions,
.check-row,
.inline-row,
.appearance-row {
  display: flex;
  gap: 8px;
}

.form-actions,
.check-row {
  flex-wrap: wrap;
  align-items: center;
}

.radio-group {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.radio-group legend {
  padding: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
}

.radio-group__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.radio-group__option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  color: var(--ink-soft);
  font-weight: 850;
  cursor: pointer;
}

.radio-group__option input {
  width: 18px;
  height: 18px;
  accent-color: var(--pokemon-blue);
}

.row-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-actions button,
.inline-row > button,
.appearance-row__delete {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 14px;
}

.inline-row {
  align-items: center;
}

.inline-row > .tags-select {
  flex: 1 1 180px;
  min-width: 0;
}

.inline-row > select {
  flex: 1;
}

.inline-row > input {
  width: 90px;
}

.skill-drop-list {
  display: grid;
  gap: 10px;
}

.translation-fields {
  display: contents;
}

.skill-drop-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.skill-drop-row label {
  margin: 0;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  color: var(--ink-soft);
  font-weight: 850;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--pokemon-blue);
}

.appearance-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.appearance-row__rarity input {
  min-width: 64px;
}

.appearance-row__main {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(240px, 1fr) minmax(180px, 0.9fr) 82px max-content;
  gap: 12px;
  align-items: start;
}

.appearance-row__pokemon,
.appearance-row__maps,
.appearance-row__rarity,
.appearance-row__main .switch-group {
  min-width: 0;
  width: 100%;
}

.appearance-row__rarity input {
  width: 100%;
}

.appearance-row__delete {
  align-self: end;
  justify-self: end;
  min-height: 32px;
  padding: 5px 9px;
  font-size: 13px;
}

.appearance-row .tags-select,
.appearance-row .tags-select__trigger {
  width: 100%;
}

.switch-group {
  min-width: 0;
  min-inline-size: 0;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.switch-group legend {
  padding: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
}

.switch-group__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.switch-group__options--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink-soft);
  font-weight: 850;
  cursor: pointer;
  user-select: none;
}

.switch-control--stacked {
  min-width: 62px;
  align-items: center;
  flex-direction: column;
  gap: 6px;
}

.switch-group__options--grid .switch-control--stacked {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: stretch;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.switch-control--disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.switch-control__copy {
  min-width: 0;
}

.switch-control__label {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.switch-control__description {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.switch-group__options--grid .switch-control__label,
.switch-group__options--grid .switch-control__description {
  text-align: left;
}

.switch-control input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  min-width: 0;
  margin: 0;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: var(--line);
  transition: background 0.16s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.16s ease;
}

.switch-control input:focus-visible + .switch-track {
  box-shadow: 0 0 0 4px rgba(42, 117, 187, 0.16);
}

.switch-control input:checked + .switch-track {
  background: var(--pokemon-blue);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(20px);
}

@media (max-width: 900px) {
  .life-toolbar {
    grid-template-columns: 1fr;
  }

  .app-shell {
    display: block;
    padding-top: 60px;
  }

  .site-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 55;
  }

  .site-topbar__inner {
    min-height: 60px;
    gap: 10px;
    padding: 8px 12px;
  }

  .site-topbar__brand {
    flex: 1 1 auto;
    display: flex;
  }

  .site-topbar__spacer {
    display: none;
  }

  .site-topbar__search {
    flex: 0 0 auto;
    min-width: 0;
  }

  .global-search {
    position: static;
    min-width: 0;
  }

  .global-search__toggle {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
  }

  .global-search__toggle:hover {
    border-color: var(--pokemon-blue);
    color: var(--pokemon-blue-deep);
  }

  .global-search__form {
    display: none;
  }

  .global-search--mobile-open .global-search__form {
    position: fixed;
    top: 68px;
    right: 12px;
    left: 12px;
    z-index: 80;
    display: flex;
  }

  .global-search__panel {
    position: fixed;
    inset: 122px 12px auto 12px;
    max-height: calc(100dvh - 138px);
  }

  .topbar-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .view-as-banner {
    top: 60px;
  }

  .view-as-banner__inner {
    min-height: 48px;
    padding: 8px 12px;
  }

  .view-as-banner__button {
    min-height: 40px;
  }

  .sidebar-toggle {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
  }

  .sidebar-toggle:hover {
    border-color: var(--pokemon-blue);
    color: var(--pokemon-blue-deep);
  }

  .brand-lockup--topbar {
    min-width: 0;
  }

  .brand-lockup--topbar .pokemon-word {
    font-size: 22px;
  }

  .brand-lockup--topbar .brand-subtitle {
    font-size: 10px;
  }

  .site-topbar .auth-user {
    max-width: 130px;
  }

  .sidebar-collapse-toggle {
    display: none;
  }

  .site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(78vw, 280px);
    max-width: calc(100vw - 40px);
    transform: translateX(-100%);
    box-shadow: var(--shadow-raised);
    transition: transform 0.18s ease;
  }

  .site-sidebar__inner {
    gap: 12px;
    padding: 14px 10px;
  }

  .site-sidebar__header .brand-lockup {
    gap: 9px;
  }

  .site-sidebar__header .pokemon-word {
    font-size: 23px;
  }

  .side-nav {
    gap: 4px;
  }

  .side-nav__link {
    min-height: 40px;
    gap: 8px;
    padding: 8px;
  }

  .side-nav__link--child {
    min-height: 36px;
    padding: 7px 8px 7px 34px;
  }

  .app-shell--sidebar-open .site-sidebar {
    transform: translateX(0);
  }

  .site-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    background: rgba(21, 25, 35, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  .app-shell--sidebar-open .site-sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .page-header {
    align-items: start;
    flex-direction: column;
  }

  .page-header__actions {
    justify-content: flex-start;
  }

  .entity-profile-grid,
  .home-hero,
  .pokemon-image-detail,
  .pokemon-description-grid,
  .pokemon-profile-grid,
  .pokemon-profile-row,
  .pokemon-core-grid,
  .pokemon-reference-grid,
  .pokemon-related-grid,
  .profile-layout,
  .profile-layout--loading,
  .profile-section-grid,
  .profile-account-grid,
  .system-wording-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .profile-hero,
  .profile-stat-strip {
    grid-template-columns: 1fr;
  }

  .profile-card--referral,
  .profile-card--password {
    grid-column: auto;
  }

  .system-wording-sidebar {
    display: flex;
    overflow-x: auto;
  }

  .system-wording-sidebar__button {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-secondary-nav {
    position: static;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px;
  }

  .admin-secondary-nav__group {
    flex: 0 0 auto;
    min-width: min(260px, 76vw);
  }

  .admin-secondary-nav__group + .admin-secondary-nav__group {
    padding-top: 0;
    padding-left: 12px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .coming-soon-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .coming-soon-panel__signal {
    grid-column: 1 / -1;
    min-height: 94px;
  }

  .coming-soon-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero {
    min-height: auto;
  }

  .home-dex {
    max-width: 560px;
  }

  .home-card-grid,
  .home-card-grid--future {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-project-updates__updated {
    margin-left: 0;
  }

  .project-updates-repo,
  .project-updates-list__row,
  .project-updates-list__item:not(.project-updates-list__item--commit) {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-updates-list__actions {
    justify-content: flex-start;
  }

  .appearance-row__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pokemon-measurement-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .page {
    --page-padding-x: 12px;
    padding-right: var(--page-padding-x);
    padding-left: var(--page-padding-x);
  }

  .page {
    padding-top: 14px;
    padding-bottom: 32px;
  }

  .page-stack {
    gap: 12px;
  }

  .site-footer {
    padding-right: 12px;
    padding-left: 12px;
    padding-bottom: 22px;
  }

  .site-footer__inner {
    gap: 7px;
    padding-top: 12px;
    font-size: 12px;
  }

  .page-header {
    gap: 8px;
  }

  .page-header__copy {
    gap: 5px;
  }

  .page-header__actions {
    gap: 6px;
  }

  .page-title {
    font-size: 28px;
  }

  .page-subtitle {
    font-size: 14px;
    line-height: 1.45;
  }

  .page-kicker {
    gap: 6px;
    font-size: 11px;
  }

  .page-kicker::before {
    width: 14px;
    height: 14px;
    border-width: 2px;
  }

  .pokemon-word {
    font-size: 22px;
  }

  .ui-button,
  .primary-button,
  .link-button,
  .plain-button,
  .row-actions button,
  .inline-row > button,
  .appearance-row__delete {
    min-height: 38px;
    gap: 6px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .ui-button--small,
  .row-actions button,
  .inline-row > button,
  .appearance-row__delete {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .field {
    gap: 5px;
  }

  .field label,
  .field-label {
    font-size: 12px;
  }

  .field input,
  .field select,
  .field textarea,
  .tags-select__search {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 14px;
  }

  .field textarea {
    min-height: 86px;
  }

  .filter-panel,
  .toolbar {
    gap: 10px;
    padding: 10px;
    border-width: 1px;
    box-shadow: var(--shadow-soft);
  }

  .tags-select__trigger,
  .tags-select--single .tags-select__trigger {
    min-height: 38px;
    gap: 6px;
    padding: 6px 8px;
    font-size: 14px;
  }

  .tags-select__selected {
    gap: 4px;
  }

  .tags-select__tag,
  .chip {
    min-height: 24px;
    gap: 4px;
    padding: 3px 6px;
    font-size: 12px;
  }

  .tags-select__dropdown {
    min-width: min(240px, calc(100vw - 24px));
    gap: 6px;
    padding: 6px;
  }

  .tags-select__option {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 14px;
  }

  .segmented {
    gap: 3px;
    padding: 3px;
    border-width: 1px;
  }

  .segmented button {
    min-height: 30px;
    min-width: 44px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .tabs,
  .tab-list {
    gap: 5px;
  }

  .tabs > button,
  .tab-button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .tabs--component,
  .detail-tabs,
  .detail-tab-panel,
  .habitat-detail-stack {
    gap: 10px;
  }

  .filter-panel,
  .toolbar,
  .entity-grid,
  .grid,
  .home-card-grid,
  .home-card-grid--community,
  .home-card-grid--future,
  .home-hero__actions,
  .home-quick-index,
  .pokemon-fetch-panel,
  .pokemon-edit-grid,
  .coming-soon-preview {
    grid-template-columns: 1fr;
  }

  .home-page {
    gap: 18px;
  }

  .home-hero {
    gap: 14px;
  }

  .home-hero__title {
    font-size: 34px;
  }

  .home-hero__subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .home-hero__copy {
    gap: 12px;
  }

  .home-hero__actions {
    gap: 8px;
  }

  .home-hero__actions .ui-button {
    width: 100%;
  }

  .home-quick-index {
    gap: 8px;
  }

  .home-quick-index a {
    min-height: 48px;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .home-quick-index .ui-icon {
    width: 20px;
    height: 20px;
  }

  .home-section {
    gap: 10px;
  }

  .home-section__header {
    gap: 5px;
  }

  .home-section__header h2 {
    font-size: 25px;
  }

  .home-card-grid {
    gap: 10px;
  }

  .home-card {
    min-height: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 10px;
  }

  .home-card--wide {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .home-card__icon {
    width: 40px;
    height: 40px;
  }

  .home-card__icon .ui-icon {
    width: 22px;
    height: 22px;
  }

  .home-card__copy {
    gap: 4px;
  }

  .home-card__copy strong {
    font-size: 17px;
  }

  .home-card__copy span {
    font-size: 13px;
    line-height: 1.35;
  }

  .home-project-updates__item,
  .home-project-updates__title {
    grid-template-columns: 1fr;
  }

  .home-project-updates__item {
    align-items: start;
  }

  .home-project-updates__title {
    display: grid;
  }

  .home-project-updates__link {
    width: 100%;
  }

  .home-project-updates__panel,
  .project-updates-panel {
    gap: 12px;
    padding: 12px;
  }

  .project-updates-list__title {
    display: grid;
  }

  .project-updates-list__actions .ui-button,
  .project-updates-list__item > .ui-button {
    width: 100%;
  }

  .home-dex__screen {
    min-height: 0;
    gap: 12px;
    margin: 8px;
    padding: 12px;
  }

  .home-dex__head {
    min-height: 46px;
    padding: 10px 12px;
  }

  .home-dex__tiles {
    gap: 8px;
  }

  .home-dex__tiles a {
    min-height: 56px;
    gap: 4px;
    padding: 8px;
    font-size: 13px;
  }

  .entity-card {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 10px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
  }

  .entity-card__mark {
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 0 var(--line-strong);
  }

  .entity-card__content {
    gap: 6px;
  }

  .entity-card__title {
    font-size: 18px;
  }

  .entity-card__subtitle,
  .meta-line {
    font-size: 13px;
  }

  .pokemon-list-grid .entity-card,
  .catalog-card-grid .entity-card {
    min-height: 0;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    align-content: center;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .collections-card-grid {
    gap: 10px;
  }

  .collections-card-grid .entity-card--collection-compact {
    aspect-ratio: auto;
    justify-content: stretch;
    gap: 10px;
    padding: 12px;
    overflow: hidden;
  }

  .collections-card-grid .entity-card--collection-compact .entity-card__content {
    display: grid;
  }

  .collections-card-grid .entity-card--collection-compact .skeleton-entity-mark {
    width: 56px !important;
    height: 56px !important;
  }

  .collections-card-grid .entity-card--collection-compact .entity-card__tooltip {
    display: none;
  }

  .pokemon-list-grid .entity-card__mark,
  .catalog-card-grid .entity-card__mark {
    width: 56px;
    height: 56px;
  }

  .pokemon-list-grid .pokeball-mark,
  .catalog-card-grid .pokeball-mark {
    --ball-size: 42px !important;
  }

  .pokemon-list-grid .entity-card__content,
  .catalog-card-grid .entity-card__content {
    justify-items: stretch;
  }

  .pokemon-list-grid .entity-card__title,
  .catalog-card-grid .entity-card__title {
    font-size: 17px;
  }

  .entity-profile-facts {
    grid-template-columns: 1fr;
  }

  .entity-detail-image__mark.entity-card__mark {
    width: 84px;
    height: 84px;
  }

  .pokemon-fetch-panel__actions {
    justify-content: flex-start;
  }

  .pokemon-profile-side--with-image {
    grid-template-columns: minmax(0, 1fr) clamp(96px, 21vw, 132px);
    gap: 10px;
  }

  .pokemon-profile-image {
    width: clamp(96px, 21vw, 132px);
    padding: 8px;
  }

  .coming-soon-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .coming-soon-panel__icon {
    width: 58px;
  }

  .coming-soon-panel__copy {
    gap: 8px;
  }

  .coming-soon-panel__copy h2 {
    font-size: 25px;
  }

  .coming-soon-panel__copy p {
    font-size: 14px;
    line-height: 1.45;
  }

  .coming-soon-panel__signal {
    min-height: 52px;
  }

  .coming-soon-preview__item {
    min-height: 0;
    gap: 8px;
    padding: 12px;
  }

  .modal-backdrop {
    place-items: stretch;
    padding: 8px;
  }

  .modal {
    width: 100%;
    max-height: calc(100dvh - 16px);
  }

  .modal-header,
  .modal-footer {
    gap: 8px;
    padding: 10px 12px;
  }

  .modal-header h2 {
    font-size: 19px;
  }

  .modal-header p {
    font-size: 12px;
  }

  .modal-close-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .modal-body,
  .modal-edit-form,
  .modal-edit-form--tabbed,
  .pokemon-edit-panel,
  .pokemon-edit-grid {
    gap: 10px;
  }

  .modal-body {
    padding: 12px;
  }

  .pokemon-edit-form {
    height: calc(100dvh - 92px);
  }

  .pokemon-fetch-panel,
  .pokemon-measurement-control,
  .skill-drop-row,
  .appearance-row,
  .permission-group {
    gap: 8px;
    padding: 10px;
  }

  .pokemon-image-preview {
    gap: 10px;
    padding: 10px;
    border-width: 2px;
  }

  .pokemon-image-preview__screen {
    min-height: 150px;
  }

  .pokemon-image-preview__screen img {
    max-height: 150px;
  }

  .pokemon-image-thumbnails {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 8px;
  }

  .pokemon-image-thumbnail {
    min-height: 96px;
    gap: 6px;
    padding: 8px;
  }

  .pokemon-image-thumbnail img {
    width: 66px;
    height: 56px;
  }

  .pokemon-related-grid,
  .entity-profile-grid,
  .pokemon-profile-grid,
  .pokemon-profile-main,
  .pokemon-profile-side,
  .pokemon-profile-row,
  .entity-profile-main,
  .entity-profile-groups,
  .entity-profile-group {
    gap: 10px;
  }

  .detail-section,
  .edit-history-panel,
  .entity-discussion-panel,
  .profile-card {
    gap: 10px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
  }

  .detail-section h2,
  .edit-history-panel__header h2,
  .entity-discussion-panel__header h2 {
    font-size: 18px;
  }

  .detail-section__body,
  .entity-profile-groups,
  .entity-profile-group,
  .edit-history-list,
  .entity-discussion-skeleton,
  .entity-discussion-form,
  .entity-discussion-list {
    gap: 9px;
  }

  .entity-profile-facts div,
  .profile-stat-strip div,
  .profile-stat-grid div {
    padding: 9px 10px;
  }

  .entity-detail-image {
    gap: 8px;
  }

  .entity-detail-image__frame {
    padding: 10px;
  }

  .entity-detail-image__mark.entity-card__mark {
    width: 64px;
    height: 64px;
  }

  .entity-detail-image__mark .entity-card__icon {
    width: 30px;
    height: 30px;
  }

  .pokemon-image-detail {
    gap: 10px;
  }

  .pokemon-image-detail__screen {
    min-height: 180px;
    border-width: 2px;
  }

  .pokemon-image-detail__screen img {
    max-height: 170px;
  }

  .pokemon-image-detail__caption strong {
    font-size: 1.1rem;
  }

  .pokemon-profile-image {
    border-width: 2px;
  }

  .pokemon-measurement-item {
    padding: 4px 10px;
  }

  .pokemon-type-chip {
    min-height: 28px;
    padding: 4px 8px 4px 6px;
  }

  .row-list li {
    gap: 8px;
    padding: 8px 0;
  }

  .edit-timeline li {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  .edit-timeline li:not(:last-child)::after {
    top: 30px;
    left: 14px;
  }

  .edit-timeline__avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .entity-discussion-comment {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 9px 0;
  }

  .entity-discussion-comment__avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .entity-discussion-comment--reply {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .entity-discussion-comment--reply .entity-discussion-comment__avatar {
    width: 28px;
    height: 28px;
  }

  .entity-discussion-empty {
    padding: 12px;
  }

  .life-post__header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .life-post__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .life-rating-control {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .life-toolbar,
  .life-toolbar__search,
  .life-toolbar__filters,
  .rate-limit-fields {
    grid-template-columns: 1fr;
  }

  .profile-referral-link-row {
    grid-template-columns: 1fr;
  }

  .profile-referral-summary {
    grid-template-columns: 1fr;
  }

  .profile-referral-summary .ui-button,
  .profile-referral-link-row .ui-button {
    width: 100%;
  }

  .profile-contribution-row dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .life-toolbar__actions,
  .life-toolbar .ui-button {
    width: 100%;
  }

  .life-toolbar,
  .life-toolbar__search,
  .life-toolbar__filters,
  .life-composer,
  .life-form,
  .life-feed__list,
  .life-detail-page,
  .life-detail-layout {
    gap: 10px;
  }

  .life-composer,
  .life-post,
  .life-empty {
    gap: 10px;
    padding: 12px;
  }

  .life-composer__header h2,
  .life-empty__copy h2 {
    font-size: 19px;
  }

  .system-wording-header {
    align-items: stretch;
    flex-direction: column;
  }

  .system-wording-header__locale {
    width: 100%;
  }

  .system-wording-controls .tabs--component {
    flex-basis: 100%;
  }

  .system-wording-toolbar__check {
    justify-content: flex-start;
  }

  .system-wording-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .system-wording-list .row-actions {
    justify-content: flex-start;
  }

  .life-feed__list {
    width: 100%;
  }

  .life-post {
    padding: 12px;
  }

  .life-post__avatar {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .life-post__body {
    font-size: 14px;
    line-height: 1.55;
  }

  .life-post__tags,
  .life-post__engagement-actions,
  .life-post__metrics,
  .life-comment__actions {
    gap: 6px;
  }

  .life-post__tag {
    min-height: 26px;
    padding: 3px 7px;
    font-size: 12px;
  }

  .life-post__engagement {
    align-items: stretch;
    gap: 8px;
    padding-top: 8px;
  }

  .life-post__engagement-actions,
  .life-post__metrics {
    width: 100%;
  }

  .life-post__engagement-actions {
    align-items: stretch;
  }

  .life-reactions {
    min-width: 0;
    flex: 0 0 auto;
  }

  .life-reaction-picker {
    width: min(100%, calc(100vw - 32px));
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px;
  }

  .life-rating-control,
  .life-rating-control__stars,
  .life-rating-control__star,
  .life-icon-button,
  .life-review-button,
  .life-reaction-control,
  .life-reaction-summary,
  .life-reaction-option,
  .life-post__review-actions {
    min-height: 38px;
    height: 38px;
  }

  .life-rating-control__star,
  .life-icon-button {
    width: 38px;
    min-width: 38px;
    flex-basis: 38px;
  }

  .life-rating-control__star .ui-icon,
  .life-icon-button .ui-icon,
  .life-metric-button .ui-icon,
  .life-reaction-option .ui-icon,
  .life-reaction-summary .ui-icon {
    width: 18px;
    height: 18px;
  }

  .life-metric-button,
  .life-reaction-option {
    padding: 6px 8px;
    font-size: 13px;
  }

  .life-reaction-summary,
  .life-reaction-option,
  .life-post__review-actions {
    height: auto;
  }

  .life-post__metrics {
    justify-content: flex-start;
  }

  .life-reaction-summary {
    justify-content: flex-start;
  }

  .life-comment-replies {
    padding-left: 10px;
  }

  .life-comment__main,
  .life-comment--reply {
    gap: 8px;
  }

  .life-comment__avatar {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .life-comment-replies,
  .life-comment-list {
    gap: 8px;
  }

  .life-reaction-user {
    gap: 8px;
    padding: 8px;
  }

  .life-reaction-user__avatar {
    width: 32px;
    height: 32px;
  }

  .profile-page,
  .profile-layout,
  .profile-public-layout,
  .profile-tab-panel,
  .profile-activity-list,
  .profile-section-grid,
  .profile-account-grid,
  .profile-contribution-list,
  .profile-contribution-row,
  .profile-activity-card,
  .profile-post-preview {
    gap: 10px;
  }

  .profile-card {
    padding: 12px;
  }

  .profile-identity {
    gap: 10px;
  }

  .profile-avatar {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .profile-identity h2,
  .profile-card__header h2 {
    font-size: 22px;
  }

  .profile-stat-strip,
  .profile-stat-grid {
    gap: 8px;
  }

  .profile-stat-strip dd,
  .profile-stat-grid dd,
  .profile-referral__metric strong {
    font-size: 24px;
  }

  .profile-referral,
  .profile-referral-summary {
    gap: 8px;
  }

  .profile-referral__metric,
  .profile-contribution-row,
  .profile-activity-card,
  .profile-post-preview {
    padding: 10px;
  }

  .profile-empty {
    min-height: 128px;
    gap: 8px;
    padding: 16px;
  }

  .profile-empty__icon {
    width: 34px;
    height: 34px;
  }

  .admin-layout {
    gap: 10px;
  }

  .admin-secondary-nav {
    gap: 8px;
    padding: 8px;
  }

  .admin-secondary-nav__group {
    min-width: min(220px, 70vw);
  }

  .admin-secondary-nav__item,
  .system-wording-sidebar__button,
  .permission-toggle,
  .drag-handle {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .appearance-list li {
    grid-template-columns: 1fr;
  }

  .appearance-list--with-media li {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .appearance-list--with-media .appearance-summary {
    grid-column: 2;
  }

  .related-pokemon-row {
    grid-template-columns: 1fr;
  }

  .related-pokemon-row__summary {
    grid-template-columns: 1fr;
  }

  .related-pokemon-row__traits {
    justify-content: flex-start;
  }

  .appearance-summary div {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .inline-row {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-row > input,
  .inline-row > .tags-select {
    width: 100%;
  }

  .appearance-row__main {
    grid-template-columns: 1fr;
  }

  .modal-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-footer .link-button,
  .modal-footer .plain-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-top: 56px;
  }

  .site-topbar__inner {
    min-height: 56px;
    gap: 8px;
    padding: 6px 10px;
  }

  .sidebar-toggle {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .brand-lockup,
  .brand-lockup--topbar {
    gap: 8px;
  }

  .brand-lockup--topbar .pokeball-mark {
    --ball-size: 28px !important;
  }

  .brand-lockup--topbar .pokemon-word {
    font-size: 19px;
    -webkit-text-stroke-width: 1.5px;
    text-shadow: 1px 2px 0 var(--pokemon-blue);
  }

  .brand-lockup--topbar .brand-subtitle,
  .site-topbar .auth-user__name {
    display: none;
  }

  .site-topbar .auth-user {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  .topbar-actions {
    gap: 4px;
  }

  .site-sidebar {
    width: min(84vw, 264px);
    max-width: calc(100vw - 28px);
  }

  .site-sidebar__inner {
    gap: 10px;
    padding: 12px 8px;
  }

  .site-sidebar__header .pokeball-mark {
    --ball-size: 34px !important;
  }

  .site-sidebar__header .pokemon-word {
    font-size: 21px;
  }

  .side-nav__link {
    min-height: 38px;
    padding: 7px 8px;
  }

  .side-nav__link--child {
    min-height: 34px;
    padding: 6px 8px 6px 30px;
  }

  .container,
  .page {
    --page-padding-x: 10px;
  }

  .page {
    padding-top: 12px;
    padding-bottom: 26px;
  }

  .page-stack {
    gap: 10px;
  }

  .page-title {
    font-size: 25px;
  }

  .page-subtitle {
    font-size: 13px;
  }

  .page-kicker {
    font-size: 10px;
  }

  .page-kicker::before {
    width: 12px;
    height: 12px;
  }

  .ui-button,
  .primary-button,
  .link-button,
  .plain-button,
  .field input,
  .field select,
  .field textarea,
  .tags-select__search,
  .tags-select__trigger,
  .tags-select--single .tags-select__trigger {
    min-height: 36px;
  }

  .ui-button,
  .primary-button,
  .link-button,
  .plain-button {
    padding: 6px 9px;
  }

  .filter-panel,
  .toolbar,
  .detail-section,
  .edit-history-panel,
  .entity-discussion-panel,
  .profile-card,
  .life-composer,
  .life-post,
  .auth-panel,
  .home-project-updates__panel,
  .project-updates-panel {
    padding: 10px;
  }

  .auth-page {
    padding: 8px 0;
  }

  .auth-panel {
    gap: 12px;
  }

  .auth-panel .page-title {
    font-size: 26px;
  }

  .home-page {
    gap: 14px;
  }

  .home-hero {
    gap: 12px;
  }

  .home-hero__copy {
    gap: 10px;
  }

  .home-hero__title {
    font-size: 30px;
  }

  .home-hero__actions {
    gap: 6px;
  }

  .home-quick-index a {
    min-height: 42px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .home-dex {
    border-width: 3px;
    box-shadow: 0 5px 0 #7b0f16, var(--shadow-soft);
  }

  .home-dex__head {
    min-height: 40px;
    padding: 8px 10px;
  }

  .home-dex__screen {
    gap: 10px;
    margin: 6px;
    padding: 10px;
    border-width: 3px;
  }

  .home-dex__screen .pokeball-mark {
    --ball-size: 60px !important;
  }

  .home-dex__copy strong {
    font-size: 20px;
  }

  .home-dex__copy p {
    font-size: 13px;
    line-height: 1.4;
  }

  .home-dex__tiles a {
    min-height: 48px;
    padding: 6px;
  }

  .home-section__header h2 {
    font-size: 22px;
  }

  .home-card {
    gap: 8px;
    padding: 9px;
  }

  .home-card__icon {
    width: 36px;
    height: 36px;
  }

  .home-card__icon .ui-icon {
    width: 20px;
    height: 20px;
  }

  .home-card__copy strong {
    font-size: 16px;
  }

  .home-card__copy span {
    font-size: 12px;
  }

  .entity-grid,
  .grid {
    gap: 10px;
  }

  .entity-card {
    gap: 8px;
    padding: 10px;
  }

  .collections-card-grid .entity-card--collection-compact {
    gap: 8px;
    padding: 10px;
  }

  .entity-card__mark {
    width: 34px;
    height: 34px;
  }

  .pokemon-list-grid .entity-card__mark,
  .catalog-card-grid .entity-card__mark {
    width: 48px;
    height: 48px;
  }

  .collections-card-grid .entity-card--collection-compact .entity-card__mark {
    width: 48px;
    height: 48px;
  }

  .collections-card-grid .entity-card--collection-compact .skeleton-entity-mark {
    width: 48px !important;
    height: 48px !important;
  }

  .pokemon-list-grid .pokeball-mark,
  .catalog-card-grid .pokeball-mark {
    --ball-size: 36px !important;
  }

  .entity-card__title,
  .pokemon-list-grid .entity-card__title,
  .catalog-card-grid .entity-card__title {
    font-size: 16px;
  }

  .modal-backdrop {
    padding: 4px;
  }

  .modal {
    max-height: calc(100dvh - 8px);
  }

  .modal-header,
  .modal-footer,
  .modal-body {
    padding: 9px 10px;
  }

  .pokemon-edit-form {
    height: calc(100dvh - 78px);
  }

  .entity-profile-facts div,
  .profile-stat-strip div,
  .profile-stat-grid div,
  .profile-contribution-row,
  .profile-activity-card,
  .profile-post-preview {
    padding: 8px;
  }

  .pokemon-profile-side--with-image {
    grid-template-columns: minmax(0, 1fr) 86px;
  }

  .pokemon-profile-image {
    width: 86px;
    padding: 6px;
  }

  .pokemon-image-detail__screen {
    min-height: 150px;
  }

  .pokemon-image-detail__screen img {
    max-height: 140px;
  }

  .life-rating-control,
  .life-rating-control__stars,
  .life-rating-control__star,
  .life-icon-button,
  .life-review-button,
  .life-reaction-control,
  .life-reaction-summary,
  .life-reaction-option,
  .life-post__review-actions {
    min-height: 36px;
    height: 36px;
  }

  .life-rating-control__star,
  .life-icon-button {
    width: 36px;
    min-width: 36px;
    flex-basis: 36px;
  }

  .life-reaction-summary,
  .life-reaction-option,
  .life-post__review-actions {
    height: auto;
  }

  .life-post__avatar {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .profile-avatar {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }

  .profile-identity h2,
  .profile-card__header h2 {
    font-size: 20px;
  }

  .profile-stat-strip dd,
  .profile-stat-grid dd,
  .profile-referral__metric strong {
    font-size: 22px;
  }

  .admin-secondary-nav {
    margin-right: -10px;
    margin-left: -10px;
    padding: 8px 10px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .site-topbar .topbar-actions__icon-button,
  .site-topbar .auth-user,
  .site-topbar .notification-menu__trigger,
  .site-topbar .language-menu__trigger {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
}

.dish-category-panel {
  display: grid;
  gap: 24px;
}

.dish-category-summary {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.dish-category-summary__content {
  display: grid;
  gap: 14px;
}

.dish-category-summary__content h2 {
  margin: 0;
  font-size: 24px;
}

.dish-media-link {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.dish-media-link img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.dish-media-link--small {
  width: 76px;
  box-shadow: none;
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.dish-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.dish-card__content {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.dish-card__title {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.3;
}

.dish-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dish-card__meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.dish-category-effect-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.dish-category-effect-row strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.dish-form-stack {
  display: grid;
  gap: 14px;
}

.dish-form-row {
  display: grid;
  gap: 14px;
}

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

.dish-form-row--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-list--compact {
  gap: 8px;
  font-size: 14px;
}

.threads-layout {
  min-height: min(78vh, 860px);
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.threads-sidebar,
.threads-list-panel,
.thread-chat-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.threads-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.threads-sidebar h2 {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
}

.thread-channel,
.thread-list-item {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

.thread-channel {
  min-height: 44px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 8px 10px;
  font-weight: 900;
}

.thread-channel:hover,
.thread-channel.active,
.thread-list-item:hover,
.thread-list-item.active {
  border-color: color-mix(in srgb, var(--pokemon-blue) 35%, var(--line));
  background: color-mix(in srgb, var(--pokemon-blue) 8%, var(--surface));
  color: var(--ink);
}

.thread-unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--pokemon-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pokemon-red) 16%, transparent);
}

.threads-list-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

.thread-search-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.thread-search-control {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--muted);
}

.thread-search-control .ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.thread-search-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
}

.thread-search-control:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent);
}

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

.thread-filters label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
}

.thread-composer textarea {
  width: 100%;
}

.thread-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thread-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

button.thread-chip {
  cursor: pointer;
}

.thread-chip.active,
.thread-list-item.unread .thread-list-item__title {
  color: var(--ink);
}

.thread-chip.active {
  border-color: var(--pokemon-blue);
  background: color-mix(in srgb, var(--pokemon-yellow) 26%, var(--surface));
}

.thread-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
}

.thread-list-item {
  padding: 12px;
}

.thread-list-item__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
}

.thread-list-item__meta,
.threads-empty,
.thread-chat-header p,
.thread-message-meta time {
  color: var(--muted);
  font-size: 13px;
}

.thread-list-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.thread-chat-panel {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.thread-chat-panel--modal {
  min-height: min(72vh, 680px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.thread-chat-header {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.thread-chat-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.thread-chat-header p {
  margin: 4px 0 0;
}

.thread-chat-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.thread-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.thread-reactions--message {
  padding: 0;
  border-bottom: 0;
}

.thread-reaction {
  min-width: 44px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--ink-soft);
  cursor: pointer;
}

.thread-reaction.active {
  border-color: var(--pokemon-blue);
  background: color-mix(in srgb, var(--pokemon-blue) 10%, var(--surface));
  color: var(--ink);
}

.thread-reaction__emoji {
  font-size: 17px;
  line-height: 1;
}

.thread-reaction--action {
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 900;
}

.thread-message-scroll {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-soft) 58%, var(--surface));
}

.thread-message-list {
  display: grid;
  gap: 16px;
}

.thread-message-group {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.thread-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--pokemon-yellow);
  color: var(--pokeball-black);
  font-weight: 900;
}

.thread-message-group__body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.thread-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.thread-message {
  display: grid;
  gap: 8px;
}

.thread-message p {
  margin: 0;
  white-space: pre-wrap;
}

.thread-message-edit {
  display: grid;
  gap: 8px;
}

.thread-message-edit textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
}

.thread-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.thread-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.thread-jump-button {
  position: absolute;
  right: 18px;
  bottom: 86px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--pokemon-yellow);
  color: var(--pokeball-black);
  font-weight: 900;
  box-shadow: var(--shadow-control);
}

.thread-load-older {
  width: fit-content;
  margin: 0 auto 14px;
}

.threads-empty {
  margin: 0;
  padding: 18px;
}

.threads-empty--select {
  align-self: center;
  justify-self: center;
}

@media (max-width: 1100px) {
  .threads-layout {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .threads-layout,
  .dish-category-summary,
  .dish-card {
    grid-template-columns: 1fr;
  }

  .thread-search-create,
  .thread-filters,
  .thread-composer,
  .thread-chat-header {
    grid-template-columns: 1fr;
  }

  .thread-chat-header {
    display: grid;
  }

  .thread-chat-actions {
    justify-content: flex-start;
  }

  .thread-chat-panel {
    min-height: 70dvh;
  }

  .dish-form-row,
  .dish-form-row--3,
  .dish-form-row--4 {
    grid-template-columns: 1fr;
  }

  .dish-media-link {
    width: 96px;
  }

  .dish-media-link--small {
    width: 72px;
  }
}

@media (max-width: 360px) {
  .brand-lockup--topbar > span {
    display: none;
  }
}
