/* ─────────────────────────────────────────────
   Tibia Warzones · Instagram Gradient Aesthetic

   FUNDO: artwork do Tibia + gradiente IG oficial
          sobreposto (purple→pink→orange→yellow)
   UI:    glass cards (frosted, readable)
          topbar glass
          texto com alto contraste garantido
   DM Sans · DM Mono
───────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap");

:root {
  /* Gradiente IG oficial */
  --ig: linear-gradient(
    45deg,
    #405de6 0%,
    #5851db 15%,
    #833ab4 30%,
    #c13584 50%,
    #e1306c 62%,
    #f77737 80%,
    #fcaf45 100%
  );

  --accent: #c13584;

  --font-system: "DM Sans", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "DM Mono", "SF Mono", ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-xl: 18px;
  --card-pad-h: 16px;
  --card-pad-v: 14px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spr: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 140ms;
  --t-base: 220ms;
  --t-theme: 280ms;
}

/* ══════════════════════════════════════════════
   DARK MODE
   Glass escuro — texto branco com contraste real
══════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  --bg-topbar: rgba(10, 6, 20, 0.58);
  --bg-header: rgba(10, 6, 20, 0.5);
  --bg-card: rgba(15, 8, 28, 0.52);
  --bg-input: rgba(20, 10, 36, 0.7);

  --sep: rgba(255, 255, 255, 0.12);
  --sep-md: rgba(255, 255, 255, 0.2);

  --text-primary: #ffffff;
  --text-secondary: #f0e8ff;
  --text-tertiary: #d4c0f0;
  --text-quaternary: #a888d0;

  --fill-2: rgba(255, 255, 255, 0.1);
  --fill-3: rgba(255, 255, 255, 0.05);

  --badge-bg: #833ab4;
  --badge-text: #ffffff;
  --time-color: #fcaf45;
  --services-color: #d4c0f0;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* ══════════════════════════════════════════════
   LIGHT MODE
   Glass claro — texto escuro com contraste real
══════════════════════════════════════════════ */
[data-theme="light"] {
  color-scheme: light;

  --bg-topbar: rgba(255, 255, 255, 0.58);
  --bg-header: rgba(255, 255, 255, 0.52);
  --bg-card: rgba(255, 255, 255, 0.55);
  --bg-input: rgba(255, 255, 255, 0.75);

  --sep: rgba(0, 0, 0, 0.1);
  --sep-md: rgba(0, 0, 0, 0.18);

  --text-primary: #0a0010;
  --text-secondary: #1a0830;
  --text-tertiary: #2e1448;
  --text-quaternary: #4a2868;

  --fill-2: rgba(0, 0, 0, 0.06);
  --fill-3: rgba(0, 0, 0, 0.03);

  --badge-bg: #833ab4;
  --badge-text: #ffffff;
  --time-color: #833ab4;
  --services-color: #833ab4;

  --shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.25);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg-topbar: rgba(255, 255, 255, 0.58);
    --bg-header: rgba(255, 255, 255, 0.52);
    --bg-card: rgba(255, 255, 255, 0.55);
    --bg-input: rgba(255, 255, 255, 0.75);
    --sep: rgba(0, 0, 0, 0.1);
    --sep-md: rgba(0, 0, 0, 0.18);
    --text-primary: #0a0010;
    --text-secondary: #1a0830;
    --text-tertiary: #2e1448;
    --text-quaternary: #4a2868;
    --fill-2: rgba(0, 0, 0, 0.06);
    --fill-3: rgba(0, 0, 0, 0.03);
    --badge-bg: #833ab4;
    --badge-text: #ffffff;
    --time-color: #833ab4;
    --services-color: #833ab4;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.25);
  }
}

/* ══════════════════════════════════════════════
   RESET
══════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ══════════════════════════════════════════════
   BACKGROUND — 3 camadas fixas

   z -3  #bg-layer  : artwork do Tibia
   z -2  body::before : gradiente IG oficial sobreposto
   z -1  body::after  : veil direcional leve (só controle
                        de luminosidade, sem cor própria)
══════════════════════════════════════════════ */
body {
  font-family: var(--font-system);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  background: #2a0a4e;
  transition: color var(--t-theme) var(--ease-out);
}

/* Artwork */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}

