/* 全社共通の見た目。会社の色は --brand（tenant.toml の theme_color）。 */
:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #1f2933; --muted: #6b7280; --line: #e5e7eb;
  --ok: #047857; --warn: #b45309; --danger: #b91c1c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--brand); }
h1 { font-size: 1.35rem; margin: .4em 0 .6em; line-height: 1.35; }
h2 { font-size: 1.1rem; margin: .2em 0 .5em; }
h3 { font-size: 1rem; margin: .2em 0 .3em; }
code { background: #eef0f3; padding: 0 .3em; border-radius: 4px; }

.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--brand); color: #fff;
}
.top .brand { color: #fff; font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .who { font-size: .85rem; opacity: .9; margin-right: 6px; }
.top .link { color: #fff; }
.inline { display: inline; margin: 0; }

.wrap { max-width: 680px; margin: 0 auto; padding: 12px 16px 40px; }
.card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin: 12px 0; color: inherit;
}
.link-card { text-decoration: none; }
.link-card strong { display: block; }
.link-card span { display: block; font-size: .9rem; }
.card.warn { border-color: #f5c27a; background: #fff8eb; }
.card.notice { border-color: var(--brand); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.pre { white-space: pre-wrap; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }

.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 12px 18px; min-height: 44px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.wide { display: block; width: 100%; text-align: center; margin-top: 8px; }
button.link { background: none; border: 0; padding: 4px; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
button.link.danger { color: var(--danger); }

label { display: block; margin: 10px 0; font-weight: 600; font-size: .95rem; }
label.opt { font-weight: 400; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
label.opt input { width: 22px; height: 22px; margin: 0; }
input:not([type=radio]):not([type=checkbox]), textarea, select {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1px solid #cbd2d9; border-radius: 10px; background: #fff;
}
input.copy { font-size: .85rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
details summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 8px 0; }

.flash { padding: 10px 14px; border-radius: 10px; background: #ecfdf5; color: var(--ok); }
.flash.error { background: #fef2f2; color: var(--danger); }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 4px 0 8px; }
.tabs a { flex: 1 0 auto; text-align: center; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .92rem; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); font-weight: 600; text-align: center; }
.tile .big { font-size: 1.8rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 4.2em 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .time { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list form { margin: 0; flex: none; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: var(--muted); }
.tag.active { background: #ecfdf5; color: var(--ok); }
.tag.paused { background: #fef2f2; color: var(--danger); }
.tally { width: 100%; border-collapse: collapse; margin: 6px 0; }
.tally td { padding: 6px 0; border-top: 1px solid var(--line); }
.tally .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.block { padding: 8px 0 12px; border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
.qr { display: block; margin: 8px auto; background: #fff; }
