/* First paint — stable header + body offset on every page navigation */
:root {
  --nav-h: 140px;
  --brand-logo-size: 120px;
  --brand-name-size: 1.85rem;
  --brand-name-line: 1.2;
  --brand-name-min-h: 2.22rem;
  --page-bg: #fff8f5;
}

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

html {
  background: linear-gradient(165deg, #fff8f5 0%, #ffffff 50%, #fff5f0 100%);
  background-attachment: fixed;
  min-height: 100%;
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  background: transparent;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #0a0a0a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.top-bar,
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 200;
  background: #fc5603;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px;
  margin: 0;
  gap: 12px;
}

.top-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.top-brand-logo,
.brand-logo {
  width: var(--brand-logo-size);
  height: var(--brand-logo-size);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.top-brand-logo img,
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  max-width: none;
}

.top-brand-text,
.brand-text-wrap {
  line-height: var(--brand-name-line);
  min-width: 0;
  align-self: center;
  min-height: var(--brand-name-min-h);
  display: flex;
  align-items: center;
}

.top-brand-name,
.brand-name {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: var(--brand-name-size);
  font-weight: 700;
  line-height: var(--brand-name-line);
  min-height: calc(var(--brand-name-size) * var(--brand-name-line));
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.top-brand-name .mana,
.brand-name .mana {
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 500;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #d84315;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  overflow: visible;
}

@media (max-width: 900px) {
  :root {
    --nav-h: 120px;
    --brand-logo-size: 80px;
    --brand-name-size: 1.12rem;
    --brand-name-min-h: 1.35rem;
  }

  .top-brand,
  .brand {
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .top-brand,
  .brand {
    max-width: calc(100% - 168px);
  }
}
