/* SPAGO シフト：LINE の中で開く画面。見本（mock/shift-mock.html）と同じ色と形 */
:root {
  --paper: #f7f3e9; --paper-2: #ede8db; --surface: #ffffff;
  --ink: #111111; --ink-sub: #4a4038; --ink-ghost: #8a7f76;
  --red: #d52b1e; --red-ink: #ffffff; --line: #d8c8b1;
  --warn: #b32318; --ok: #1d6b4a; --ok-bg: #dbe8e1;
  --e-bg: #f5ecd5; --e-fg: #7a5f1c; --l-bg: #dbe8e1; --l-fg: #0f3b2e; --b-bg: #fde8e7; --b-fg: #b32318;
  --scrim: rgba(17, 17, 17, .35);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130f; --paper-2: #2a251f; --surface: #1f1b16;
    --ink: #f3eee4; --ink-sub: #cfc5b6; --ink-ghost: #968b7e;
    --red: #e04a3d; --line: #3a332b; --warn: #ff8a7f; --ok: #7fc4a4; --ok-bg: #1d3a30;
    --e-bg: #3a3020; --e-fg: #e3c278; --l-bg: #1d3a30; --l-fg: #8fd1b1; --b-bg: #3a1916; --b-fg: #ff8a7f;
    --scrim: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
button[disabled] { opacity: .45; cursor: default; }
main { max-width: 480px; margin: 0 auto; padding: 20px 16px calc(32px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; }
h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.35; text-wrap: balance; }
.sub { margin: 0; color: var(--ink-sub); font-size: 14px; }
.card { background: var(--surface); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.ct { margin: 0; font-weight: 700; }
.ct small { font-weight: 400; color: var(--ink-ghost); margin-left: 6px; font-size: 13px; }
.big { margin: 0; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.muted { margin: 0; color: var(--ink-sub); font-size: 13.5px; }
.btn { border: 0; background: var(--red); color: var(--red-ink); font-weight: 700; border-radius: 999px; padding: 13px 16px; width: 100%; font-size: 16px; }
.btn.sub { background: var(--paper-2); color: var(--ink); }
.link { border: 0; background: none; color: var(--ink-sub); text-decoration: underline; padding: 4px 0; font-size: 14px; justify-self: start; }
.msg { text-align: center; padding: 48px 8px; display: grid; gap: 12px; justify-items: center; }
.msg .mark { font-size: 40px; line-height: 1; }
.err { color: var(--warn); }
.done { color: var(--ok); }

/* 曜日ごとの選択 */
.rows { display: grid; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .k { font-weight: 700; }
.seg { display: inline-grid; grid-auto-flow: column; gap: 2px; background: var(--paper-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 6px 10px; font-size: 14px; font-weight: 700; color: var(--ink-sub); min-width: 48px; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.seg button.e[aria-pressed="true"] { background: var(--e-bg); color: var(--e-fg); }
.seg button.l[aria-pressed="true"] { background: var(--l-bg); color: var(--l-fg); }
.seg button.b[aria-pressed="true"] { background: var(--b-bg); color: var(--b-fg); }

/* カレンダー（月〜土の 6 列） */
.cal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal .h { font-size: 12px; color: var(--ink-ghost); }
.cal-d, .cal-x { border: 0; border-radius: 10px; padding: 6px 0 4px; display: grid; line-height: 1.15; min-height: 52px; font-variant-numeric: tabular-nums; }
.cal-d { background: var(--paper-2); }
.cal-d b { font-size: 15px; }
.cal-d small { font-size: 12px; font-weight: 700; min-height: 1.2em; }
.cal-x { color: var(--ink-ghost); opacity: .45; font-size: 13px; align-content: center; }
.c-e { background: var(--e-bg); color: var(--e-fg); }
.c-l { background: var(--l-bg); color: var(--l-fg); }
.c-b { background: var(--b-bg); color: var(--b-fg); }
.mon { margin: 4px 0 0; font-weight: 700; font-size: 14px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
textarea { width: 100%; min-height: 72px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; font-size: 15px; background: var(--surface); color: var(--ink); resize: vertical; }

/* 下から出る選択 */
.sheet-wrap { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: flex-end; z-index: 10; }
.sheet { background: var(--surface); width: 100%; border-radius: 20px 20px 0 0; padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; max-width: 480px; margin: 0 auto; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); justify-self: center; }
.opts { display: grid; gap: 8px; }
.opts button { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 16px; text-align: left; display: flex; justify-content: space-between; font-weight: 700; }
.opts button span { font-weight: 400; color: var(--ink-ghost); font-size: 14px; font-variant-numeric: tabular-nums; }
.opts button[aria-pressed="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.opts button.e[aria-pressed="true"] { background: var(--e-bg); color: var(--e-fg); }
.opts button.l[aria-pressed="true"] { background: var(--l-bg); color: var(--l-fg); }
.opts button.b[aria-pressed="true"] { background: var(--b-bg); color: var(--b-fg); }

/* 期間を選ぶカレンダー（はじまり・おわりは赤、間は薄い赤） */
.cal-d.edge { background: var(--red); color: var(--red-ink); }
.cal-d.in { background: var(--b-bg); color: var(--b-fg); }
.seg button[disabled] { opacity: .35; }

/* 募集の一覧（バイト） */
.card.pick { border: 0; text-align: left; width: 100%; font: inherit; color: inherit; justify-items: start; gap: 4px; }

/* 集まり具合 */
.prog { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.prog-bar { flex: 1; height: 10px; border-radius: 5px; background: var(--paper-2); overflow: hidden; }
.prog-bar span { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 7px; padding: 2px 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.off { background: var(--paper-2); color: var(--ink-ghost); font-weight: 500; }
.memos { display: grid; gap: 4px; }
.dl { display: grid; }
.dr { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 8px; padding: 8px 0; border-top: 1px solid var(--line); align-items: start; }
.dr:first-child { border-top: 0; }
.dd { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.dr.warn .dd { color: var(--warn); }
.dw { grid-column: 2; font-size: 12.5px; color: var(--warn); font-weight: 700; }
.btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btns .btn { padding: 10px 12px; font-size: 14px; }
.confirm { display: grid; gap: 8px; background: var(--paper-2); border-radius: 12px; padding: 12px; }
.sub .link { display: inline; padding: 0 0 0 6px; font-size: 13px; }