/* Gradiente IG sobre a artwork — vibrante, dominante */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    45deg,
    rgba(64, 93, 230, 0.72) 0%,
    rgba(88, 81, 219, 0.65) 15%,
    rgba(131, 58, 180, 0.6) 30%,
    rgba(193, 53, 132, 0.55) 50%,
    rgba(225, 48, 108, 0.5) 62%,
    rgba(247, 119, 55, 0.45) 80%,
    rgba(252, 175, 69, 0.4) 100%
  );
  pointer-events: none;
}

/* Veil direcional — só escurece levemente o centro/base para legibilidade */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.18) 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  transition: background var(--t-theme) var(--ease-out);
}

/* ══════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════ */
.container {
  width: min(1140px, 100%);
  padding-inline: 20px;
  margin-inline: auto;
}
@media (min-width: 600px) {
  .container {
    padding-inline: 32px;
  }
}
@media (min-width: 1000px) {
  .container {
    padding-inline: 48px;
  }
}

/* ══════════════════════════════════════════════
   TOPBAR — glass
══════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-topbar);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--sep-md);
  transition: background var(--t-theme) var(--ease-out),
    border-color var(--t-theme) var(--ease-out);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding-block: 6px;
}

.topbar-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.topbar-label {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  margin-right: 8px;
}

.topbar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-out),
    background var(--t-fast) var(--ease-out);
}
.topbar-links a:hover {
  color: var(--text-primary);
  background: var(--fill-2);
}

/* Short labels hidden on wide, shown on narrow */
.link-short {
  display: none;
}
.link-full {
  display: inline;
}
@media (max-width: 520px) {
  .link-short {
    display: inline;
  }
  .link-full {
    display: none;
  }
}

.topbar-divider {
  display: inline-block;
  width: 1px;
  height: 11px;
  background: var(--sep-md);
  flex-shrink: 0;
}

.topbar-right,
.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Language dropdown ── */
.lang-dropdown {
  position: relative;
  isolation: isolate;
}

.lang-menu-btn {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sep-md);
  background: var(--fill-3);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-tertiary);
  transition: background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}
.lang-menu-btn:hover {
  background: var(--fill-2);
  color: var(--text-primary);
}
.lang-menu-btn:active {
  transform: scale(0.88);
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  background: var(--bg-topbar);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--sep-md);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 9999;
  animation: menuIn 140ms var(--ease-out) both;
}
.lang-menu.is-open {
  display: block;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-flag {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-system);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}
.lang-flag:hover {
  background: var(--fill-2);
  color: var(--text-primary);
}
.lang-flag:active {
  background: var(--fill-2);
}
.lang-flag.is-active {
  color: var(--text-primary);
  background: rgba(193, 53, 132, 0.12);
}
.lang-flag span {
  flex: 1;
}

.topbar-vsep {
  width: 1px;
  height: 18px;
  background: var(--sep-md);
  flex-shrink: 0;
  margin-inline: 4px;
}

.theme-toggle {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sep-md);
  background: var(--fill-3);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-tertiary);
  transition: background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}
.theme-toggle:hover {
  background: var(--fill-2);
  color: var(--text-primary);
}
.theme-toggle:active {
  transform: scale(0.88);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.theme-toggle .icon-sun {
  display: none;
}
.theme-toggle .icon-moon {
  display: flex;
}
[data-theme="light"] .theme-toggle .icon-sun {
  display: flex;
}
[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .icon-sun {
    display: flex;
  }
  :root:not([data-theme]) .theme-toggle .icon-moon {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar-links {
    font-size: 11px;
    gap: 4px;
  }
}

/* ══════════════════════════════════════════════
   SITE HEADER — glass
══════════════════════════════════════════════ */
.site-header {
  background: var(--bg-header);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--sep);
  padding-block: 20px 18px;
  position: relative;
  z-index: 90;
  transition: background var(--t-theme) var(--ease-out);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

/* Controls (hamburger + moon) pushed to far right */
.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.site-header h1 {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.site-header p {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   CONTROLS
══════════════════════════════════════════════ */
.controls {
  padding-block: 20px 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label,
.section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.7);
}

.section-label {
  display: block;
  padding-top: 18px;
  padding-bottom: 5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 11px;
  color: var(--text-quaternary);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color var(--t-fast) var(--ease-out);
}
.input-wrapper:focus-within .input-icon {
  color: var(--text-primary);
}

#searchInput {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--sep-md);
  border-radius: var(--r-md);
  background: var(--bg-input);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-family: var(--font-system);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    background var(--t-theme) var(--ease-out);
}
#searchInput::placeholder {
  color: var(--text-quaternary);
}
#searchInput:focus {
  outline: none;
  border-color: var(--text-secondary);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
#searchInput::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.select-wrapper {
  position: relative;
}

