/*
 * base.css — ほいくのーと 共通スタイル
 * デザインテーマ：ナチュラル / ぱすてる / クール / らくらく
 * <html data-theme="natural|pastel|cool|easy"> で切り替える
 */

/* ================================================
   リセット
================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ================================================
   状態色（全テーマ共通・テーマで上書きしない）
================================================ */
:root {
  --s-danger:       #D64545;
  --s-danger-fill:  #C0392B;
  --s-danger-bg:    #FDECEC;
  --s-danger-text:  #A32020;
  --s-warning:      #E8A317;
  --s-warning-bg:   #FFF4D6;
  --s-warning-text: #7A5200;
  --s-success:      #3E9B5C;
  --s-success-fill: #2E7D46;
  --s-success-bg:   #E6F4EA;
  --s-success-text: #1F6B36;
  --s-info:         #3A7BD5;
  --s-info-bg:      #E7F0FC;
  --s-info-text:    #1F4F99;
}

/* ================================================
   テーマ変数 — ナチュラル（標準）
   あたたかいクリーム × テラコッタ
================================================ */
[data-theme="natural"] {
  --c-bg:             #FBF7F1;
  --c-surface:        #FFFFFF;
  --c-surface-alt:    #F5EEE4;
  --c-border:         #E8DDD0;
  --c-text:           #4A3728;
  --c-text-muted:     #7A6553;
  --c-primary:        #C0703A;
  --c-primary-strong: #A45C2C;
  --c-on-primary:     #FFFFFF;
  --c-primary-soft:   #F6E6D8;
  --c-accent:         #7FA36B;
  --c-sidebar-bg:     #F3EADF;
  --c-sidebar-text:   #4A3728;
  --c-sidebar-active: #A45C2C;
  --font-body:        "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-size-base:   16px;
  --radius:           12px;
  --radius-btn:       10px;
  --radius-field:     10px;
  --tap-min:          44px;
}

/* ================================================
   テーマ変数 — ぱすてる
   ミントグリーン × オレンジ・ピンク / 丸ゴシック
================================================ */
[data-theme="pastel"] {
  --c-bg:             #FFF8E7;
  --c-surface:        #FFFFFF;
  --c-surface-alt:    #FDF1D8;
  --c-border:         #F0E4C8;
  --c-text:           #3D4A5C;
  --c-text-muted:     #5F6A7C;
  --c-primary:        #3FA69B;
  --c-primary-strong: #2A7A71;
  --c-on-primary:     #FFFFFF;
  --c-primary-soft:   #DDF1EE;
  --c-accent:         #F4A259;
  --c-accent-2:       #EF8FA3;
  --c-sidebar-bg:     #3FA69B;
  --c-sidebar-text:   #FFFFFF;
  --c-sidebar-active: #2A7A71;
  --font-body:        "Zen Maru Gothic", "M PLUS Rounded 1c", sans-serif;
  --font-size-base:   16px;
  --radius:           20px;
  --radius-btn:       999px;
  --radius-field:     12px;
  --tap-min:          44px;
}

/* ================================================
   テーマ変数 — クール
   深いネイビー × ゴールド / 明朝体 / 角丸なし
================================================ */
[data-theme="cool"] {
  --c-bg:             #EEF1F8;
  --c-surface:        #FFFFFF;
  --c-surface-alt:    #F5F7FB;
  --c-border:         #D5DAE6;
  --c-text:           #1B2436;
  --c-text-muted:     #5A6378;
  --c-primary:        #101A2C;
  --c-primary-strong: #101A2C;
  --c-on-primary:     #FFFFFF;
  --c-primary-soft:   #E3E8F2;
  --c-accent:         #B4915B;
  --c-sidebar-bg:     #101A2C;
  --c-sidebar-text:   #EEF1F8;
  --c-sidebar-active: #B4915B;
  --font-body:        "Noto Serif JP", serif;
  --font-size-base:   16px;
  --radius:           0px;
  --radius-btn:       0px;
  --radius-field:     0px;
  --tap-min:          44px;
}

