:root {
  --bg: #0d0d0f;
  --bg-2: #16161a;
  --card: #1a1a20;
  --text: #f0ede8;
  --muted: #b6b6c4;
  --accent: #c8f55a;
  --gold: #ffd166;
  --border: #2a2a35;
  --danger: #ff4d6d;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(200, 245, 90, 0.11), transparent 55%),
    radial-gradient(800px 420px at -8% 35%, rgba(255, 209, 102, 0.05), transparent 50%),
    var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#app {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 16px 96px;
}

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

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--accent);
}

.badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lang button.active {
  background: var(--accent);
  color: #111;
}

.hero-claim {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 8px 0 10px;
}

.muted {
  color: var(--muted);
}

.card {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin: 12px 0;
}

.card h2,
.card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.05rem;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 6px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #121216;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #111;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border));
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 10px;
}

.tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(720px - 32px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(18, 18, 22, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 6px;
  border-radius: 12px;
  cursor: pointer;
}

.tabs button.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin: 10px 0;
  background: #141418;
}

.plan-card .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--gold);
  margin-left: 6px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  margin: 10px 0;
}

.bubble {
  align-self: flex-start;
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #22222a;
  border: 1px solid var(--border);
  font-size: 14px;
}

.bubble.mine {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 14%, #1a1a20);
}

.bubble.system {
  align-self: center;
  background: transparent;
  color: var(--muted);
  border-style: dashed;
  font-size: 13px;
  text-align: center;
}

.me-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.me-grid div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.me-grid div:last-child {
  border-bottom: 0;
}

.notice {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