#timezoneSelect {
  width: 100%;
  min-height: 40px;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--sep-md);
  border-radius: var(--r-md);
  background: var(--bg-input);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-family: var(--font-system);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out),
    background var(--t-theme) var(--ease-out);
}
#timezoneSelect option {
  background: #1a0a2e;
  color: #ffffff;
}
[data-theme="light"] #timezoneSelect option {
  background: #f0e8ff;
  color: #150020;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) #timezoneSelect option {
    background: #f0e8ff;
    color: #150020;
  }
}
#timezoneSelect:focus {
  outline: none;
  border-color: var(--text-secondary);
}

.select-chevron {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* ══════════════════════════════════════════════
   FILTERS — inline pills inside control-group
══════════════════════════════════════════════ */
.control-group--filters {
  grid-column: 1 / -1;
}

#filtersBar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--sep-md);
  background: var(--bg-input);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  color: var(--text-tertiary);
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}

/* "All" pill — slightly dimmer to signal it's a reset, not a real filter */
.filter-pill--all {
  color: var(--text-quaternary);
  margin-right: 3px;
}

.filter-pill:hover {
  background: linear-gradient(
    135deg,
    rgba(131, 58, 180, 0.55) 0%,
    rgba(193, 53, 132, 0.55) 50%,
    rgba(225, 48, 108, 0.55) 100%
  );
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-color: rgba(193, 53, 132, 0.6);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(193, 53, 132, 0.3);
}

.filter-pill:active {
  transform: scale(0.95);
}

.filter-pill.is-active {
  background: linear-gradient(135deg, #833ab4 0%, #c13584 50%, #e1306c 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 14px rgba(193, 53, 132, 0.5);
}

@media (max-width: 600px) {
  .filter-pill {
    font-size: 12px;
    min-height: 36px;
    padding: 0 10px;
  }
}

/* ══════════════════════════════════════════════
   SUMMARY
══════════════════════════════════════════════ */
.summary {
  font-size: 12px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.7);
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 18px;
  min-height: 18px;
}

/* ══════════════════════════════════════════════
   WORLDS LIST
══════════════════════════════════════════════ */
.worlds-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 64px;
}
.masonry-col {
  flex: 1;
  min-width: 0;
}
@media (max-width: 679px) {
  .worlds-list {
    flex-direction: column;
    gap: 12px;
  }
}
.world-card,
.empty-state {
  display: block;
  width: 100%;
}

/* ══════════════════════════════════════════════
   WORLD CARD — glass, texto contrastante
══════════════════════════════════════════════ */
.world-card {
  background: var(--bg-card);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--sep-md);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--t-base) var(--ease-out),
    transform var(--t-base) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    background var(--t-theme) var(--ease-out);
  cursor: pointer;
}
.world-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.35);
}

/* header: nome · badge */
.world-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
  padding: var(--card-pad-v) var(--card-pad-h) 10px;
}

.world-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.world-name-link {
  color: inherit;
  text-decoration: none;
}
.world-name-link:hover {
  text-decoration: underline;
}

/* badge: sólido */
.badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--badge-bg);
  color: var(--badge-text);
  white-space: nowrap;
  line-height: 1.4;
}

.world-card-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.service-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  color: var(--text-secondary);
}

.service-mark-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.14);
}

.service-mark--healthy {
  color: #9af0ba;
}

.service-mark--trolls {
  color: #ffd37f;
}

.service-mark--inconclusive {
  color: #f0b2de;
}

/* meta */
.world-meta {
  padding: 0 var(--card-pad-h) 10px;
  display: flex;
  flex-wrap: wrap;
}
.world-meta > span {
  flex: 0 0 50%;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.8;
  padding-right: 8px;
}

/* executions */
.executions {
  border-top: 1px solid var(--sep);
  padding: 10px var(--card-pad-h) 14px;
}

.executions h3 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--services-color);
  margin-bottom: 8px;
}

.executions > p {
  font-size: 12px;
  color: var(--text-quaternary);
  font-style: italic;
}

.executions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.execution-item {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: var(--fill-3);
  border: 1px solid var(--sep);
  transition: background var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out);
}
.execution-item:hover {
  background: var(--fill-2);
  border-color: var(--sep-md);
}

.execution-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--time-color);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 42px;
}

