:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background: #f7f4ee;
  font-synthesis: none;
  --ink: #1d3557;
  --paper: #ffffff;
  --warm: #f7f4ee;
  --gold: #d7a84e;
  --muted: #667085;
  --line: #e6e0d5;
  --danger: #a61b1b;
  --ok: #216e4e;
  --shadow: 0 10px 30px rgba(29,53,87,.10);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--warm); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.app-shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px,4vw,40px); background: rgba(247,244,238,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display:flex; gap:12px; align-items:center; }
.brand-mark { width:40px; height:40px; border-radius:12px; background:var(--ink); color:white; display:grid; place-items:center; font-weight:800; }
.brand strong { color: var(--ink); display:block; }
.brand small { color: var(--muted); }
.status-pill { display:inline-flex; align-items:center; gap:7px; border-radius:999px; padding:8px 11px; font-size:.84rem; background:white; border:1px solid var(--line); }
.status-dot { width:9px; height:9px; border-radius:50%; background:var(--ok); }
.status-pill.offline .status-dot { background:#b4690e; }
.container { width:min(1120px, 100%); margin:0 auto; padding: clamp(18px,4vw,40px); }
.hero { padding:26px 0 18px; }
.hero h1 { color:var(--ink); margin:0 0 8px; font-size:clamp(2rem,7vw,3.8rem); line-height:1; letter-spacing:-.04em; }
.hero p { max-width:720px; color:var(--muted); font-size:1.06rem; line-height:1.6; }
.grid { display:grid; grid-template-columns:repeat(12,1fr); gap:16px; }
.card { grid-column:span 12; background:var(--paper); border:1px solid var(--line); border-radius:22px; padding:20px; box-shadow:var(--shadow); }
.card h2, .card h3 { margin-top:0; color:var(--ink); }
.action-grid { display:grid; grid-template-columns:1fr; gap:12px; }
.action {
  width:100%; text-align:left; border:1px solid var(--line); background:#fff; border-radius:18px; padding:18px;
  display:flex; align-items:center; gap:14px; min-height:78px; color:var(--ink); font-weight:700;
}
.action:hover { transform:translateY(-1px); box-shadow:0 7px 18px rgba(29,53,87,.08); }
.action .emoji { font-size:1.7rem; width:42px; height:42px; border-radius:13px; background:#f3efe6; display:grid; place-items:center; }
.btn { border:0; border-radius:14px; padding:13px 18px; font-weight:750; background:var(--ink); color:white; }
.btn.secondary { background:white; color:var(--ink); border:1px solid var(--line); }
.btn.danger { background:var(--danger); }
.btn.gold { background:var(--gold); color:#1b263b; }
.toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
label { display:block; font-weight:700; color:var(--ink); margin-bottom:8px; }
input, textarea, select { width:100%; border:1px solid #cbc4b8; border-radius:14px; background:white; padding:13px 14px; color:#1f2933; }
textarea { min-height:220px; resize:vertical; line-height:1.6; }
.field { margin-bottom:16px; }
.helper { color:var(--muted); font-size:.9rem; line-height:1.45; }
.save-state { font-size:.92rem; color:var(--ok); font-weight:700; }
.save-state.warn { color:#9a6700; }
.recorder { border:1px solid var(--line); border-radius:18px; padding:18px; background:#fcfbf8; }
.meter { height:14px; border-radius:99px; overflow:hidden; background:#e9e5dc; margin:14px 0; }
.meter > div { height:100%; width:0%; background:linear-gradient(90deg,#4d9078,#e9c46a,#d1495b); transition:width .06s linear; }
.timer { font-size:2rem; font-variant-numeric:tabular-nums; font-weight:800; color:var(--ink); }
.recording-dot { display:inline-block; width:11px; height:11px; border-radius:50%; background:#bd1e1e; margin-right:8px; animation:pulse 1.1s infinite; }
@keyframes pulse { 50% { opacity:.35; } }
.list { display:grid; gap:10px; }
.item { padding:14px 16px; border:1px solid var(--line); border-radius:15px; background:white; }
.item strong { color:var(--ink); }
.item small { color:var(--muted); display:block; margin-top:5px; }
.login-wrap { min-height:100vh; display:grid; place-items:center; padding:20px; }
.login-card { width:min(460px,100%); background:white; padding:28px; border-radius:26px; border:1px solid var(--line); box-shadow:var(--shadow); }
.login-card h1 { color:var(--ink); margin-top:0; }
.alert { border-radius:14px; padding:12px 14px; margin:12px 0; background:#fff5e6; color:#7a4a00; border:1px solid #edd4a6; }
.ok-box { background:#edf8f3; border-color:#b7ddcc; color:#216e4e; }
.admin-table { width:100%; border-collapse:collapse; font-size:.92rem; }
.admin-table th,.admin-table td { text-align:left; padding:10px; border-bottom:1px solid var(--line); vertical-align:top; }
.admin-table th { color:var(--ink); }
.muted { color:var(--muted); }
.hidden { display:none !important; }
.toast { position:fixed; right:18px; bottom:18px; max-width:360px; background:#172235; color:white; border-radius:14px; padding:12px 15px; box-shadow:var(--shadow); opacity:0; transform:translateY(12px); pointer-events:none; transition:.2s; z-index:99; }
.toast.show { opacity:1; transform:translateY(0); }
@media(min-width:720px){
  .card.half { grid-column:span 6; }
  .action-grid { grid-template-columns:repeat(2,1fr); }
}
@media(min-width:1024px){
  .action-grid { grid-template-columns:repeat(3,1fr); }
  .card.third { grid-column:span 4; }
  .card.two-thirds { grid-column:span 8; }
}
@media(prefers-reduced-motion:reduce){ * { animation:none !important; transition:none !important; } }