/* ================================================
   テーマ変数 — らくらく
   ロイヤルブルー × ゴールド / 大きめUD書体
================================================ */
[data-theme="easy"] {
  --c-bg:             #F5F8FC;
  --c-surface:        #FFFFFF;
  --c-surface-alt:    #EBF0F7;
  --c-border:         #CBD5E3;
  --c-text:           #1F2A3A;
  --c-text-muted:     #4E5B6E;
  --c-primary:        #35578B;
  --c-primary-strong: #35578B;
  --c-on-primary:     #FFFFFF;
  --c-primary-soft:   #DCE5F2;
  --c-accent:         #E0A526;
  --c-sidebar-bg:     #35578B;
  --c-sidebar-text:   #FFFFFF;
  --c-sidebar-active: #E0A526;
  --font-body:        "BIZ UDPGothic", sans-serif;
  --font-size-base:   18px;
  --radius:           8px;
  --radius-btn:       8px;
  --radius-field:     8px;
  --tap-min:          52px;
}
/* らくらく：htmlのfont-sizeを20pxにしてremを変える */
[data-theme="easy"] { font-size: 20px; }

/* ================================================
   フォーム入力欄：テーマの --radius-field を適用
   （インラインスタイルで var(--radius-btn) を使っている箇所を上書き）
================================================ */
textarea,
input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="email"],
input[type="search"],
select {
  border-radius: var(--radius-field) !important;
}

/* ================================================
   共通レイアウト
================================================ */
body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}
.app-shell {
  display: flex;
  height: 100vh;
}

/* ================================================
   サイドバー（共通）
================================================ */
.sidebar {
  width: 244px; flex-shrink: 0;
  background: var(--c-sidebar-bg);
  color: var(--c-sidebar-text);
  display: flex; flex-direction: column;
  padding: 20px 12px 16px;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
  color: var(--c-sidebar-text);
}
.brand-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50% 50% 50% 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: rgba(255,255,255,0.18);
}
.brand-name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.brand-sub  { font-size: 12px; opacity: 0.65; }

.nav-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  opacity: 0.78;
  margin: 20px 0 4px 8px;
  color: var(--c-sidebar-text);
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  min-height: var(--tap-min, 44px); padding: 0 10px;
  border-radius: var(--radius-btn, 10px);
  color: var(--c-sidebar-text); opacity: 1;
  font-size: 14px; font-weight: 600;
  transition: background 0.15s;
}
.nav-item:hover  { background: rgba(255,255,255,0.12); }
.nav-item.active { font-weight: 700; }
.nav-item i { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }

.nav-sub {
  display: flex; align-items: center;
  min-height: 38px; padding: 0 10px 0 38px;
  color: var(--c-sidebar-text); opacity: 0.88;
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-btn, 10px);
}
.nav-sub:hover  { opacity: 1; background: rgba(255,255,255,0.1); }
.nav-sub.active { opacity: 1; font-weight: 700; background: rgba(255,255,255,0.15); }

.sidebar-spacer { flex: 1; min-height: 16px; }
.sidebar-foot {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: var(--radius, 12px);
  background: rgba(255,255,255,0.12);
  font-size: 13px; color: var(--c-sidebar-text);
}
.sidebar-foot i { font-size: 22px; opacity: 0.75; }

/* ================================================
   パンくずリスト
================================================ */
.breadcrumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  padding: 10px 20px;
  font-size: 12px; color: var(--c-text-muted);
  background: var(--c-surface-alt);
  border-bottom: 1px solid var(--c-border);
}
.breadcrumbs a { color: var(--c-text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-primary); text-decoration: underline; }
.breadcrumbs .bc-sep { opacity: 0.4; margin: 0 2px; }
.breadcrumbs .bc-current { color: var(--c-text); font-weight: 600; }

/* ================================================
   メインエリア・トップバー
================================================ */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 28px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.topbar-left { flex: 1; }
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-sub   { font-size: 13px; color: var(--c-text-muted); margin-top: 1px; }

.btn-icon {
  width: var(--tap-min, 44px); height: var(--tap-min, 44px);
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--radius-btn, 10px);
  color: var(--c-text-muted); font-size: 18px;
}
.btn-icon:hover { background: var(--c-surface-alt); }

