:root {
  --paper: #f6f1e8;
  --paper-2: #fffaf1;
  --ink: #1f1b16;
  --muted: #71675d;
  --line: rgba(45, 37, 28, 0.13);
  --clay: #d97757;
  --violet: #8b5cf6;
  --pink: #f43f8b;
  --cyan: #06b6d4;
  --green: #20c997;
  --yellow: #f4c542;
  --shadow: 0 28px 80px rgba(76, 54, 33, 0.14);
  font-family: "Styrene B", "Anthropic Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 12%, rgba(244, 197, 66, 0.38), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(6, 182, 212, 0.2), transparent 22rem),
    radial-gradient(circle at 76% 86%, rgba(244, 63, 139, 0.18), transparent 24rem),
    linear-gradient(180deg, #fbf6ec 0%, #f2eadf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(40, 32, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 32, 24, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 78%);
}

button,
input {
  font: inherit;
}

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

.shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

.panel {
  min-width: 0;
}

.generator {
  padding: 6px 0;
}

.mast {
  margin-bottom: 22px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 10px;
  border: 1px solid rgba(217, 119, 87, 0.24);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  color: var(--clay);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  padding: 7px 11px;
}

h1 {
  max-width: 8.5em;
  margin: 0;
  color: #231a12;
  font-family: "Tiempos Text", "Anthropic Serif", Georgia, "Times New Roman", serif;
  font-size: 56px;
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
}

.country-groups {
  display: grid;
  gap: 16px;
  max-height: 430px;
  margin: 24px 0;
  overflow: auto;
  padding: 4px 8px 4px 0;
  scrollbar-color: rgba(31, 27, 22, 0.24) transparent;
}

.country-section {
  display: grid;
  gap: 8px;
}

.country-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.country-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.country {
  min-height: 58px;
  border: 1px solid rgba(31, 27, 22, 0.11);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.72);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.country:nth-child(5n + 1) {
  --active: var(--pink);
}

.country:nth-child(5n + 2) {
  --active: var(--violet);
}

.country:nth-child(5n + 3) {
  --active: var(--cyan);
}

.country:nth-child(5n + 4) {
  --active: var(--green);
}

.country:nth-child(5n + 5) {
  --active: var(--clay);
}

.country:hover,
.country.active {
  background: #fffdf8;
  border-color: color-mix(in srgb, var(--active) 62%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--active) 14%, transparent);
}

.country:active {
  transform: translateY(1px);
}

.country-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 820;
}

.country-code {
  color: var(--active);
  font-size: 12px;
  font-weight: 900;
}

.control-stack {
  display: grid;
  grid-template-columns: 88px 1fr 132px;
  gap: 10px;
  align-items: end;
}

.input-block {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.input-block input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(31, 27, 22, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.9);
  color: var(--ink);
  outline: none;
  padding: 0 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.input-block input::placeholder {
  color: rgba(113, 103, 93, 0.68);
}

.input-block input:focus {
  border-color: rgba(139, 92, 246, 0.56);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.region-input input {
  text-transform: uppercase;
}

.primary,
.copy {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 840;
}

.primary {
  height: 52px;
  background: linear-gradient(135deg, var(--pink), var(--violet) 52%, var(--cyan));
  color: #fff;
  box-shadow: 0 16px 34px rgba(139, 92, 246, 0.28);
}

.primary:hover {
  filter: saturate(1.08) brightness(1.02);
}

.primary:disabled {
  cursor: wait;
  opacity: 0.62;
}

.status {
  min-height: 24px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 14px;
}

.status[data-type="error"] {
  color: #c2410c;
}

.result {
  border: 1px solid rgba(31, 27, 22, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  padding: 18px;
}

.node-meta {
  display: grid;
  grid-template-columns: 120px 1fr 190px;
  gap: 10px;
  margin-bottom: 14px;
}

.node-meta > div,
.format-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.node-meta > div {
  min-width: 0;
  padding: 13px;
}

.label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.node-meta strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-list {
  display: grid;
  gap: 12px;
}

.format-card {
  min-width: 0;
  overflow: hidden;
}

.format-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 840;
}

.copy {
  min-width: 76px;
  height: 34px;
  background: #231a12;
  color: #fffaf1;
}

.copy:hover {
  background: var(--clay);
}

code,
pre {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
  color: #272019;
  font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

code {
  min-height: 82px;
  padding: 15px;
}

pre {
  min-height: 210px;
  max-height: 360px;
  overflow: auto;
  padding: 15px;
  white-space: pre-wrap;
}

.chain-card {
  border-color: rgba(139, 92, 246, 0.22);
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 22px 0;
  }

  h1 {
    max-width: none;
    font-size: 44px;
  }

  .node-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100vw - 20px, 1180px);
  }

  h1 {
    font-size: 38px;
  }

  .country-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-stack {
    grid-template-columns: 1fr;
  }
}
