/* スマホUI：勤怠・タスク・マニュアル・設定（デザイン 11〜14） */
@media (max-width: 768px) {
  /* ---------- 11 勤怠 ---------- */
  .topbar-actions .at-tabseg { width: 140px; }
  .topbar-actions .at-tabseg > button { height: 32px; font-size: 13px; }
  .at-sp { display: grid; gap: 12px; }
  .at-datenav { display: flex; align-items: center; gap: 4px; background: var(--sp-track); border-radius: 12px; padding: 4px; }
  .at-datenav > button { width: 40px; height: 40px; border: 0; background: transparent; font: inherit; font-size: 20px; color: var(--sub); cursor: pointer; border-radius: 8px; }
  .at-datenav > button.at-today { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--primary); background: #fff; height: 32px; }
  .at-date-l { position: relative; flex: 1; text-align: center; font-size: 16px; cursor: pointer; }
  /* 日付を押すとネイティブの日付選択が開く */
  .at-date-l input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .at-card { background: var(--panel); border: 1px solid var(--sp-line); border-radius: var(--sp-r); padding: 14px; display: grid; gap: 12px; }
  .at-card-head { display: flex; align-items: baseline; gap: 8px; }
  .at-card-head h3 { font-size: 17px; flex: 0 0 auto; }
  .at-stat { margin-left: auto; font-size: 11.5px; color: var(--sub); text-align: right; }
  .at-fields { display: grid; grid-template-columns: 1fr 1.15fr; gap: 10px; }
  .at-field { display: grid; gap: 4px; min-width: 0; }
  .at-field > span { font-size: 12px; color: var(--sub); font-weight: 600; }
  .at-start { width: 100%; height: 48px !important; text-align: center; font-size: 18px !important; font-weight: 700; border-radius: 10px; }
  .at-start.is-empty { color: #94A3B8; font-weight: 500; }
  .at-ot { display: flex; align-items: center; gap: 6px; }
  .at-step { flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid var(--sp-line); border-radius: 10px; background: #fff; font: inherit; font-size: 22px; color: var(--text); cursor: pointer; }
  .at-step:disabled { color: #CBD5E1; cursor: default; }
  .at-ot-v { flex: 1; min-width: 0; text-align: center; font-size: 16px; white-space: nowrap; }
  .at-ot-v.is-empty { color: #94A3B8; font-weight: 500; }
  .at-more { justify-self: start; border: 0; background: transparent; padding: 2px 0; font: inherit; font-size: 13px; color: var(--sub); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 月別 */
  .at-month-panel .panel-head { flex-wrap: wrap; gap: 8px; }
  .at-month-panel .month-nav { width: 100%; }
  .at-month-panel .month-nav { display: flex; align-items: center; gap: 6px; }
  .at-month-panel .month-nav input[type=month] { flex: 1 1 auto; width: auto; min-width: 0; }
  .at-month-panel .month-nav .btn { width: 44px; height: 44px; }
  .at-month-panel .fl.inline { width: 100%; display: flex; align-items: center; gap: 8px; }
  .at-month-panel .fl.inline select { flex: 1 1 auto; min-width: 0; }
  .at-summary { flex-wrap: wrap; gap: 4px 12px; }
  .at-month-list .lg-row { min-height: 48px; }
  .at-month-list .lg-row.is-today { background: var(--primary-weak); }
  .at-md { flex: 0 0 auto; width: 5.2em; font-size: 13px; font-weight: 600; }
  .at-md.sun { color: var(--danger); }
  .at-md.sat { color: var(--primary); }
  .at-sum { font-weight: 500; font-size: 14px; display: grid; }
  .at-sum.muted { color: #94A3B8; }
  .at-sum small { font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* ---------- 12 タスク ---------- */
  .tk-filter-sp { background: var(--panel); border: 1px solid var(--sp-line); border-radius: 12px; padding: 0 12px; }
  .tk-filter-sp summary { min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--sub); cursor: pointer; }
  .tk-filter-sp[open] { padding-bottom: 12px; }
  .tk-on { font-size: 11px; color: var(--primary); background: var(--primary-weak); border-radius: 999px; padding: 2px 8px; }
  .tk-sp { display: grid; gap: 14px; }
  .tk-gh { font-size: 13px; color: var(--sub); margin: 0 4px 8px; }
  .tk-row { display: flex; align-items: center; gap: 12px; padding: 0 0 0 14px; }
  .tk-main { flex: 1; min-width: 0; display: grid; gap: 3px; text-align: left; border: 0; background: transparent; font: inherit; color: var(--text); padding: 12px 14px 12px 0; cursor: pointer; }
  .tk-title { font-size: 15px; }
  .tk-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--sub); }
  .tk-sub:empty { display: none; }
  .tk-carry { background: var(--warn-weak); color: var(--warn); font-weight: 700; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
  .tk-row.is-done .tk-title { color: #94A3B8; text-decoration: line-through; }
  .tk-done-toggle { width: 100%; height: 44px; border: 1.5px dashed #CBD5E1; border-radius: 12px; background: transparent; font: inherit; font-size: 13px; color: var(--sub); cursor: pointer; }
  .tk-done { display: grid; gap: 14px; }
  .tk-empty { text-align: center; padding: 16px 0; }

  /* ---------- 13 マニュアル ---------- */
  .ml-sp { display: grid; gap: 8px; }
  .ml-row { display: flex; align-items: center; gap: 10px; padding-right: 14px; }
  .ml-main { flex: 1; min-width: 0; display: grid; gap: 3px; text-align: left; border: 0; background: transparent; font: inherit; color: var(--text); padding: 14px 0 14px 16px; cursor: pointer; }
  .ml-title { font-weight: 700; font-size: 15px; }
  .ml-desc { font-size: 12.5px; color: var(--sub); }
  .ml-url { font-size: 11.5px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ml-url.none { color: #94A3B8; font-weight: 600; }
  .ml-btn { flex: 0 0 auto; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--sp-line); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; text-decoration: none; white-space: nowrap; }
  .ml-ops { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
  .ml-mv, .cat-mv { width: 36px; height: 44px; border: 0; background: transparent; color: #64748B; font-size: 13px; cursor: pointer; flex: 0 0 auto; }
  .ml-mv:disabled, .cat-mv:disabled { color: #E2E8F0; cursor: default; }
  .ml-del, .cat-del { height: 32px; padding: 0 10px; border: 1px solid #FECACA; border-radius: 8px; background: #fff; color: var(--danger); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; flex: 0 0 auto; }

  /* ---------- 14 設定 ---------- */
  .cat-sp { display: grid; gap: 10px; }
  .cat-row { display: flex; align-items: center; padding-right: 6px; }
  .cat-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; font: inherit; color: var(--text); text-align: left; padding: 10px 0 10px 16px; min-height: 56px; cursor: pointer; }
  .cat-sq { width: 14px; height: 14px; border-radius: 3px; flex: 0 0 auto; }
  .cat-txt { display: grid; gap: 1px; min-width: 0; }
  .cat-txt b { font-size: 15px; }
  .cat-txt small { font-size: 11.5px; color: var(--sub); }
  .cat-add { height: 40px; border: 1.5px dashed #93C5FD; border-radius: 12px; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: var(--primary); cursor: pointer; }
  .cat-reset { height: 40px; border: 1px solid #FCA5A5; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--danger); cursor: pointer; }
}
