:root {
  --bg: #000000;
  --surface: #101116;
  --surface-2: #191b22;
  --surface-3: #242731;
  --text: #ffffff;
  --muted: #b8bdc7;
  --dim: #7c8491;
  --accent: #00d4ff;
  --accent-2: #24f28c;
  --selected: #1f355b;
  --danger: #ff5470;
  --focus: rgba(0, 212, 255, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

#app {
  position: relative;
  width: 600px;
  height: 600px;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.hidden {
  display: none;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.status {
  min-width: 96px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.status.ok {
  color: var(--accent-2);
}

.status.error {
  color: var(--danger);
}

.content {
  flex: 1;
  min-height: 0;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
}

.panel.compact {
  padding-bottom: 10px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-title span {
  font-size: 20px;
  font-weight: 800;
}

.section-title small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.choice,
.note-choice {
  min-height: 66px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0.86;
  transition:
    transform 475ms cubic-bezier(0.6, 0, 0.4, 1),
    opacity 300ms cubic-bezier(0.4, 0.04, 0.5, 1),
    background 300ms cubic-bezier(0.4, 0.04, 0.5, 1);
}

.note-choice {
  min-height: 48px;
  padding: 5px;
  font-size: 13px;
  font-weight: 800;
}

.note-choice.input-action {
  color: #061015;
  background: var(--accent);
}

.emoji {
  font-size: 26px;
  line-height: 1;
}

.number {
  font-size: 18px;
  font-weight: 900;
}

.choice.selected,
.note-choice.selected {
  background: var(--selected);
  opacity: 1;
}

.focusable {
  cursor: pointer;
}

.focusable:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--focus);
  opacity: 1;
  transform: scale(0.93);
}

.latest {
  margin: 0;
  padding: 0 14px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-status {
  min-height: 18px;
  margin: 7px 2px 0;
  color: var(--dim);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-status.active {
  color: var(--accent-2);
}

.voice-status.error {
  color: var(--danger);
}

.nav-bar {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  min-height: 84px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
}

.nav-bar.triple {
  grid-template-columns: 0.9fr 1fr 1fr;
}

.nav-item {
  min-height: 66px;
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.nav-item.primary {
  background: var(--accent);
  color: #061015;
}

.nav-item.secondary {
  background: var(--surface-3);
}

.saved-card {
  flex: 1;
  margin: 80px 30px;
  padding: 34px;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.saved-icon {
  width: 74px;
  height: 74px;
  margin: 0;
  border-radius: 50%;
  background: var(--accent-2);
  color: #04130a;
  display: grid;
  place-items: center;
  font-size: 48px;
  font-weight: 900;
}

#saved-summary {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  max-width: 536px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  border: 2px solid var(--accent);
  font-size: 16px;
  font-weight: 800;
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.text-content {
  flex: 1;
  min-height: 0;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.text-note-display {
  width: 100%;
  min-height: 92px;
  max-height: 92px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
}

.text-note-display.empty {
  color: var(--dim);
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.char-key {
  min-height: 50px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-key.wide-label {
  font-size: 12px;
}

.char-key.primary {
  background: var(--accent);
  color: #061015;
}
