:root {
  color-scheme: dark;
  --color-background: #0c0e11;
  --color-surface: #12151a;
  --color-surface-raised: #181c23;
  --color-border: #22272f;
  --color-border-strong: #38404f;
  --color-text: #dde3ec;
  --color-text-muted: #7a8a9e;
  --color-text-subtle: #566070;
  --color-restricted: #e5a13f;
  --color-restricted-glow: rgba(229, 161, 63, 0.18);
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius: 10px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.5), 0 18px 56px rgba(0, 0, 0, 0.42);
}

[data-theme='light'] {
  color-scheme: light;
  --color-background: #eef1f6;
  --color-surface: #f8fafc;
  --color-surface-raised: #edf0f5;
  --color-border: #d6dce8;
  --color-border-strong: #b0bace;
  --color-text: #0e1219;
  --color-text-muted: #46546a;
  --color-text-subtle: #7e8fa6;
  --color-restricted: #b87313;
  --color-restricted-glow: rgba(184, 115, 19, 0.14);
  --shadow-card: 0 1px 3px rgba(14, 20, 40, 0.07), 0 18px 48px rgba(14, 20, 40, 0.09);
}

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

html {
  min-width: 320px;
  background: var(--color-background);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 56px 28px 40px;
  overflow-x: hidden;
  color: var(--color-text);
  background: var(--color-background);
  font-family: var(--font-sans);
  transition: color 0.3s ease, background-color 0.3s ease;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: '';
  background:
    radial-gradient(ellipse 60% 50% at 8% 8%, rgba(80, 110, 220, 0.055), transparent 100%),
    radial-gradient(ellipse 50% 40% at 92% 92%, rgba(50, 180, 150, 0.04), transparent 100%);
}

[data-theme='light'] body::before {
  background:
    radial-gradient(ellipse 70% 55% at 5% 0%, rgba(80, 110, 200, 0.07), transparent 100%),
    radial-gradient(ellipse 60% 50% at 95% 100%, rgba(50, 170, 140, 0.05), transparent 100%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-text-muted);
  outline-offset: 3px;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 1000px);
  min-height: calc(100vh - 96px);
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
  animation: fade-up 0.4s ease both;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 1.1875rem;
  white-space: nowrap;
}

.wordmark__status {
  width: 9px;
  height: 9px;
  margin-right: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--color-restricted);
  box-shadow: 0 0 0 4px var(--color-restricted-glow);
}

.wordmark__name {
  overflow: hidden;
  color: var(--color-text);
  font-weight: 500;
  text-overflow: ellipsis;
}

.wordmark__context {
  color: var(--color-text-muted);
  font-weight: 400;
}

.header-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.header-action:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  background: var(--color-surface-raised);
  transform: translateY(-1px);
}

.icon {
  display: block;
  width: 15px;
  height: 15px;
  flex: none;
}

.notice-layout {
  display: grid;
  place-items: center;
  padding: 72px 0;
}

.notice-card {
  position: relative;
  width: min(100%, 620px);
  padding: 48px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  animation: fade-up 0.45s 0.08s ease both;
}

.notice-card__accent {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--color-restricted);
}

.notice-card__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-restricted);
  background: var(--color-surface-raised);
}

.notice-card__icon svg {
  width: 22px;
  height: 22px;
}

.notice-card__label {
  margin: 0 0 12px;
  color: var(--color-text-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 520px;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.notice-card__message {
  max-width: 500px;
  margin: 18px 0 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.notice-card__status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.025em;
}

.notice-card__status svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.notice-fallback {
  color: inherit;
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.notice-fallback:hover {
  color: var(--color-text-muted);
  text-decoration-color: currentColor;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--color-text-subtle);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  animation: fade-up 0.4s 0.16s ease both;
}

.site-footer__status {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.site-footer__status svg {
  width: 10px;
  height: 10px;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 660px) {
  body {
    padding: 28px 16px 32px;
  }

  .page-shell {
    min-height: calc(100vh - 60px);
  }

  .notice-layout {
    padding: 48px 0;
  }

  .notice-card {
    padding: 34px 28px;
  }
}

@media (max-width: 410px) {
  .wordmark__context {
    display: none;
  }

  .site-header {
    column-gap: 12px;
  }

  .site-footer {
    gap: 8px 20px;
    flex-wrap: wrap;
  }
}

@media (max-width: 380px) {
  .notice-card {
    padding: 30px 22px;
  }
}
