:root {
  --bg: #F6F6F3;
  --ink: #16181D;
  --muted: #5C606A;
  --line: #E8E8E3;
  --accent: #0F766E;
  --link: #0F5E57;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: #0A3F3A; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Search bar */
.search {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1.5px solid #E3E3DE;
  border-radius: 999px;
  padding: 0 24px;
  box-shadow: 0 6px 24px rgba(22, 24, 29, 0.06);
}
.search:focus-within { border-color: var(--accent); }
.search svg { flex: none; }
.search input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font: inherit; font-size: 18px; color: var(--ink);
  padding: 16px 0;
}
.search input::placeholder { color: #8A8D94; }

/* Home */
.home {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 48px 24px;
}
.home h1 { margin: 0; font-weight: 600; font-size: 40px; letter-spacing: -0.02em; }
.home form, .home .live { width: 100%; max-width: 560px; }
.home .live { min-height: 96px; display: flex; flex-direction: column; gap: 8px; }

/* Inner pages */
.top {
  max-width: 720px; margin: 0 auto; padding: 32px 24px 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
}
.top .brand {
  font-weight: 600; font-size: 20px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.top form { flex: 1 1 320px; }
.top .search { padding: 0 20px; box-shadow: 0 4px 16px rgba(22, 24, 29, 0.05); }
.top .search input { font-size: 17px; padding: 14px 0; }

.page { max-width: 720px; margin: 0 auto; padding: 40px 24px 64px; }

/* Result cards */
.card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 28px; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #C9C9C2; color: var(--ink); transform: translateY(-1px); }
.card .r { font-family: var(--mono); font-weight: 700; font-size: 32px; color: var(--accent); min-width: 88px; }
.card .text { flex: 1 1 240px; min-width: 0; }
.card .meaning { margin: 0; font-size: 20px; font-weight: 600; }
.card .why { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.card .arrow { font-size: 20px; color: #9A9DA4; }

.card.small { padding: 20px 24px; gap: 16px; align-items: baseline; border-color: transparent; }
.card.small .r { font-size: 24px; min-width: 0; }
.card.small .meaning { font-size: 18px; font-weight: 400; color: #2F333B; }

.empty {
  background: #fff; border: 1px dashed #D3D3CC; border-radius: 16px;
  padding: 32px 28px; text-align: center;
}
.empty p { margin: 0; }
.empty .t { font-size: 17px; font-weight: 600; }
.empty .s { margin-top: 6px; font-size: 15px; color: var(--muted); }
.home .miss { margin: 0; text-align: center; font-size: 15px; color: var(--muted); }

/* Root page */
.back {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.entry { margin-top: 24px; display: flex; flex-direction: column; gap: 32px; }
.entry h1 {
  margin: 0; font-family: var(--mono); font-weight: 700;
  font-size: 96px; line-height: 1; letter-spacing: 0.02em; color: var(--accent);
}
.entry .meaning { margin: 8px 0 0; font-size: 32px; font-weight: 600; letter-spacing: -0.015em; }
.details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 28px; }
.details dl { margin: 0; }
.details .row { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 18px 0; }
.details .row + .row { border-top: 1px solid #EFEFEA; }
.details dt { flex: 0 0 160px; font-size: 14px; color: var(--muted); }
.details dd { margin: 0; flex: 1 1 240px; font-size: 16px; }

@media (max-width: 480px) {
  .entry h1 { font-size: 72px; }
  .home h1 { font-size: 32px; }
}
