:root {
  color-scheme: dark;
  --bg: #111018;
  --panel: #1a1824;
  --ink: #f7f2ea;
  --muted: #aaa6b4;
  --line: #3b3748;
  --accent: #ffcf57;
  --accent-2: #bca7ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 5%, rgba(188,167,255,.13), transparent 28rem),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 100% 48px, auto;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
}

button, textarea { font: inherit; }
.shell { width: min(1260px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 72px 0 42px; border-bottom: 1px solid var(--line); }
.eyebrow, .step { margin: 0 0 12px; color: var(--accent); font: 700 11px/1.2 ui-monospace, monospace; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(42px, 7vw, 84px); line-height: .95; letter-spacing: -.065em; }
h1 span { color: var(--accent); font-weight: 400; }
.lead { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

.options { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.options > p { max-width: 480px; margin: 0; color: #7e798c; font-size: 12px; line-height: 1.6; text-align: right; }
.lookup-button { display: grid; gap: 4px; min-width: 290px; padding: 13px 18px; border: 1px solid var(--accent-2); border-radius: 3px; color: var(--ink); background: rgba(188,167,255,.12); text-align: left; cursor: pointer; }
.lookup-button span { font-weight: 700; }
.lookup-button small { color: var(--muted); }
.lookup-button:hover { background: rgba(188,167,255,.2); }
.lookup-button:disabled { opacity: .55; cursor: wait; }

.workspace { display: grid; grid-template-columns: 1fr 54px 1fr; padding: 40px 0 32px; }
.panel { min-width: 0; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; min-height: 58px; margin-bottom: 18px; }
h2 { margin: 0; font-size: 20px; letter-spacing: .02em; }
.text-button { padding: 6px 0; color: var(--muted); border: 0; border-bottom: 1px solid var(--muted); background: none; cursor: pointer; }
.text-button:hover { color: var(--ink); }
.divider { display: grid; place-items: center; color: var(--accent); font-size: 24px; }

textarea {
  display: block;
  width: 100%;
  height: 520px;
  padding: 22px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  color: var(--ink);
  background: var(--panel);
  font: 14px/1.7 "BIZ UDGothic", "Yu Gothic UI", monospace;
  transition: border-color .2s, box-shadow .2s;
}
textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(188,167,255,.1); }
#result { color: #f4e6b8; background: #17151f; }
.hint { margin: 13px 0 0; color: #777181; font-size: 12px; }
.status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.status::before { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); content: ""; }
.status.loading::before { animation: pulse 1s infinite alternate; background: var(--accent-2); }
@keyframes pulse { to { opacity: .25; } }

.copy-button { display: flex; justify-content: space-between; width: 100%; margin-top: 12px; padding: 15px 18px; border: 1px solid var(--accent); border-radius: 3px; color: #17130a; background: var(--accent); font-weight: 700; cursor: pointer; }
.copy-button:hover { filter: brightness(1.08); }
.copy-button:active { transform: translateY(1px); }
button:disabled, textarea:disabled { opacity: .58; cursor: wait; }
footer { padding: 24px 0 48px; border-top: 1px solid var(--line); color: #777181; font-size: 12px; line-height: 1.7; }
footer a { color: var(--accent-2); }

@media (max-width: 780px) {
  .shell { width: min(100% - 28px, 620px); }
  .hero { padding: 48px 0 32px; }
  .options { align-items: flex-start; flex-direction: column; }
  .options > p { text-align: left; }
  .workspace { grid-template-columns: 1fr; padding-top: 28px; }
  .divider { height: 54px; transform: rotate(90deg); }
  textarea { height: 390px; }
}
