@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Poppins:wght@400;600;700&display=swap');
:root {
  color-scheme: dark;
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --bg-header: #3f51b5;
  --bg-pill: #f4f6fb;
  --bg-pill-hover: #e9edf9;
  --bg-pill-active: #ffffff;
  --bg-lang-toggle: rgba(255,255,255,.14);
  --text-main: #333333;
  --text-muted: #666666;
  --text-on-brand: #ffffff;
  --text-pill: #333333;
  --text-pill-active: #3f51b5;
  --border-card: #e5e7eb;
  --shadow-card: 0 6px 24px rgba(16,24,40,.06);
  --shadow-header: 0 2px 10px rgba(0,0,0,.08);
  --font-display: 'Cinzel Decorative', 'Times New Roman', serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display-system: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body-system: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bg-footer: var(--bg-header);
  --bg-fallback-image: none;
}
.is-hidden {
  display: none !important;
}
html.font-system {
  --font-display: var(--font-display-system);
  --font-body: var(--font-body-system);
}
html[data-theme="dark"] {
  --bg-main: #111827;
  --bg-card: #1f2937;
  --bg-header: #1e293b;
  --bg-pill: #374151;
  --bg-pill-hover: #4b5563;
  --bg-pill-active: #f4f6fb;
  --bg-lang-toggle: rgba(255,255,255,.05);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-on-brand: #e5e7eb;
  --text-pill: #f9fafb;
  --text-pill-active: #111827;
  --border-card: #374151;
  --shadow-card: 0 6px 24px rgba(0,0,0,.15);
  --shadow-header: 0 2px 10px rgba(0,0,0,.2);
}
html {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}
main {
  flex-grow: 1;
  width: 100%;
  box-sizing: border-box;
}
main,
section.container {
  flex-grow: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    var(--bg-fallback-image);
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
  opacity: 0.10;
}
:root{
  --nav-h: 64px;
  --brand: #3f51b5;
}
main.container {
  padding-top: 0;
  padding-bottom: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
}
html,body{ scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
}
.update-banner{
  max-width: 1200px;
  margin: 10px auto 6px;
  padding: 0 16px;
  display: flex;
  justify-content: center;
}
.update-banner__inner{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(16,24,40,.06);
  padding: 10px 12px;
  width: auto;
  max-width: 100%;
  font-size: 15px;
  border: 1px solid var(--border-card);
}
.update-banner__text{
  font-weight: 600;
}
.update-banner time{
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}
.info-badge{
  margin-left: 8px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--brand);
  font-weight: 700;
  cursor: help;
  user-select: none;
  outline: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
