/* ============================================================
   サロン分析 — スタイル（コンパクト版）
   グロースOSと同じく、白地・小さめの文字・細い線で、
   一画面にたくさん並べることを優先した作り
   ============================================================ */
:root {
  --accent: #307d8c; --accent-dark: #245e6a; --accent-soft: #e8f2f4;
  --ink: #1c2226; --ink-2: #5b686f; --ink-3: #93a1a8;
  --line: #d3dbdf; --line-2: #e6ebee; --bg: #e9eef1; --bg-2: #f2f5f7;
  --warn-bg: #fff7d6; --warn-line: #e8c95a; --warn-ink: #8a6b09;
  --dang-bg: #ffe5e5; --dang-line: #e08585; --dang-ink: #a52020;
  --ok: #2c8a5f;
  --radius: 10px;
  --num: "Roboto", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: "Roboto", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif; font-variant-numeric: tabular-nums; font-size: 13px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.tiny { font-size: 10.5px; }
.right { text-align: right; }
.neg, .down { color: var(--dang-ink); }
.up { color: var(--ok); }

/* ---------- レイアウト ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: 200px; flex: 0 0 200px; border-right: 1px solid var(--line); padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #fff; display: flex; flex-direction: column; }
.brand { padding: 0 8px 12px; display: flex; flex-direction: column; }
.brand b { font-size: 13.5px; letter-spacing: .02em; }
.brand span { font-family: var(--num); font-size: 10px; letter-spacing: .12em; color: var(--ink-3); }
.navgroup { font-size: 10.5px; color: var(--ink-3); padding: 12px 10px 4px; letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2); font-size: 12.5px; }
.nav a:hover { background: var(--line-2); text-decoration: none; }
.nav a svg { width: 15px; height: 15px; stroke: var(--ink-3); flex: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.nav a[aria-current="page"] svg { stroke: var(--accent); }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; font-family: var(--num); font-size: 10.5px; color: var(--ink-3); }
.side-foot button { background: none; border: 0; padding: 0; color: var(--ink-2); cursor: pointer; text-align: left; font-size: 11.5px; font-family: inherit; }
.side-foot .viewonly { font-family: inherit; color: var(--accent-dark); font-weight: 700; font-size: 11px; }

.main { flex: 1; min-width: 0; }
.wrap { padding: 0 24px 64px; display: flex; flex-direction: column; gap: 16px; max-width: 1720px; }

/* ページ上部（スクロールしても上に残る） */
.head { position: sticky; top: 0; z-index: 30; margin: 0 -24px; padding: 10px 24px; min-height: 54px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(20, 40, 50, .06); display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.head > div:first-child { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.head h1 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; }
.head .sub { font-size: 11px; color: var(--ink-3); }
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 部品 ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 14px 16px; box-shadow: 0 1px 3px rgba(20, 40, 50, .07); }
.panel > h2, .panel-h h2 { margin: 0; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; }
.panel-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: -2px -16px 12px; padding: 0 16px 10px; border-bottom: 1px solid var(--line-2); }
.panel-h p { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-3); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* 入力欄：ラベルは左に小さく */
.field { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-3); letter-spacing: .03em; }
form .field, .dlg .field, .choice .field, .drop + .field { flex-direction: column; align-items: stretch; gap: 3px; }
.input, .select, textarea.input { height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 12.5px; color: var(--ink); outline: none; }
textarea.input { height: auto; min-height: 64px; padding: 6px 9px; resize: vertical; line-height: 1.6; }
.select { padding-right: 26px; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2393a1a8' stroke-width='1.4' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.input:focus, .select:focus { border-color: var(--accent); }

.btn { height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn.quiet { border-color: transparent; color: var(--accent); padding: 0 6px; }
.btn.danger { color: var(--dang-ink); }
.btn.sm { height: 24px; padding: 0 8px; font-size: 11px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn svg { width: 13px; height: 13px; stroke: currentColor; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; height: 30px; background: #fff; }
.stepper button { width: 28px; height: 100%; border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 15px; }
.stepper button:hover { color: var(--accent); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper b { min-width: 86px; text-align: center; font-size: 12.5px; font-family: var(--num); font-weight: 600; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.seg button { border: 0; border-right: 1px solid var(--line); background: #fff; padding: 5px 14px; color: var(--ink-2); cursor: pointer; font-size: 12px; }
.seg button:last-child { border-right: 0; }
.seg button[aria-selected="true"] { background: var(--accent); color: #fff; font-weight: 700; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 8px 14px; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent-dark); font-weight: 700; border-bottom-color: var(--accent); }

/* ラベル（ピル） */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: #fff; white-space: nowrap; line-height: 1.6; }
.badge.dang { background: var(--dang-bg); border-color: var(--dang-line); color: var(--dang-ink); font-weight: 700; }
.badge.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); font-weight: 700; }
.badge.info { background: var(--accent-soft); border-color: #cfe3e7; color: var(--accent-dark); }
.badge.ok { color: var(--ok); }
.manual { font-size: 9.5px; color: var(--ink-3); margin-left: 3px; }

/* ---------- 数字の並び ---------- */
.figures { display: flex; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; flex-wrap: wrap; box-shadow: 0 1px 3px rgba(20, 40, 50, .07); }
.figure { flex: 1 1 120px; padding: 10px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.figure:last-child { border-right: 0; }
.figure .k { font-size: 10.5px; color: var(--ink-3); letter-spacing: .03em; }
.figure .v { font-family: var(--num); font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); white-space: nowrap; }
.figure .v small { font-size: 11px; font-weight: 400; color: var(--ink-2); margin-left: 2px; }
.figure .d { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.figure .v.up { color: var(--ok); } .figure .v.down { color: var(--dang-ink); }

/* 店舗詳細の見込み */
.outlook { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; background: #fff; box-shadow: 0 1px 3px rgba(20, 40, 50, .07); }
.outlook .big { flex: 0 0 210px; padding: 12px 16px; border-right: 1px solid var(--line); background: var(--accent-soft); display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.outlook .big .pct { font-family: var(--num); font-size: 34px; font-weight: 700; line-height: 1.1; }
.outlook .big .pct small { font-size: 15px; }
.outlook .facts { flex: 1; display: flex; flex-wrap: wrap; }
.outlook .facts > div { flex: 1 1 150px; padding: 10px 14px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 1px; }
.outlook .facts > div:last-child { border-right: 0; }
.outlook .facts .k { font-size: 10.5px; color: var(--ink-3); }
.outlook .facts .v { font-family: var(--num); font-size: 16px; font-weight: 700; }
.outlook .facts .d { font-size: 10.5px; color: var(--ink-3); }

/* ---------- 表 ---------- */
.tablewrap { overflow: auto; max-height: calc(100vh - 150px); border: 1px solid var(--line); border-radius: 8px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.t th { position: sticky; top: 0; z-index: 2; background: #eef2f4; text-align: left; font-weight: 700; color: var(--ink-2); font-size: 10.5px; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; white-space: nowrap; }
table.t td.r { font-family: var(--num); }
table.t td.nw { white-space: nowrap; }
table.t th.sep, table.t td.sep { border-left: 1px solid var(--line); }
table.t tr.sub td { background: var(--bg-2); }
table.t tr.sub td:first-child { padding-left: 24px; }
table.t tr.total td { background: var(--accent-soft); font-weight: 700; color: var(--accent-dark); }
table.t tbody tr:hover td { background: #fafcfc; }
table.t a.store { font-weight: 700; color: var(--ink); }
table.t a.store:hover { color: var(--accent); }
table.t td:first-child, table.t th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
table.t th:first-child { z-index: 3; background: #eef2f4; }
table.t tr.total td:first-child { background: var(--accent-soft); }
table.t tr.sub td:first-child { background: var(--bg-2); }
table.t td.rate { min-width: 110px; }
table.t td.rate b { font-weight: 700; }
table.t td.rate .pace { margin-top: 3px; }

.pace { position: relative; height: 4px; border-radius: 2px; background: var(--line-2); min-width: 90px; }
.pace i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--accent); }
.pace i.warn { background: var(--warn-line); }
.pace i.dang { background: var(--dang-line); }
.pace b { position: absolute; top: -3px; width: 1.5px; height: 10px; background: var(--ink); opacity: .4; }

/* ---------- グラフ ---------- */
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 110px; align-items: center; gap: 10px; }
.bar-row .lab { font-size: 12px; }
.bar-row .lab small { display: block; font-size: 10px; color: var(--ink-3); }
.bar-track { position: relative; height: 12px; background: var(--line-2); border-radius: 3px; }
.bar-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.bar-track i.short { background: var(--warn-line); }
.bar-track b { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--ink); opacity: .45; }
.bar-row .val { text-align: right; font-family: var(--num); font-size: 11px; color: var(--ink-3); }
.bar-row .val strong { display: block; font-size: 12.5px; color: var(--ink); }

.mix { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--line-2); }
.mix i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.funnel { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.funnel > div { flex: 1 1 110px; padding: 8px 12px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; }
.funnel > div:last-child { border-right: 0; }
.funnel .rate { background: var(--bg-2); }
.funnel .k { font-size: 10.5px; color: var(--ink-3); }
.funnel .v { font-family: var(--num); font-size: 17px; font-weight: 700; }
.funnel .c { font-size: 10.5px; }

.heat { display: grid; gap: 2px; min-width: 680px; }
.heat .hd { font-size: 9.5px; color: var(--ink-3); text-align: center; font-family: var(--num); }
.heat .dl { font-size: 11px; display: flex; align-items: center; gap: 4px; }
.heat .dl small { color: var(--ink-3); font-size: 9.5px; }
.heat .c { height: 22px; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-family: var(--num); }
.heat .c.na { background: repeating-linear-gradient(45deg, #f6f8f8, #f6f8f8 3px, #eef1f2 3px, #eef1f2 6px); }
.scale { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--ink-3); }
.scale i { width: 16px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------- お知らせ・空状態 ---------- */
.note { border: 1px solid #cfe3e7; background: var(--accent-soft); color: var(--accent-dark); border-radius: 8px; padding: 7px 12px; font-size: 12px; }
.note.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.note.dang { border-color: var(--dang-line); background: var(--dang-bg); color: var(--dang-ink); }
.note.ok { border-color: #cfe3e7; background: #fff; color: var(--ink-2); }
.empty { padding: 26px 16px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; }
.empty b { color: var(--ink); font-size: 13px; }
.loading { padding: 40px 0; text-align: center; color: var(--ink-3); }

/* ---------- 取り込み ---------- */
.drop { position: relative; min-height: 54px; border: 1.5px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; color: var(--ink-3); font-size: 12px; cursor: pointer; background: var(--bg-2); }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.has { border-style: solid; border-color: var(--accent); color: var(--ink); background: #fff; }
details summary { cursor: pointer; color: var(--ink-2); }

/* ---------- 選択（店舗チップ・条件） ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 11.5px; color: var(--ink-2); }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.choice button { text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.choice button b { font-size: 12.5px; }
.choice button span { font-size: 10.5px; color: var(--ink-3); }
.choice button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------- カード一覧（ゲリラ・施策ログ） ---------- */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; background: #fff; box-shadow: 0 1px 3px rgba(20, 40, 50, .07); }
.item-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11px; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: repeat(4, minmax(56px, auto)); gap: 2px 14px; text-align: right; }
.kv div { display: flex; flex-direction: column; }
.kv span { font-size: 10px; color: var(--ink-3); }
.kv b { font-family: var(--num); font-size: 15px; }
.deltas { display: flex; flex-wrap: wrap; gap: 4px; }
.delta { background: var(--line-2); border-radius: 6px; padding: 3px 9px; font-size: 11.5px; }
.delta b { font-family: var(--num); }

.sticky-bar { position: sticky; bottom: 10px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; box-shadow: 0 4px 18px rgba(28, 34, 38, .08); }

/* ---------- 稼働率×新規（横一列） ---------- */
.quad-wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quad-lab, .quad-x { display: none; }
.quad { text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.quad:hover { border-color: var(--accent); }
.quad b { font-size: 12px; display: block; }
.quad small { display: block; font-size: 10px; color: var(--ink-3); }
.quad .quad-n { font-family: var(--num); font-size: 20px; font-weight: 700; }
.quad.alert b, .quad.alert .quad-n { color: var(--dang-ink); }
.quad.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.situ { font-size: 11.5px; color: var(--ink-2); }
.situ.alert { color: var(--dang-ink); font-weight: 700; }

/* ---------- 「?」の説明 ---------- */
.help { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 6px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-3); font-size: 9.5px; font-weight: 700; cursor: help; flex: none; font-family: var(--num); }
.help:hover, .help:focus-visible { color: var(--accent); border-color: var(--accent); }
.help:hover::after, .help:focus-visible::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: max-content; max-width: min(340px, 80vw); white-space: normal; text-align: left; background: var(--ink); color: #fff; font-family: inherit; font-size: 11.5px; font-weight: 400; line-height: 1.7; padding: 8px 12px; border-radius: 7px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }

/* ---------- 翌日限定クーポンの表 ---------- */
/* 当日限定クーポンの管理表（色なし・幅をつめる） */
.board-wrap { width: fit-content; max-width: 100%; }
table.board { width: auto; }
table.board th.dh { text-align: center; padding: 4px 0; min-width: 25px; line-height: 1.15; }
table.board th.dh b { display: block; font-family: var(--num); font-size: 12px; color: var(--ink); }
table.board th.dh span { display: block; font-size: 9.5px; font-weight: 400; }
table.board th.dh.td b { text-decoration: underline; }
table.board td.dc { text-align: center; min-width: 25px; padding: 5px 1px; border-left: 1px solid var(--line-2); font-family: var(--num); }
table.board td.dc b { font-size: 12.5px; }
table.board td.dc b.z { font-weight: 400; color: var(--ink-3); }
table.board td.r { padding-left: 8px; padding-right: 8px; }
table.board .pend { font-size: 11px; color: var(--ink-3); }
table.board tr.total td { background: var(--bg-2); color: var(--ink); }
table.board tr.total td:first-child { background: var(--bg-2); }
table.board tr.ty td { font-size: 11px; color: var(--ink-2); padding-top: 2px; padding-bottom: 2px; border-bottom-color: transparent; }
table.board tr.ty td.dc { font-family: var(--num); }
table.board tr.ty td.r { font-family: var(--num); }
table.board tr.ty .tyn { display: inline-block; max-width: 112px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; padding-left: 12px; position: relative; }
table.board tr.ty .tyn::before { content: "└"; position: absolute; left: 0; color: var(--ink-3); }
table.board tr.ty .z { color: var(--ink-3); }
table.board tbody tr:not(.ty) td { border-top: 1px solid var(--line-2); }

/* ---------- モーダル・トースト ---------- */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(500px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(28, 34, 38, .25); }
dialog::backdrop { background: rgba(28, 34, 38, .35); }
.dlg { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.dlg h2 { margin: 0; font-size: 14px; }
.dlg .actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 12.5px; z-index: 100; max-width: calc(100vw - 32px); }
.toast.err { background: var(--dang-ink); }

/* ---------- ログイン ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg-2); }
.login form { width: min(340px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.login h1 { margin: 0; font-size: 16px; }
.login p { margin: 0; color: var(--ink-2); font-size: 12px; }
.login .input { height: 34px; }
.login .btn { height: 34px; }

/* ---------- スマホ ---------- */
@media (max-width: 900px) {
  .app { display: block; }
  .side { position: static; width: auto; height: auto; flex-direction: row; overflow-x: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); align-items: center; gap: 2px; }
  .brand { padding: 0 8px 0 2px; flex: none; }
  .brand span, .navgroup, .side-foot { display: none; }
  .nav { flex-direction: row; display: flex; }
  .nav a { white-space: nowrap; }
  .wrap { padding: 0 12px 48px; }
  .head { margin: 0 -12px; padding: 8px 12px; position: static; }
  .grid2 { grid-template-columns: 1fr; }
  .quad-wrap { grid-template-columns: 1fr 1fr; }
  .outlook .big { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .bar-row { grid-template-columns: 70px minmax(0, 1fr) 90px; }
  .tablewrap { max-height: none; }
}

@media print {
  .side, .no-print, .toast, .controls { display: none !important; }
  .app { display: block; }
  .head { position: static; border: 0; }
  .tablewrap { max-height: none; overflow: visible; border: 0; }
  table.t th { position: static; }
  @page { size: A4 landscape; margin: 8mm; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
body.viewer .edit-only { display: none !important; }
table.t td.rate { white-space: nowrap; }
table.t td.rate .pace { display: inline-block; vertical-align: middle; width: 80px; min-width: 0; margin: 0 0 0 10px; }

/* 日別の新規数 */
table.tnd th.nd, table.tnd td.nd { padding: 6px 0; min-width: 30px; width: 30px; text-align: center; }
table.tnd th.nd small { display: block; font-size: 9.5px; line-height: 1.2; }
table.tnd th.sun { color: #c0504d; }
table.tnd th.sat { color: #3f6fb0; }
table.tnd th.today { background: var(--accent); color: #fff; }
table.tnd td.fut { font-style: italic; }
table.tnd td .z { color: var(--line); }

/* 施策ログ */
.item.log { gap: 6px; }
.log-what { font-size: 13px; font-weight: 700; color: var(--ink); }
table.lsum { width: auto; min-width: min(460px, 100%); margin-top: 4px; }
table.lsum td, table.lsum th { padding: 5px 14px; }
table.lsum td:first-child, table.lsum th:first-child { position: static; padding-left: 0; }
table.lsum th:first-child { background: none; }
table.lsum thead th { background: none; }
.warn-t { color: var(--warn-ink); }
details.logdetail > summary { cursor: pointer; font-size: 12px; color: var(--accent-dark); font-weight: 700; padding: 4px 0; list-style: none; }
details.logdetail > summary::before { content: "▸ "; }
details.logdetail[open] > summary::before { content: "▾ "; }
details.logdetail .tablewrap, #lf .tablewrap { margin-top: 6px; max-height: none; }
table.tnd td.up { color: var(--ok); font-weight: 700; }
table.tnd td.down { color: var(--dang-ink); }
details.logdetail table.tnd th.nd, details.logdetail table.tnd td.nd, #lf table.tnd th.nd, #lf table.tnd td.nd { min-width: 38px; width: 38px; }
.item.log > table.lsum { align-self: flex-start; }
details.logdetail .tablewrap, #lf .tablewrap { width: fit-content; max-width: 100%; }
details.logdetail table.tnd, #lf table.tnd { width: auto; }
details.logdetail table.tnd td:first-child, #lf table.tnd td:first-child { min-width: 96px; }

/* 当日限定：クーポンの行 */
.item-line { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) 110px 36px; gap: 8px; align-items: end; }
@media (max-width: 760px) { .item-line { grid-template-columns: 1fr 1fr; } .item-line .nm { grid-column: 1 / -1; } }

/* メニュー別の合計 */
table.tsum { width: auto; min-width: min(640px, 100%); }
table.tsum td, table.tsum th { padding: 7px 14px; }
table.tsum tr.total td { background: var(--bg-2); color: var(--ink); }
