html, body { height: 100%; }

/* .screen's own `display: flex` has equal specificity to [hidden]'s default
   `display: none` and would win by source order alone, showing every screen
   stacked at once -- this rule is what actually makes toggling the `hidden`
   property (see showScreen in editor.js) work. */
.screen[hidden] { display: none; }
.screen { height: 100vh; display: flex; }

.centered {
  margin: auto;
  text-align: center;
  max-width: 360px;
  padding: 24px;
}

.centered .brand-mark { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.centered h1 { margin: 0 0 8px; }
.muted { color: var(--text-muted); margin-bottom: 24px; }

.button-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

#editor-screen { flex-direction: column; }

.editor-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.icon-button {
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 6px;
}
.icon-button:hover { background: var(--surface); }

.filename-input {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 6px 8px;
  border-radius: 6px;
}
.filename-input:focus { outline: 2px solid var(--accent); background: var(--surface); }

.save-status {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.save-status.error { color: var(--error); }

.content-area {
  flex: 1;
  border: none;
  resize: none;
  padding: 20px 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
.content-area:focus { outline: none; }
