:root {
  --paper: #f3ebdd;
  --ink: #241c16;
  --quiet: #6f6256;
  --line: #ddcfbb;
  --thread: #b5522a;
  --button: #243126;
  --button-text: #f6f1e8;
  --sans: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  min-height: 100dvh;
}

#app {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.kicker {
  margin: 0 0 8px;
  color: var(--quiet);
  font-size: 14px;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lead {
  margin: 14px 0 0;
  font-size: 20px;
  line-height: 1.45;
}

.note {
  margin: 22px 0 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.5;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--button);
  border-radius: 12px;
  background: var(--button);
  color: var(--button-text);
  font-size: 18px;
  text-align: center;
}

.btn:focus-visible,
.choice:focus-visible,
.row:focus-visible,
.text-btn:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.row strong {
  font-size: 22px;
  font-weight: 600;
}

.row span,
.meta {
  color: var(--quiet);
  font-size: 14px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--thread);
  font-size: 16px;
}

.ask {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.center-line {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: 18px;
}

.center-line b {
  font-size: 22px;
  font-weight: 600;
}

.field {
  margin-top: 22px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 28px;
}

.field textarea {
  min-height: 96px;
  font-family: var(--sans);
  font-size: 20px;
  resize: vertical;
}

.hint-line {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 15px;
}

.warn {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--thread);
  font-size: 15px;
}

.step {
  margin: 0;
  color: var(--quiet);
  font-size: 14px;
}

.web {
  width: min(100%, 520px);
  margin: 12px auto 0;
}

.mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
}

.hub {
  width: 120px;
  margin: 0 auto;
  padding: 12px 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
  text-align: center;
}

.hub b,
.node b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
}

.hub span,
.node span,
.node small {
  display: block;
  margin-top: 4px;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.35;
}

.node {
  max-width: 150px;
  text-align: center;
}

.node.theme {
  margin: 0 auto;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--thread);
}

.node.opposite {
  margin: 0 auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--thread);
}

.node.together {
  justify-self: end;
  padding: 8px 14px 8px 0;
  border-right: 1px solid var(--thread);
  text-align: right;
}

.node.near {
  justify-self: start;
  padding: 8px 0 8px 14px;
  border-left: 1px solid var(--thread);
  text-align: left;
}

.node b {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.sentence {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.5;
}

.kinds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.choice {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  text-align: left;
}

.word-en {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.word-ko {
  margin: 8px 0 0;
  font-size: 22px;
}

.pair {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.45;
}

.pair small {
  display: block;
  margin-bottom: 4px;
  color: var(--quiet);
  font-size: 14px;
}

.list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.list b {
  font-family: var(--serif);
  font-weight: 600;
}

@media (max-width: 420px) {
  h1 { font-size: 36px; }
  .ask { font-size: 24px; }
  .word-en { font-size: 34px; }
  .hub { width: 104px; }
  .hub b { font-size: 22px; }
  .node b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
