:root {
  color-scheme: dark;
  --bg: #0d0d0d;
  --panel: #131313;
  --panel-soft: #101010;
  --border: #2a2a2a;
  --border-soft: #1c1c1c;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --accent: #ffffff;
  --success: #9ad9aa;
  --error: #e6a5a5;
  --focus: #666;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.07), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

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

.app-shell {
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero { margin-bottom: 1.5rem; }

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: .4rem;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: .95;
  letter-spacing: -.05em;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intro {
  max-width: 45rem;
  margin-bottom: 0;
  color: var(--muted);
}

.panel {
  margin-top: 1rem;
  padding: 1.2rem;
  background: rgba(19, 19, 19, .92);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0,0,0,.22);
}

.panel.subtle { background: rgba(16, 16, 16, .65); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.badge {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .75rem;
}

.field {
  display: grid;
  gap: .4rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .88rem;
}

.field > span:first-child { color: #cfcfcf; }

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: #0f0f0f;
  color: var(--text);
  padding: .8rem .9rem;
  outline: none;
}

textarea { resize: vertical; min-height: 7rem; }

textarea:focus,
input:focus,
select:focus { border-color: var(--focus); }

.grid.two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .grid.two { grid-template-columns: 1fr 1fr; align-items: end; }
}

.checkbox-field {
  min-height: 3.25rem;
  padding: .8rem .9rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .65rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: #0f0f0f;
}

.checkbox-field input { width: auto; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1rem;
}

.button {
  border: 0;
  border-radius: .75rem;
  padding: .78rem 1rem;
  cursor: pointer;
  transition: transform .08s ease, background .12s ease, color .12s ease;
}

.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); color: #000; font-weight: 650; }
.button.ghost { background: #232323; color: #d0d0d0; }
.button.ghost:hover { background: #2d2d2d; }

.result {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: #0f0f0f;
  padding: 1rem;
}

.emoji-output {
  min-height: 4.5rem;
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 9vw, 4.5rem);
  line-height: 1;
  text-align: center;
  word-break: break-all;
  user-select: all;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  margin: 1rem 0 0;
}

.stats div {
  padding: .7rem;
  border: 1px solid var(--border-soft);
  border-radius: .75rem;
  background: var(--panel-soft);
}

.stats dt {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.stats dd {
  margin: .15rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .83rem;
}

.notes-list {
  margin: .75rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.status {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), 34rem);
  margin: 0;
  min-height: 2.75rem;
  display: grid;
  place-items: center;
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(12,12,12,.95);
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
  text-align: center;
}

.status.visible { opacity: 1; }
.status.success { color: var(--success); }
.status.error { color: var(--error); }

.hidden { display: none !important; }
