:root {
  color-scheme: dark;
  --blue: #002eff;
  --blue-deep: #001543;
  --yellow: #ffd100;
  --white: #ffffff;
  --red: #ff0000;
  --line: rgba(255, 255, 255, 0.32);
  --muted: rgba(255, 255, 255, 0.73);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--blue);
  color: var(--white);
  font-family: "Tw Cen MT", "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, sans-serif;
}

body {
  min-width: 280px;
}

button,
input,
a {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.welcome-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(18px, 3vw, 42px) clamp(18px, 5vw, 76px) clamp(18px, 3vw, 40px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    var(--blue);
}

.welcome-nav,
.welcome-footer,
.editor-head,
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.welcome-nav {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-mark {
  color: var(--yellow);
}

.welcome-nav a,
.welcome-footer button {
  color: var(--white);
  text-decoration: none;
}

.welcome-nav a:hover {
  color: var(--yellow);
}

.welcome-main {
  align-self: center;
  max-width: 1180px;
  padding-block: 4vh 3vh;
}

.welcome-kicker,
.link-label,
.editor-kicker {
  color: var(--yellow);
  font-size: clamp(11px, 1.1vw, 15px);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.welcome-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
}

.kicker-line {
  display: inline-block;
  width: 38px;
  height: 3px;
  background: var(--yellow);
}

h1 {
  max-width: 1040px;
  margin: clamp(18px, 2.5vw, 34px) 0 0;
  color: var(--white);
  font-size: clamp(50px, 8vw, 142px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.85;
}

.welcome-prompt {
  max-width: 740px;
  margin-top: clamp(18px, 2.5vw, 32px);
  color: var(--muted);
  font-size: clamp(16px, 2vw, 29px);
  line-height: 1.12;
}

.welcome-link-block {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  max-width: 980px;
  margin-top: clamp(24px, 3.5vw, 48px);
  padding-top: 17px;
  border-top: 2px solid rgba(255, 255, 255, 0.64);
}

.map-link {
  min-width: 0;
  overflow: hidden;
  color: var(--white);
  font-size: clamp(19px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.map-link:hover {
  color: var(--yellow);
}

.copy-link,
.save-button,
.reset-button {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.copy-link:hover,
.save-button:hover {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--blue-deep);
}

.welcome-footer {
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.edit-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--yellow) !important;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.editor {
  z-index: 4;
  position: fixed;
  right: clamp(12px, 3vw, 42px);
  bottom: clamp(12px, 3vw, 42px);
  width: min(460px, calc(100% - 24px));
  padding: 22px;
  border: 1px solid var(--white);
  background: var(--blue-deep);
  box-shadow: 16px 16px 0 rgba(0, 0, 0, 0.22);
}

.editor[hidden] {
  display: none;
}

.editor-head {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.editor h2 {
  margin: 7px 0 0;
  color: var(--white);
  font-size: 24px;
}

.close-editor {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 23px;
}

.editor label {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
}

.editor-actions {
  justify-content: flex-start;
  margin-top: 20px;
}

.reset-button {
  border-color: var(--line);
  color: var(--muted);
}

.reset-button:hover {
  border-color: var(--red);
  color: var(--white);
}

.editor-help {
  margin-top: 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.welcome-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  padding: 11px 14px;
  background: var(--yellow);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.welcome-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .welcome-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .welcome-main {
    padding-block: 12vh 8vh;
  }

  .welcome-link-block {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .link-label {
    grid-column: 1 / -1;
  }

  .map-link {
    font-size: 18px;
  }

  .copy-link {
    min-height: 42px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .welcome-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
}

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