.btn-primary {
  display: flex; align-items: center; gap: 6px;
  min-height: var(--tap-min, 44px); padding: 0 18px;
  background: var(--c-primary-strong); color: var(--c-on-primary);
  border: none; border-radius: var(--radius-btn, 10px);
  font-size: 13px; font-weight: 700; font-family: var(--font-body);
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  display: flex; align-items: center; gap: 6px;
  min-height: var(--tap-min, 44px); padding: 0 18px;
  background: transparent; color: var(--c-primary-strong);
  border: 2px solid var(--c-primary-strong); border-radius: var(--radius-btn, 10px);
  font-size: 13px; font-weight: 700; font-family: var(--font-body);
  cursor: pointer;
}
.btn-secondary:hover { background: var(--c-primary-soft); }

/* ================================================
   コンテンツ・コンポーネント（変数で自動対応）
================================================ */
.content { padding: 24px 28px 60px; }

.section-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--c-text-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin: 22px 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--c-border);
}

/* モーダル共通 */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 1050; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  background: var(--c-surface); border-radius: var(--radius);
  width: 100%; padding: 28px; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  font-size: 20px; color: var(--c-text-muted); cursor: pointer;
}
.modal-label {
  font-size: 11px; font-weight: 700; color: var(--c-text-muted);
  display: block; margin-bottom: 4px;
}
.modal-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 14px; background: var(--c-bg);
  font-family: var(--font-body);
}
.modal-select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 14px; background: var(--c-bg);
  font-family: var(--font-body);
}
.modal-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 14px; background: var(--c-bg);
  font-family: var(--font-body); resize: vertical;
}

/* アラート行 */
.alert-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; margin-bottom: 8px;
  background: var(--s-danger-bg);
  border-left: 3px solid var(--s-danger);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px; color: var(--s-danger-text);
}
.alert-row i { color: var(--s-danger); flex-shrink: 0; font-size: 16px; }
.alert-row.warn {
  background: var(--s-warning-bg);
  border-left-color: var(--s-warning);
  color: var(--s-warning-text);
}
.alert-row.warn i { color: var(--s-warning); }
.alert-label { font-weight: 700; }

/* 出欠グリッド */
.attend-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.attend-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.attend-class { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.attend-count { display: flex; align-items: baseline; gap: 4px; }
.attend-n { font-size: 28px; font-weight: 700; color: var(--c-primary-strong); line-height: 1; }
.attend-total { font-size: 13px; color: var(--c-text-muted); }
.attend-detail { font-size: 13px; color: var(--c-text-muted); margin-top: 5px; }
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: var(--radius-btn); margin-right: 4px;
}
.tag-absent { background: var(--s-danger-bg); color: var(--s-danger-text); }
.tag-ok     { background: var(--s-success-bg); color: var(--s-success-text); }

/* クイックアクション */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.btn-quick {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 8px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 13px; font-weight: 700;
  color: var(--c-text); font-family: var(--font-body);
  transition: background 0.15s, border-color 0.15s;
}
.btn-quick:hover { background: var(--c-primary-soft); border-color: var(--c-primary); }
.btn-quick i { font-size: 24px; color: var(--c-primary); }

/* メモボックス */
.memo-box {
  background: var(--c-surface-alt);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px; min-height: 72px;
  font-size: 14px; color: var(--c-text-muted);
}

/* ================================================
   ナチュラル専用：ライトサイドバーの調整
================================================ */
[data-theme="natural"] .brand-icon {
  background: rgba(192,112,58,0.15);
  color: var(--c-primary);
  border-radius: 10px 14px 10px 14px;
}
[data-theme="natural"] .nav-item       { color: var(--c-sidebar-text); }
[data-theme="natural"] .nav-item:hover { background: rgba(192,112,58,0.09); }
[data-theme="natural"] .nav-item.active {
  background: var(--c-primary-soft);
  color: var(--c-primary-strong);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--c-primary-strong);
}
[data-theme="natural"] .nav-sub {
  color: var(--c-text-muted); opacity: 1;
  font-weight: 500;
  padding-left: 42px;
  border-left: 2px solid var(--c-border);
  margin-left: 8px;
  border-radius: 0;
}
[data-theme="natural"] .nav-sub.active {
  color: var(--c-primary-strong);
  font-weight: 700;
  background: var(--c-primary-soft);
  border-left-color: var(--c-primary-strong);
}
[data-theme="natural"] .nav-label { opacity: 0.5; color: var(--c-text-muted); }
[data-theme="natural"] .sidebar-foot { background: rgba(192,112,58,0.1); }

