:root {
  --bg: #f4f7fb;
  --paper: #ffffff;
  --ink: #1c2434;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #3b82f6;
  --shadow: 0 18px 40px rgba(28, 36, 52, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, #e8f1ff 0%, transparent 42%),
    radial-gradient(circle at top right, #fff4e8 0%, transparent 36%),
    var(--bg);
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
}

.page {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(36px + env(safe-area-inset-top)) 0 calc(72px + env(safe-area-inset-bottom));
}

.hero {
  margin-bottom: 28px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  color: var(--muted);
  font-weight: 600;
}

.logout-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.pokeball {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    linear-gradient(#ef4444 0 50%, #fff 50%),
    #fff;
  border: 3px solid #1c2434;
  position: relative;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.2);
}

.pokeball::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1c2434;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 2px 0 0;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.subtitle {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.site-nav-link.is-active {
  color: #fff;
  background: #1c2434;
  border-color: #1c2434;
}

.gen-search-wrap {
  display: block;
  margin-top: 8px;
}

.gen-search {
  width: 100%;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0 22px;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
  outline: none;
  box-shadow: var(--shadow);
}

.gen-search:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.gen-search[type="search"]::-webkit-search-decoration,
.gen-search[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.gen-empty {
  margin-top: 28px;
  padding: 28px 24px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
}

.gen-empty strong {
  display: block;
  font-size: 18px;
}

.gen-empty p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.gen-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.gen-card h2 {
  margin: 2px 0 0;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.gen-aka,
.gen-region {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.gen-sprite {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.gen-badge {
  margin: 0;
  text-align: right;
}

.gen-badge strong {
  display: block;
  font-size: 56px;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.gen-badge span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gen-card[data-gen="1"] { background: linear-gradient(160deg, #fee2e2, #fff 58%); }
.gen-card[data-gen="2"] { background: linear-gradient(160deg, #fef3c7, #fff 58%); }
.gen-card[data-gen="3"] { background: linear-gradient(160deg, #dcfce7, #fff 58%); }
.gen-card[data-gen="4"] { background: linear-gradient(160deg, #dbeafe, #fff 58%); }
.gen-card[data-gen="5"] { background: linear-gradient(160deg, #e2e8f0, #fff 58%); }
.gen-card[data-gen="6"] { background: linear-gradient(160deg, #ede9fe, #fff 58%); }
.gen-card[data-gen="7"] { background: linear-gradient(160deg, #ffedd5, #fff 58%); }
.gen-card[data-gen="8"] { background: linear-gradient(160deg, #f3e8ff, #fff 58%); }
.gen-card[data-gen="9"] { background: linear-gradient(160deg, #ffe4e6, #fff 58%); }

.gen-matches {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.gen-match {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.gen-match.is-selected {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.gen-match img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.gen-match strong,
.gen-match em,
.gen-match b {
  display: block;
}

.gen-match em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.gen-match b {
  font-size: 18px;
}

@media (max-width: 640px) {
  .gen-search {
    height: 58px;
    font-size: 20px;
  }

  .gen-card {
    grid-template-columns: 72px 1fr;
  }

  .gen-sprite {
    width: 72px;
    height: 72px;
  }

  .gen-card h2 {
    font-size: 26px;
  }

  .gen-badge {
    grid-column: 1 / -1;
    text-align: left;
  }

  .gen-badge strong {
    font-size: 64px;
  }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  font: inherit;
  background: #f8fafc;
  color: var(--ink);
  outline: none;
}

.input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  background: #fff;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin: 0 0 14px;
}

.search-wrap {
  position: relative;
}

.add-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px 0 10px;
  background: #1c2434;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(28, 36, 52, 0.16);
}

.add-chip:focus-within {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.add-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.add-input {
  width: 210px;
  height: 36px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.add-input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.add-input[type="search"]::-webkit-search-decoration,
.add-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 8px);
  width: min(420px, 90vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}

.suggestion {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.suggestion:hover,
.suggestion:focus {
  background: #f1f5f9;
}

.suggestion img {
  width: 48px;
  height: 66px;
  object-fit: contain;
}

.suggestion strong {
  display: block;
}

.suggestion span,
.meta {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.toolbar .status {
  flex: 1 1 100%;
  min-height: 0;
  margin: 0;
  font-size: 12px;
}

.status {
  color: var(--muted);
  font-size: 14px;
}

.status:empty {
  display: none;
}

.status.error {
  color: #dc2626;
}

.status.ok {
  color: #059669;
}

.filters-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(28, 36, 52, 0.05);
}

.filter-chip:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.filter-icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex: 0 0 auto;
}

.filter-prefix {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}

.filter-input {
  width: 168px;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.filter-input[type="search"]::-webkit-search-decoration,
.filter-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.filter-chip-select {
  padding-right: 8px;
}

.filter-select {
  width: auto;
  min-width: 72px;
  max-width: 110px;
  padding-right: 4px;
  cursor: pointer;
  appearance: none;
  background: transparent;
}

.count {
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.binder {
  display: grid;
  grid-template-columns: 28px 1fr;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  min-height: 360px;
  overflow: hidden;
}

.rings {
  background: linear-gradient(180deg, #dbe7f5, #c9d8ea);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 24px 0;
}

.rings span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: inset 0 0 0 3px #e2e8f0, 0 0 0 3px #64748b;
}

.layout-picker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  padding: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(28, 36, 52, 0.05);
}

.layout-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 2px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}

.layout-btn.is-active {
  background: #1c2434;
  color: #fff;
}

.layout-thumb {
  display: grid;
  gap: 1px;
  width: 12px;
  height: 10px;
}

.layout-thumb i {
  display: block;
  background: currentColor;
  border-radius: 0.5px;
  opacity: 0.55;
}

.layout-btn.is-active .layout-thumb i {
  opacity: 1;
}

.binder-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.pager-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-label {
  font-size: 12px;
  color: var(--muted);
  min-width: 72px;
  text-align: center;
}

.binder-grid {
  display: grid;
  grid-template-columns: repeat(var(--binder-cols, 3), minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.pocket-empty {
  min-height: 0;
  cursor: default;
  background: repeating-linear-gradient(
    -12deg,
    #f8fafc,
    #f8fafc 6px,
    #eef2f7 6px,
    #eef2f7 12px
  );
  border: 1px dashed #cbd5e1;
}

.binder[data-cols="4"] .card-body h2,
.binder[data-cols="5"] .card-body h2 {
  font-size: 11px;
}

.binder[data-cols="4"] .card-meta:last-of-type,
.binder[data-cols="5"] .card-meta:last-of-type {
  display: none;
}

.pocket {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18));
  border: 1px dashed rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.card {
  position: relative;
  background: var(--card-bg, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.14);
}

.card-art {
  aspect-ratio: 63 / 88;
  background: rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  padding: 6px 6px 0;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(15, 23, 42, 0.16));
}

.card-body {
  padding: 6px 8px 8px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 6px;
}

.card-body h2 {
  margin: 0;
  font-size: 12px;
}

.card-body .badge {
  padding: 2px 7px;
  font-size: 10px;
}

.hp {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
}

.card-meta {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.pocket:hover .remove,
.pocket:focus-within .remove {
  opacity: 1;
  pointer-events: auto;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 80px 20px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

.modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 8px;
}

.modal-head h2 {
  margin: 4px 0 0;
}

.modal-close {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.modal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 14px 0 16px;
  padding: 5px;
  background: #f1f5f9;
  border-radius: 14px;
}

.modal-tab {
  border: 0;
  background: transparent;
  border-radius: 10px;
  height: 38px;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.modal-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(28, 36, 52, 0.08);
}

.modal-tab-panel[hidden] {
  display: none;
}

.pokedex {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) 1.2fr;
  gap: 22px;
  align-items: start;
}

.pokedex-art {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 42%, #fff 0 38%, transparent 39%),
    linear-gradient(180deg, #eef6ff, #f8fafc);
  border: 1px solid var(--line);
}

.pokedex-art img {
  width: min(100%, 320px);
  height: auto;
  filter: drop-shadow(0 16px 24px rgba(15, 23, 42, 0.18));
}

.pokedex-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.pokedex-fact {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
}

.pokedex-fact dt {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.86;
}

.pokedex-fact dd {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.pokedex-fact.is-wide dd {
  font-size: 16px;
}

.pokedex-fact.is-measure {
  background: #30a7d7;
}

.pokedex-fact.is-info {
  background: #5a6b7d;
}

.pokedex-gender {
  display: flex;
  gap: 10px;
  font-size: 22px;
  line-height: 1;
}

.pokedex-gender .male {
  color: #6ec8f5;
}

.pokedex-gender .female {
  color: #f5a7c5;
}

.pokedex-flavor {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.55;
}

.pokedex-section {
  margin-bottom: 16px;
}

.pokedex-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.pokedex-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 7px 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.18);
}

.pokedex-stats {
  display: grid;
  gap: 8px;
}

.pokedex-stat {
  display: grid;
  grid-template-columns: 78px 42px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.pokedex-stat strong {
  color: var(--muted);
  font-weight: 600;
}

.pokedex-stat span {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.pokedex-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.pokedex-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #30a7d7;
}

.pokedex-evo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pokedex-evo-stage {
  display: flex;
  gap: 8px;
}

.pokedex-evo-card {
  width: 92px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
}

.pokedex-evo-card.is-current {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.pokedex-evo-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.pokedex-evo-card p {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
}

.pokedex-evo-arrow {
  color: var(--muted);
  font-size: 20px;
}

@media (max-width: 800px) {
  .pokedex {
    grid-template-columns: 1fr;
  }

  .pokedex-facts {
    grid-template-columns: 1fr;
  }
}

.versions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  padding-top: 8px;
}

.version-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}

.version-card.is-cover {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
  background: #eff6ff;
}

.version-card img {
  width: 100%;
  aspect-ratio: 63 / 88;
  object-fit: contain;
}

.version-card h3 {
  margin: 8px 0 4px;
  font-size: 14px;
}

.cover-btn,
.cover-label {
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.cover-btn {
  background: #1c2434;
  color: #fff;
  cursor: pointer;
}

.cover-label {
  background: #dbeafe;
  color: #1d4ed8;
  margin: 10px 0 0;
}

@media (max-width: 800px) {
  .add-chip {
    width: 100%;
  }

  .add-input {
    width: 100%;
  }

  .filters-bar {
    display: flex;
  }

  .filter-input {
    width: 100%;
    min-width: 0;
  }

  .filter-chip,
  .filter-chip-select {
    flex: 1 1 auto;
  }

  .filter-select {
    max-width: none;
  }

  .binder {
    grid-template-columns: 1fr;
  }

  .rings {
    display: none;
  }
}

.pwa-banner {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.pwa-banner[hidden] {
  display: none;
}

.pwa-banner-text {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-install,
.pwa-dismiss,
.offline-retry {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pwa-install,
.offline-retry {
  background: #1c2434;
  color: #fff;
}

.pwa-dismiss {
  background: #f1f5f9;
  color: var(--muted);
}

.offline-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(32px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}

.offline-card {
  width: min(420px, 100%);
  text-align: center;
}

.offline-card .brand-logo {
  margin-inline: auto;
}

.offline-retry {
  margin-top: 18px;
  padding: 12px 18px;
  font-size: 14px;
}