@media (hover: hover) {
  .info-badge:hover{ background: var(--pill-bg-hover); }
}
.info-badge:active {
  transform: scale(0.92);
}
.info-badge:focus-visible{ outline: 2px solid var(--brand); outline-offset: 2px; }
.info-badge.is-open .info-badge__tip{
  opacity: 0.12;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
}
.info-badge__tip{
  position: absolute;
  left: 50%; top: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 240px;
  max-width: 320px;
  background: #111827;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 20;
  text-align: center;
}
.info-badge__tip::after{
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #111827;
}
@media (hover: hover) {
  .info-badge:hover .info-badge__tip,
  .info-badge:focus .info-badge__tip{
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
  }
}
@media (max-width: 600px){
  .update-banner__inner{
    font-size: clamp(12px, 3.8vw, 14px);
    padding: 8px 10px;
    gap: 8px;
  }
  .info-badge{
    width: 20px; height: 20px;
    font-size: 12px;
  }
  .info-badge .info-badge__tip{
    left: auto;
    right: 0;
    transform: translateY(0);
    max-width: min(86vw, 320px);
  }
  .info-badge.is-open .info-badge__tip{
    transform: translateY(-2px);
  }
}
.sr-only{
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
html[data-i18n-loading="1"] body { visibility: hidden; }
@keyframes settings-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
* {
  -webkit-tap-highlight-color: transparent;
}
button, a, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--brand);
}
input:focus + .slider {
  box-shadow: 0 0 1px var(--brand);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.guild-timer {
  text-align: center;
  padding: 12px 1rem;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--card-border-color);
}
.guild-timer__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  color: var(--text);
}
.guild-timer time {
  font-weight: 700;
  font-size: 18px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.timer-suffix-desktop {
  display: inline;
}
@media (max-width: 600px) {
  .guild-timer__inner {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 14px;
    line-height: 1.4;
  }
  .guild-timer time {
    font-size: 16px;
  }
  .timer-suffix-desktop {
    display: block;
    width: 100%;
  }
}
.welcome-section {
  text-align: center;
  padding: 28px 1rem 8px;
}
.welcome-section h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0;
}
.welcome-section h1 em {
  font-style: normal;
  color: var(--brand);
}
.story-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  margin: 24px auto;
  max-width: 800px;
  border: 1px solid var(--border-card);
}
.story-card h1,
.story-card h2 {
  text-align: center;
  margin-top: 0;
  font-size: 1.8rem;
  color: var(--text);
}
.story-card p {
  line-height: 1.7;
  color: var(--muted);
  text-align: justify;
}
@media (max-width: 600px) {
  .story-card {
    padding: 20px;
  }
  .story-card h2 {
    font-size: 1.3rem;
    line-height: 1.2;
  }
  .story-card p {
    text-align: left;
  }
}
.update-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 200%);
  z-index: 10000;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  background-color: var(--brand);
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  width: 90%;
  max-width: 450px;
}
.update-toast.is-visible {
  transform: translate(-50%, 0);
}
.update-toast.is-hidden {
  transform: translate(-50%, 200%);
}
.update-toast__icon {
  flex-shrink: 0;
}
.update-toast__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.toast-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  padding-right: 20px;
}
.update-toast__content {
  text-align: center;
}
.update-toast__text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.update-toast__text strong {
  color: #FBBF24;
  font-weight: 600;
}
.update-toast__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.update-toast__button {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}
@media(hover: hover) {
  .update-toast__button:hover {
    background: rgba(255,255,255,0.25);
  }
}
.update-toast__button:active {
  transform: scale(0.96);
}
.update-toast__progress {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.update-toast__close {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.7;
  font-size: 24px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  position: absolute;
  top: 8px;
  right: 8px;
}
.update-toast__icon {
  margin: 0;
}
.update-toast__text {
  margin: 0;
  text-align: center;
}
.update-toast__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.update-banner__inner {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-card);
}
.info-badge {
  background: var(--bg-pill);
  color: var(--brand);
}
@media (hover: hover) {
  .info-badge:hover { background: var(--bg-pill-hover); }
}
.info-badge__tip {
  background: #111827;
  color: #fff;
}
.info-badge__tip::after {
  border-bottom-color: #111827;
}
.guild-timer {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
}
.guild-timer__inner {
  color: var(--text-main);
}
.story-card h1, .story-card h2 {
  color: var(--text-main);
}
.story-card p {
  color: var(--text-muted);
}
.font-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  height: 36px;
  width: 44px;
  background: var(--bg-lang-toggle);
  border-radius: 999px;
  overflow: hidden;
}
.font-half {
  flex: 1 1 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  margin: 0;
  background-color: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: transform .12s ease, background-color .15s ease;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-on-brand);
}
.font-half:not(.is-active) {
  opacity: 0.6;
}
.font-half.is-active {
  background-color: rgba(255, 255, 255, 0.2);
}
.font-half .font-icon {
  display: block;
  line-height: 1;
  font-weight: 600;
}
.font-half.font-default .font-icon,
.font-half.font-system .font-icon,
.font-half[data-font="system"] .font-icon {
  font-family: var(--font-body-system);
}
.font-half.font-default .font-icon,
.font-half[data-font="decorative"] .font-icon {
  font-family: 'Cinzel Decorative', 'Times New Roman', serif;
  letter-spacing: .05em;
}
.page-alert.incognito,
.page-alert.maintenance {
  background-color: rgba(255, 165, 0, 0.15);
  color: #f0ad4e;
  padding: 0.5rem 1rem;
  text-align: center;
  font-weight: 600;
  border-radius: 4px;
  margin: 1rem auto;
  max-width: 1000px;
}
main.container > h1 {
  text-align: center;
}
.bg-video-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}
.bg-video-wrapper .bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 155%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.05;
}
.bg-video-wrapper .noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/assets/images/noise.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.03;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce), (max-width: 800px) {
  .bg-video-wrapper,
  .bg-video {
    display: none;
  }
}
body::before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    var(--bg-fallback-image);
  background-attachment: scroll;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.06;
}
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
