:root {
  --ivory: #FAF9F5;
  --card: #FFFFFF;
  --ink: #1F1E1C;
  --muted: #6E6B66;
  --line: rgba(31, 30, 28, .10);
  --blue: #6E9CC6;
  --blue-soft: #DCE8F3;
  --blue-deep: #2F5F8A;
  --gold: linear-gradient(135deg, #B8892E 0%, #F6DB7E 35%, #C99A3A 60%, #FBE9A6 85%, #C4932F 100%);
  --navy: #1F3347;
  --silver: linear-gradient(135deg, #9AA0A6 0%, #F1F3F5 40%, #B5BAC0 65%, #E6E9EC 100%);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(31, 42, 68, .05), 0 8px 24px rgba(31, 42, 68, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-deep); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px #F7EDCC; }
.brand small { color: var(--muted); font-weight: 500; }

.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; background: var(--navy); color: #fff;
  transition: transform .12s ease, opacity .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.blue { background: var(--blue-deep); }
.btn.blue:disabled { background: var(--blue-deep); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.gold { background: var(--gold); color: #3B2E0A; }

.input {
  width: 100%; font: inherit; font-size: 18px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #F0ECE2; }
.muted { color: var(--muted); }
.msg { min-height: 1.4em; font-size: 15px; }
.msg.err { color: #B42318; }
.msg.ok { color: #1E7B4F; }

/* ---------- Word cloud ---------- */
.cloud { position: relative; width: 100%; height: 100%; overflow: hidden; }
.cloud .w {
  position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1; font-weight: 700;
  letter-spacing: -.02em; cursor: default; user-select: none;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), font-size .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease;
  will-change: transform;
}
.cloud.can-hide .w { cursor: pointer; }
.cloud.can-hide .w:hover { opacity: .6; }
.cloud .w .cnt {
  font-size: max(.32em, 11px); font-weight: 600; opacity: .7; margin-left: .18em; vertical-align: .95em; letter-spacing: 0;
}
.cloud .w.new { opacity: 0; }
.cloud-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 18px; padding: 24px;
}
