:root {
  --bg: #f7f5f0;
  --surface: #fff;
  --text: #171717;
  --muted: #77736d;
  --line: #dfdcd5;
  --danger: #a33d35;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
button, input { font: inherit; }
.hidden { display: none !important; }
.entry-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(54px, env(safe-area-inset-top)) 20px 28px;
  display: flex;
  flex-direction: column;
}
header { padding: 24px 0 42px; }
header p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
h1 { margin: 0; font-size: 36px; line-height: 1.15; letter-spacing: 0; }
.entry-form { padding-top: 26px; border-top: 1px solid var(--line); }
label { display: block; margin-bottom: 11px; font-size: 14px; font-weight: 700; }
input {
  width: 100%;
  height: 56px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  color: var(--text);
  background: var(--surface);
  text-transform: uppercase;
  letter-spacing: 0;
}
input:focus { border-color: var(--text); }
.entry-error { margin: 12px 0 0; color: var(--danger); font-size: 13px; }
button {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 1px solid #171717;
  border-radius: 7px;
  color: #fff;
  background: #171717;
  font-weight: 700;
}
button:disabled { opacity: 0.55; }
button.secondary { color: var(--text); border-color: var(--line); background: var(--surface); }
.history-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.history-heading button { width: auto; min-height: 32px; margin: 0; padding: 0 10px; color: var(--muted); border-color: var(--line); background: transparent; font-weight: 400; }
.history-item { display: block; width: 100%; margin-top: 8px; padding: 13px 14px; color: var(--text); border: 1px solid var(--line); background: var(--surface); text-align: left; }
.history-item strong, .history-item span { display: block; }
.history-item span { margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.history-empty { padding: 24px 0; color: var(--muted); font-size: 13px; text-align: center; }
footer { margin-top: auto; padding-top: 40px; color: var(--muted); font-size: 12px; text-align: center; }
