﻿/* Kopier-Button für Abschnittslinks in Guide-Überschriften */
.guide-section-title button[onclick^="copySectionLink"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary);
  font-size: 1.1em;
  vertical-align: middle;
  padding: 0 2px;
  transition: color 0.2s;
}
.guide-section-title button[onclick^="copySectionLink"]:hover {
  color: var(--primary);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ff6b6b;
  --primary-dark: #ee5a52;
  --secondary: #4ecdc4;
  --background: #0f1419;
  --surface: #1a1f2e;
  --surface-alt: #252d3d;
  --text-primary: #e8e8e8;
  --text-secondary: #a8a8a8;
  --border: #393f4d;
  --accent: #ffd93d;
  --success: #4ecdc4;
  --warning: #ffd93d;
  --danger: #ff6b6b;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background);
  background-image:
    radial-gradient(1200px 520px at 80% -10%, rgba(78, 205, 196, 0.08), transparent 60%),
    radial-gradient(900px 420px at -10% 20%, rgba(255, 107, 107, 0.08), transparent 55%),
    linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.panel {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.panel-soft {
  background: transparent;
  border: none;
  padding: 0;
}

header.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
  align-items: start;
}

.hero h1 {
  color: #eef6ff;
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  letter-spacing: -1px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.hero p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.hero-links {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  min-width: 420px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  padding: 0.4rem 0.8rem;
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 0.5rem;
  white-space: nowrap;
}

.hero-link-left {
  justify-self: start;
}

.hero-link-right {
  justify-self: end;
}

.hero-links a:hover {
  color: var(--primary);
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.1);
}

.header-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  align-items: center;
  padding: 0.35rem;
  border: 1px solid rgba(126, 191, 235, 0.2);
  border-radius: 0.82rem;
  background:
    linear-gradient(140deg, rgba(23, 38, 58, 0.78), rgba(20, 31, 47, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.16);
}

.header-menu a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #dff6ff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-height: 38px;
  padding: 0.42rem 0.72rem;
  background: rgba(11, 24, 40, 0.62);
  border: 1px solid rgba(78, 205, 196, 0.22);
  border-radius: 0.62rem;
  white-space: nowrap;
}

.header-nav-select-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 220px;
}

.header-nav-select {
  width: 100%;
  min-height: 38px;
  padding: 0.42rem 0.68rem;
  background: rgba(11, 24, 40, 0.62);
  border: 1px solid rgba(78, 205, 196, 0.25);
  border-radius: 0.62rem;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.header-nav-select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.14);
}

.header-menu a:hover {
  color: #ffe8e8;
  transform: translateY(-1px);
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.12);
}

.header-menu a.active {
  color: #e8f6ff;
  border-color: rgba(126, 191, 235, 0.62);
  background: linear-gradient(145deg, rgba(74, 126, 167, 0.42), rgba(52, 92, 126, 0.36));
  box-shadow: inset 0 0 0 1px rgba(190, 225, 255, 0.15);
}

/* Simplified header nav: use dropdown globally */
.header-menu a {
  display: none;
}

.nav-icon {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.36rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(78, 205, 196, 0.15);
  border: 1px solid rgba(78, 205, 196, 0.18);
  color: currentColor;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 0.75rem;
  height: 0.75rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon img {
  width: 0.75rem;
  height: 0.75rem;
  object-fit: contain;
  display: block;
}

.header-lang-group {
  display: inline-flex;
  gap: 0.35rem;
  padding-left: 0.1rem;
}

.header-lang-btn {
  min-height: 38px;
  min-width: 42px;
  padding: 0.42rem 0.68rem;
  background: rgba(11, 24, 40, 0.62);
  border: 1px solid rgba(78, 205, 196, 0.25);
  border-radius: 0.62rem;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.header-lang-btn:hover {
  color: var(--primary);
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.1);
}

.header-lang-btn:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.14);
}

