:root {
  --ink: #1b1f23;
  --muted: #5c6670;
  --line: #d9dee3;
  --accent: #1f6f8b;
  --accent-dark: #16556b;
  --danger: #b23a3a;
  --ok: #2c7a4b;
  --bg: #fafbfc;
  --card: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 8px 0 4px; }
h2 { font-size: 1.15rem; margin: 20px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.hidden { display: none !important; }
.screen { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin-top: 12px; }
input[type="text"] { width: 100%; font-size: 1.2rem; letter-spacing: 0.08em; padding: 12px;
  border: 1px solid var(--line); border-radius: 8px; margin: 6px 0 12px; text-transform: uppercase; }
button { font: inherit; font-size: 1.05rem; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); margin: 6px 6px 6px 0; min-width: 44%; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:active { background: var(--accent-dark); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.link { background: none; border: none; color: var(--accent); padding: 4px 0; min-width: 0; }
button:disabled { opacity: 0.5; }
.buttons { display: flex; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 24px; height: 24px; margin-top: 4px; flex: none; }
.howto { padding-left: 20px; }
.howto li { margin: 4px 0; }
.texts { padding-left: 0; list-style: none; }
.texts li { border-top: 1px solid var(--line); padding: 10px 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.texts li:first-child { border-top: none; }
.texts .label { font-weight: 600; }
.texts .snippet { color: var(--muted); font-size: 0.95rem; }
.texts .state { white-space: nowrap; color: var(--muted); }
.texts .state.ok { color: var(--ok); font-weight: 600; }
.texts button { min-width: 0; padding: 8px 12px; margin: 0; }
.readtext { font-size: 1.25rem; line-height: 1.6; padding: 12px; background: #f3f6f8; border-radius: 8px; }
.meter { height: 12px; background: #e9edf0; border-radius: 6px; overflow: hidden; margin: 8px 0; }
#meter-bar { height: 100%; width: 0; background: var(--ok); transition: width 0.1s linear; }
#meter-bar.hot { background: var(--danger); }
.status { min-height: 1.5em; font-weight: 600; }
.msg { min-height: 1.5em; color: var(--danger); font-weight: 600; }
.msg.ok { color: var(--ok); }
.done { color: var(--ok); font-weight: 600; font-size: 1.1rem; }
audio { width: 100%; margin-top: 8px; }
footer { padding: 8px 4px 24px; }
