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

:root {
  --bg: #0a1018;
  --bg-gradient: radial-gradient(ellipse 130% 90% at 50% -30%, rgba(91,206,250,.14), transparent 55%);
  --bg-elevated: rgba(22,34,46,.92);
  --bg-input: #0a1018;
  --bg-toolbar: rgba(22,34,46,.95);
  --bg-sheet: #0a1018;
  --text: #e8eef4;
  --text-soft: #a8bcc9;
  --text-muted: #8ba3b8;
  --text-faint: #6a8499;
  --border: #2f4558;
  --border-soft: rgba(47,69,88,.8);
  --accent: #5bcefa;
  --success: #52b788;
  --success-dark: #2d6a4f;
  --warn: #ffb347;
  --danger: #e76f51;
  --header-bg: rgba(10,16,24,.92);
  --header-border: rgba(47,69,88,.85);
  --shadow: rgba(0,0,0,.22);
  --shadow-lg: rgba(0,0,0,.35);
  --progress-track: #1a2733;
  --panel-heading: #5bcefa;
  --footer-bg: linear-gradient(180deg, transparent, rgba(10,16,24,.6));
  --cmp-dim: rgba(0,0,0,.62);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fa;
  --bg-gradient: radial-gradient(ellipse 130% 90% at 50% -30%, rgba(91,206,250,.12), transparent 55%);
  --bg-elevated: rgba(255,255,255,.96);
  --bg-input: #fff;
  --bg-toolbar: rgba(255,255,255,.98);
  --bg-sheet: #eef2f6;
  --text: #1a2836;
  --text-soft: #4a6278;
  --text-muted: #5c7389;
  --text-faint: #7a92a8;
  --border: #c5d4e0;
  --border-soft: rgba(197,212,224,.95);
  --header-bg: rgba(255,255,255,.94);
  --header-border: rgba(197,212,224,.95);
  --shadow: rgba(26,40,54,.08);
  --shadow-lg: rgba(26,40,54,.14);
  --progress-track: #dde6ee;
  --panel-heading: #1484b8;
  --footer-bg: linear-gradient(180deg, transparent, rgba(228,235,242,.85));
  --cmp-dim: rgba(255,255,255,.72);
}