.header-lang-btn.active {
  color: #e8f6ff;
  border-color: rgba(126, 191, 235, 0.62);
  background: linear-gradient(145deg, rgba(74, 126, 167, 0.42), rgba(52, 92, 126, 0.36));
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

.page-footer {
  border-top: 1px solid var(--border);
  background: rgba(26, 31, 46, 0.75);
  padding: 0.85rem 1.25rem 1rem;
}

.page-footer-links {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

.page-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 0.45rem;
  background: rgba(78, 205, 196, 0.08);
}

.page-footer-links a:hover {
  color: var(--primary);
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.08);
}

.quick-hint {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1200;
  padding: 0.55rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(78, 205, 196, 0.35);
  background: rgba(17, 45, 70, 0.95);
  color: #dff7f5;
  font-size: 0.82rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.quick-hint.show {
  opacity: 1;
  transform: translateY(0);
}

.quick-hint.warning {
  border-color: rgba(255, 217, 61, 0.45);
  background: rgba(64, 52, 20, 0.96);
  color: #f8e89f;
}

.quick-hint.error {
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(66, 26, 28, 0.96);
  color: #ffd4d4;
}

.quick-hint.share-hint {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 0.15rem);
  bottom: auto;
  z-index: 5;
  width: fit-content;
  max-width: 100%;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
}

.status,
.health {
  padding: 0.5rem 0.75rem;
  background: rgba(78, 205, 196, 0.15);
  border-left: 3px solid var(--secondary);
  color: var(--text-secondary);
  border-radius: 0.25rem;
  font-size: 0.85rem;
}

.status {
  margin-bottom: 0.5rem;
}

.status.error {
  border-left-color: var(--danger);
  background: rgba(255, 107, 107, 0.15);
  color: #ffd0d0;
}

.status.warn,
.health.warn {
  border-left-color: var(--warning);
  background: rgba(255, 217, 61, 0.12);
  color: #f5de8a;
}

.health {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.health-toggle {
  margin-top: 0.25rem;
}

.health-toggle summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--secondary);
  background: rgba(78, 205, 196, 0.08);
  border: 1px solid rgba(78, 205, 196, 0.22);
  border-radius: 0.45rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  user-select: none;
}

.health-toggle summary::-webkit-details-marker {
  display: none;
}

.health-toggle summary::before {
  content: "▸";
  font-size: 0.78rem;
  line-height: 1;
  transform: translateY(-1px);
}

.health-toggle[open] summary::before {
  content: "▾";
}

.health-toggle summary:hover {
  color: var(--primary);
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.08);
}

.health-toggle .status {
  margin-top: 0.55rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  padding: 0 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.controls,
.preview-panel {
  height: fit-content;
}

.preview-panel {
  position: sticky;
  top: 2rem;
}

.preview-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--secondary);
  color: var(--text-primary);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  align-items: end;
}

.language-group { grid-column: 1; grid-row: 1; }
.gender-group { grid-column: 2; grid-row: 1; }
.search-group { grid-column: 3; grid-row: 1; }

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.toolbar-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 1.2rem;
}