.execution-order:not(:empty) {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--sep-md);
  font-size: 11px;
  color: var(--text-quaternary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.execution-order:empty {
  display: none;
}

.execution-time-note {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-quaternary);
}
.timezone-details {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-quaternary);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--sep-md);
  border-radius: var(--r-xl);
  color: var(--text-tertiary);
  font-size: 14px;
  box-shadow: var(--shadow);
}

/* ══════════════════════════════════════════════
   SCROLLBAR · A11Y · MOTION
══════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--sep-md);
  border-radius: 99px;
}

:focus-visible {
  outline: 2px solid var(--text-secondary);
  outline-offset: 2px;
  border-radius: 3px;
}

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

/* ══════════════════════════════════════════════
   MOBILE
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --card-pad-h: 13px;
    --card-pad-v: 11px;
  }
  .site-header {
    padding-block: 16px 14px;
  }
  .site-header h1 {
    font-size: 18px;
  }
  .world-card h2 {
    font-size: 14px;
  }
  .world-meta > span {
    flex: 0 0 100%;
  }
}

/* ══════════════════════════════════════════════
   LIVE CLOCK
══════════════════════════════════════════════ */
.clock-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-block: 6px 0;
}

#liveClock {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 24px rgba(193, 53, 132, 0.6);
  line-height: 1;
  min-width: 100px;
  text-align: right;
  user-select: none;
}

@media (max-width: 640px) {
  #liveClock {
    font-size: 22px;
  }
}

/* ══════════════════════════════════════════════
   NEXT WARZONE BAR
══════════════════════════════════════════════ */
#nextWarzoneBar {
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--bg-card);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--sep);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
  transition: background var(--t-theme) var(--ease-out);
}

.next-wz-content {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
}

.next-wz-sep {
  height: 1px;
  background: var(--sep);
  margin: 10px 0;
}

/* When toolbar is inside nextWarzoneBar, remove its own top border/margin since sep handles it */
#nextWarzoneBar .schedule-toolbar {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
  width: 100%;
}

.next-wz-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.next-wz-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-quaternary);
  white-space: nowrap;
}

.next-wz-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.next-wz-time {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--time-color);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.next-wz-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.next-wz-countdown {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--fill-2);
  border: 1px solid var(--sep-md);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.next-wz-urgent .next-wz-countdown {
  color: var(--time-color);
  border-color: rgba(252, 175, 69, 0.35);
  background: rgba(252, 175, 69, 0.1);
  animation: countdownPulse 1.4s ease-in-out infinite;
}
[data-theme="light"] .next-wz-urgent .next-wz-countdown {
  color: #c13584;
  border-color: rgba(193, 53, 132, 0.35);
  background: rgba(193, 53, 132, 0.08);
}
@keyframes countdownPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.now-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #c13584, #e1306c);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  animation: nowPulse 1.2s ease-in-out infinite;
}
@keyframes nowPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.next-wz-empty .next-wz-label {
  color: var(--text-quaternary);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════
   SCHEDULE PANEL
══════════════════════════════════════════════ */
.schedule-panel {
  background: var(--bg-card);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--sep);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 10px 16px 12px;
  margin-bottom: 8px;
  transition: background var(--t-theme) var(--ease-out);
  display: flex;
  flex-direction: column;
}

/* Title sits flush at top, identical to .next-wz-label */
.schedule-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-quaternary);
  white-space: nowrap;
  padding-top: 1px; /* optical alignment with next-wz-label */
}

/* Header: title top-left, copy top-right — both flush to top */
.schedule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: nowrap;
}

.schedule-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Rows */
.schedule-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-radius: 6px;
  transition: background var(--t-fast) var(--ease-out),
    opacity var(--t-base) var(--ease-out);
}
.schedule-row:hover {
  background: var(--fill-3);
}
.schedule-row.is-past {
  opacity: 0.35;
}
.schedule-row.is-past .schedule-time {
  text-decoration: line-through;
}

.schedule-status {
  flex-shrink: 0;
  width: 14px;
  text-align: center;
  font-size: 10px;
}
.past-dot {
  color: var(--text-quaternary);
}
.upcoming-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c13584;
  margin: 0 4px;
}

.schedule-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--time-color);
  letter-spacing: 0.03em;
  min-width: 44px;
  flex-shrink: 0;
}

.schedule-name {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

/* Remove button (shows on hover) */
.schedule-remove-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-quaternary);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}
.schedule-row:hover .schedule-remove-btn {
  opacity: 1;
}
.schedule-remove-btn:hover {
  color: #e1306c;
  transform: scale(1.2);
}
.schedule-remove-btn:active {
  transform: scale(0.85);
}

