/* 390 px first. One column. Every control at least 44 px tall. Nothing wider than the viewport. */
:root { --ink: #16202a; --mute: #5b6770; --line: #d9dee3; --brand: #12314a; --ok: #1e7b4f; --warn: #a33; --bg: #f6f7f8; }
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); overflow-wrap: anywhere; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 10px calc(16px + env(safe-area-inset-left)); background: var(--brand); color: #fff; min-height: 52px; }
.brand { font-weight: 700; letter-spacing: .01em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav a, .nav .linklike { color: #fff; text-decoration: none; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 8px; background: rgba(255,255,255,.12); font: inherit; border: 0; cursor: pointer; white-space: nowrap; }
.inline { display: inline; margin: 0; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(48px + env(safe-area-inset-bottom)); }
h1 { font-size: 1.45rem; margin: 8px 0 12px; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 24px 0 8px; }
p { margin: 8px 0; }
.lead { font-size: 1.05rem; }
.hint { color: var(--mute); font-size: .92rem; }
.hint a { display: inline-flex; align-items: center; min-height: 44px; }
.status { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stack { display: grid; gap: 14px; margin-top: 12px; }
label { display: grid; gap: 6px; font-weight: 600; }
label .hint { font-weight: 400; }
input, select, textarea { font: inherit; min-height: 48px; padding: 10px 12px; border: 1px solid #7f8a94; border-radius: 10px; background: #fff; width: 100%; }
::placeholder { color: var(--mute); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; background: #eef1f4; }
.choice input:disabled + span { background: #eef1f4; }
input[type="file"] { padding: 8px; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--brand); background: #fff; color: var(--brand); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; width: 100%; text-align: center; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.danger { border-color: var(--warn); color: var(--warn); }
.btn + .btn { margin-top: 0; }
p > .btn { display: inline-flex; width: auto; margin: 4px 8px 4px 0; }
fieldset.habit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0; background: #fff; }
fieldset.habit legend { font-weight: 700; padding: 0 6px; }
fieldset.habit p { margin: 4px 0 10px; }
fieldset.private { border-color: #b9c8d6; background: #f3f7fb; }
.pts { color: var(--mute); font-weight: 400; font-size: .9rem; }
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: block; font-weight: 500; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.choice span { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.choice input:checked + span { border-color: var(--brand); background: #e8f0f8; font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
video { width: 100%; max-width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.report-line { background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 10px; padding: 12px; margin: 12px 0; font-size: .95rem; }
.notice { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 10px; }
.notice h2 { font-size: 1rem; margin: 14px 0 4px; }
.notice ul { padding-left: 18px; }
.flash { padding: 12px; border-radius: 10px; margin: 8px 0; }
.flash.ok { background: #e6f4ec; border: 1px solid #b7dfc6; }
.flash.err { background: #fbe9e9; border: 1px solid #efb9b9; }
.flash ul { margin: 0; padding-left: 18px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; color: var(--mute); font-size: .85rem; }
.card .big { font-size: 1.7rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 48px; padding: 10px 12px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a { color: var(--brand); min-height: 44px; display: inline-flex; align-items: center; }
.table-wrap { overflow-x: auto; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 10px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; background: #f1f3f5; }
.foot { text-align: center; color: var(--mute); font-size: .85rem; padding: 16px; }
a { color: var(--brand); }