.toolbar-group select,
.toolbar-group input,
.search,
input,
select {
  width: 100%;
  min-height: 40px;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.toolbar-group select:hover,
.toolbar-group input:hover,
input:hover,
select:hover {
  border-color: var(--primary);
}

.toolbar-group select:focus,
.toolbar-group input:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

button,
.tag-chip,
.item-row,
.slot-toggle {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.tag-chip:focus-visible,
.item-row:focus-visible,
.slot-toggle:focus-visible {
  outline: 2px solid #7fded8;
  outline-offset: 2px;
}

.inline-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.inline-row.no-wrap {
  flex-wrap: nowrap;
}

.inline-row.top-gap {
  margin-top: 0.75rem;
}

.favorites-group {
  grid-column: 4;
  grid-row: 1;
}

.favorites-group .inline-row.no-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.favorites-group .inline-row.top-gap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.share-row {
  grid-column: 1 / 3;
  grid-row: 2;
  align-self: end;
  position: relative;
  padding-bottom: 0;
}

.share-row .inline-row {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto auto;
  gap: 0.5rem;
  align-items: center;
  justify-content: start;
}

.toolbar-actions {
  grid-column: 3 / 5;
  grid-row: 2;
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  align-self: end;
}

.btn {
  padding: 0.75rem 1.5rem;
  background: #3b546d;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: normal;
}

.btn:hover {
  background: #4a6988;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: var(--secondary);
  color: var(--background);
}

.btn.secondary:hover {
  background: #3ab9b2;
}

.btn.warning {
  background: var(--warning);
  color: var(--background);
}

.btn.warning:hover {
  background: #e6c200;
}

.btn.danger {
  background: var(--danger);
}

.btn.danger:hover {
  background: var(--primary-dark);
}

.btn.mini {
  min-height: 36px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  flex: 0 0 auto;
  min-width: 0;
  background: #10283f;
  color: #d8e8f8;
  border: 1px solid #35597f;
}

.tag-filter-head .btn.mini {
  width: auto;
}

.btn.mini:hover {
  background: #163752;
  border-color: var(--secondary);
  color: #ffffff;
  box-shadow: none;
}

.tag-filter {
  margin-bottom: 2rem;
}

.tag-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.tag-filter-head span {
  font-weight: 600;
  color: var(--text-primary);
}

.tag-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-chip {
  padding: 0.45rem 0.9rem;
  border-radius: 1rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  background: rgba(78, 205, 196, 0.2);
  color: var(--secondary);
}

.tag-chip:hover {
  background: rgba(78, 205, 196, 0.3);
}

.tag-chip.selected {
  box-shadow: inset 0 0 0 1px #fff;
}

.tag-default { background: rgba(255,255,255,0.08); color: #d2d2d2; border-color: var(--border); }
.tag-mart { background: rgba(255, 217, 61, 0.2); color: #ffe680; border-color: rgba(255, 217, 61, 0.5); }
.tag-pvp { background: rgba(255, 107, 107, 0.2); color: #ff9c9c; border-color: rgba(255, 107, 107, 0.5); }
.tag-gift { background: rgba(78, 205, 196, 0.2); color: #87e7e0; border-color: rgba(78, 205, 196, 0.5); }
.tag-seasonal { background: rgba(147, 112, 219, 0.25); color: #c8b4ff; border-color: rgba(147, 112, 219, 0.6); }
.tag-event { background: rgba(255, 140, 0, 0.22); color: #ffbe6b; border-color: rgba(255, 140, 0, 0.5); }
.tag-limited { background: rgba(255, 107, 107, 0.22); color: #ffb3b3; border-color: rgba(255, 107, 107, 0.5); }
.tag-pve { background: rgba(78, 205, 196, 0.22); color: #8df0e8; border-color: rgba(78, 205, 196, 0.5); }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.slot-head {
  padding: 0.75rem;
  background: rgba(78, 205, 196, 0.08);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slot-title {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.slot-toggle {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  font-size: 0.72rem;
}

.slot-toggle:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.slot-count {
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.slot.collapsed .search,
.slot.collapsed .list-info,
.slot.collapsed .item-list {
  display: none;
}

.slot .search {
  margin: 0.65rem;
  width: calc(100% - 1.3rem);
}

.list-info {
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

.item-list {
  border-top: 1px solid var(--border);
  background: var(--background);
  max-height: 240px;
  overflow: auto;
}

.item-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
}

.item-row:last-child {
  border-bottom: none;
}

.item-row:hover {
  background: var(--surface-alt);
}

.item-row.selected {
  background: rgba(78, 205, 196, 0.2);
  outline: 1px solid var(--secondary);
}

.item-name {
  display: block;
  font-size: 0.84rem;
  line-height: 1.15;
}

.item-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.icon-crop {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--background);
  flex: 0 0 auto;
}

.icon-crop img {
  width: 68px;
  height: 68px;
  margin-left: -18px;
  margin-top: -7px;
}

.icon-crop img.category-icon {
  width: 100%;
  height: 100%;
  margin-left: 0;
  margin-top: 0;
  object-fit: contain;
  padding: 3px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.6rem;
  text-align: center;
}

.preview-image-wrap {
  position: relative;
  min-height: 126px;
  display: grid;
  place-items: center;
}

.preview-image-wrap img.main {
  width: 100%;
  max-width: 110px;
  image-rendering: pixelated;
}

.preview-label {
  margin-top: 7px;
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(78, 205, 196, 0.08);
}

.location-panel {
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.location-panel h3 {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--text-primary);
}

.location-headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.location-global-toggle {
  min-height: 30px;
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
}

.location-global-toggle:disabled {
  opacity: 0.55;
  cursor: default;
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.location-item {
  padding: 0.75rem;
  background: var(--surface);
  border-left: 3px solid var(--secondary);
  border-radius: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.location-item .name {
  color: var(--text-primary);
  font-weight: 700;
}

.location-item .entry {
  margin-top: 0.3rem;
}

.location-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.location-head .name {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.location-toggle-btn {
  min-width: 92px;
  justify-content: center;
}

.location-body {
  margin-top: 0.35rem;
}

.location-item.collapsed .location-body {
  display: none;
}

.location-item .missing {
  color: #f5de8a;
}

.location-item a {
  color: var(--secondary);
  text-decoration: none;
}

.location-item a:hover {
  color: var(--primary);
}

.calendar-page {
  background-color: var(--background);
  background-image:
    radial-gradient(1200px 520px at 80% -10%, rgba(78, 205, 196, 0.08), transparent 60%),
    radial-gradient(900px 420px at -10% 20%, rgba(255, 107, 107, 0.08), transparent 55%),
    linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.calendar-page .hero {
  background: rgba(14, 22, 32, 0.78);
  backdrop-filter: blur(5px);
}

.calendar-shell {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.25rem;
}

.calendar-shell-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.calendar-shell-head h2 {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.calendar-shell-head p {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.calendar-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-lang label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.calendar-lang select {
  min-height: 34px;
  padding: 0.4rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  color: var(--text-primary);
  font-size: 0.84rem;
}

.calendar-lang select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.15);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.roam-card {
  background:
    linear-gradient(160deg, rgba(18, 29, 45, 0.95) 0%, rgba(26, 39, 57, 0.95) 100%);
  border: 1px solid rgba(132, 167, 202, 0.34);
  border-radius: 0.75rem;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
  overflow: hidden;
}

.roam-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(78, 205, 196, 0.1), transparent 45%);
}

.roam-card.current-month {
  border-color: rgba(255, 217, 61, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 217, 61, 0.3), 0 12px 26px rgba(0, 0, 0, 0.35);
}

.roam-card.current-month::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 0.75rem;
  pointer-events: none;
  border: 1px solid rgba(255, 217, 61, 0.45);
}

.roam-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(132, 167, 202, 0.35);
}

.month-pill {
  min-width: 32px;
  height: 22px;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d8ebff;
  border: 1px solid rgba(132, 167, 202, 0.55);
  background: rgba(70, 108, 146, 0.35);
}

.roam-card-head h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #edf6ff;
  letter-spacing: 0.01em;
}

.current-badge {
  margin-left: auto;
  font-size: 0.64rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #211400;
  background: #ffd93d;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.26rem 0.42rem;
}

.roam-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.roam-type {
  min-width: 54px;
  text-align: center;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.18rem 0.4rem;
  border: 1px solid transparent;
}

.roam-type.kanto {
  color: #ffe2aa;
  border-color: rgba(255, 190, 109, 0.55);
  background: rgba(255, 190, 109, 0.12);
}

.roam-type.johto {
  color: #c7ebff;
  border-color: rgba(101, 197, 255, 0.55);
  background: rgba(101, 197, 255, 0.12);
}

.roam-line img {
  width: 52px;
  height: 38px;
  object-fit: contain;
}

.roam-line span {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e4effa;
}

.calendar-details,
.calendar-faq {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem;
}

.calendar-detail-body {
  margin-top: 0.75rem;
  color: var(--text-secondary);
}

.calendar-detail-body p {
  margin: 0.2rem 0;
}

.calendar-faq h2 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.calendar-faq .health-toggle {
  margin: 0 0 0.55rem;
}

.guides-page .hero {
  background: rgba(14, 22, 32, 0.78);
  backdrop-filter: blur(5px);
}

.guides-shell {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem 1.25rem;
}

.guides-head {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.guides-head h2 {
  font-size: 1.15rem;
}

.guides-head p {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.guides-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.guides-tab-btn {
  border: 1px solid rgba(78, 205, 196, 0.25);
  border-radius: 0.55rem;
  background: rgba(78, 205, 196, 0.08);
  color: var(--secondary);
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.guides-tab-btn:hover {
  color: var(--primary);
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
}

.guides-tab-btn.active {
  color: #e8f6ff;
  border-color: rgba(126, 191, 235, 0.55);
  background: rgba(74, 126, 167, 0.28);
}

.guide-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.75rem;
}

.guide-panel.active {
  display: block;
}

.guide-panel h3 {
  margin-bottom: 0.25rem;
}

.guide-panel p {
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.guide-icon-wrap {
  margin: 0.35rem 0 0.9rem;
}

.guide-icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid rgba(78, 205, 196, 0.25);
  border-radius: 0.65rem;
  background: rgba(78, 205, 196, 0.06);
  padding: 0.45rem;
}

.guide-accordion .health-toggle {
  margin: 0 0 0.6rem;
}

.guide-accordion .health-toggle:last-child {
  margin-bottom: 0;
}

.guide-accordion .health-toggle summary {
  width: 100%;
}

.guide-list {
  padding-left: 1.1rem;
}

.guide-list li {
  margin-bottom: 0.35rem;
}

.guide-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.4rem 0 0.8rem;
  background: rgba(78, 205, 196, 0.04);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  overflow: hidden;
}

.guide-panel th,
.guide-panel td {
  padding: 0.38rem 0.56rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.2;
}

.guide-panel th {
  color: #d8edf2;
  background: rgba(78, 205, 196, 0.1);
  font-weight: 600;
}

.guide-panel tr:last-child td {
  border-bottom: none;
}

.legendary-guide-shell {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem 1.25rem;
}

.legendary-guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.legendary-guide-nav a {
  border: 1px solid rgba(78, 205, 196, 0.25);
  border-radius: 0.55rem;
  background: rgba(78, 205, 196, 0.08);
  color: var(--secondary);
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legendary-guide-nav a:hover {
  color: var(--primary);
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
}

.legendary-guide-content {
  display: block;
  padding: 1rem;
}

.legendary-guide-content section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.legendary-guide-content section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.legendary-guide-content h3 {
  margin-bottom: 0.4rem;
}

.legendary-guide-content p {
  color: var(--text-secondary);
}

.legendary-guide-toc {
  background: rgba(78, 205, 196, 0.05);
  border: 1px solid rgba(78, 205, 196, 0.22);
  border-radius: 0.55rem;
  padding: 0.8rem;
  margin-bottom: 0.6rem;
}

.legendary-guide-toc summary {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legendary-guide-content .info-box,
.legendary-guide-content .warn-box,
.legendary-guide-content .success-box {
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  padding: 0.75rem 0.85rem;
  margin: 0.7rem 0;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.legendary-guide-content .info-box {
  border-left: 3px solid var(--secondary);
  background: rgba(78, 205, 196, 0.1);
}

.legendary-guide-content .hint-box {
  border-left: 5px solid var(--accent);
  background: rgba(255, 217, 61, 0.15);
  border-radius: 0.55rem;
  border-top: 1px solid rgba(255, 217, 61, 0.4);
  border-right: 1px solid rgba(255, 217, 61, 0.4);
  border-bottom: 1px solid rgba(255, 217, 61, 0.4);
  padding: 0.9rem 1rem;
  margin: 0.9rem 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.legendary-guide-content .hint-box::before {
  content: "💡";
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.legendary-guide-content .warn-box {
  border-left: 3px solid var(--warning);
  background: rgba(255, 217, 61, 0.12);
}

.legendary-guide-content .success-box {
  border-left: 3px solid #67df9f;
  background: rgba(103, 223, 159, 0.12);
}

.legendary-guide-content .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.7rem;
  margin: 0.7rem 0;
}

.legendary-guide-content .pokemon-card {
  background: rgba(78, 205, 196, 0.05);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.62rem;
}

.legendary-guide-content .pokemon-card .name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #d8edf2;
}

.legendary-guide-content .pokemon-card .location {
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.legendary-guide-content .legendary-card-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.35rem;
  border: 1px solid rgba(78, 205, 196, 0.24);
  border-radius: 0.5rem;
  background: rgba(78, 205, 196, 0.08);
  padding: 0.22rem;
}

.legendary-guide-content .tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  margin-right: 0.25rem;
  margin-top: 0.4rem;
  border: 1px solid transparent;
}

.legendary-guide-content .tag-roaming {
  color: #b7dfff;
  border-color: rgba(103, 173, 229, 0.48);
  background: rgba(103, 173, 229, 0.12);
}

.legendary-guide-content .tag-temp {
  color: #ffd8a8;
  border-color: rgba(255, 177, 101, 0.48);
  background: rgba(255, 177, 101, 0.12);
}

.legendary-guide-content .tag-raid {
  color: #b6f7d7;
  border-color: rgba(83, 210, 149, 0.48);
  background: rgba(83, 210, 149, 0.12);
}

.legendary-guide-content .tag-event {
  color: #ffe7a8;
  border-color: rgba(255, 217, 61, 0.48);
  background: rgba(255, 217, 61, 0.12);
}

.legendary-guide-content .tag-kanto,
.legendary-guide-content .tag-johto,
.legendary-guide-content .tag-sinnoh,
.legendary-guide-content .tag-pokedex,
.legendary-guide-content .tag-koth {
  color: var(--text-primary);
  border-color: rgba(126, 191, 235, 0.42);
  background: rgba(126, 191, 235, 0.12);
}

.legendary-guide-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.75rem;
  border: 1px solid var(--border);
  background: rgba(78, 205, 196, 0.04);
  border-radius: 0.45rem;
  overflow: hidden;
}

.legendary-guide-content th,
.legendary-guide-content td {
  padding: 0.4rem 0.58rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
  text-align: left;
}

.legendary-guide-content th {
  background: rgba(78, 205, 196, 0.1);
  color: #d8edf2;
}

.legendary-guide-content tr:last-child td {
  border-bottom: none;
}

.legendary-guide-content .small-note {
  font-size: 0.84rem;
}

.legendary-guide-content code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.06rem 0.32rem;
}

.nature-block {
  margin: 0;
  padding: 0.46rem 0.56rem 0.2rem;
  border: 1px solid rgba(78, 205, 196, 0.18);
  border-radius: 0.45rem;
  background: rgba(78, 205, 196, 0.03);
}

.nature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}

.nature-grid .nature-block:nth-child(4) {
  grid-column: 1;
}

.nature-grid .nature-block:nth-child(5) {
  grid-column: 2;
}

.nature-grid .nature-block:nth-child(6) {
  grid-column: 3;
}

.nature-table-wrap {
  overflow-x: auto;
}

.nature-table {
  min-width: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.nature-block p {
  margin: 0 0 0.28rem;
  font-size: 1.08rem;
}

.nature-neutral-block {
  padding: 0.46rem 0.56rem 0.2rem;
}

.nature-neutral-table {
  min-width: 0;
}

.nature-table th,
.nature-table td {
  white-space: nowrap;
}

.nature-table th + th,
.nature-table td + td {
  border-left: 1px solid var(--border);
}

.nature-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 1120px) {
  .nature-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .nature-grid .nature-block:nth-child(4),
  .nature-grid .nature-block:nth-child(5),
  .nature-grid .nature-block:nth-child(6) {
    grid-column: auto;
  }
}

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

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

@media (max-width: 1160px) {
  .calendar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .preview-panel {
    position: static;
  }

  .hero-top {
    grid-template-columns: 1fr;
  }

  .hero-links {
    grid-template-columns: 1fr;
    min-width: 0;
    justify-items: start;
  }

  .hero-link-right {
    justify-self: start;
  }
}

@media (max-width: 920px) {
  .calendar-shell {
    margin: 0 1rem;
    padding: 0.9rem;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .calendar-shell-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .calendar-lang {
    width: 100%;
  }

  .calendar-lang select {
    width: 100%;
  }

  .calendar-details,
  .calendar-faq {
    margin: 0 1rem 1rem;
    padding: 0.9rem;
  }

  .guides-shell {
    margin: 0 1rem 1rem;
    padding: 0.9rem;
  }

  header.hero {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .layout {
    padding: 0 1rem 1rem;
    gap: 1rem;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
  }

  .favorites-group,
  .share-row,
  .toolbar-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .toolbar-actions {
    justify-content: flex-start;
    align-self: auto;
    flex-wrap: wrap;
  }

  .share-row .inline-row,
  .favorites-group .inline-row.no-wrap,
  .favorites-group .inline-row.top-gap {
    grid-template-columns: 1fr;
  }

  .slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hero-links a {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .cosmetics-page .header-menu {
    width: 100%;
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .cosmetics-page .layout {
    padding: 0 0.8rem 1rem;
    gap: 0.85rem;
  }

  .cosmetics-page .controls,
  .cosmetics-page .preview-panel {
    padding: 1rem;
  }

  .cosmetics-page .toolbar {
    gap: 0.8rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }

  .cosmetics-page .language-group,
  .cosmetics-page .gender-group,
  .cosmetics-page .search-group,
  .cosmetics-page .favorites-group,
  .cosmetics-page .share-row,
  .cosmetics-page .toolbar-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .cosmetics-page .toolbar-group label {
    font-size: 0.78rem;
  }

  .cosmetics-page .toolbar-group select,
  .cosmetics-page .toolbar-group input,
  .cosmetics-page .search,
  .cosmetics-page input,
  .cosmetics-page select {
    min-height: 44px;
    font-size: 16px;
  }

  .cosmetics-page .favorites-group .inline-row.no-wrap {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cosmetics-page .favorites-group .inline-row.top-gap {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .cosmetics-page .share-row .inline-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cosmetics-page .favorites-group .btn.mini,
  .cosmetics-page .share-row .btn.mini {
    width: 100%;
    min-height: 42px;
  }

  .cosmetics-page .toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .cosmetics-page .toolbar-actions .btn {
    width: 100%;
    min-height: 42px;
    padding: 0.6rem 0.55rem;
  }

  .cosmetics-page .tag-filter {
    margin-bottom: 1.25rem;
  }

  .cosmetics-page .slot-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .cosmetics-page .location-item {
    overflow-wrap: anywhere;
  }
}

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

  .roam-line img {
    width: 48px;
    height: 34px;
  }

  .roam-line span {
    font-size: 0.86rem;
  }

  .hero h1 {
    font-size: 1.2rem;
  }

  .toolbar-actions {
    flex-direction: column;
  }

  .toolbar-actions .btn {
    width: 100%;
  }

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

  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inline-row {
    flex-wrap: wrap;
  }

  .location-headbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .cosmetics-page .hero h1 {
    font-size: 1.1rem;
  }

  .cosmetics-page .hero p {
    font-size: 0.82rem;
  }

  .header-menu {
    justify-content: flex-start;
  }

  .cosmetics-page .layout {
    padding: 0 0.6rem 0.8rem;
  }

  .cosmetics-page .controls,
  .cosmetics-page .preview-panel {
    padding: 0.85rem;
  }

  .cosmetics-page .toolbar-actions {
    grid-template-columns: 1fr;
  }

  .cosmetics-page .favorites-group .inline-row.top-gap {
    grid-template-columns: 1fr;
  }

  .cosmetics-page .preview-grid {
    gap: 0.5rem;
    margin-bottom: 0.9rem;
  }

  .cosmetics-page .preview-card {
    padding: 0.45rem;
  }

  .cosmetics-page .preview-image-wrap {
    min-height: 104px;
  }

  .cosmetics-page .location-head {
    align-items: flex-start;
  }

  .cosmetics-page .location-toggle-btn {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