/* ================================================
   ぱすてる専用：丸型アイコン・背景装飾
================================================ */
[data-theme="pastel"] .brand-icon { border-radius: 50%; }
[data-theme="pastel"] .nav-item.active {
  background: rgba(255,255,255,0.92);
  color: var(--c-sidebar-active);
  box-shadow: none;
}
[data-theme="pastel"] .nav-sub.active {
  color: #fff;
  font-weight: 700;
  background: rgba(255,255,255,0.22);
  border-left-color: rgba(255,255,255,0.8);
}
[data-theme="pastel"] .nav-item i { font-size: 17px; }
[data-theme="pastel"] .nav-sub {
  padding-left: 42px;
  border-left: 2px solid rgba(255,255,255,0.25);
  margin-left: 8px;
  border-radius: 0;
}

/* ぱすてるの背景装飾（position:fixed・mix-blend-mode不使用） */
.pastel-deco {
  display: none; position: fixed; pointer-events: none;
  z-index: 0; inset: 0; overflow: hidden;
}
[data-theme="pastel"] .pastel-deco { display: block; }
.pb { position: absolute; border-radius: 50%; opacity: 0.06; }

/* ================================================
   ぱすてる：サイドバー 画用紙テクスチャ（mix-blend-mode 不使用）
================================================ */
[data-theme="pastel"] .sidebar { position: relative; }
/* 粗目レイヤー（紙の大きなむら感） */
[data-theme="pastel"] .sidebar::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='3' seed='12' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.14; pointer-events: none; z-index: 0;
}
/* 細目レイヤー（繊維・ざらつき） */
[data-theme="pastel"] .sidebar::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='6' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  opacity: 0.2; pointer-events: none; z-index: 0;
}
[data-theme="pastel"] .sidebar > * { position: relative; z-index: 1; }

/* ================================================
   ぱすてる：トップバー ドット装飾
================================================ */
[data-theme="pastel"] .topbar {
  border-bottom: 1px solid rgba(63,166,155,0.15);
  position: relative;
}
[data-theme="pastel"] .topbar::after {
  content: "";
  position: absolute; bottom: -8px; left: 0; right: 0;
  height: 8px;
  background-image: radial-gradient(circle, rgba(63,166,155,0.5) 2.5px, transparent 2.5px);
  background-size: 16px 8px;
  background-position: 8px 2.5px;
  pointer-events: none;
}

/* ================================================
   クール専用：角なし・ゴールドライン
================================================ */
[data-theme="cool"] .brand-icon {
  border-radius: 0;
  border: 1px solid rgba(180,145,91,0.35);
  color: var(--c-accent);
  background: rgba(180,145,91,0.08);
}
[data-theme="cool"] .nav-item       { border-radius: 0; color: rgba(238,241,248,0.95); }
[data-theme="cool"] .nav-sub        {
  border-radius: 0; font-weight: 500;
  color: rgba(238,241,248,0.82);
  padding-left: 42px;
  border-left: 1px solid rgba(180,145,91,0.3);
  margin-left: 8px;
}
[data-theme="cool"] .nav-item.active {
  border-radius: 0;
  border-left: 3px solid var(--c-accent);
  background: rgba(180,145,91,0.12);
  color: var(--c-accent);
  box-shadow: none;
}
[data-theme="cool"] .nav-sub.active {
  color: var(--c-accent);
  font-weight: 700;
  background: rgba(180,145,91,0.12);
  border-left-color: var(--c-accent);
}
[data-theme="cool"] .nav-label { letter-spacing: 0.2em; opacity: 0.7; color: var(--c-accent); }
/* トップバーの二重線 */
[data-theme="cool"] .topbar {
  position: relative;
  border-bottom: 2px solid var(--c-primary-strong);
}
[data-theme="cool"] .topbar::after {
  content: ""; position: absolute; bottom: -5px; left: 0; right: 0;
  height: 1px; background: var(--c-accent); opacity: 0.55;
}
[data-theme="cool"] .attend-card { border-radius: 0; }
[data-theme="cool"] .btn-quick   { border-radius: 0; }
[data-theme="cool"] .alert-row   { border-radius: 0; }
[data-theme="cool"] .memo-box    { border-radius: 0; }
/* カード・バナー・バッジ等すべて角なし */
[data-theme="cool"] .form-card,
[data-theme="cool"] .plan-card,
[data-theme="cool"] .inc-card,
[data-theme="cool"] .comp-card,
[data-theme="cool"] .status-card,
[data-theme="cool"] .paper-card,
[data-theme="cool"] .parent-banner,
[data-theme="cool"] .plan-summary,
[data-theme="cool"] .plan-base-banner,
[data-theme="cool"] .create-dropdown,
[data-theme="cool"] .child-plan-link,
[data-theme="cool"] .type-tab,
[data-theme="cool"] .eval-radio label,
[data-theme="cool"] .sign-done-info { border-radius: 0 !important; }

