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

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c6670;
  --accent: rgb(115, 184, 196);
  --accent-hover: rgb(95, 164, 176);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --footer-bg: #e8ecf0;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}

.logo-wrap {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.logo {
  max-width: min(200px, 60vw);
  height: auto;
  display: inline-block;
}

.content {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
}

.content h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.content p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.content p:last-child {
  margin-bottom: 0;
}

.hint {
  margin-top: 1.25rem !important;
  font-size: 0.95em;
}

.footer {
  padding: clamp(1rem, 3vw, 1.25rem) clamp(1rem, 4vw, 2rem);
  background: var(--footer-bg);
  text-align: center;
  font-size: clamp(0.8125rem, 2vw, 0.875rem);
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}

.footer-link {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--accent-hover);
}

.content a,
.modal-body a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.content a:hover,
.modal-body a:hover {
  color: var(--accent-hover);
}

.modal {
  border: none;
  padding: 0;
  max-width: min(32rem, calc(100vw - 2rem));
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  background: var(--surface);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.modal-inner {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 40rem);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--footer-bg);
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: clamp(1.125rem, 3vw, 1.35rem);
  font-weight: 600;
}

.modal-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: var(--footer-bg);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: #dde2e8;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  text-align: left;
  font-size: clamp(0.875rem, 2.2vw, 1rem);
  color: var(--text-muted);
}

.modal-body p {
  margin: 0 0 1rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body strong {
  color: var(--text);
}

@media (min-width: 768px) {
  .content {
    padding: 2.5rem 3rem;
  }
}
