:root {
  --ink: #15120d;
  --muted: #6a6257;
  --paper: #fff8ed;
  --card: rgba(255, 252, 245, .9);
  --line: rgba(44, 34, 21, .16);
  --gold: #d99c21;
  --green: #138f53;
  --red: #c0392b;
  --gray: #5f6570;
  --shadow: 0 26px 70px rgba(58, 40, 12, .22);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  background:
    radial-gradient(circle at 14% 18%, rgba(217, 156, 33, .35), transparent 28rem),
    radial-gradient(circle at 88% 4%, rgba(19, 143, 83, .18), transparent 24rem),
    linear-gradient(135deg, #f7dfad 0%, #fff8ed 48%, #f1c565 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(21, 18, 13, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(21, 18, 13, .045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.eyebrow {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, .38);
  color: #6c4b00;
  font: 700 12px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, p { margin: 0; }
h1 {
  max-width: 760px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: .92;
  letter-spacing: -.07em;
}

.hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.panel, .resultPanel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 24px;
  display: grid;
  gap: 14px;
}

label {
  font-weight: 800;
  font-size: 18px;
}

textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  color: var(--ink);
  background: #fffdf7;
  font: 16px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  outline: none;
}

textarea:focus { border-color: rgba(217, 156, 33, .75); box-shadow: 0 0 0 4px rgba(217, 156, 33, .17); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  color: #fff8ed;
  background: var(--ink);
  font: 800 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
button:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(21, 18, 13, .22); }
button:disabled { cursor: wait; opacity: .6; transform: none; }
button.ghost { color: var(--ink); background: #f3dfb4; }

.hint { color: var(--muted); font-size: 14px; line-height: 1.6; }
.resultPanel { margin-top: 22px; padding: 22px; }
.resultHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.resultHead h2 { font-size: 24px; letter-spacing: -.03em; }
#summary { color: var(--muted); font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.results { display: grid; gap: 12px; }
.results.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 20px; padding: 22px; text-align: center; }

.card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, .55);
  animation: rise .28s ease both;
}

.topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user { font: 800 18px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.badge { border-radius: 999px; padding: 7px 11px; color: white; font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.badge.active { background: var(--green); }
.badge.sealed { background: var(--red); }
.badge.unknown { background: var(--gray); }
.message { color: var(--muted); line-height: 1.55; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; color: #776d60; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: #7d5600; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 1040px); padding: 28px 0; }
  .panel, .resultPanel { border-radius: 22px; padding: 16px; }
  h1 { font-size: clamp(40px, 15vw, 62px); }
  .topline, .resultHead { align-items: flex-start; flex-direction: column; }
}