.schedule-empty {
  font-size: 12px;
  color: var(--text-quaternary);
  font-style: italic;
  padding: 4px 0;
}

/* Toolbar: below rows, bottom of card */
.schedule-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--sep);
}

/* Generic small pill button */
.schedule-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-system);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--sep-md);
  background: var(--fill-3);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}
.schedule-btn:hover {
  background: var(--fill-2);
  color: var(--text-primary);
}
.schedule-btn:active {
  transform: scale(0.92);
}

/* Icon-only square pill */
.schedule-icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
  flex-shrink: 0;
}

.schedule-notify-btn.is-active {
  background: rgba(193, 53, 132, 0.15);
  border-color: rgba(193, 53, 132, 0.4);
  color: #e1306c;
}
[data-theme="light"] .schedule-notify-btn.is-active {
  color: #833ab4;
  background: rgba(193, 53, 132, 0.1);
}

/* ── Alert offset stepper ── */
.alert-offset-group {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: var(--fill-3);
  border: 1px solid var(--sep-md);
  border-radius: 999px;
  padding: 0 6px;
  height: 28px;
}
.stepper-btn {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-quaternary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}
.stepper-btn:hover {
  color: var(--text-primary);
}
.stepper-btn:active {
  transform: scale(0.82);
}
.stepper-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 14px;
  text-align: center;
}
.stepper-unit {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-quaternary);
  white-space: nowrap;
  padding-left: 3px;
}

/* ── Volume control ── */
.volume-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-quaternary);
  flex-shrink: 0;
}
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  height: 2px;
  border-radius: 99px;
  background: var(--sep-md);
  outline: none;
  cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-spr);
}
.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}
.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

/* ── Sound picker ── */
.sound-picker-wrap {
  position: relative;
  margin-left: auto;
}
.sound-picker-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 152px;
  background: var(--bg-topbar);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--sep-md);
  border-radius: var(--r-md);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 9999;
  animation: menuIn 140ms var(--ease-out) both;
}
.sound-picker-menu.is-open {
  display: block;
}
.sound-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}
.sound-option:hover {
  background: var(--fill-2);
  color: var(--text-primary);
}
.sound-option.is-active {
  color: var(--text-primary);
  background: rgba(193, 53, 132, 0.12);
}

/* ══════════════════════════════════════════════
   EXEC SELECT BUTTON (per-execution, inline)
══════════════════════════════════════════════ */
.execution-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: var(--fill-3);
  border: 1px solid var(--sep);
  justify-content: space-between;
  transition: background var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out);
}
.execution-item:hover {
  background: var(--fill-2);
  border-color: var(--sep-md);
}
.execution-item.is-selected {
  background: rgba(193, 53, 132, 0.08);
  border-color: rgba(193, 53, 132, 0.28);
}
[data-theme="light"] .execution-item.is-selected {
  background: rgba(193, 53, 132, 0.06);
  border-color: rgba(193, 53, 132, 0.22);
}

.exec-select-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--sep-md);
  background: var(--fill-3);
  color: var(--text-quaternary);
  cursor: pointer;
  margin-left: auto;
  transition: background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}
.exec-select-btn:hover {
  background: rgba(193, 53, 132, 0.16);
  border-color: rgba(193, 53, 132, 0.45);
  color: var(--text-primary);
  transform: scale(1.12);
}
.exec-select-btn:active {
  transform: scale(0.88);
}
.exec-select-btn.is-selected {
  background: rgba(193, 53, 132, 0.22);
  border-color: rgba(193, 53, 132, 0.6);
  color: #e1306c;
}
[data-theme="light"] .exec-select-btn.is-selected {
  background: rgba(193, 53, 132, 0.13);
  border-color: rgba(193, 53, 132, 0.42);
  color: #833ab4;
}

/* ══════════════════════════════════════════════
   WORLD CARD — select button & selected state
══════════════════════════════════════════════ */
.executions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.executions-header h3 {
  margin-bottom: 0 !important;
}

.history-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
}
.history-link:hover {
  text-decoration: underline;
}

.history-back-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
}

.history-back-link:hover {
  text-decoration: underline;
}

.world-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
  padding-bottom: 64px;
}

.world-detail-card {
  background: var(--bg-card);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--sep-md);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 18px;
}

.world-detail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.world-detail-card-header h2 {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.world-detail-inline-note {
  font-size: 12px;
  color: var(--text-quaternary);
}

.world-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.world-detail-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--sep);
  background: var(--fill-3);
}

