:root {
  --bg: #eef3f7;
  --bg-soft: #f8fafc;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --line: #d4dde6;
  --line-strong: #b6c4d2;
  --text: #1f2f3d;
  --text-soft: #5a6b7c;
  --accent: #1f5f8b;
  --accent-strong: #184b6e;
  --accent-soft: #e6f0f7;
  --highlight: #d8a85b;
  --shadow: 0 18px 42px rgba(20, 42, 63, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 95, 139, 0.08), transparent 34%),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
  font: 400 1rem/1.65 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

button,
select,
input {
  font: inherit;
}

button,
select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--text);
}

button {
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

button:hover,
button:focus-visible {
  background: #f5f8fb;
  border-color: #89a5bf;
  transform: translateY(-1px);
}

select {
  min-width: 15rem;
  max-width: 100%;
  padding: 0.72rem 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

:focus-visible {
  outline: 3px solid rgba(31, 95, 139, 0.24);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

header.container {
  padding: 1.25rem 0 1.5rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin: 0 0 1.35rem;
  border: 1px solid rgba(182, 196, 210, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(25, 49, 71, 0.08);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand img {
  flex: 0 0 auto;
}

.lang-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.lang-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
  text-decoration: none;
  background: transparent;
}

.lang-nav a.active,
.lang-nav a:hover,
.lang-nav a:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: rgba(24, 75, 110, 0.5);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(182, 196, 210, 0.8);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 252, 0.94)),
    linear-gradient(180deg, rgba(230, 240, 247, 0.3), rgba(216, 168, 91, 0.05));
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.35rem, 6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #1c3145;
}

.hero p {
  margin: 0 0 1rem;
  max-width: 66ch;
  font-size: 1.05rem;
}

.hero > div:last-child {
  justify-self: center;
}

.hero > div:last-child img {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  border: 8px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 36px rgba(26, 48, 71, 0.14);
}

.badge,
.note {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.note {
  background: #edf3f8;
  color: #476175;
}

main.container {
  padding-bottom: 2rem;
}

.card {
  margin: 0 0 1.35rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid rgba(182, 196, 210, 0.82);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  color: #204964;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

article {
  height: 100%;
  padding: 1.15rem;
  border: 1px solid rgba(212, 221, 230, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.98));
}

article h3 {
  margin: 0 0 0.75rem;
  font-size: 1.18rem;
  line-height: 1.3;
  color: #234966;
}

article p {
  margin: 0 0 0.82rem;
}

strong {
  color: #2f3f46;
}

abbr {
  text-decoration-color: rgba(14, 106, 115, 0.4);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(182, 196, 210, 0.85);
  border-radius: 999px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(25, 49, 71, 0.06);
}

.links a:hover,
.links a:focus-visible {
  background: #eef5fb;
  border-color: rgba(31, 95, 139, 0.35);
}

label[for="jsloc-sel"] {
  font-weight: 700;
  color: #3d596d;
}

#jsloc-plan {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(24, 44, 63, 0.10);
}

#lt-result {
  margin: 0 auto;
  box-shadow: 0 14px 30px rgba(24, 44, 63, 0.12);
  background: #fff;
}

#lt-msg {
  color: var(--accent-strong);
  font-weight: 600;
}

#lt-reset {
  min-width: 8rem;
  background: linear-gradient(135deg, #f7fafc 0%, #eaf1f7 100%);
}

label[id^="lt-lbl-"] {
  gap: 0.3rem;
  padding: 0.35rem 0.2rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

label[id^="lt-lbl-"]:hover {
  transform: translateY(-2px);
  border-color: rgba(182, 196, 210, 0.9);
  background: rgba(250, 252, 255, 0.95);
  box-shadow: 0 10px 16px rgba(24, 44, 63, 0.08);
}

label[id^="lt-lbl-"] img {
  border: 2px solid rgba(182, 196, 210, 0.55);
  box-shadow: 0 5px 14px rgba(24, 44, 63, 0.08);
}

label[id^="lt-lbl-"]:has(input:checked) {
  border-color: rgba(31, 95, 139, 0.35);
  background: rgba(230, 240, 247, 0.7);
}

label[id^="lt-lbl-"]:has(input:checked) img {
  border-color: rgba(31, 95, 139, 0.5);
}

footer.container {
  padding: 0.3rem 0 2.2rem;
}

footer p {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(182, 196, 210, 0.75);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-soft);
  text-align: center;
}

@media (max-width: 900px) {
  .topbar,
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    border-radius: 24px;
  }

  .topbar,
  .lang-nav {
    justify-content: flex-start;
  }

  .hero > div:last-child {
    order: -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 0.97rem;
  }

  .container {
    width: min(calc(100% - 1rem), var(--container));
  }

  .topbar {
    padding: 0.95rem;
  }

  .brand {
    width: 100%;
    flex-wrap: wrap;
  }

  .lang-nav {
    width: 100%;
  }

  .lang-nav a {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
  }

  .card,
  article {
    border-radius: 18px;
  }

  .links a {
    width: 100%;
    justify-content: center;
  }

  select,
  #jsloc-plan {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}