/* ================================================
   らくらく専用：大きめタップ・UD書体
================================================ */
[data-theme="easy"] .nav-label   { font-size: 13px; opacity: 0.88; }
[data-theme="easy"] .nav-item i  { font-size: 22px; }
[data-theme="easy"] .nav-item    { font-size: 16px; font-weight: 700; opacity: 1; }
[data-theme="easy"] .nav-sub     { font-size: 15px; font-weight: 700; opacity: 0.95; }
[data-theme="easy"] .brand-icon  { border-radius: 8px; }
[data-theme="easy"] .brand-name  { font-size: 18px; }
[data-theme="easy"] .topbar-title { font-size: 21px; }
[data-theme="easy"] .topbar-sub  { font-size: 15px; }
[data-theme="easy"] .nav-item.active {
  border-left: 3px solid var(--c-accent);
  border-radius: 0;
  background: rgba(255,255,255,0.15);
  box-shadow: none;
}
[data-theme="easy"] .nav-sub.active {
  font-weight: 900;
  opacity: 1;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border-left: 3px solid var(--c-accent);
  border-radius: 0;
}
[data-theme="easy"] .btn-quick   { font-size: 15px; }
[data-theme="easy"] .btn-quick i { font-size: 32px; }
[data-theme="easy"] .attend-n    { font-size: 38px; }
[data-theme="easy"] .attend-class { font-size: 15px; }
[data-theme="easy"] .section-head { font-size: 15px; }
[data-theme="easy"] .alert-row   { font-size: 16px; }

/* ================================================
   ハンバーガーメニューボタン（PC時は非表示）
================================================ */
.sidebar-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: none; border: none;
  font-size: 24px; color: var(--c-text);
  cursor: pointer; flex-shrink: 0;
  border-radius: var(--radius-btn);
}
.sidebar-toggle:hover { background: var(--c-surface-alt); }

/* サイドバー背景オーバーレイ（PC時は非表示） */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
}

/* PC/SP 表示切替ヘルパー */
.show-sp { display: none; }
.show-pc { display: inline; }