.world-detail-stat span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-quaternary);
}

.world-detail-stat strong {
  font-size: 14px;
  color: var(--text-primary);
}

.world-detail-empty {
  color: var(--text-quaternary);
  font-size: 13px;
}

.world-schedule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.world-schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--sep);
  background: var(--fill-3);
}

.world-schedule-time {
  font-family: var(--font-mono);
  color: var(--time-color);
  font-weight: 700;
}

.world-schedule-seq {
  color: var(--text-secondary);
  font-size: 12px;
}

.world-history-table-wrap {
  overflow-x: auto;
}

.world-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.world-history-table th,
.world-history-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--sep);
}

.world-history-table th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-quaternary);
}

.world-history-table td {
  font-size: 13px;
  color: var(--text-secondary);
}

.world-card--selected {
  border-color: rgba(193, 53, 132, 0.45) !important;
  box-shadow: var(--shadow), 0 0 0 2px rgba(193, 53, 132, 0.12) !important;
}

/* ══════════════════════════════════════════════
   WORLD META — left/right pair layout
══════════════════════════════════════════════ */
.world-meta {
  padding: 0 var(--card-pad-h) 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0;
}
.world-meta > span {
  flex: 0 0 50%;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.9;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta-left {
  text-align: left;
  padding-right: 4px;
}
.meta-right {
  text-align: right;
  padding-left: 4px;
  padding-right: 0 !important;
}
@media (max-width: 360px) {
  .world-meta > span {
    flex: 0 0 100%;
    text-align: left !important;
  }
}

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.warzone-toast {
  position: fixed;
  bottom: 24px;
  right: 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(193, 53, 132, 0.4);
  border-radius: var(--r-xl);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  max-width: min(340px, calc(100vw - 36px));
  transform: translateY(16px);
  opacity: 0;
  transition: transform 280ms var(--ease-spr), opacity 220ms var(--ease-out);
}
.warzone-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.toast-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.4;
}
.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-quaternary);
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
  border-radius: 4px;
  transition: color var(--t-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}
.toast-close:hover {
  color: var(--text-primary);
}
@media (max-width: 480px) {
  .warzone-toast {
    bottom: 14px;
    right: 10px;
    left: 10px;
    max-width: 100%;
  }
}

/* ══════════════════════════════════════════════
   SCHEDULE CONFLICT WARNING
══════════════════════════════════════════════ */
.conflict-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(252, 175, 69, 0.1);
  border: 1px solid rgba(252, 175, 69, 0.3);
  border-radius: var(--r-md);
  font-size: 12px;
  color: #fcaf45;
  animation: fadeSlideIn 220ms var(--ease-out) both;
}
[data-theme="light"] .conflict-warn {
  background: rgba(193, 53, 132, 0.08);
  border-color: rgba(193, 53, 132, 0.25);
  color: #c13584;
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.conflict-warn svg {
  flex-shrink: 0;
  opacity: 0.85;
}
.conflict-warn span {
  flex: 1;
  line-height: 1.4;
}
.conflict-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.6;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity var(--t-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}
.conflict-close:hover {
  opacity: 1;
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  margin-top: 56px;
  background: var(--bg-topbar);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: 1px solid var(--sep-md);
  padding-block: 24px 20px;
  transition: background var(--t-theme) var(--ease-out),
    border-color var(--t-theme) var(--ease-out);
}

/* ── Top row: brand + notice + github btn ── */
.footer-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding-top: 1px;
}

.footer-icon {
  font-size: 15px;
  line-height: 1;
}

.footer-brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.footer-sep-v {
  width: 1px;
  align-self: stretch;
  background: var(--sep-md);
  flex-shrink: 0;
  margin-block: 2px;
}

.footer-notice {
  flex: 1;
  min-width: 200px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-quaternary);
}

.footer-gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--sep-md);
  background: var(--fill-3);
  color: var(--text-secondary);
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-spr);
  -webkit-user-select: none;
  user-select: none;
}
.footer-gh-btn:hover {
  background: var(--fill-2);
  border-color: rgba(193, 53, 132, 0.4);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.footer-gh-btn:active {
  transform: translateY(0) scale(0.97);
}

/* ── Bottom strip: copyright + disclaimer ── */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--sep);
}

.footer-copy {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.footer-disclaimer {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-quaternary);
  opacity: 0.75;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--t-fast) var(--ease-out);
}
.footer-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .footer-sep-v {
    display: none;
  }
  .footer-top {
    gap: 12px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
