/* ActView 共通スタイル（iPad の縦・横どちらでも押しやすい大きさ） */
:root {
  --ink: #1d2433; --sub: #5b6475; --line: #e3e6ec; --bg: #f5f6f8; --card: #fff;
  --main: #1f5f8b; --main-weak: #e8f1f8; --golf: #2f7d4f; --golf-weak: #e7f4ec;
  --warn: #b3261e; --warn-weak: #fdecea; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--main); }
.demo-banner { background: #fff4d6; color: #6b4e00; font-size: 13px; text-align: center; padding: 4px; }

/* ヘッダー */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 18px; margin: 0; letter-spacing: .02em; }
.top .who { margin-left: auto; color: var(--sub); font-size: 14px; }
.tabs { display: flex; gap: 4px; padding: 0 12px; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 14px; color: var(--sub); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--main); font-weight: 600; }

main { max-width: 1080px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 17px; margin: 0 0 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--sub); font-size: 14px; }
.grow { flex: 1; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.btn.primary { background: var(--main); border-color: var(--main); color: #fff; font-weight: 600; }
.btn.golf { background: var(--golf); border-color: var(--golf); color: #fff; }
.btn.danger { color: var(--warn); border-color: #f1c0bc; }
.btn.small { min-height: 34px; padding: 4px 10px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }

/* 入力 */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--sub); }
input[type=text], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
  min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
textarea { min-height: 70px; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* 一覧 */
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th, table.list td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { color: var(--sub); font-weight: 500; font-size: 13px; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover { background: var(--main-weak); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--main-weak); color: var(--main); margin-right: 4px; }
.tag.golf { background: var(--golf-weak); color: var(--golf); }
.tag.off { background: #eee; color: #777; }
.tag.warn { background: var(--warn-weak); color: var(--warn); }

/* 記録の行入力 */
.lines { width: 100%; border-collapse: collapse; }
.lines td, .lines th { padding: 4px; }
.lines th { font-size: 12px; color: var(--sub); font-weight: 500; text-align: left; }
.lines input, .lines select { min-height: 42px; }

/* ログイン（スタッフ選択と暗証番号） */
.center { max-width: 720px; margin: 24px auto; padding: 0 16px; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.staff-grid button { min-height: 72px; text-align: left; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.staff-grid button small { display: block; color: var(--sub); }
.pin { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.pin span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--main); }
.pin span.on { background: var(--main); }
.pad { display: grid; grid-template-columns: repeat(3, 88px); gap: 12px; justify-content: center; }
.pad button { height: 72px; font-size: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.msg { min-height: 24px; text-align: center; color: var(--warn); }
.ok-msg { color: var(--golf); }

/* トースト */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 18px;
  border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; }
#toast.on { opacity: .92; }

/* LINE 連携コード */
.code { font-size: 40px; letter-spacing: .3em; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

/* 会員向け画面（スマホ） */
.m-wrap { max-width: 480px; margin: 0 auto; padding: 16px; }
.m-rec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.m-rec h3 { font-size: 15px; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.m-rec table { width: 100%; font-size: 14px; border-collapse: collapse; }
.m-rec td { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.hidden { display: none !important; }