html[data-theme="light"] .nav-logo-text,
html[data-theme="light"] .page-head h1 {
  background: linear-gradient(135deg, #1a2836 20%, #1484b8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.site-nav {
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px; text-decoration: none; color: #e8eef4;
  font-weight: 700; font-size: .88rem; min-width: 0; flex: 1;
}
.nav-logo:hover { color: #5bcefa; }
.nav-logo-icon { color: #5bcefa; font-size: .75rem; }
.nav-logo-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: linear-gradient(135deg, #fff 20%, #5bcefa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-crumb { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #8ba3b8; }
.nav-crumb-current { color: #52b788; font-weight: 600; text-transform: lowercase; }
.nav-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: auto;
}
.nav-link {
  font-size: .78rem; color: #a8bcc9; text-decoration: none; padding: 6px 10px;
  border-radius: 6px; transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(47,69,88,.5); color: #fff; }
html[data-theme="light"] .nav-link:hover { background: rgba(91,206,250,.12); color: var(--text); }
.nav-link-accent { color: var(--accent); border: 1px solid rgba(91,206,250,.35); }
#nav-catalog { color: var(--success); }
.nav-theme {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text-muted);
  cursor: pointer; font-size: 1rem; line-height: 1;
  transition: border-color .15s, color .15s, background .15s;
}
.nav-theme:hover { border-color: var(--accent); color: var(--accent); }
.nav-theme-icon { display: none; }
html:not([data-theme="light"]) .nav-theme-icon-moon { display: inline; }
html[data-theme="light"] .nav-theme-icon-sun { display: inline; }
.nav-link-accent:hover { background: rgba(91,206,250,.12); }
.nav-mine { color: #52b788 !important; border: 1px solid rgba(82,183,136,.35); }
.nav-mine-active {
  color: #0a1018 !important;
  background: linear-gradient(180deg, #52b788, #2d6a4f) !important;
  border-color: #52b788 !important;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(82,183,136,.35);
}
.nav-mine-active:hover {
  filter: brightness(1.08);
  color: #0a1018 !important;
}

.mine-banner {
  background: linear-gradient(90deg, rgba(45,106,79,.95), rgba(82,183,136,.88));
  border-bottom: 1px solid rgba(82,183,136,.5);
  padding: 10px 16px;
}
.mine-banner-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
}
.mine-banner-text {
  margin: 0; font-size: .84rem; font-weight: 600; color: #e8eef4;
}
.mine-banner-btn {
  background: #0a1018 !important; color: #52b788 !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  white-space: nowrap;
}
.mine-banner-btn:hover { filter: brightness(1.15); }

.site-announcements {
  display: flex; flex-direction: column; gap: 0;
}
.site-announce {
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-announce-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 10px 16px;
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px;
}
.site-announce-body { flex: 1; min-width: 0; }
.site-announce-title {
  margin: 0 0 3px; font-size: .82rem; font-weight: 800; letter-spacing: .01em;
}
.site-announce-text {
  margin: 0; font-size: .78rem; line-height: 1.45; color: rgba(232,238,244,.92);
}
.site-announce-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.site-announce-link {
  background: rgba(10,16,24,.55) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  color: inherit !important;
  font-size: .72rem !important;
  padding: 6px 10px !important;
}
.site-announce-dismiss {
  background: transparent; border: none; color: inherit;
  font-size: 1.25rem; line-height: 1; cursor: pointer; opacity: .75;
  padding: 2px 6px; border-radius: 6px;
}
.site-announce-dismiss:hover { opacity: 1; background: rgba(0,0,0,.15); }

.site-announce-info {
  background: linear-gradient(90deg, rgba(26,58,92,.92), rgba(45,90,130,.85));
  color: #d8ecff;
}
.site-announce-info .site-announce-title { color: #9ed4ff; }

.site-announce-success {
  background: linear-gradient(90deg, rgba(45,106,79,.95), rgba(82,183,136,.82));
  color: #e8f5ee;
}
.site-announce-success .site-announce-title { color: #b8f0d4; }

.site-announce-event {
  background: linear-gradient(90deg, rgba(92,58,18,.95), rgba(180,120,40,.82));
  color: #fff4e0;
}
.site-announce-event .site-announce-title { color: #ffd98a; }

.site-announce-warning {
  background: linear-gradient(90deg, rgba(92,28,28,.95), rgba(160,55,55,.85));
  color: #ffe8e8;
}
.site-announce-warning .site-announce-title { color: #ffb4b4; }

html[data-theme="light"] .site-announce-text { color: rgba(20,32,44,.88); }
html[data-theme="light"] .site-announce-info { color: #1a3a55; }
html[data-theme="light"] .site-announce-success { color: #1a3d2c; }
html[data-theme="light"] .site-announce-event { color: #4a3208; }
html[data-theme="light"] .site-announce-warning { color: #5a1818; }

.mine-resume {
  border-color: rgba(82,183,136,.45) !important;
  background: linear-gradient(135deg, rgba(45,106,79,.12), rgba(22,34,46,.92)) !important;
}
.mine-resume-body {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
}
.mine-resume h2 { color: #52b788; font-size: 1rem; margin-bottom: 6px; }
.mine-resume-sub { margin: 0 !important; }
.mine-resume-sub strong { color: #5bcefa; text-transform: lowercase; }
.mine-resume-btn { white-space: nowrap; }
.mine-own-edit { margin-top: 12px !important; }
.mine-own-edit .btn { display: inline-block; text-decoration: none; }
.nav-lang {
  background: rgba(26,39,51,.9); border: 1px solid #2f4558; color: #e8eef4;
  padding: 6px 8px; border-radius: 6px; font-size: .75rem; cursor: pointer; max-width: 110px;
}

.page-head { text-align: center; margin-bottom: 18px; }
.page-head h1 {
  font-size: clamp(1.2rem, 3.5vw, 1.65rem); font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(135deg, #fff 30%, #5bcefa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head p { font-size: .84rem; color: #8ba3b8; margin-top: 6px; max-width: 36em; margin-inline: auto; }

.community-panel { margin-top: 4px; }
.community-panel-compact .board-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.board-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.board-card {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
  background: #0a1018; border: 1px solid #2f4558; border-radius: 10px;
  text-decoration: none; color: inherit; transition: border-color .15s, transform .12s, box-shadow .15s;
}
.board-card:hover {
  border-color: #5bcefa; transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.board-card-name {
  font-weight: 700; font-size: .92rem; color: #e8eef4; text-transform: lowercase;
}
.board-card-bar {
  height: 5px; background: #1a2733; border-radius: 99px; overflow: hidden;
}
.board-card-bar span {
  display: block; height: 100%; background: linear-gradient(90deg, #2d6a4f, #52b788);
  border-radius: 99px;
}
.board-card-stats { font-size: .75rem; color: #52b788; font-weight: 600; }
.board-card-time { font-size: .68rem; color: #6a8499; }

.boards-browse { scroll-margin-top: 72px; }
.boards-filters { margin-bottom: 16px; }
.boards-filters-row {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 640px) {
  .boards-filters-row { grid-template-columns: 1.4fr 1fr auto auto; align-items: end; }
}
.boards-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.boards-field-label {
  font-size: .68rem; color: #6a8499; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600;
}
.boards-field input[type=search],
.boards-field input[type=number],
.boards-field select {
  background: #0a1018; border: 1px solid #2f4558; color: #e8eef4;
  padding: 10px 12px; border-radius: 8px; font-size: .88rem; width: 100%;
}
.boards-field input:focus, .boards-field select:focus {
  outline: 2px solid #5bcefa; border-color: transparent;
}
.boards-field-num { max-width: 120px; }
.boards-filters-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.boards-results-msg { margin-bottom: 14px; font-weight: 600; color: #8ba3b8 !important; }

.boards-pagination {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(47,69,88,.6);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.boards-page-info { font-size: .78rem; color: #6a8499; text-align: center; }
.boards-page-links {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
}
.boards-page-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: 8px; border: 1px solid #2f4558;
  color: #a8bcc9; text-decoration: none; font-size: .82rem; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.boards-page-num:hover { border-color: #5bcefa; color: #5bcefa; }
.boards-page-current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: 8px; background: rgba(91,206,250,.15);
  border: 1px solid rgba(91,206,250,.45); color: #5bcefa;
  font-size: .82rem; font-weight: 700;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 16px 16px 32px; }

.panel {
  background: var(--bg-elevated); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 18px; margin-bottom: 14px;
  box-shadow: 0 8px 32px var(--shadow);
}
.panel h2 { font-size: .95rem; margin-bottom: 10px; color: var(--panel-heading); font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
input[type=text],
input[type=password] {
  background: #0a1018; border: 1px solid #2f4558; color: #fff;
  padding: 10px 14px; border-radius: 8px; font-size: .9rem; flex: 1; min-width: 140px;
  box-sizing: border-box;
}
input[type=text]:focus,
input[type=password]:focus { outline: 2px solid #5bcefa; border-color: transparent; }
.btn {
  background: linear-gradient(180deg, #3d9a6a, #2d6a4f); color: #fff; border: none;
  padding: 10px 16px; border-radius: 8px; font-size: .85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: transform .12s, filter .12s;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: #243444; border: 1px solid #2f4558; }
.btn.secondary:hover { background: #2d4356; filter: none; }
.btn-sm { padding: 8px 12px; font-size: .78rem; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--bg-toolbar); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.toolbar-count { font-size: .88rem; color: var(--text-muted); }
.toolbar-count strong { color: #52b788; font-size: 1.05rem; }
.progress-wrap { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 10px; }
.progress-bar {
  flex: 1; height: 8px; background: #1a2733; border-radius: 99px; overflow: hidden;
  border: 1px solid #2f4558;
}
.progress-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #2d6a4f, #52b788);
  border-radius: 99px; transition: width .35s ease;
}
.progress-text { font-size: .75rem; color: #52b788; font-weight: 700; min-width: 2.5em; text-align: right; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.link-box {
  background: #0a1018; border: 1px solid #2f4558; border-radius: 8px;
  padding: 10px 12px; font-size: .8rem; word-break: break-all; margin-top: 8px; color: #5bcefa;
}
.link-box label { display: block; font-size: .7rem; color: #8ba3b8; margin-bottom: 4px; }

.admin-gate label,
.admin-filter label {
  display: block; font-size: .8rem; color: var(--panel-heading); font-weight: 600; margin-bottom: 6px;
}
.admin-code {
  margin-top: 12px; padding: 12px 14px; border-radius: 8px;
  background: #0a1018; border: 1px solid #2f4558;
  color: #9ad4ff; font-size: .78rem; overflow-x: auto; white-space: pre-wrap;
}
.admin-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 14px;
}
.admin-filter { margin-top: 12px; }
.admin-filter-count { margin: 8px 0 0; }
.admin-table-wrap {
  overflow-x: auto; margin-top: 8px;
  border: 1px solid var(--border-soft); border-radius: 10px;
}
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .8rem;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
}
.admin-table th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: #8ba3b8; background: rgba(10, 16, 24, .55);
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-url-cell { max-width: 28rem; }
.admin-edit-link {
  display: inline-block; max-width: 100%;
  color: #5bcefa; word-break: break-all; text-decoration: none;
}
.admin-edit-link:hover { text-decoration: underline; }
.admin-actions {
  display: flex; flex-wrap: wrap; gap: 6px; white-space: nowrap;
}
.admin-actions .btn {
  padding: 6px 10px; font-size: .75rem;
}

.rename-box {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.rename-box > label {
  display: block; font-size: .8rem; color: var(--panel-heading); font-weight: 600; margin-bottom: 4px;
}
.rename-hint { margin: 0 0 8px; font-size: .78rem; }
.pin-box {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.pin-box-label {
  display: block; font-size: .8rem; color: var(--panel-heading); font-weight: 600; margin-bottom: 4px;
}
.pin-opt {
  font-weight: 500;
  font-size: .72rem;
  color: #8ba3b8;
}
.pin-opt::before { content: '· '; }
.pin-tip {
  margin: 0 0 8px;
  font-size: .78rem;
  line-height: 1.4;
  color: #8ba3b8;
}
.pin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.pin-row .pin-input {
  flex: 1 1 9rem;
  min-width: 0;
  max-width: none;
}
.pin-row .btn {
  flex: 0 0 auto;
  align-self: stretch;
}
.pin-input {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
  text-align: center;
}
.pin-input::placeholder {
  letter-spacing: .02em;
  font-family: inherit;
  text-align: left;
  opacity: .55;
}
.pin-input:placeholder-shown {
  letter-spacing: normal;
  text-align: left;
}
.setup-lead {
  margin: 0 0 10px;
  font-size: .85rem;
  line-height: 1.45;
  color: #8ba3b8;
}
.setup-fields {
  display: grid; gap: 12px; margin: 10px 0 8px;
}
.setup-fields-create {
  align-items: start;
}
@media (min-width: 540px) {
  .setup-fields-create {
    grid-template-columns: minmax(0, 1.35fr) minmax(7.5rem, .75fr);
    column-gap: 14px;
  }
}
.setup-field label {
  display: block; font-size: .78rem; color: var(--panel-heading); font-weight: 600; margin-bottom: 4px;
}
.setup-field input {
  width: 100%;
  min-width: 0;
}
.setup-field-pin .pin-input {
  flex: none;
  width: 100%;
  max-width: 11rem;
}
.setup-fields-create .setup-field-pin .pin-input {
  max-width: none;
}
.setup-pin-tip {
  margin: 0 0 12px;
}
.setup-recover-link-wrap {
  margin-top: 10px;
  font-size: .8rem;
}
.setup-recover-link-wrap a {
  color: #5bcefa;
  text-decoration: none;
}
.setup-recover-link-wrap a:hover { text-decoration: underline; }
.setup-actions {
  margin-top: 4px;
}
.recover-panel {
  scroll-margin-top: 72px;
}
html[data-theme="light"] .pin-opt,
html[data-theme="light"] .pin-tip,
html[data-theme="light"] .setup-lead {
  color: rgba(26, 18, 8, .62);
}
html[data-theme="light"] .setup-recover-link-wrap a {
  color: #0b6bcb;
}
.stats { font-size: .85rem; color: #8ba3b8; }
.stats strong { color: #52b788; }
.msg { font-size: .8rem; margin-top: 8px; }
.msg.ok { color: #52b788; }
.msg.err { color: #e76f51; }
.msg.info { color: #8ba3b8; }

.intro {
  font-size: .88rem; line-height: 1.6; color: #a8bcc9; margin-bottom: 14px;
  padding: 14px 16px; background: rgba(22,34,46,.5); border-radius: 12px;
  border-left: 3px solid #5bcefa;
}
.intro p + p { margin-top: 8px; }

.site-footer {
  margin-top: 32px; padding: 22px 16px 28px;
  background: linear-gradient(180deg, transparent, rgba(10,16,24,.6));
  border-top: 1px solid rgba(47,69,88,.7);
  text-align: center; font-size: .78rem; color: #6a8499; line-height: 1.75;
}
.site-footer p + p { margin-top: 6px; }
.site-footer a {
  color: #5bcefa; text-decoration: none; font-weight: 600;
  transition: color .15s;
}
.site-footer a:hover { color: #8dd8fc; text-decoration: underline; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.sheet-outer {
  position: relative;
  z-index: 1;
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--bg-sheet); overflow: auto; -webkit-overflow-scrolling: touch;
  box-shadow: 0 12px 40px var(--shadow-lg);
  scroll-margin-top: 80px;
}
.sheet-wrap {
  position: relative; width: 100%; min-width: 640px; line-height: 0; user-select: none;
}
.sheet-wrap img { width: 100%; height: auto; display: block; pointer-events: none; }
/* Tablero con iconos oficiales — grilla por familia */
.sheet-wrap.sheet-wrap-icons {
  min-width: 0;
  line-height: normal;
}
.sheet-wrap-icons {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 14px 16px;
  overflow: visible;
  background:
    radial-gradient(ellipse 90% 55% at 24% 18%, rgba(91,206,250,.07), transparent 60%),
    radial-gradient(ellipse 90% 55% at 76% 18%, rgba(168,85,247,.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03) 0, transparent 18%),
    var(--bg-sheet);
}
.sheet-wrap-icons::after {
  content: '';
  position: absolute;
  inset: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  pointer-events: none;
  z-index: 0;
}
.sheet-wrap-icons .sheet-bg-ref { display: none !important; }
.sheet-icons-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.sheet-board-section { display: flex; flex-direction: column; gap: 10px; }
.sheet-board-section-title {
  margin: 0;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent, #7ec8ff);
}
.sheet-board-section-lead {
  margin: -4px 0 4px;
  font-size: .78rem;
  line-height: 1.35;
  color: var(--text-soft);
}
.sheet-board-section-archived {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  scroll-margin-top: 88px;
  border-radius: 12px;
  background: rgba(139,163,184,.045);
}
.toolbar-archived-jump {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  color: var(--accent, #7ec8ff);
  font-weight: 700;
  text-decoration: none;
}
.toolbar-archived-jump:hover { text-decoration: underline; }
.sheet-family-row-archived .sheet-family-label { opacity: .85; }
.sheet-sprite-slot-archived { opacity: .96; filter: saturate(.96); }
.spirit-check.spirit-archived:not(:checked) { opacity: .65; }
.spirit-check.spirit-archived:checked {
  opacity: 1;
  filter: none;
}
.sheet-family-row {
  display: grid;
  grid-template-columns: minmax(72px, 96px) minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  min-width: 0;
}
.sheet-family-label {
  margin: 0;
  padding-top: 8px;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-soft);
  text-align: right;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.sheet-family-cells {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 52px));
  gap: 4px;
  justify-content: start;
  min-width: 0;
}
.sheet-sprite-slot-archived { opacity: .96; filter: saturate(.96); }
.spirit-archived:checked + .sheet-sprite-slot { box-shadow: 0 0 0 2px rgba(139,163,184,.55); }

.community-explore-action {
  display: flex;
  justify-content: flex-end;
  margin: 14px 0 0;
}
.community-explore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(91,206,250,.38);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(91,206,250,.16), rgba(61,154,106,.18));
  color: #9be3ff;
  font-size: .8rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.14);
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.community-explore-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91,206,250,.68);
  background: linear-gradient(135deg, rgba(91,206,250,.24), rgba(61,154,106,.25));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 9px 22px rgba(0,0,0,.2);
}
.community-explore-btn:active { transform: translateY(0); }

/* Desktop: dos columnas de familias */
@media (min-width: 900px) {
  .sheet-wrap-icons {
    max-width: 1180px;
    padding: 14px 16px 18px;
  }
  .sheet-icons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 10px;
  }
  .sheet-family-row {
    grid-template-columns: minmax(88px, 112px) minmax(0, 1fr);
    gap: 4px 12px;
  }
  .sheet-family-label {
    font-size: .72rem;
    padding-top: 10px;
  }
  .sheet-family-cells {
    grid-template-columns: repeat(7, minmax(0, 58px));
    gap: 5px;
  }
  .sheet-wrap-icons:not(.sheet-show-unreleased) .sheet-family-cells {
    grid-template-columns: repeat(auto-fill, minmax(50px, 58px));
  }
  .sheet-sprite-cell {
    max-width: 58px;
  }
}

.sheet-sprite-cell {
  position: relative;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: block;
  touch-action: manipulation;
  aspect-ratio: 4 / 5;
  min-width: 0;
  width: 100%;
  max-width: 56px;
}
.sheet-sprite-cell-gap {
  visibility: hidden;
  pointer-events: none;
}
.sheet-sprite-cell .sheet-sprite-slot {
  position: absolute;
  inset: 0;
}
.sheet-sprite-cell .spirit-check {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  z-index: 2;
  pointer-events: none;
}
.sheet-sprite-cell .spirit-check::before { inset: -6px; }
.sheet-sprite-cell .spirit-check::after { content: none !important; }
.sheet-sprite-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 1px 4px rgba(0,0,0,.24);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  pointer-events: none;
}
.sheet-sprite-cell:not(.sheet-sprite-cell-locked) {
  cursor: pointer;
}
.sheet-sprite-art {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  padding: 2px 2px 0;
}
.sheet-sprite-art-empty {
  padding-bottom: 2px;
}
.sheet-sprite-slot .sheet-sprite-icon {
  width: 88%;
  height: 88%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
}
.sheet-sprite-caption {
  flex: 0 0 auto;
  width: 100%;
  padding: 2px 2px 3px;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.78) 38%, rgba(0,0,0,.88) 100%);
  text-align: center;
  line-height: 1.05;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sheet-sprite-caption-name {
  display: block;
  font-size: clamp(0.44rem, 1.05vw, 0.62rem);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.sheet-sprite-caption-style {
  display: block;
  font-size: clamp(0.34rem, 0.72vw, 0.48rem);
  font-weight: 600;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet-sprite-caption-name + .sheet-sprite-caption-style {
  margin-top: 1px;
}
.sheet-sprite-caption-id {
  display: block;
  font-size: clamp(0.34rem, 0.72vw, 0.48rem);
  font-weight: 700;
  color: #f6d98a;
  letter-spacing: .02em;
}
/* Silueta clara: sprites oscuros (Batman) con brightness(0) desaparecían en fondo dark */
.sheet-sprite-slot-silhouette .sheet-sprite-icon {
  opacity: 0.5;
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0,0,0,.45));
}
.sheet-sprite-slot-unreleased {
  opacity: .82;
  border-style: dashed;
  border-color: rgba(255,255,255,.16);
}
.sheet-sprite-slot-empty {
  background: rgba(0,0,0,.32);
}
.sheet-sprite-ph {
  font-size: clamp(.34rem, 0.85vw, .48rem);
  color: var(--text-muted);
  text-align: center;
  padding: 2px;
  line-height: 1.1;
}
.sheet-sprite-cell:hover .sheet-sprite-slot,
.sheet-sprite-cell:focus-within .sheet-sprite-slot {
  border-color: rgba(91,206,250,.55);
  box-shadow: inset 0 0 0 1px rgba(91,206,250,.15), 0 0 12px rgba(91,206,250,.22);
  transform: scale(1.03);
}
.sheet-sprite-cell-locked {
  cursor: default;
}
.sheet-sprite-cell-locked .sheet-sprite-slot {
  opacity: .72;
}
.sheet-sprite-cell-locked:hover .sheet-sprite-slot,
.sheet-sprite-cell-locked:focus .sheet-sprite-slot {
  transform: none;
  border-color: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 2px 8px rgba(0,0,0,.28);
}
.sheet-sprite-lock {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  pointer-events: none;
  z-index: 3;
}
.sheet-sprite-lock::after {
  content: '';
  position: absolute;
  inset: 3px 4px 2px;
  border: 1.5px solid rgba(255,255,255,.75);
  border-top: none;
  border-radius: 0 0 3px 3px;
}
.sheet-sprite-lock::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  width: 6px;
  height: 4px;
  margin-left: -3px;
  border: 1.5px solid rgba(255,255,255,.75);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}
.sheet-wrap:not(.sheet-show-unreleased) .spirit-check.spirit-unreleased {
  visibility: hidden;
  pointer-events: none !important;
}
.sheet-wrap-icons:not(.sheet-show-unreleased) .sheet-sprite-cell-no-drop,
.sheet-wrap-icons:not(.sheet-show-unreleased) .sheet-sprite-cell-gap {
  display: none;
}
.sheet-wrap-icons:not(.sheet-show-unreleased) .sheet-family-row-empty {
  display: none;
}
.sheet-wrap:not(.sheet-wrap-icons):not(.sheet-show-unreleased) .sheet-sprite-cell-locked {
  visibility: hidden;
  pointer-events: none !important;
}
.board-filter-unreleased {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--text-muted);
  margin-left: 8px;
  user-select: none;
}
.board-filter-unreleased input {
  accent-color: var(--accent);
}
.stats-total-hint {
  font-size: .82em;
  color: var(--text-muted);
  font-weight: 500;
}
.spirit-tooltip-compact {
  width: min(168px, 58vw);
}
.spirit-tooltip-compact .spirit-tooltip-art {
  min-height: 72px;
  padding: 6px 8px 4px;
}
.spirit-tooltip-compact .spirit-tooltip-img {
  width: 56px;
  height: 56px;
}
.spirit-tooltip-compact .spirit-tooltip-body {
  padding: 6px 8px 8px;
}
.spirit-tooltip-compact .spirit-tooltip-name {
  font-size: .72rem;
  margin-bottom: 6px;
}
.spirit-tooltip-fixed {
  z-index: 60;
}
body.cmp-picker-open .spirit-tooltip {
  display: none !important;
}
.sheet-sprite-cell:has(.spirit-check:checked) .sheet-sprite-slot {
  border-color: #52b788;
  box-shadow:
    inset 0 0 0 1px rgba(82,183,136,.35),
    0 0 0 2px rgba(82,183,136,.25),
    0 0 14px rgba(82,183,136,.35);
}
.sheet-sprite-cell:has(.spirit-check:checked) .sheet-sprite-slot::after {
  content: '✓';
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 3;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #2d6a4f;
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.sheet-sprite-cell:has(.spirit-check.spirit-starred) .sheet-sprite-slot,
.sheet-sprite-cell.spirit-lv5 .sheet-sprite-slot {
  border-color: #e9c46a;
  box-shadow:
    inset 0 0 0 1px rgba(233,196,106,.4),
    0 0 0 2px rgba(233,196,106,.35),
    0 0 16px rgba(233,196,106,.4);
}
.sheet-sprite-cell:has(.spirit-check.spirit-starred) .sheet-sprite-slot::after,
.sheet-sprite-cell.spirit-lv5 .sheet-sprite-slot::after {
  content: '★';
  background: linear-gradient(145deg, #f4d35e 0%, #c9a227 100%);
  color: #1a1408;
  font-size: .62rem;
  line-height: 15px;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.sheet-sprite-cell:has(.spirit-unreleased:checked) .sheet-sprite-slot {
  border-color: #6a8499;
  box-shadow: 0 0 10px rgba(106,132,153,.28);
}
.sheet-sprite-cell:has(.spirit-unreleased:checked) .sheet-sprite-slot::after {
  background: #6a8499;
}
.sheet-sprite-cell.catalog-highlight .sheet-sprite-slot {
  border-color: #5bcefa;
  box-shadow: 0 0 0 2px rgba(91,206,250,.45), 0 0 16px rgba(91,206,250,.35);
  transform: scale(1.06);
}
.sheet-wrap-icons.compare-active .sheet-sprite-cell:has(.spirit-check:checked) .sheet-sprite-slot::after {
  content: none;
}
.sheet-wrap-icons.compare-active .sheet-sprite-cell .spirit-check {
  opacity: 0;
}
.cmp-dim-patch-icons::before {
  inset: 0;
  border-radius: 6px;
}

/* Comparar (tablero iconos): atenuar celdas con CSS, sin overlays negros flotantes */
.sheet-wrap-icons.compare-active .sheet-sprite-cell:has(.spirit-check.cmp-dim) .sheet-sprite-slot {
  opacity: 0.38;
  filter: grayscale(0.55) brightness(0.72);
}
.sheet-wrap-icons.compare-active .sheet-sprite-cell:has(.spirit-check.cmp-offer) .sheet-sprite-slot,
.sheet-wrap-icons.compare-active .sheet-sprite-cell:has(.spirit-check.cmp-want) .sheet-sprite-slot,
.sheet-wrap-icons.compare-active .sheet-sprite-cell:has(.spirit-check.cmp-both) .sheet-sprite-slot {
  opacity: 1;
  filter: none;
}
.sheet-wrap-icons.compare-active.compare-diff-only .sheet-sprite-cell:has(.spirit-check.cmp-both) .sheet-sprite-slot {
  opacity: 0.38;
  filter: grayscale(0.55) brightness(0.72);
}

/* En modo comparar: una columna (las 2 columnas rompen marcas % y se lee peor) */
body.board-mode-compare .sheet-wrap-icons,
.sheet-outer.compare-sheet-active .sheet-wrap-icons,
.sheet-wrap-icons.compare-active {
  max-width: 760px;
}
body.board-mode-compare .sheet-icons-grid,
.sheet-outer.compare-sheet-active .sheet-icons-grid,
.sheet-wrap-icons.compare-active .sheet-icons-grid {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 0 auto;
}
.cmp-marker-icons .cmp-marker-ring {
  inset: -6%;
  border-radius: 8px;
  border-width: 2px;
}
.cmp-marker-icons .cmp-marker-badge {
  top: -6%;
  right: -6%;
  min-width: 38%;
  min-height: 38%;
  font-size: clamp(8px, 55%, 14px);
}
html[data-theme="light"] .sheet-wrap-icons {
  background:
    radial-gradient(ellipse 90% 55% at 24% 18%, rgba(91,206,250,.1), transparent 60%),
    radial-gradient(ellipse 90% 55% at 76% 18%, rgba(168,85,247,.08), transparent 60%),
    var(--bg-sheet);
}
html[data-theme="light"] .sheet-sprite-slot {
  border-color: rgba(0,0,0,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 2px 6px rgba(0,0,0,.08);
}
html[data-theme="light"] .sheet-sprite-caption {
  background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, rgba(0,0,0,.06) 38%, rgba(0,0,0,.12) 100%);
  border-top-color: rgba(0,0,0,.08);
}
html[data-theme="light"] .sheet-sprite-caption-name { color: var(--text); }
html[data-theme="light"] .sheet-sprite-caption-style { color: var(--text-muted); }
html[data-theme="light"] .sheet-sprite-caption-id { color: #8a5a00; }
.sheet-wrap.readonly { pointer-events: none; }
.sheet-wrap.readonly .spirit-check { opacity: .88; }
/* Tablero con iconos: el check a pantalla completa tapa el arte en vista de otros */
.sheet-wrap-icons.readonly .sheet-sprite-cell .spirit-check {
  opacity: 0 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.sheet-wrap-icons.readonly .sheet-sprite-cell:has(.spirit-check:checked) .sheet-sprite-slot {
  border-color: #52b788;
  box-shadow:
    inset 0 0 0 1px rgba(82,183,136,.28),
    0 0 0 1.5px rgba(82,183,136,.4),
    0 0 10px rgba(82,183,136,.22);
}
.sheet-wrap-icons.readonly .sheet-sprite-cell:has(.spirit-check:checked) .sheet-sprite-slot::after {
  width: 13px;
  height: 13px;
  line-height: 13px;
  font-size: .52rem;
  top: 2px;
  right: 3px;
  background: rgba(45, 106, 79, .92);
}
.sheet-wrap-icons.readonly .sheet-sprite-cell:has(.spirit-check.spirit-starred) .sheet-sprite-slot,
.sheet-wrap-icons.readonly .sheet-sprite-cell.spirit-lv5 .sheet-sprite-slot {
  border-color: #e9c46a;
  box-shadow:
    inset 0 0 0 1px rgba(233,196,106,.3),
    0 0 0 1.5px rgba(233,196,106,.45),
    0 0 12px rgba(233,196,106,.28);
}
.sheet-wrap-icons.readonly .sheet-sprite-cell:has(.spirit-check.spirit-starred) .sheet-sprite-slot::after,
.sheet-wrap-icons.readonly .sheet-sprite-cell.spirit-lv5 .sheet-sprite-slot::after {
  content: '★';
  background: linear-gradient(145deg, #f4d35e 0%, #c9a227 100%);
  color: #1a1408;
  font-size: .55rem;
  line-height: 13px;
}
.sheet-hint {
  font-size: .72rem; color: #6a8499; text-align: center; padding: 8px;
  border-top: 1px solid #1a2733;
}

.spirit-check {
  position: absolute; appearance: none; -webkit-appearance: none; margin: 0;
  border: 2px solid rgba(255,255,255,.5); border-radius: 4px;
  background: rgba(0,0,0,.35); cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
  touch-action: manipulation;
}
.spirit-check::before { content: ''; position: absolute; inset: -10px; }
.spirit-check:hover, .spirit-check:focus-visible {
  border-color: #5bcefa; box-shadow: 0 0 8px rgba(91,206,250,.45); outline: none;
}
.spirit-check:checked {
  background: rgba(82,183,136,.92); border-color: #2d6a4f;
  box-shadow: 0 0 10px rgba(82,183,136,.55);
}
.spirit-check:checked::after {
  content: '✓'; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: #fff; font-size: 70%; font-weight: bold; line-height: 1;
}

.spirit-check.spirit-unreleased {
  border-style: dashed;
  border-color: rgba(255,255,255,.28);
  background: rgba(0,0,0,.22);
  opacity: .72;
}
.spirit-check.spirit-unreleased:hover,
.spirit-check.spirit-unreleased:focus-visible {
  border-color: rgba(168,188,201,.55);
  box-shadow: 0 0 6px rgba(168,188,201,.25);
}
.spirit-check.spirit-unreleased:checked {
  background: rgba(106,132,153,.75);
  border-color: #6a8499;
  box-shadow: 0 0 8px rgba(106,132,153,.35);
}

.spirit-tooltip {
  position: absolute;
  z-index: 30;
  transform: translate(-50%, calc(-100% - 12px));
  width: min(200px, 72vw);
  padding: 0;
  border-radius: 10px;
  background: rgba(12,16,22,.94);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  font-size: .72rem;
  line-height: 1.35;
  text-align: left;
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.2);
  white-space: normal;
  overflow: hidden;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.spirit-tooltip-below {
  transform: translate(-50%, 12px);
}
.spirit-tooltip-arrow {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: rgba(12,16,22,.94);
  border-right: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
  transform: rotate(45deg);
  pointer-events: none;
}
.spirit-tooltip-below .spirit-tooltip-arrow {
  bottom: auto;
  top: -6px;
  transform: rotate(225deg);
}
.spirit-tooltip-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 108px;
  padding: 10px 10px 6px;
  overflow: hidden;
}
.spirit-tooltip-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 85%, rgba(255,255,255,.08), transparent 70%);
  pointer-events: none;
}
.spirit-tooltip-img {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  max-width: 100%;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.4));
}
.spirit-tooltip-silhouette {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: rgba(0,0,0,.55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.spirit-tooltip-silhouette::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: center / 62% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='8' width='44' height='48' rx='10' fill='%23222'/%3E%3Ccircle cx='24' cy='28' r='5' fill='%23444'/%3E%3Ccircle cx='40' cy='28' r='5' fill='%23444'/%3E%3Cpath d='M22 42 Q32 50 42 42' stroke='%23444' stroke-width='3' fill='none'/%3E%3C/svg%3E");
  opacity: .85;
}
.spirit-tooltip-art-fallback .spirit-tooltip-img:not(.sprite-icon-silhouette) {
  opacity: .78;
  filter: grayscale(.2) drop-shadow(0 8px 12px rgba(0,0,0,.4));
}
.spirit-tooltip-art-missing {
  min-height: 80px;
}
.spirit-tooltip-body {
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.2);
}
.spirit-tooltip-name {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px;
  color: #fff;
  text-align: center;
}
.spirit-tooltip-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  align-items: center;
}
.spirit-tooltip-drop-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 8px !important;
  color: #ffdda3 !important;
  background: rgba(255,179,71,.18) !important;
  border: 1px solid rgba(255,179,71,.28) !important;
  font-weight: 700;
}
.spirit-tooltip-drop-value {
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.spirit-tooltip-drop-label {
  font-size: .58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .85;
}
.spirit-tooltip-family-pill {
  color: var(--text-soft) !important;
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.1) !important;
}
.spirit-tooltip-status {
  margin: 8px 0 0;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: .64rem;
  font-weight: 600;
  text-align: center;
  color: var(--warn);
  background: rgba(255,179,71,.1);
  border: 1px solid rgba(255,179,71,.2);
}
.spirit-check.catalog-highlight {
  animation: catalogPulse .55s ease-in-out 2;
  z-index: 25;
}
@keyframes catalogPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91,206,250,.0); }
  50% { box-shadow: 0 0 0 6px rgba(91,206,250,.45); }
}

.toolbar-released {
  font-size: .78em;
  color: #6a8499;
  font-weight: 400;
}

.not-found { text-align: center; padding: 40px 20px; }
.not-found h2 { color: #e76f51; margin-bottom: 8px; }
.save-indicator {
  position: fixed; bottom: 16px; right: 16px; z-index: 99;
  background: rgba(22,34,46,.95); border: 1px solid #2f4558;
  padding: 8px 16px; border-radius: 99px; font-size: .75rem; color: #8ba3b8;
  opacity: 0; transition: opacity .3s; pointer-events: none;
  backdrop-filter: blur(8px);
}
.save-indicator.show { opacity: 1; }
.save-indicator.saving { color: #5bcefa; }
.save-indicator.saved { color: #52b788; }
.save-indicator.err { color: #e76f51; }

.share-panel { scroll-margin-top: 72px; }

/* Board mode: Vista / Comparar */
.board-mode-bar {
  position: relative;
  z-index: 40;
  margin-bottom: 10px; padding: 8px 10px;
  background: rgba(22,34,46,.96); border: 1px solid rgba(47,69,88,.85);
  border-radius: 14px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0,0,0,.2);
  overflow: visible;
}
.board-mode-bar-compare {
  z-index: 120;
  border-color: rgba(91,206,250,.35);
  box-shadow: 0 4px 28px rgba(91,206,250,.08);
  padding: 10px 12px;
}
body.cmp-picker-open .board-mode-bar-compare {
  z-index: 500;
}
body.cmp-picker-open .sheet-outer {
  z-index: 0;
}
.board-mode-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 4px; border-radius: 12px;
  background: rgba(10,16,24,.85); border: 1px solid #2f4558;
}
.board-mode-toggle-3 {
  grid-template-columns: repeat(3, 1fr);
}
.board-mode-btn {
  font-family: inherit; font-size: .84rem; font-weight: 700;
  padding: 9px 12px; border: none; border-radius: 9px;
  background: transparent; color: #8ba3b8; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.board-mode-btn:hover { color: #e8eef4; background: rgba(47,69,88,.35); }
.board-mode-btn-active {
  background: linear-gradient(180deg, rgba(91,206,250,.22), rgba(91,206,250,.08));
  color: #5bcefa;
  box-shadow: inset 0 0 0 1px rgba(91,206,250,.35);
}
#board-mode-compare.board-mode-btn-active {
  background: linear-gradient(180deg, rgba(255,179,71,.2), rgba(255,179,71,.06));
  color: #ffb347;
  box-shadow: inset 0 0 0 1px rgba(255,179,71,.4);
}
#board-mode-catalog.board-mode-btn-active {
  background: linear-gradient(180deg, rgba(82,183,136,.22), rgba(82,183,136,.08));
  color: #52b788;
  box-shadow: inset 0 0 0 1px rgba(82,183,136,.35);
}
.board-view[hidden] { display: none !important; }
.board-view-catalog { margin-top: 4px; }
.board-view-catalog .catalog-panel {
  margin-top: 0;
  padding-top: 4px;
}
.board-mode-compare-tools {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(47,69,88,.6);
  display: flex; flex-direction: column; gap: 8px;
  overflow: visible;
}
.board-mode-compare-tools[hidden],
.board-mode-bar:not(.board-mode-bar-compare) .board-mode-compare-tools {
  display: none !important;
}
.board-mode-bar:not(.board-mode-bar-compare) .compare-status {
  display: none !important;
}
.board-mode-hint {
  margin: 0; font-size: .78rem; color: #8ba3b8; line-height: 1.4;
}
.compare-controls-inline { margin-bottom: 0; }
.compare-filter-inline {
  margin: 0; font-size: .76rem;
}
.compare-board-hint-inline {
  display: none;
}
.compare-panel-results { scroll-margin-top: 80px; margin-top: 12px; }
.compare-panel-results[hidden] { display: none !important; }

.compare-panel { scroll-margin-top: 72px; }
.compare-controls {
  display: flex; flex-direction: column; gap: 8px;
}
.compare-controls-label {
  font-size: .72rem; color: #6a8499; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600;
}

.cmp-picker { position: relative; flex: 1; min-width: 0; z-index: 1; }
.cmp-picker.cmp-picker-open { z-index: 400; }
.cmp-picker-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(15,25,35,.95), rgba(10,16,24,.98));
  border: 1px solid rgba(47,69,88,.9); color: #e8eef4;
  font-family: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.cmp-picker-trigger:hover { border-color: rgba(91,206,250,.45); }
.cmp-picker-trigger:focus-visible {
  outline: 2px solid #5bcefa; outline-offset: 2px;
}
.cmp-picker-trigger:disabled { opacity: .55; cursor: wait; }
.cmp-picker-trigger-active {
  border-color: rgba(91,206,250,.55);
  box-shadow: 0 0 0 1px rgba(91,206,250,.15);
}
.cmp-picker-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-transform: lowercase;
}
.cmp-picker-chevron {
  flex-shrink: 0; width: 10px; height: 10px;
  border-right: 2px solid #5bcefa; border-bottom: 2px solid #5bcefa;
  transform: rotate(45deg) translateY(-2px);
  opacity: .85;
}
.cmp-picker-menu {
  position: absolute; z-index: 410; left: 0; right: 0; top: calc(100% + 6px);
  display: none;
  flex-direction: column;
  max-height: min(380px, 60vh); overflow: hidden;
  background: #0f1923; border: 1px solid rgba(91,206,250,.3);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.2);
}
.cmp-picker-open .cmp-picker-menu,
.cmp-picker-menu:not([hidden]) {
  display: flex;
}
.cmp-picker-menu[hidden] {
  display: none !important;
}
.cmp-picker-search { flex-shrink: 0; padding: 4px 4px 8px; }
.cmp-picker-search-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid rgba(47,69,88,.9); background: #0a1018;
  color: #e8eef4; font-family: inherit; font-size: .88rem;
  outline: none;
}
.cmp-picker-search-input::placeholder { color: #6a8499; }
.cmp-picker-search-input:focus {
  border-color: rgba(91,206,250,.55);
  box-shadow: 0 0 0 1px rgba(91,206,250,.2);
}
.cmp-picker-options {
  overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0;
}
.cmp-picker-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  width: 100%; padding: 10px 12px; margin: 0;
  border: none; border-radius: 10px; background: transparent;
  color: #e8eef4; font-family: inherit; text-align: left;
  cursor: pointer; transition: background .12s;
}
.cmp-picker-option:hover { background: rgba(47,69,88,.45); }
.cmp-picker-option-selected {
  background: rgba(91,206,250,.1) !important;
  box-shadow: inset 0 0 0 1px rgba(91,206,250,.35);
}
.cmp-picker-option[hidden],
.cmp-picker-option.cmp-picker-option-filtered { display: none !important; }
.cmp-picker-empty {
  margin: 8px 8px 12px; font-size: .82rem; color: #6a8499; font-weight: 600;
  text-align: center;
}
.cmp-picker-name {
  font-size: .88rem; font-weight: 700; text-transform: lowercase;
  color: #e8eef4;
}
.cmp-picker-option-mine .cmp-picker-name { color: #52b788; }
.cmp-picker-meta {
  font-size: .72rem; color: #6a8499; font-weight: 600;
}
.cmp-picker-bar {
  width: 100%; height: 4px; background: #1a2733; border-radius: 99px; overflow: hidden;
}
.cmp-picker-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #2d6a4f, #52b788);
  border-radius: 99px;
}
.cmp-picker-option-empty .cmp-picker-name { color: #8ba3b8; font-weight: 600; }

.compare-status { margin-top: 10px; }

.compare-summary { margin-top: 16px; }
.compare-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
.compare-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px; border-radius: 12px; border: 1px solid #2f4558;
  background: rgba(10,16,24,.6); text-align: center;
}
.compare-stat-n {
  font-size: 1.65rem; font-weight: 800; line-height: 1;
}
.compare-stat-label { font-size: .68rem; color: #8ba3b8; line-height: 1.3; }
.compare-stat-both .compare-stat-n { color: #52b788; }
.compare-stat-offer .compare-stat-n { color: #ffb347; }
.compare-stat-want .compare-stat-n { color: #5bcefa; }
.compare-stat-both { border-color: rgba(82,183,136,.35); }
.compare-stat-offer { border-color: rgba(255,179,71,.35); }
.compare-stat-want { border-color: rgba(91,206,250,.35); }

.compare-trade-hint {
  font-size: .84rem; color: var(--text-soft); line-height: 1.5;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(91,206,250,.06); border: 1px solid rgba(91,206,250,.2);
  margin-bottom: 14px;
}
html[data-theme="light"] .compare-trade-hint {
  background: rgba(91,206,250,.08); border-color: rgba(91,206,250,.28);
}

.compare-lists {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 16px;
}
.compare-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-input);
  padding: 12px 14px;
  min-width: 0;
}
.compare-list-base { border-color: rgba(255,179,71,.35); }
.compare-list-other { border-color: rgba(91,206,250,.35); }
.compare-list-title {
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 10px; line-height: 1.35;
}
.compare-list-base .compare-list-title { color: #c47f17; }
html[data-theme="light"] .compare-list-base .compare-list-title { color: #a86200; }
.compare-list-other .compare-list-title { color: #1a8ab8; }
.compare-list-items {
  list-style: none; margin: 0; padding: 4px;
  max-height: min(420px, 52vh); overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(91,206,250,.35) rgba(10,16,24,.45);
}
.compare-list-items::-webkit-scrollbar { width: 8px; }
.compare-list-items::-webkit-scrollbar-track {
  background: rgba(10,16,24,.35);
  border-radius: 99px;
  margin: 4px 0;
}
.compare-list-items::-webkit-scrollbar-thumb {
  background: rgba(91,206,250,.35);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.compare-list-item {
  font-size: .72rem; line-height: 1.3; color: var(--text);
  padding: 12px 8px 10px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: center;
  min-height: 118px;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.compare-list-item:hover {
  border-color: rgba(91,206,250,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  transform: translateY(-1px);
}
.compare-list-base .compare-list-item:hover {
  border-color: rgba(255,179,71,.42);
  box-shadow: 0 6px 18px rgba(255,179,71,.12);
}
.compare-list-other .compare-list-item:hover {
  border-color: rgba(91,206,250,.42);
  box-shadow: 0 6px 18px rgba(91,206,250,.12);
}
.compare-list-icon {
  width: 64px; height: 64px; flex: 0 0 64px;
  object-fit: contain; border-radius: 12px;
  background: rgba(10,16,24,.55);
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.compare-list-icon.sprite-icon-silhouette {
  opacity: 0.5;
  background: rgba(0,0,0,.45);
}
.compare-list-icon-ph {
  display: block;
  background: linear-gradient(135deg, rgba(47,69,88,.5), rgba(10,16,24,.35));
}
.compare-list-label {
  width: 100%;
  min-width: 0;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compare-list-unreleased {
  opacity: .78; border-style: dashed;
}
.compare-list-empty {
  grid-column: 1 / -1;
  font-size: .78rem; color: var(--text-faint); font-style: italic;
  padding: 16px 8px;
  text-align: center;
  min-height: auto;
  border: none;
  background: transparent;
  box-shadow: none;
}
.compare-list-empty:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.compare-legend-compact { margin-bottom: 0; }
.compare-filter {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; color: #8ba3b8; cursor: pointer; user-select: none; white-space: nowrap;
}
.compare-filter input { accent-color: #5bcefa; width: 16px; height: 16px; cursor: pointer; }

.compare-legend {
  display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center;
  font-size: .72rem; color: #6a8499;
}
.compare-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.cmp-legend-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: .65rem; font-weight: 800;
}
.cmp-legend-both .cmp-legend-icon { background: rgba(82,183,136,.2); color: #52b788; }
.cmp-legend-offer .cmp-legend-icon { background: rgba(255,179,71,.2); color: #ffb347; }
.cmp-legend-want .cmp-legend-icon { background: rgba(91,206,250,.2); color: #5bcefa; }
.compare-legend-item::before {
  content: ''; width: 14px; height: 14px; border-radius: 4px; border: 2px solid;
}
.cmp-legend-both::before { background: rgba(82,183,136,.92); border-color: #2d6a4f; }
.cmp-legend-offer::before { background: rgba(255,179,71,.92); border-color: #c47f17; }
.cmp-legend-want::before { background: rgba(91,206,250,.35); border-color: #5bcefa; }

/* Compare mode — image-first visuals */
.sheet-outer.compare-sheet-active {
  border-color: rgba(91,206,250,.45);
  box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(91,206,250,.12);
}
.sheet-wrap.compare-active .spirit-check {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  z-index: 2;
  opacity: 1;
  filter: none;
}
.sheet-wrap.compare-active .spirit-check::after { content: none !important; }

.cmp-markers {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
}
.cmp-dim-patch {
  position: absolute; box-sizing: border-box;
}
.cmp-dim-patch::before {
  content: '';
  position: absolute;
  inset: -50%;
  border-radius: 12px;
  background: var(--cmp-dim);
  backdrop-filter: grayscale(.4);
}
html[data-theme="light"] .cmp-dim-patch::before {
  backdrop-filter: grayscale(.2) brightness(1.05);
}
.cmp-marker {
  position: absolute; box-sizing: border-box;
}
.cmp-marker-ring {
  position: absolute;
  inset: -55%;
  border-radius: 10px;
  border: 3px solid;
  box-shadow: 0 0 18px currentColor, inset 0 0 12px rgba(255,255,255,.06);
  animation: cmp-pulse 2.2s ease-in-out infinite;
}
@keyframes cmp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .88; transform: scale(1.03); }
}
.cmp-marker-badge {
  position: absolute;
  top: -18%;
  right: -18%;
  min-width: 46%;
  min-height: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; line-height: 1;
  font-size: clamp(7px, 52%, 18px);
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  z-index: 2;
}
.cmp-marker-both { color: #52b788; }
.cmp-marker-both .cmp-marker-ring {
  border-color: #52b788;
  background: rgba(82,183,136,.18);
}
.cmp-marker-both .cmp-marker-badge {
  background: #2d6a4f; color: #fff;
}
.cmp-marker-offer { color: #ffb347; }
.cmp-marker-offer .cmp-marker-ring {
  border-color: #ffb347;
  background: rgba(255,179,71,.2);
}
.cmp-marker-offer .cmp-marker-badge {
  background: #c47f17; color: #fff;
}
.cmp-marker-want { color: #5bcefa; }
.cmp-marker-want .cmp-marker-ring {
  border-color: #5bcefa;
  background: rgba(91,206,250,.22);
}
.cmp-marker-want .cmp-marker-badge {
  background: #1a6a8a; color: #fff;
}

.share-sub { margin-bottom: 16px; line-height: 1.55; }

.share-preview {
  background: linear-gradient(145deg, rgba(15,25,35,.95), rgba(10,16,24,.98));
  border: 1px solid rgba(91,206,250,.22);
  border-radius: 14px;
  padding: 18px 20px 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
}
.share-preview-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px;
  margin-bottom: 12px;
}
.share-preview-count {
  font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; color: #52b788;
  line-height: 1; letter-spacing: -.02em;
}
.share-preview-total {
  font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 600; color: #6a8499;
}
.share-preview-badge {
  margin-left: auto;
  font-size: .82rem; font-weight: 800; color: #52b788;
  background: rgba(82,183,136,.14); border: 1px solid rgba(82,183,136,.45);
  padding: 5px 12px; border-radius: 99px;
}
.share-preview-bar {
  height: 10px; background: #1a2733; border-radius: 99px; overflow: hidden;
  border: 1px solid rgba(47,69,88,.9);
}
.share-preview-fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #2d6a4f, #52b788);
  border-radius: 99px; transition: width .35s ease;
  box-shadow: 0 0 12px rgba(82,183,136,.35);
}

.share-formats-label {
  font-size: .72rem; color: #6a8499; text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 10px; font-weight: 600;
}
.share-formats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
button.share-fmt {
  font-family: inherit; -webkit-appearance: none; appearance: none;
  border: none; background: none;
}
.share-fmt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 10px; min-height: 100px;
  background: linear-gradient(160deg, rgba(15,25,35,.9), rgba(10,16,24,.95));
  border: 1px solid rgba(47,69,88,.85); border-radius: 14px;
  cursor: pointer; color: #e8eef4;
  transition: border-color .18s, transform .12s, box-shadow .18s;
}
.share-fmt:hover {
  border-color: rgba(91,206,250,.55); transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.3), 0 0 0 1px rgba(91,206,250,.12);
}
.share-fmt:active { transform: scale(.98); }
.share-fmt-icon {
  border: 2px solid rgba(91,206,250,.65); border-radius: 5px;
  background: rgba(91,206,250,.1);
  box-shadow: 0 0 12px rgba(91,206,250,.15);
}
.share-fmt-story { width: 24px; height: 42px; border-radius: 7px; }
.share-fmt-square { width: 34px; height: 34px; }
.share-fmt-wide { width: 46px; height: 26px; border-radius: 5px; }
.share-fmt-full { width: 30px; height: 30px; border-radius: 4px; border-style: dashed; opacity: .85; }
.share-fmt-name {
  font-size: .72rem; color: #a8bcc9; text-align: center; line-height: 1.25; font-weight: 600;
}

.share-social-wrap {
  margin-top: 4px; padding-top: 16px;
  border-top: 1px solid rgba(47,69,88,.6);
}
.share-social { display: flex; flex-wrap: wrap; gap: 10px; }
.share-social .btn, .share-social .share-ext {
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px;
}
.share-platform { border-color: rgba(102,192,244,.35) !important; }
#btn-steam { color: #c7d5e0; }
#btn-discord { color: #5865f2; border-color: rgba(88,101,242,.4) !important; }

/* Share modal — bottom sheet en móvil, centrado en desktop */
body.share-modal-open { overflow: hidden; }
.share-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.share-modal[hidden] { display: none !important; }
.share-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.share-modal-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px; max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #16222e 0%, #0a1018 100%);
  border: 1px solid rgba(91,206,250,.28);
  border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 48px rgba(0,0,0,.45);
  animation: shareSheetUp .28s ease-out;
}
@keyframes shareSheetUp {
  from { transform: translateY(100%); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}
.share-modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px; border: none; border-radius: 99px;
  background: rgba(47,69,88,.6); color: #e8eef4; font-size: 1.4rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.share-modal-heading {
  font-size: 1rem; font-weight: 700; color: #5bcefa; margin: 0 36px 4px 0;
}
.share-modal-format {
  font-size: .78rem; color: #8ba3b8; margin-bottom: 12px; font-weight: 600;
}
.share-modal-preview {
  display: flex; justify-content: center; align-items: center;
  background: rgba(0,0,0,.35); border-radius: 14px;
  border: 1px solid rgba(47,69,88,.8);
  padding: 12px; margin-bottom: 12px;
  min-height: 120px;
}
.share-modal-preview img {
  display: block; max-width: 100%; height: auto;
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.4);
  -webkit-touch-callout: default;
  user-select: auto; -webkit-user-select: auto;
}
.share-modal-hint {
  font-size: .75rem; color: #6a8499; line-height: 1.5; margin-bottom: 14px;
}
.share-modal-actions {
  display: flex; flex-direction: column; gap: 10px;
}
.share-modal-actions .btn {
  width: 100%; min-height: 48px; font-size: .92rem;
}
.share-modal-primary {
  background: linear-gradient(180deg, #5bcefa, #3a9fd4) !important;
  color: #0a1018 !important; font-weight: 700;
  box-shadow: 0 4px 20px rgba(91,206,250,.35);
}

@media (min-width: 520px) {
  .share-modal { align-items: center; padding: 20px; }
  .share-modal-sheet { border-radius: 18px; max-height: 88vh; }
}

@media (max-width: 768px) {
  .wrap { padding: 12px 10px 24px; }
  .site-nav { padding: 8px 10px; }
  .nav-logo { flex: 1 1 100%; order: 1; }
  .nav-crumb { order: 2; flex: 1; }
  .nav-actions {
    order: 3; flex: 1 1 100%; justify-content: flex-start;
    overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-link { white-space: nowrap; flex-shrink: 0; }
  .page-head { text-align: left; }
  .board-grid { grid-template-columns: repeat(2, 1fr); }
  .share-formats { grid-template-columns: repeat(2, 1fr); }
  .compare-stats { grid-template-columns: 1fr; }
  .compare-lists { grid-template-columns: 1fr; }
  .board-mode-bar {
    margin-bottom: 8px;
  }
  .board-mode-btn { min-height: 44px; }
  .toolbar {
    position: sticky; bottom: 10px; z-index: 50;
    box-shadow: 0 -4px 28px rgba(0,0,0,.45); margin-bottom: 0;
  }
  .sheet-outer { max-height: 58vh; margin-bottom: 8px; }
  .sheet-wrap.sheet-wrap-icons {
    padding: 8px 6px 12px;
  }
  .sheet-outer:has(.sheet-wrap-icons) {
    max-height: min(82vh, 760px);
  }
  .sheet-family-row {
    grid-template-columns: minmax(64px, 78px) minmax(0, 1fr);
    gap: 3px 6px;
  }
  .sheet-family-label {
    padding-top: 4px;
    font-size: .6rem;
  }
  .sheet-family-cells {
    grid-template-columns: repeat(6, minmax(0, 44px));
    gap: 2px;
  }
  .sheet-wrap-icons:not(.sheet-show-unreleased) .sheet-family-cells {
    grid-template-columns: repeat(auto-fill, minmax(40px, 44px));
  }
  .sheet-sprite-cell {
    max-width: 44px;
    aspect-ratio: 4 / 4.8;
  }
  .sheet-sprite-caption-style {
    font-size: clamp(0.3rem, 2.2vw, 0.42rem);
  }
  .board-filter-no-drop {
    flex: 1 1 100%;
    margin: 6px 0 0;
    font-size: .72rem;
  }
  .toolbar-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .btn { min-height: 44px; }
}

/* Light theme — componentes con colores fijos */
html[data-theme="light"] body { color: var(--text); }
html[data-theme="light"] .nav-logo { color: var(--text); }
html[data-theme="light"] .nav-crumb { color: var(--text-muted); }
html[data-theme="light"] .nav-link { color: var(--text-soft); }
html[data-theme="light"] .nav-lang {
  background: var(--bg-input); border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .page-head p { color: var(--text-muted); }
html[data-theme="light"] .intro {
  color: var(--text-soft); background: rgba(255,255,255,.7);
  border-left-color: var(--accent);
}
html[data-theme="light"] .site-footer {
  color: var(--text-faint); background: var(--footer-bg);
  border-top-color: var(--border);
}
html[data-theme="light"] input[type=text],
html[data-theme="light"] input[type=password],
html[data-theme="light"] .boards-field input,
html[data-theme="light"] .boards-field select {
  background: var(--bg-input); border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .board-card {
  background: var(--bg-input); border-color: var(--border);
}
html[data-theme="light"] .board-card-name { color: var(--text); }
html[data-theme="light"] .compare-stat {
  background: var(--bg-elevated); border-color: var(--border);
}
html[data-theme="light"] .compare-stat-label { color: var(--text-muted); }
html[data-theme="light"] .compare-filter { color: var(--text-muted); }
html[data-theme="light"] .compare-legend { color: var(--text-faint); }
html[data-theme="light"] .compare-list-items {
  scrollbar-color: rgba(91,206,250,.45) rgba(0,0,0,.06);
}
html[data-theme="light"] .compare-list-items::-webkit-scrollbar-track {
  background: rgba(0,0,0,.05);
}
html[data-theme="light"] .compare-list-items::-webkit-scrollbar-thumb {
  background: rgba(91,206,250,.4);
}
html[data-theme="light"] .spirit-tooltip {
  background: rgba(255,255,255,.98); color: var(--text);
  border-color: var(--border); box-shadow: 0 8px 24px var(--shadow-lg);
}
html[data-theme="light"] .spirit-tooltip-arrow {
  background: rgba(255,255,255,.98);
  border-color: var(--border);
}
html[data-theme="light"] .spirit-tooltip-name { color: var(--text); }
html[data-theme="light"] .spirit-tooltip-body {
  background: rgba(0,0,0,.03);
  border-top-color: var(--border);
}
html[data-theme="light"] .share-preview,
html[data-theme="light"] .share-fmt {
  background: linear-gradient(160deg, rgba(255,255,255,.98), rgba(244,247,250,.98));
  border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .share-fmt-name { color: var(--text-soft); }
html[data-theme="light"] .btn.secondary {
  background: #e8eef4; border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .btn.secondary:hover { background: #dde6ee; }
html[data-theme="light"] .cmp-picker-trigger {
  background: var(--bg-input); border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .cmp-picker-menu {
  background: var(--bg-elevated); border-color: var(--border);
}
html[data-theme="light"] .cmp-picker-search-input {
  background: var(--bg-input); border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .sheet-hint { color: var(--text-faint); border-top-color: var(--border); }
html[data-theme="light"] .toolbar {
  box-shadow: 0 4px 20px var(--shadow);
}
html[data-theme="light"] .spirit-check {
  border-color: rgba(26,40,54,.35);
  background: rgba(255,255,255,.45);
}
html[data-theme="light"] .spirit-check.spirit-unreleased {
  background: rgba(255,255,255,.25);
  border-color: rgba(26,40,54,.22);
}

/* Spirit catalog */
.catalog-panel { scroll-margin-top: 72px; }
.catalog-sub { margin-bottom: 8px; }
.catalog-synced {
  font-size: .72rem; color: var(--text-faint); margin: 0 0 6px;
}
.catalog-jump-hint {
  font-size: .75rem; color: var(--text-muted); margin: 0 0 14px;
}
.catalog-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.catalog-field {
  display: flex; flex-direction: column; gap: 4px; min-width: 120px;
}
.catalog-field-search { flex: 1 1 180px; min-width: min(100%, 220px); }
.catalog-field-label {
  font-size: .68rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.catalog-field input,
.catalog-field select {
  font: inherit; font-size: .82rem;
  padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text);
}
.catalog-count {
  font-size: .78rem; color: var(--text-muted); margin: 0 0 10px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 12px;
}
.catalog-card {
  font: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; min-height: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.3);
  padding: 0;
  color: var(--text);
  overflow: hidden;
  transition: transform .12s, border-color .12s, box-shadow .12s, background .12s;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.catalog-card:hover,
.catalog-card:focus-visible {
  transform: translateY(-2px);
  background: rgba(24,25,28,.92) !important;
  border-color: rgba(91,206,250,.35);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  outline: none;
}
.catalog-card-collected {
  box-shadow: inset 0 0 0 2px rgba(82,183,136,.45);
}
.catalog-card-unreleased { opacity: .88; }
.catalog-card-art {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  min-height: 132px;
  padding: 8px;
  isolation: isolate;
}
/* Pedestal claro debajo del icono (los theme-* ponen su propio background) */
.catalog-card-art::before {
  content: '';
  position: absolute;
  inset: 12% 18%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .22), transparent 68%);
}
[data-theme="light"] .catalog-card-art::before {
  background: radial-gradient(ellipse at center, rgba(15, 23, 32, .1), transparent 68%);
}
.catalog-card-art > img,
.catalog-card-art > .catalog-card-ph {
  position: relative;
  z-index: 1;
}
.catalog-card-art img,
.catalog-card-img {
  display: block;
  width: 112px; height: 112px;
  object-fit: contain;
  padding: 6px;
  filter: drop-shadow(0 12px 14px rgba(0,0,0,.35));
  transition: filter .28s, transform .28s cubic-bezier(0.34,1.6,0.64,1);
}
.catalog-card:hover .catalog-card-img:not(.catalog-card-img-broken):not(.sprite-icon-silhouette) {
  filter: brightness(1.2) drop-shadow(0 12px 14px rgba(0,0,0,.35));
  transform: translateY(-4px) scale(1.04);
}
.catalog-card-icon-fallback .catalog-card-img {
  opacity: .78;
  filter: grayscale(.2) drop-shadow(0 12px 14px rgba(0,0,0,.35));
}
/* Silueta clara (invert) — Batman y otros sprites negros no se pierden en dark UI */
.sprite-icon-silhouette {
  filter: brightness(0) invert(1);
  opacity: 0.45;
}
.catalog-card-art-silhouette,
.spirit-tooltip-art-silhouette {
  position: relative;
}
.catalog-card-art-silhouette::after,
.spirit-tooltip-art-silhouette::after {
  content: '';
  position: absolute;
  inset: 10% 14% 8%;
  border-radius: 14px;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 68% at 50% 52%, rgba(0,0,0,.18), rgba(0,0,0,.55) 88%);
  box-shadow: inset 0 0 24px rgba(0,0,0,.3);
}
.catalog-card-silhouette-mode .catalog-card-img,
.spirit-tooltip-art-silhouette .spirit-tooltip-img.sprite-icon-silhouette {
  opacity: 0.55;
  filter: brightness(0) invert(1) drop-shadow(0 6px 10px rgba(0,0,0,.45));
}
.catalog-card-silhouette-mode:hover .catalog-card-img.sprite-icon-silhouette {
  opacity: 0.68;
  transform: translateY(-2px) scale(1.02);
}
[data-theme="light"] .sprite-icon-silhouette,
[data-theme="light"] .catalog-card-silhouette-mode .catalog-card-img,
[data-theme="light"] .spirit-tooltip-art-silhouette .spirit-tooltip-img.sprite-icon-silhouette,
[data-theme="light"] .sheet-sprite-slot-silhouette .sheet-sprite-icon {
  filter: brightness(0) saturate(0%) drop-shadow(0 4px 8px rgba(0,0,0,.25));
  opacity: 0.42;
}
.catalog-card-fallback-badge {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}
.catalog-card-silhouette {
  position: absolute; inset: 18% 22%;
  border-radius: 16px;
  background: rgba(0,0,0,.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.catalog-card-silhouette::after {
  content: '';
  position: absolute; inset: 0;
  background: center / 58% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='8' width='44' height='48' rx='10' fill='%23111'/%3E%3Ccircle cx='24' cy='28' r='5' fill='%23333'/%3E%3Ccircle cx='40' cy='28' r='5' fill='%23333'/%3E%3Cpath d='M22 42 Q32 50 42 42' stroke='%23333' stroke-width='3' fill='none'/%3E%3C/svg%3E");
  opacity: .9;
}
.catalog-card-ph {
  position: relative; z-index: 1;
  font-size: .64rem; color: var(--text-muted); padding: 6px; text-align: center;
}
.catalog-card-body {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; padding: 10px 12px 12px;
}
.catalog-card-name {
  display: block; font-size: .9rem; font-weight: 700; line-height: 1.15;
}
.catalog-card-pills {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.catalog-card-meta {
  display: block; font-size: .64rem; color: var(--text-faint); line-height: 1.2;
}
.catalog-card-ability {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .68rem; line-height: 1.35; color: var(--text-soft);
}
.catalog-card-status {
  margin-top: auto;
  display: block;
  padding: 7px 8px 5px;
  border-radius: 6px;
  font-size: .68rem; font-weight: 700;
  text-align: center; text-transform: uppercase;
}
.catalog-card-status-unreleased {
  background: #ce0365;
  color: #fff;
}
.sprite-pill {
  display: inline-flex; align-items: center;
  min-height: 22px; padding: 4px 6px 2px;
  background: rgba(255,255,255,.08);
  color: #cfd5df;
  border-radius: 6px;
  font-size: .62rem; font-weight: 700;
  line-height: 1; text-transform: uppercase;
}
.sprite-rarity-rare { background: #00458a; color: #00fffb; }
.sprite-rarity-epic { background: #4c197b; color: #ec27ff; }
.sprite-rarity-legendary { background: #8a3c1e; color: #fbc363; }
.sprite-rarity-mythic { background: #7c5d26; color: #fff0a6; }
.sprite-rarity-special {
  background: linear-gradient(15deg,#5dffe4 0,#8dff9a 8%,#fff36a 16%,#60dfff 24%,#7b7cff 32%,#ff77d8 40%,#ffc45f 48%,#5dffe4 56%,#8dff9a 64%,#fff36a 72%,#60dfff 80%,#7b7cff 88%,#ff77d8 96%,#ffc45f 100%);
  color: #000;
  background-size: 430% 100%;
  animation: sprite-rarity-special-anim 12s linear infinite;
}
@keyframes sprite-rarity-special-anim {
  0% { background-position: 0 0; }
  100% { background-position: 98%; }
}
.catalog-card-rate-pill { color: #ffdda3; background: rgba(255,179,71,.16); }
.sprite-theme-rare { background: linear-gradient(180deg,#104273 0,transparent 100%); }
.sprite-theme-epic { background: linear-gradient(180deg,#4d1566 0,transparent 100%); }
.sprite-theme-legendary { background: linear-gradient(180deg,#743e0a 0,transparent 100%); }
.sprite-theme-mythic { background: linear-gradient(180deg,#a89442 0,transparent 100%); }
.sprite-theme-gold { background: linear-gradient(180deg,#9d752a 0,transparent 100%); }
.sprite-theme-candy { background: linear-gradient(180deg,#9f4540 0,transparent 100%); }
.sprite-theme-galaxy { background: linear-gradient(180deg,#463b9e 0,transparent 100%); }
.sprite-theme-gem { background: linear-gradient(180deg,#7098a3 0,transparent 100%); }
.sprite-theme-holofoil { background: linear-gradient(180deg,#a1428e 0,transparent 100%); }
.sprite-theme-cube { background: linear-gradient(180deg,#730974 0,transparent 100%); }
.sprite-theme-quack { background: linear-gradient(180deg,#6941a2 0,transparent 100%); }
.sprite-theme-cheatmaster { background: linear-gradient(180deg,#2d6a4f 0,transparent 100%); }
.sprite-theme-hacker { background: linear-gradient(180deg,#0e7490 0,transparent 100%); }
.sprite-theme-bounty { background: linear-gradient(180deg,#b45309 0,transparent 100%); }
.sprite-theme-trick { background: linear-gradient(180deg,#c2410c 0,transparent 100%); }
.sprite-theme-fortune { background: linear-gradient(180deg,#ca8a04 0,transparent 100%); }
.sprite-theme-cursed { background: linear-gradient(180deg,#4c1d95 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-rare { background: linear-gradient(180deg,#104273 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-epic { background: linear-gradient(180deg,#4d1566 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-legendary { background: linear-gradient(180deg,#743e0a 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-mythic { background: linear-gradient(180deg,#a89442 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-gold { background: linear-gradient(180deg,#9d752a 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-candy { background: linear-gradient(180deg,#9f4540 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-galaxy { background: linear-gradient(180deg,#463b9e 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-gem { background: linear-gradient(180deg,#7098a3 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-holofoil { background: linear-gradient(180deg,#a1428e 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-cube { background: linear-gradient(180deg,#730974 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-quack { background: linear-gradient(180deg,#6941a2 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-cheatmaster { background: linear-gradient(180deg,#2d6a4f 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-hacker { background: linear-gradient(180deg,#0e7490 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-bounty { background: linear-gradient(180deg,#b45309 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-trick { background: linear-gradient(180deg,#c2410c 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-fortune { background: linear-gradient(180deg,#ca8a04 0,transparent 100%); }
.spirit-tooltip-art.sprite-theme-cursed { background: linear-gradient(180deg,#4c1d95 0,transparent 100%); }
html[data-theme="light"] .catalog-card {
  background: rgba(255,255,255,.72);
  border-color: rgba(26,40,54,.12);
}
html[data-theme="light"] .catalog-card:hover {
  background: rgba(255,255,255,.95) !important;
}
@media (max-width: 640px) {
  .catalog-toolbar { gap: 8px; padding: 10px; }
  .catalog-field { min-width: calc(50% - 8px); }
  .catalog-field-search { min-width: 100%; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
  .catalog-card-art { min-height: 108px; }
  .catalog-card-art img, .catalog-card-img { width: 88px; height: 88px; }
  .catalog-card-body { padding: 8px; gap: 6px; }
  .catalog-card-name { font-size: .78rem; }
  .sprite-pill { min-height: 18px; font-size: .56rem; }
  .spirit-tooltip { width: min(184px, 80vw); }
  .spirit-tooltip-art { min-height: 96px; }
  .spirit-tooltip-img { width: 84px; height: 84px; }
  .compare-list-items {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    max-height: min(360px, 48vh);
  }
  .compare-list-item { min-height: 104px; padding: 10px 6px 8px; }
  .compare-list-icon { width: 52px; height: 52px; flex-basis: 52px; }
}

/* Home — hero + zonas */
.page-home .wrap { max-width: 1120px; }
.home-hero {
  position: relative;
  margin: 0 -16px 14px;
  padding: clamp(32px, 7vw, 56px) 20px clamp(24px, 5vw, 36px);
  min-height: clamp(220px, 38vw, 300px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-top: 0;
  background: linear-gradient(160deg, rgba(16,28,42,.97), rgba(10,16,24,.88));
  box-shadow: 0 16px 40px var(--shadow-lg);
}
.home-hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.home-hero-icons {
  position: absolute;
  inset: -8% -4% auto;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 18px 20px 0;
  opacity: .42;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.95), transparent 92%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.95), transparent 92%);
  transform: rotate(-4deg) scale(1.08);
}
.home-hero-icons img {
  width: 100%;
  max-width: 92px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
  justify-self: center;
}
.home-hero-icons img:nth-child(odd) { transform: translateY(10px); }
.home-hero-icons img:nth-child(3n) { transform: translateY(-6px) scale(1.05); }
.home-hero-content,
.home-hero-resume { position: relative; z-index: 1; }
.home-hero-resume {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  margin-bottom: 16px; padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(82,183,136,.5);
  background: rgba(45,106,79,.28);
  backdrop-filter: blur(8px);
}
.home-hero-resume-kicker {
  margin: 0 0 4px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--success);
}
.home-hero-resume-text { margin: 0; font-size: .84rem; color: var(--text-soft); }
.home-hero-resume-text strong { color: var(--accent); text-transform: lowercase; }
.home-hero-resume-btn { white-space: nowrap; }
.home-hero-title {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-hero-sub {
  margin: 0 0 18px; max-width: 34em;
  font-size: clamp(.88rem, 2.4vw, .98rem); line-height: 1.55; color: var(--text-soft);
}
.home-hero-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.btn-lg {
  padding: 12px 20px; font-size: .92rem; font-weight: 700;
}
.home-hero-cta { box-shadow: 0 4px 20px rgba(91,206,250,.35); }
.home-hero-stats {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: .78rem; color: var(--text-muted);
}
.home-hero-stat strong { color: var(--accent); font-size: .95rem; margin-right: 4px; }

.home-zone-nav {
  position: sticky; top: 52px; z-index: 90;
  margin: 0 -16px 14px; padding: 0 16px 8px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px);
}
.home-zone-nav-inner {
  display: flex; gap: 6px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 4px; border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(10,16,24,.55);
}
.home-zone-nav-inner::-webkit-scrollbar { display: none; }
.home-zone-btn {
  flex: 1 0 auto; min-width: max-content;
  padding: 10px 14px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-muted);
  font: inherit; font-size: .78rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s;
}
.home-zone-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.home-zone-btn-active {
  background: var(--accent) !important; color: #0a1018 !important;
  box-shadow: 0 2px 12px rgba(91,206,250,.3);
}
.home-zone { scroll-margin-top: 108px; }
.home-zone[hidden] { display: none !important; }
.home-board-lead {
  margin: 0 0 10px; padding: 8px 12px;
  font-size: .84rem; color: var(--text-soft); text-align: center;
  border-radius: 10px;
  background: rgba(91,206,250,.08);
  border: 1px solid rgba(91,206,250,.18);
}
.home-setup-compact.panel {
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(251,191,36,.65) !important;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(251,191,36,.12),
    0 12px 40px rgba(245,158,11,.32),
    0 4px 16px rgba(0,0,0,.28);
}
.home-setup-summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 15px 44px 15px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 42%, #ea580c 100%);
  transition: filter .18s, box-shadow .18s;
}
.home-setup-summary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 24%, rgba(255,255,255,.28) 46%, transparent 66%);
  pointer-events: none;
}
.home-setup-summary::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2.5px solid rgba(10,16,24,.72);
  border-bottom: 2.5px solid rgba(10,16,24,.72);
  transform: rotate(45deg);
  transition: transform .2s, margin-top .2s;
}
.home-setup-compact[open] .home-setup-summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}
.home-setup-summary:hover {
  filter: brightness(1.06) saturate(1.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.home-setup-summary::-webkit-details-marker { display: none; }
.home-setup-summary-title {
  position: relative;
  font-weight: 800;
  font-size: .94rem;
  letter-spacing: -.01em;
  color: #1a1208;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
.home-setup-summary-hint {
  position: relative;
  font-size: .76rem;
  font-weight: 600;
  color: rgba(26,18,8,.72);
}
.home-setup-body {
  margin-top: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(251,191,36,.35);
  background: var(--bg-elevated);
}

.home-family-ability {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .58rem; line-height: 1.3; color: var(--text-soft);
  margin: 0 0 4px;
}
.home-guide-jump {
  margin: 12px 0 0; font-size: .78rem; color: var(--text-muted);
}
.home-guide-jump a { color: #5bcefa; text-decoration: none; }
.home-guide-jump a:hover { text-decoration: underline; }

.guide-how-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(91, 80, 180, .35), transparent 55%),
    linear-gradient(180deg, #1a2440 0%, #0d1424 100%);
  border-color: rgba(120, 140, 200, .35);
}
.guide-how-kicker {
  margin: 0 0 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.85);
}
.guide-how-banner {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 18px 7px;
  font-size: 1.05rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
  color: #0b1a33;
  background: linear-gradient(90deg, #7ec8ff, #b7d9ff);
  clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%);
  border-radius: 2px;
}
.guide-how-body {
  display: grid; gap: 10px;
  font-size: .88rem; line-height: 1.55; color: rgba(255,255,255,.92);
  max-width: 42em; margin-bottom: 16px;
}
.guide-how-body p { margin: 0; }
.guide-faq-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.guide-faq-card {
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  background: rgba(8,12,22,.45); padding: 12px 14px;
}
.guide-faq-card h3 {
  margin: 0 0 6px; font-size: .8rem; color: #9fd4ff;
}
.guide-faq-card p {
  margin: 0; font-size: .78rem; line-height: 1.45; color: rgba(255,255,255,.82);
}

.guide-explorer {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(120, 140, 200, .28);
  background:
    radial-gradient(ellipse at 70% 20%, rgba(40, 70, 120, .35), transparent 50%),
    linear-gradient(165deg, #121a2c 0%, #0a1018 60%);
}
.guide-explorer > .home-section-head {
  padding: 18px 18px 0;
}
.guide-explorer-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 0;
  min-height: 420px;
}
.guide-explorer-rail {
  padding: 12px 12px 18px;
  border-right: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.22);
}
.guide-explorer-rail-label {
  margin: 0 0 8px;
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
}
.guide-explorer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}
.guide-thumb {
  font: inherit; cursor: pointer; color: #fff;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  padding: 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.guide-thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.25);
}
.guide-thumb-active {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 8px 20px rgba(0,0,0,.35);
}
.guide-thumb-art {
  width: 100%; aspect-ratio: 1;
  border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(10,16,24,.55);
  overflow: hidden;
  font-weight: 800; font-size: .9rem;
}
.guide-thumb-art img { width: 78%; height: 78%; object-fit: contain; }
.guide-thumb-label {
  font-size: .58rem; font-weight: 700; text-align: center; line-height: 1.15;
  color: rgba(255,255,255,.85);
}
.guide-thumb-rarity-rare .guide-thumb-art { background: linear-gradient(160deg, #123a66, #0a2038); }
.guide-thumb-rarity-epic .guide-thumb-art { background: linear-gradient(160deg, #3a1860, #1a0c30); }
.guide-thumb-rarity-legendary .guide-thumb-art { background: linear-gradient(160deg, #5a3a10, #2a1a08); }
.guide-thumb-rarity-mythic .guide-thumb-art { background: linear-gradient(160deg, #5a1a1a, #2a0c0c); }

.guide-explorer-detail {
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  align-items: start;
}
.guide-detail-stage {
  position: relative;
  min-height: 220px;
  display: grid; place-items: center;
}
.guide-detail-pedestal {
  position: absolute; bottom: 18%; left: 50%;
  width: 70%; height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(80,180,255,.55), transparent 70%);
  filter: blur(2px);
  animation: guide-pedestal-pulse 2.8s ease-in-out infinite;
}
.guide-detail-hero {
  position: relative; z-index: 1;
  width: min(100%, 200px); height: auto; max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.45));
  animation: guide-hero-float 3.2s ease-in-out infinite;
}
.guide-detail-hero-ph {
  position: relative; z-index: 1;
  font-size: 1.4rem; font-weight: 800; color: rgba(255,255,255,.5);
}
@keyframes guide-hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes guide-pedestal-pulse {
  0%, 100% { opacity: .7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.guide-detail-info { min-width: 0; }
.guide-detail-badges {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.guide-badge {
  display: inline-flex; align-items: center;
  padding: 4px 8px 3px;
  border-radius: 4px;
  font-size: .62rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
}
.guide-badge-role {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
}
.guide-badge-rarity-rare { background: #00458a; color: #00fffb; }
.guide-badge-rarity-epic { background: #4c197b; color: #ec27ff; }
.guide-badge-rarity-legendary { background: #8a3c1e; color: #fbc363; }
.guide-badge-rarity-mythic { background: #7c5d26; color: #fff0a6; }
.guide-badge-rarity-special,
.guide-badge-level {
  background: linear-gradient(90deg, #7b7cff, #ff77d8, #5dffe4);
  color: #0a1018;
}
.guide-detail-name {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 3vw, 1.65rem);
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: #fff;
  transform: skewX(-6deg);
}
.guide-detail-ability {
  margin: 0 0 14px;
  font-size: .9rem; line-height: 1.45; color: rgba(255,255,255,.88);
}
.guide-detail-block { margin-bottom: 14px; }
.guide-detail-block-label {
  margin: 0 0 8px;
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}
.guide-level-pills,
.guide-style-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.guide-level-pill,
.guide-style-pill {
  font: inherit; cursor: pointer;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  padding: 6px 10px;
  font-size: .72rem; font-weight: 700;
  transition: border-color .12s, background .12s, transform .1s;
}
.guide-level-pill:hover,
.guide-style-pill:hover {
  border-color: rgba(255,255,255,.4);
}
.guide-level-pill-active {
  background: #f7e36a; color: #1a1208; border-color: #f7e36a;
}
.guide-style-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 5px;
}
.guide-style-pill img {
  width: 22px; height: 22px; object-fit: contain;
  border-radius: 4px; background: rgba(0,0,0,.25);
}
.guide-style-pill-active {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.3);
  background: rgba(255,255,255,.14);
}
.guide-style-pill-soon { opacity: .55; }
.guide-level-value {
  margin: 0 0 8px;
  font-size: .95rem; font-weight: 800; color: #9fd4ff;
}
.guide-level-track {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
}
.guide-level-step {
  height: 6px; border-radius: 99px;
  background: rgba(255,255,255,.12);
}
.guide-level-step-on {
  background: linear-gradient(90deg, #5bcefa, #52b788);
}
.guide-bonus-box {
  border: 1px solid rgba(93, 206, 250, .55);
  border-radius: 10px;
  background: rgba(20, 40, 60, .55);
  padding: 12px 14px;
}
.guide-bonus-short {
  margin: 0 0 4px;
  font-size: .72rem; font-weight: 800; color: #5bcefa;
  text-transform: uppercase; letter-spacing: .03em;
}
.guide-bonus-text {
  margin: 0;
  font-size: .82rem; line-height: 1.4; color: rgba(255,255,255,.9);
}
.guide-detail-tip {
  margin: 0 0 14px;
  font-size: .76rem; line-height: 1.4; color: rgba(255,255,255,.6);
  border-left: 2px solid rgba(91,206,250,.45); padding-left: 10px;
}
.guide-detail-cta {
  background: linear-gradient(180deg, #f8e56a, #e0b93a);
  color: #1a1208;
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  transform: skewX(-6deg);
  padding: 12px 22px;
}
.guide-detail-cta:hover { filter: brightness(1.06); }

.guide-variant-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.guide-variant-card {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-input); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.guide-variant-name { margin: 0; font-size: .85rem; }
.guide-variant-short { margin: 0; font-size: .72rem; font-weight: 700; color: #5bcefa; }
.guide-variant-bonus { margin: 0; font-size: .76rem; line-height: 1.4; color: var(--text-soft); }
.guide-variant-best { margin: 0; font-size: .68rem; color: var(--text-muted); }
.guide-variant-note { margin-top: 12px; }

@media (max-width: 860px) {
  .guide-explorer-layout { grid-template-columns: 1fr; }
  .guide-explorer-rail {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .guide-explorer-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    max-height: none;
  }
  .guide-explorer-detail {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .guide-detail-badges,
  .guide-level-pills,
  .guide-style-pills { justify-content: center; }
  .guide-detail-name { transform: none; }
  .guide-detail-tip { text-align: left; }
  .guide-detail-cta { transform: none; width: 100%; }
}

.home-section-title {
  font-size: 1rem; color: var(--panel-heading); margin-bottom: 6px;
}
.home-section-sub {
  margin: 0 0 12px; font-size: .8rem; color: var(--text-muted); max-width: 40em;
}
.home-section-head { margin-bottom: 10px; }
.home-about-grid {
  display: grid; gap: 10px;
  font-size: .86rem; line-height: 1.6; color: var(--text-soft);
}
.home-families { margin: 0 0 14px; }
.home-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}
.home-family-card {
  font: inherit; text-align: left; cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-input);
  padding: 8px;
  color: var(--text);
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.home-family-card:hover,
.home-family-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(91,206,250,.45);
  box-shadow: 0 6px 16px var(--shadow);
  outline: none;
}
.home-family-media {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 10px; background: rgba(10,16,24,.35);
  margin-bottom: 8px; overflow: hidden;
}
.home-family-media img { width: 72%; height: 72%; object-fit: contain; }
.home-family-ph { font-size: .62rem; color: var(--text-muted); text-align: center; padding: 4px; }
.home-family-name {
  display: block; font-size: .72rem; font-weight: 700; line-height: 1.2; margin-bottom: 3px;
}
.home-family-meta {
  display: block; font-size: .6rem; color: var(--text-faint); line-height: 1.25;
}
.home-family-rarity {
  display: inline-block; margin-top: 5px;
  font-size: .58rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
}
.home-family-rarity-rare .home-family-rarity { color: #74c0fc; }
.home-family-rarity-epic .home-family-rarity { color: #b197fc; }
.home-family-rarity-legendary .home-family-rarity { color: #ffd43b; }
.home-family-rarity-mythic .home-family-rarity { color: #ff8787; }
.home-style-row { display: flex; flex-wrap: wrap; gap: 8px; }
.home-style-chip {
  font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 88px; padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  transition: border-color .12s, background .12s;
}
.home-style-chip:hover,
.home-style-chip:focus-visible {
  border-color: rgba(91,206,250,.45);
  background: rgba(91,206,250,.08);
  outline: none;
}
.home-style-name { font-size: .76rem; font-weight: 700; }
.home-style-count { font-size: .62rem; color: var(--text-faint); }
.home-rates-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-soft); border-radius: 12px;
}
.home-rates-table {
  width: 100%; min-width: 520px; border-collapse: collapse; font-size: .78rem;
}
.home-rates-table th,
.home-rates-table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-soft);
}
.home-rates-table th {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); background: rgba(10,16,24,.25);
}
.home-rates-table tr:last-child td { border-bottom: 0; }
.home-rate-value { font-weight: 700; color: var(--warn); }
.home-rates-rarity-mythic .home-rate-value { color: #ff8787; }
.home-rates-rarity-legendary .home-rate-value { color: #ffd43b; }

html[data-theme="light"] .home-hero {
  background: linear-gradient(160deg, rgba(255,255,255,.98), rgba(244,247,250,.92));
}
html[data-theme="light"] .home-hero-title {
  background: linear-gradient(135deg, #1a2836 20%, #1484b8);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="light"] .home-zone-nav-inner { background: rgba(255,255,255,.9); }
html[data-theme="light"] .home-family-media { background: rgba(255,255,255,.65); }
html[data-theme="light"] .home-setup-compact.panel {
  border-color: rgba(217,119,6,.45) !important;
  box-shadow: 0 12px 32px rgba(245,158,11,.22), 0 2px 8px rgba(0,0,0,.08);
}
html[data-theme="light"] .home-setup-summary {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #f59e0b 100%);
}
html[data-theme="light"] .home-setup-summary:hover {
  filter: brightness(1.04);
}
html[data-theme="light"] .home-setup-summary::after {
  border-color: rgba(26,18,8,.6);
}
html[data-theme="light"] .home-setup-summary-title { color: #1a1208; }
html[data-theme="light"] .home-setup-summary-hint { color: rgba(26,18,8,.68); }
html[data-theme="light"] .home-setup-body {
  border-top-color: rgba(217,119,6,.25);
}

@media (max-width: 640px) {
  .home-hero { margin-inline: -12px; padding-inline: 14px; border-radius: 0 0 16px 16px; }
  .home-zone-nav { margin-inline: -12px; top: 48px; }
  .home-hero-icons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    opacity: .32;
    transform: rotate(-3deg) scale(1.12);
  }
  .home-hero-actions { flex-direction: column; }
  .home-hero-actions .btn { width: 100%; text-align: center; }
  .home-family-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
