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

:root {
  --bg: #f9f8f6;
  --surface: #ffffff;
  --surface-dark: #4b4b4b;
  --surface-dark-top: #5a5a5a;
  --border: #e4e1da;
  --text-primary: #1a1814;
  --text-secondary: #6b6760;
  --accent: #8b6f47;
  --accent-light: #f0e9de;
  --tag-tank-text: #1a4a7a;
  --tag-healer-text: #145a30;
  --tag-dps-text: #7a1a1a;
  --macro-green: #8ce44e;
  --macro-green-dark: #4a8a1a;
  --macro-red: #df5454;
  --macro-white: #f3f3f3;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

header h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

nav a {
  font-size: 0.82rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

nav a:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

main {
  margin: 2.5rem auto;
  padding: 0 1.5rem 4rem;
}

footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.header-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.header-subtitle:hover {
  text-decoration: underline;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.back-to-top {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.back-to-top:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  header {
    padding: 2rem 1.25rem 1.5rem;
  }

  main {
    padding: 0 1rem 3rem;
  }
}
