:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; padding: 20px; gap: 16px; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* Header */
.hdr {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-tertiary);
}
.hdr-title {
  font-size: 22px; font-weight: 700; letter-spacing: 2px;
  color: var(--accent);
}
.hdr-num {
  font-size: 18px; font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Preview box */
.preview-box {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.preview-line {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}
.preview-total {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

/* Field list */
.field-list {
  display: flex; flex-direction: column; gap: 10px;
}
.field-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  min-height: 56px;
  font-family: inherit;
}
.field-label {
  font-size: 15px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.field-value {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 600;
  max-width: 60%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action row */
.action-row {
  display: flex; gap: 10px;
  margin-top: auto;
}
.btn {
  flex: 1;
  min-height: 88px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: var(--radius-md);
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:focus {
  background: var(--accent-secondary);
}
.btn-ghost {
  background: var(--bg-primary);
  color: var(--text-primary);
  flex: 0 0 140px;
}

/* Picker */
.picker-list {
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
  flex: 1;
}
.pick-item {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  font-size: 20px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  min-height: 60px;
}
.pick-item.current::after {
  content: '●';
  float: right;
  color: var(--accent);
}

/* Stepper */
.step-display {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid var(--bg-tertiary);
}
.step-value {
  font-size: 72px;
  font-weight: 700;
  color: var(--accent-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.step-unit {
  font-size: 18px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.step-btn {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 70px;
  font-size: 22px;
  font-weight: 700;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

/* Copied confirm */
.copied-card {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  flex: 1;
}
.copied-icon {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--accent-secondary);
  color: var(--bg-primary);
  font-size: 56px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.copied-msg {
  font-size: 20px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}
.copied-line {
  font-size: 16px;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.4;
  padding: 14px;
  background: var(--bg-primary);
  border-radius: 8px;
  width: 100%;
  word-break: break-word;
}
