* { box-sizing: border-box; }
html, body { margin: 0; background: #f6f1ee; color: #222; font: 17px/1.5 -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Arial, sans-serif; }
.hide { display: none !important; }
header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #7a1f3d; color: #fff; font-size: 20px; font-weight: 700; }
.pill { font-size: 14px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: #fff3; }
.pill.ok { background: #2e9d5a; } .pill.bad { background: #d9534f; }
main { padding: 12px 12px 100px; max-width: 720px; margin: 0 auto; }
nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid #ddd; padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
nav button { flex: 1; border: 0; background: none; padding: 8px 2px; font-size: 15px; color: #777; line-height: 1.3; }
nav button.on { color: #7a1f3d; font-weight: 700; }
.card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px #0001; }
h2 { font-size: 19px; margin: 0 0 8px; color: #7a1f3d; }
h3 { font-size: 17px; margin: 12px 0 6px; }
.muted { color: #777; font-size: 15px; }
.err { color: #c0392b; font-size: 15px; white-space: pre-wrap; }
button.big, .btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 14px; font-size: 18px; font-weight: 700; background: #7a1f3d; color: #fff; margin-top: 10px; text-align: center; text-decoration: none; }
.btn2 { background: #fff; color: #7a1f3d; border: 2px solid #7a1f3d; }
.btn-danger { background: #fff; color: #c0392b; border: 2px solid #c0392b; }
.row { display: flex; gap: 8px; } .row > * { flex: 1; }
input, select, textarea { width: 100%; font-size: 17px; padding: 11px; border: 1px solid #ccc; border-radius: 10px; background: #fff; font-family: inherit; }
label.f { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 16px; }
.chk { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 17px; }
.chk input { width: 24px; height: 24px; flex: none; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { flex: 1 0 12%; text-align: center; border: 1px solid #ccc; border-radius: 10px; padding: 8px 0; font-size: 15px; }
.days input { display: none; }
.days label.on { background: #7a1f3d; color: #fff; border-color: #7a1f3d; }
pre.rp { white-space: pre-wrap; word-break: break-word; font: 16px/1.55 inherit; font-family: inherit; background: #fbf8f6; border-radius: 10px; padding: 10px; margin: 8px 0 0; max-height: 70vh; overflow: auto; }
.item { border-top: 1px solid #eee; padding: 10px 0; }
.item:first-child { border-top: 0; }
.ad { border-top: 1px solid #eee; padding: 10px 0; }
.ad b { font-size: 16px; }
.big-num { font-size: 26px; font-weight: 800; color: #7a1f3d; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #222; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 16px; z-index: 9; max-width: 90%; }
.login { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; }
.login h1 { color: #7a1f3d; margin: 0 0 4px; }
.qr { display: block; width: 260px; max-width: 100%; margin: 10px auto; border-radius: 10px; }
.sched-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sched-head b { font-size: 18px; }
.switch { position: relative; width: 54px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ccc; border-radius: 30px; transition: .2s; }
.switch span:before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: #2e9d5a; }
.switch input:checked + span:before { transform: translateX(24px); }