/* ── 日誌カードスタイル（PC） ── */
.journal-today-btn {
  display: block; padding: 10px; margin: 4px 8px;
  background: var(--c-primary); color: var(--c-on-primary);
  font-size: 13px; font-weight: 700; text-decoration: none;
  border-radius: var(--radius); text-align: center;
}
.journal-date-card {
  display: flex; flex-direction: column;
  margin: 4px 8px; padding: 9px 10px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); text-decoration: none; color: var(--c-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.journal-date-card:hover {
  border-color: var(--c-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.journal-date-label {
  font-size: 13px; font-weight: 600; color: var(--c-text);
}
.journal-date-dow { font-size: 11px; color: var(--c-text-muted); }
.journal-status-label {
  font-size: 11px; margin-top: 2px;
}

/* ================================================
   レスポンシブ：768px 以下（タブレット・スマホ）
================================================ */
@media (max-width: 768px) {
  .show-sp { display: inline !important; }
  .show-pc { display: none !important; }
  /* サイドバー：画面外に隠す → .open で左からスライド
     !important はぱすてるテーマの position:relative を上書きするために必要 */
  .sidebar {
    position: fixed !important; top: 0; left: 0; bottom: 0;
    z-index: 1000;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }

  /* ハンバーガーボタンを表示 */
  .sidebar-toggle { display: flex; }

  /* メインエリア全幅化 */
  .app-shell { display: block; height: auto; min-height: 100vh; }
  .main { overflow-y: visible; }

  /* トップバー：padding縮小 */
  .topbar { padding: 0 12px; min-height: 52px; gap: 8px; }
  .topbar-title { font-size: 16px; }
  .topbar-sub { font-size: 12px; }

  /* コンテンツ：padding縮小 */
  .content { padding: 16px 12px 40px; }

  /* パンくずリスト */
  .breadcrumbs { padding: 8px 12px; font-size: 11px; }

  /* 出欠グリッド → 2列 */
  .attend-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .attend-n { font-size: 24px; }

  /* クイックアクション → 2列 */
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* テーブル：横スクロール対応（inline overflow:hidden を上書き） */
  div:has(> table) {
    overflow-x: auto !important; -webkit-overflow-scrolling: touch;
  }
  div:has(> table) > table { min-width: 520px; }

  /* トップバーのアクション群を折り返し可能に */
  .topbar { flex-wrap: wrap; min-height: auto; padding: 8px 12px; }
  .topbar-left { min-width: 0; }

  /* ボタン類のpadding調整 */
  .btn-primary { padding: 0 14px; font-size: 12px; min-height: 40px; }
  .btn-secondary { padding: 0 14px; font-size: 12px; min-height: 40px; }

  /* モーダル全幅化 */
  .modal-overlay { padding: 8px; }
  .modal-box { padding: 20px 16px; max-height: 90vh; overflow-y: auto; }

  /* Bootstrap row/col のgap調整 */
  .row.g-3 > [class*="col-"] { padding-left: 6px; padding-right: 6px; }

  /* セクションヘッダー */
  .section-head { font-size: 12px; margin: 16px 0 8px; }

  /* 保育日誌：2カラム → 1カラム */
  .journal-layout {
    flex-direction: column !important;
    height: auto !important;
  }
  .journal-layout .journal-sidebar {
    width: 100% !important;
    flex-shrink: 1 !important;
    overflow-y: auto !important;
    max-height: 300px !important;
    display: block !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
  }
  .journal-today-btn {
    margin: 4px 0 !important;
  }
  .journal-date-card {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 4px 0 !important;
    padding: 10px 12px !important;
  }
  .journal-status-label {
    margin-top: 0 !important;
    margin-left: auto;
  }
  .journal-layout .journal-main {
    overflow-y: visible !important;
    height: auto !important;
  }

  /* 個人記録：2カラム → 1カラム */
  .two-panel {
    flex-direction: column !important;
    height: auto !important;
  }
  .panel-left {
    width: 100% !important;
    max-height: 300px !important;
    overflow: auto !important;
  }
  .panel-right {
    min-height: 200px !important;
  }

  /* 健康観察：再検温フォーム行のインデントを縮小 */
  .during-form-row { padding-left: 10px !important; }

  /* 園児詳細：関連情報リンクを1列に */
  .related-links { flex-direction: column !important; }

  /* インラインのgridレイアウトを1列に（設定ページのクラス編集フォーム等） */
  div[style*="grid-template-columns:2fr"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ================================================
   レスポンシブ：480px 以下（小型スマホ）
================================================ */
@media (max-width: 480px) {
  /* 出欠グリッド → 1列 */
  .attend-grid { grid-template-columns: 1fr; }

  /* クイックアクション → 2列のまま */
  .quick-grid { grid-template-columns: repeat(2, 1fr); }

  /* トップバーのアクションボタン縮小 */
  .topbar-title { font-size: 15px; }
}

/* ================================================
   レスポンシブ：らくらくテーマのモバイル調整
   （文字が大きいので少し追加調整）
================================================ */
@media (max-width: 768px) {
  [data-theme="easy"] .topbar-title { font-size: 18px; }
  [data-theme="easy"] .topbar-sub { font-size: 13px; }
  [data-theme="easy"] .attend-n { font-size: 30px; }
  [data-theme="easy"] .btn-quick { font-size: 13px; }
  [data-theme="easy"] .btn-quick i { font-size: 26px; }
}
