:root {
  color-scheme: light;
  --ink: #241f33;
  --muted: #726985;
  --line: #ddd4ec;
  --surface: #fffafd;
  --accent: #e84d35;
  --accent-2: #7a5ccf;
  --shadow: 0 10px 28px rgba(55, 38, 86, 0.14);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f2fb;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.language-switcher a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: rgba(255, 250, 253, 0.92);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  color: transparent;
  font-size: 0;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(55, 38, 86, 0.08);
}

.language-switcher a[data-lang="ja"] {
  background-image: url("/flag-ja.svg");
}

.language-switcher a[data-lang="en"] {
  background-image: url("/flag-en.svg");
}

.language-switcher a:hover,
.language-switcher a.is-active {
  border-color: rgba(122, 92, 207, 0.52);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(122, 92, 207, 0.14);
}

.language-switcher a[hidden] {
  display: none;
}

.event-link {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--accent-2);
  border-radius: 6px;
  color: var(--accent-2);
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.event-link:hover {
  background: #f5f0ff;
  box-shadow: 0 2px 8px rgba(122, 92, 207, 0.18);
}

.event-link.primary {
  color: #fff;
  background: var(--accent-2);
}

.event-link.primary:hover {
  background: #6a4fc4;
  box-shadow: 0 4px 12px rgba(122, 92, 207, 0.3);
}

.admin-message {
  align-self: center;
  margin: 0;
  color: #5f536e;
  font-size: 13px;
  line-height: 1.5;
}

.admin-message:not(:empty) {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(122, 92, 207, 0.08);
  border: 1px solid rgba(122, 92, 207, 0.18);
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 32px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legal-links a {
  color: inherit;
}

@media (max-width: 720px) {
  .language-switcher a {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }

  .event-link {
    min-height: 30px;
  }
}
