:root {
  --pink: #f4c3d0;
  --rose: #e07a9a;
  --ear: #f7c2d0;
  --cream: #fff7f8;
  --paper: #ffffff;
  --mint: #e7f5ea;
  --sky: #eef5fb;
  --ink: #5a3f46;
  --muted: #97757d;
  --line: #f0d5dc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  background:
    radial-gradient(circle at 86% 8%, #ffd9e4 0 120px, transparent 121px),
    linear-gradient(#fde6ec 0 220px, #f7f1ea 220px 100%);
}

.wrap {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--rose);
  font-family: "Gowun Dodum", "Noto Sans KR", sans-serif;
  font-size: 0.95rem;
}

h1,
h2,
h3,
.search-label,
.card-kicker,
.card-label,
.btn {
  font-family: "Gowun Dodum", "Noto Sans KR", sans-serif;
  font-weight: 400;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.sub {
  margin: 10px 0 18px;
  max-width: 22em;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.bunny {
  width: min(100%, 210px);
  justify-self: end;
}

.panel,
.card,
.status,
.examples li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 10px 24px rgba(224, 122, 154, 0.12);
}

.panel {
  padding: 20px 22px 16px;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.search-row {
  display: flex;
  gap: 8px;
}

#word-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  color: var(--ink);
  font-family: "Nunito", "Noto Sans KR", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  background: var(--cream);
  border: 1.5px solid var(--pink);
  border-radius: 999px;
  outline: none;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  ime-mode: disabled;
}

#word-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(244, 195, 208, 0.45);
}

.hint {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.btn {
  cursor: pointer;
  padding: 12px 18px;
  font-size: 1rem;
  border: 0;
  border-radius: 999px;
}

.btn-main {
  color: #fff;
  background: var(--rose);
}

.btn-soft {
  color: var(--ink);
  background: #f8dde4;
}

.btn:hover {
  filter: brightness(1.04);
}

.status {
  margin-top: 14px;
  padding: 16px 18px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.status.is-loading {
  background: var(--sky);
}

.status.is-error {
  background: #ffece4;
}

.result {
  margin-top: 18px;
}

.card {
  padding: 20px 22px 18px;
}

.card-kicker,
.card-label {
  margin: 0 0 6px;
  color: var(--rose);
  font-size: 0.95rem;
}

.card-word {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#result-word {
  margin: 0;
  font-family: "Nunito", "Gowun Dodum", sans-serif;
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
}

.tag {
  padding: 4px 10px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--rose);
  border-radius: 999px;
}

.phonetic {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: "Nunito", "Noto Sans KR", sans-serif;
  font-size: 0.98rem;
}

.btn-sound {
  cursor: pointer;
  padding: 4px 10px;
  color: var(--rose);
  font-family: "Gowun Dodum", "Noto Sans KR", sans-serif;
  font-size: 0.85rem;
  background: var(--cream);
  border: 1.5px solid var(--pink);
  border-radius: 999px;
}

.card-mean {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--cream);
  border-radius: 18px;
}

#result-meaning {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.55;
}

.sense-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sense-chip {
  cursor: pointer;
  padding: 8px 14px;
  color: var(--ink);
  font-family: "Gowun Dodum", "Noto Sans KR", sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
  background: var(--paper);
  border: 1.5px solid var(--pink);
  border-radius: 999px;
}

.sense-chip.is-on {
  color: #fff;
  background: var(--rose);
  border-color: var(--rose);
}

.examples-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 22px 6px 12px;
}

.examples-head h3 {
  margin: 0;
  font-size: 1.18rem;
}

.examples {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: example;
}

.examples li {
  position: relative;
  padding: 16px 18px 16px 58px;
}

.examples li:nth-child(2) {
  background: var(--sky);
}

.examples li:nth-child(3) {
  background: var(--mint);
}

.examples li::before {
  counter-increment: example;
  content: counter(example);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 32px;
  height: 32px;
  font-family: "Nunito", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 32px;
  text-align: center;
  background: var(--pink);
  border-radius: 50%;
}

.examples li.is-empty {
  padding-left: 18px;
}

.examples li.is-empty::before {
  content: none;
  counter-increment: none;
}

.example-en {
  margin: 0 0 6px;
  font-family: "Nunito", "Noto Sans KR", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.45;
}

.example-ko {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.foot {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.foot p {
  margin: 0;
}

@media (max-width: 680px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sub {
    margin-left: auto;
    margin-right: auto;
  }

  .bunny {
    justify-self: center;
    width: 160px;
    margin-top: -12px;
  }

  .search-row,
  .examples-head {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .examples li {
    padding: 50px 16px 16px;
  }

  .examples li::before {
    top: 12px;
  }
}
