/* ===== 保護者ポータル（やわらかポップ） ===== */
:root {
  --cream: #fdf9ee; --card: #fffefa; --ink: #3a3528; --sub: #857e6c; --mute: #bdb6a3;
  --g-50: #eef7e2; --g-100: #dcefc6; --g-200: #c3e3a3; --g-400: #6cc04a; --g-600: #3f9a26; --g-800: #2c5e1c;
  --y-100: #fff3b8; --y-300: #ffe27a; --y-700: #8a6a00;
  --pink-100: #fde3e3; --red: #d9483b;
  --o-100: #ffe9c7; --o-200: #ffd99a; --o-400: #f0a531; --o-800: #7a4600;
  --line: #e6eed8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--cream); color: var(--ink); font-family: "M PLUS Rounded 1c", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; line-height: 1.6; }
a { color: var(--g-600); }
button, select, input { font-family: inherit; color: inherit; font-size: inherit; }
code { font-family: ui-monospace, monospace; }
.inline { display: inline; }
.muted { color: var(--sub); }
.small { font-size: 12px; }
.center { text-align: center; }
.red { color: var(--red); }
.ok { color: var(--g-600); font-weight: 700; margin: 12px 0; }
.alert { background: var(--pink-100); color: var(--red); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-weight: 700; font-size: 14px; }
.err { display: block; color: var(--red); font-size: 12px; min-height: 0; }

/* pixel block decorations */
.px { display: grid; grid-template-columns: repeat(3, 10px); grid-auto-rows: 10px; pointer-events: none; }
.px i { display: block; }
.px .g { background: var(--g-200); } .px .y { background: var(--y-300); } .px .l { background: var(--g-100); }
.px.deco { position: absolute; right: 16px; top: 10px; z-index: 1; }

/* header */
.top { max-width: 1040px; margin: 0 auto; padding: 18px 20px 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--g-800); text-decoration: none; letter-spacing: .02em; }
.mark { display: grid; grid-template-columns: repeat(2, 9px); grid-auto-rows: 9px; }
.mark i:nth-child(1) { background: var(--y-300); } .mark i:nth-child(2) { background: var(--g-200); }
.mark i:nth-child(3) { background: var(--g-100); } .mark i:nth-child(4) { background: var(--g-400); }
.link { color: var(--sub); text-decoration: none; background: none; border: none; cursor: pointer; font-size: 12px; }
.link:hover { color: var(--g-600); }
/* メニュー：大きなボタン（今のページは塗りつぶし）＋ 名前のボタン（パスワード変更・ログアウト） */
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--g-800); background: #fff; box-shadow: inset 0 0 0 2px var(--g-100); text-decoration: none; white-space: nowrap; }
.nav-btn:hover { background: var(--g-50); }
.nav-btn.on { background: var(--g-400); color: #fff; box-shadow: none; }
.nav-btn svg, .acct svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.acct { position: relative; }
.acct summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); user-select: none; }
.acct summary::-webkit-details-marker { display: none; }
.acct summary:hover, .acct[open] summary { box-shadow: inset 0 0 0 2px var(--g-200); }
.acct .chev { width: 16px; height: 16px; transition: transform .15s; }
.acct[open] .chev { transform: rotate(180deg); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(58, 53, 40, .12), inset 0 0 0 1.5px var(--line); padding: 6px; z-index: 20; }
.acct-menu form { margin: 0; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--g-50); }
@media (max-width: 700px) {
  .top { padding: 12px 16px 4px; }
  .logo { flex: 1; min-width: 0; font-size: 14px; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .nav-btn { flex: 1; justify-content: center; padding: 10px 6px; font-size: 13px; }
  .acct-name { max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

main { padding-bottom: 24px; }
.hello-row { max-width: 1040px; margin: 0 auto; padding: 4px 20px 0; display: flex; justify-content: space-between; align-items: center; }
.hello { font-size: 22px; font-weight: 800; }
.hello small { font-size: 13px; font-weight: 500; color: var(--sub); margin-left: 6px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px 120px; display: grid; gap: 22px; }
@media (min-width: 860px) { .wrap { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; padding-bottom: 48px; } }
.narrow { max-width: 440px; margin: 24px auto; padding: 0 20px; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 22px 20px; position: relative; }
.card p + p { margin-top: 14px; }
.h1 { font-size: 22px; font-weight: 800; color: var(--g-800); margin-bottom: 6px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 12px; background: var(--g-100); color: var(--g-800); font-weight: 800; text-decoration: none; border: none; cursor: pointer; }
.btn:hover { background: var(--g-200); }

/* forms */
.field { display: block; margin: 14px 0; }
.field > span:first-child { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field input, .field select { width: 100%; height: 48px; border: 2px solid #d9d3bf; border-radius: 12px; padding: 0 14px; background: #fff; font-size: 16px; }
.field input:focus, .field select:focus, .times select:focus { outline: none; border-color: var(--g-400); box-shadow: 0 0 0 3px var(--g-100); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0 18px; }
.check input { width: 18px; height: 18px; accent-color: var(--g-600); }
.login .save { margin-bottom: 12px; }
/* 送信中（ログイン）：くるくる＋文字。時間がかかるときの説明 */
.save.busy { display: flex; align-items: center; justify-content: center; gap: 12px; letter-spacing: .15em; }
.save.busy:disabled { opacity: 1; background: var(--g-600); box-shadow: 0 4px 0 var(--g-800); } /* 薄くせず、文字を読みやすく */
.save .spin { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .save .spin { animation-duration: 2.4s; } }
.busy-note { font-size: 13px; font-weight: 700; color: var(--g-800); text-align: center; line-height: 1.6; margin: 0 0 12px; }
.busy-note:empty { display: none; }

/* child tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 3px solid var(--g-200); margin: 14px 0 18px; }
.tab { padding: 9px 22px 7px; border-radius: 14px 14px 0 0; font-size: 16px; font-weight: 800; color: var(--sub); text-decoration: none; white-space: nowrap; }
.tab.on { background: var(--g-200); color: var(--g-800); }

/* month nav */
.mon { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mon h1 { font-size: 26px; font-weight: 800; color: var(--g-800); letter-spacing: .03em; }
.nb { width: 46px; height: 40px; border-radius: 12px; background: var(--g-100); color: var(--g-600); font-size: 22px; font-weight: 800; display: grid; place-items: center; text-decoration: none; }
.nb:hover { background: var(--g-200); }

/* calendar */
.cal { background: var(--card); border: 2px solid var(--line); border-radius: 20px; overflow: hidden; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.w { background: var(--g-50); text-align: center; font-weight: 800; font-size: 14px; padding: 10px 0; }
.w.sun { color: var(--red); } .w.sat { color: var(--g-600); }
.d { min-height: 72px; padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: none; border-top: 1.5px solid var(--line); border-left: 1.5px solid var(--line); background: transparent;
  font-size: 16px; font-weight: 700; position: relative; text-align: center; }
.w + .d, .grid > :nth-child(7n+1) { border-left: none; }
.d.sun, .d.hol { color: var(--red); } .d.sat { color: var(--g-600); }
/* 過ぎた日は灰色（開講日だった日も灰色にして、これからの日と区別する） */
.grid > .d.past, .grid > .d.past.cls { background: #efece5; color: #aaa497; }
.d.past .num { color: #aaa497; }
.d.past .chk, .d.past .pill.cnt { background: #c4beb0; color: #fff; }
.d.past .abs { border-color: #c4beb0; }
.d.past .tm, .d.past .pill { color: #9a9486; }
.d.past .pill.off, .d.past .pill.sp { background: #e2ded4; }
.d.past.cls:hover { background: #e6e2d9; }
.d.past.sel { background: #e6e2d9; box-shadow: inset 0 0 0 2.5px #aaa497; }
/* 今日 */
.d.today .num { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 7px; }
/* 開講日のマスは薄い緑で塗る（ひと目で授業のある日が分かるように） */
.d.cls { cursor: pointer; background: var(--g-100); }
.d.cls:hover { background: var(--g-200); }
.d.sel { background: var(--g-200); box-shadow: inset 0 0 0 2.5px var(--g-600); border-radius: 12px; }
.swatch { width: 16px; height: 16px; border-radius: 4px; background: var(--g-100); border: 1px solid var(--g-200); display: inline-block; }
.d.dirty::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--y-300); }
.chk { width: 20px; height: 20px; border-radius: 50%; background: var(--g-400); display: grid; place-items: center; flex-shrink: 0; }
.chk svg { width: 12px; height: 12px; }
.abs { width: 20px; height: 20px; border-radius: 50%; border: 2px dashed var(--mute); flex-shrink: 0; }
.chk.sm, .abs.sm { width: 16px; height: 16px; }
.tm { font-size: 10px; font-weight: 700; color: var(--g-600); line-height: 1; }
.tm.no { color: var(--sub); }
.tm.off { color: var(--mute); font-weight: 500; }
.who.off .who-title, .who.off b { color: var(--sub); }
.who.off .who-title small { font-weight: 500; font-size: 11px; margin-left: 4px; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 8px; line-height: 1.2; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.d .pill { font-size: 10px; padding: 2px 4px; border-radius: 6px; }
.pill.off { background: var(--pink-100); color: #c0392b; }
.pill.sp { background: var(--y-300); color: var(--y-700); }
.pill.cnt { background: var(--g-400); color: #fff; }
.pill.cnt.zero { background: #efece3; color: var(--sub); }
.hint { margin-top: 10px; }
/* 特別開講（申込制）はオレンジ系で通常の開講日（緑）と区別する */
.d.cls.spc { background: var(--o-100); }
.d.cls.spc:hover { background: var(--o-200); }
.d.spc.sel { background: var(--o-200); box-shadow: inset 0 0 0 2.5px var(--o-400); }
.pill.spc { background: var(--o-200); color: var(--o-800); }
.swatch.spc { background: var(--o-100); border-color: var(--o-200); }
.dh.spc { background: var(--o-100); }
.dh.spc b { color: var(--o-800); }
.note.spc-note { color: var(--o-800); padding-top: 12px; }
/* 申請中（スタッフの承認待ち） */
.req { width: 20px; height: 20px; border-radius: 50%; background: var(--o-400); display: grid; place-items: center; flex-shrink: 0; }
.req svg { width: 12px; height: 12px; }
.req.sm { width: 16px; height: 16px; }
.tm.req { color: var(--o-800); }
/* 空き席・満席 */
.pill.seat { background: #fff; color: var(--g-800); box-shadow: inset 0 0 0 1px var(--g-200); }
.pill.full, .pill.cnt.full { background: #ece8df; color: #4a453b; box-shadow: inset 0 0 0 1px #d6d0c2; }
.seat-text { font-weight: 800; color: var(--g-800); font-size: 14px; }
.seat-text.full { color: var(--red); }
.toast.warn { color: var(--o-800); }
.grid > .d.past.cls.spc { background: #efece5; }
.d.past .req { background: #c4beb0; }
.d.past .pill.spc { background: #e2ded4; }
.who { padding: 12px 0; border-bottom: 1.5px solid var(--line); }
.who:last-of-type { border-bottom: none; }
.who-title { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.who ul { list-style: none; display: grid; gap: 6px; }
.who li { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; font-size: 14px; }
.who .parent { font-size: 12px; color: var(--sub); }
.who .time { margin-left: auto; font-weight: 700; color: var(--g-600); font-size: 13px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--sub); font-weight: 500; }
.legend > span { display: flex; align-items: center; gap: 6px; }

/* detail */
.detail { background: var(--card); border: 2px solid var(--line); border-radius: 22px; overflow: hidden; position: relative; }
.dh { background: var(--g-100); padding: 16px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dh b { font-size: 24px; font-weight: 800; color: var(--g-800); }
.db { padding: 4px 20px 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 0; border-bottom: 1.5px solid var(--line); }
.row .label { font-size: 17px; font-weight: 800; white-space: nowrap; }
.sw { width: 62px; height: 34px; border-radius: 999px; background: #e4e0d4; position: relative; cursor: pointer; border: none; transition: .2s; flex-shrink: 0; }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .2s; }
.sw.on { background: var(--g-400); } .sw.on::after { left: 32px; }
.sw:disabled { cursor: not-allowed; opacity: .5; }
.times { display: flex; align-items: center; gap: 6px; }
.times select { appearance: none; border: 2px solid #d9d3bf; border-radius: 12px; padding: 8px 26px 8px 10px; font-size: 16px; font-weight: 700; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23857e6c'/%3E%3C/svg%3E") no-repeat right 9px center; }
.times select:disabled { cursor: not-allowed; }
.times.dim { opacity: .35; }
.tilde { font-weight: 800; color: var(--sub); }
.note { font-size: 12px; color: var(--sub); line-height: 1.8; padding-top: 10px; }
.note.closed { color: var(--red); }

/* save bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(253, 249, 238, 0), var(--cream) 35%); z-index: 5; }
@media (min-width: 860px) { .bar { position: static; padding: 0; background: none; margin-top: 16px; } }
.save { width: 100%; height: 58px; border: none; border-radius: 18px; background: var(--g-400); color: #fff; font-size: 20px; font-weight: 800; letter-spacing: .3em; cursor: pointer; box-shadow: 0 4px 0 var(--g-600); transition: .1s; }
.save:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--g-600); }
.save.dirty { background: var(--g-600); box-shadow: 0 4px 0 var(--g-800); }
.save:disabled { opacity: .6; cursor: wait; }
.toast { text-align: center; font-size: 13px; font-weight: 700; color: var(--g-600); min-height: 20px; margin-top: 8px; }
.toast.error { color: var(--red); }

.staff-note { max-width: 1000px; margin: 10px auto 0; padding: 10px 14px; border-radius: 12px; background: var(--y-100); color: var(--y-700); font-size: 13px; line-height: 1.7; }
@media (max-width: 1040px) { .staff-note { margin: 10px 20px 0; } }
.staff-note a { margin-left: 6px; color: var(--g-800); font-weight: 700; }

/* いつも参加する曜日 */
.weekdays-card { margin-top: 18px; }
.h2 { font-size: 16px; font-weight: 800; color: var(--g-800); margin-bottom: 10px; }
.h2 small { font-size: 12px; color: var(--sub); font-weight: 500; margin-left: 4px; }
.wd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wd { position: relative; cursor: pointer; }
.wd input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); font-weight: 800; color: var(--sub); background: #fff; }
.wd input:checked + span { background: var(--g-400); border-color: var(--g-400); color: #fff; }
.wd input:focus-visible + span { box-shadow: 0 0 0 3px var(--g-200); }
.wd.sun span { color: var(--red); } .wd.sat span { color: var(--g-600); }
.wd.sun input:checked + span, .wd.sat input:checked + span { color: #fff; }
@media (max-width: 859px) { .weekdays-card { margin-bottom: 90px; } }

/* ===== 授業レポート ===== */
.page { max-width: 880px; margin: 0 auto; padding: 8px 20px 40px; }
.page-title { font-size: 24px; font-weight: 800; color: var(--g-800); }
.report-list { display: grid; gap: 16px; margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.report-card { display: block; background: var(--card); border: 2px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; transition: .15s; }
.report-card:hover { border-color: var(--g-200); transform: translateY(-2px); }
.report-card .cover { aspect-ratio: 16 / 10; background: var(--g-50); display: grid; place-items: center; overflow: hidden; }
.report-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mark.big { grid-template-columns: repeat(2, 22px); grid-auto-rows: 22px; }
.report-card .meta { padding: 12px 16px 16px; display: grid; gap: 4px; }
.report-card .meta b { font-size: 17px; font-weight: 800; color: var(--g-800); }
.report-card .meta p { font-size: 13px; color: var(--sub); }
.report-card .meta .pill { justify-self: start; }
.date { font-size: 12px; font-weight: 700; color: var(--sub); }

.report { background: var(--card); border: 2px solid var(--line); border-radius: 22px; overflow: hidden; margin: 8px 0 16px; }
.report-head { background: var(--g-100); padding: 20px; position: relative; }
.report-head h1 { font-size: 24px; font-weight: 800; color: var(--g-800); line-height: 1.4; }
.report-body { padding: 18px 20px 4px; white-space: pre-wrap; font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
/* 本文の書式：# 大見出し／## 小見出し／**太字**／[画像12] */
.report-body p { margin: 0 0 .9em; }
.report-body h3 { font-size: 20px; font-weight: 800; color: var(--g-800); line-height: 1.5; margin: .6em 0 .5em; padding-left: 12px; border-left: 6px solid var(--g-400); }
.report-body h4 { font-size: 17px; font-weight: 800; color: var(--g-800); line-height: 1.5; margin: .5em 0 .3em; }
.report-body > :first-child { margin-top: 0; }
.report-body strong { font-weight: 800; background: linear-gradient(transparent 62%, var(--y-100) 62%); }
.rb-fig { margin: 4px 0 18px; display: grid; gap: 6px; justify-items: start; }
.rb-fig img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; border-radius: 14px; background: var(--g-50); }
.rb-fig figcaption { font-size: 13px; line-height: 1.5; display: grid; }
.rb-fig figcaption b { font-weight: 800; }
.rb-fig figcaption span { color: var(--sub); font-size: 12px; }
.rb-pdf a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--pink-100); color: var(--ink); text-decoration: none; font-weight: 700; }
.rb-pdf b { color: var(--red); font-weight: 800; }
.rb-missing { background: var(--pink-100); color: var(--red); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.report-section { padding: 16px 20px 20px; }
.report-section h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dot-block { width: 14px; height: 14px; background: var(--g-400); box-shadow: inset 0 -5px 0 #8b5a2b; display: inline-block; }
.gallery { display: grid; gap: 12px; }
.gallery.works { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery.cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery figure { display: grid; gap: 6px; }
.gallery img { width: 100%; border-radius: 14px; display: block; background: var(--g-50); }
.gallery.works img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 13px; line-height: 1.5; display: grid; }
.gallery figcaption b { font-weight: 800; }
.gallery figcaption span { color: var(--sub); font-size: 12px; }
.pdf { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 14px; background: var(--pink-100); color: var(--red); font-weight: 800; font-size: 22px; text-decoration: none; text-align: center; }
.pdf small { display: block; font-size: 11px; color: var(--sub); font-weight: 500; word-break: break-all; padding: 0 8px; }

.lightbox { position: fixed; inset: 0; background: rgba(30, 28, 22, .88); display: grid; place-items: center; z-index: 50; padding: 16px; }
.lightbox[hidden] { display: none; }
/* 画面の大きさに収める（% は grid の中では効かず見切れるため、画面の幅・高さで指定。上下は閉じるボタンの分あける） */
.lightbox img { display: block; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: calc(100vh - 112px); max-height: calc(100dvh - 112px); object-fit: contain; border-radius: 10px; }
.lb-close { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: none; background: #fff; font-size: 24px; font-weight: 800; cursor: pointer; }
.no-scroll { overflow: hidden; }

/* ===== 管理画面 ===== */
.admin { max-width: 1040px; margin: 0 auto; padding: 8px 20px 40px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 18px; }
.admin-nav a { padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--sub); font-weight: 700; font-size: 14px; background: var(--card); border: 2px solid var(--line); }
.admin-nav a.on { background: var(--g-200); color: var(--g-800); border-color: var(--g-200); }
.admin h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; color: var(--g-800); }
.admin .card + .card { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; color: var(--sub); font-weight: 700; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.list td { padding: 8px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
table.list tr.cancelled td { color: var(--mute); }
.badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; background: var(--g-100); color: var(--g-800); margin: 1px 2px 1px 0; white-space: nowrap; }
.badge.no { background: #efece3; color: var(--sub); }
.badge.off { background: var(--pink-100); color: var(--red); }
table.list input[type=time], table.list input[type=text] { height: 36px; border: 2px solid #d9d3bf; border-radius: 10px; padding: 0 8px; background: #fff; font-size: 14px; }
table.list input[type=text] { width: 100%; min-width: 140px; }
table.list input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--g-600); }
table.list .form-row { margin-top: 6px; }
button.badge { border: none; cursor: pointer; font-family: inherit; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { margin: 6px 0; flex: 1 1 160px; }
.form-row .field input, .form-row .field select { height: 42px; font-size: 15px; }
.form-row .btn { height: 42px; margin: 6px 0; }
.weekdays { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; font-size: 14px; }
.weekdays label { display: flex; gap: 4px; align-items: center; }
.secret { background: var(--y-100); border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 14px; }
.secret code { font-size: 18px; font-weight: 700; letter-spacing: .05em; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { display: inline; }
/* 表の中の操作ボタン列は、行の高さ・区切り線を他の列とそろえるため表のセルのままにする */
td.actions { display: table-cell; white-space: nowrap; }
/* アカウント一覧：行の区切りをはっきりさせ、押し間違いを防ぐ */
table.list.users > tbody > tr > td { border-bottom: 3px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
table.list.users > tbody > tr:hover > td { background: var(--g-50); }
td.actions form { display: inline-block; margin: 0 4px 4px 0; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.warn { background: var(--pink-100); color: var(--red); }
.btn.ghost { background: transparent; border: 2px solid var(--line); }
.form-row .field.grow { flex: 3 1 260px; }
.field textarea { width: 100%; border: 2px solid #d9d3bf; border-radius: 12px; padding: 10px 14px; background: #fff; font-size: 15px; line-height: 1.7; resize: vertical; }
.field input[type=file] { height: auto; padding: 8px; font-size: 14px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 12px; }
.media-item { border: 2px solid var(--line); border-radius: 16px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; background: var(--g-50); }
.media-item .pdf { aspect-ratio: 4 / 3; font-size: 18px; }
.media-item form, .media-item .media-fields { display: grid; gap: 6px; }
.media-item input, .media-item select { height: 36px; border: 2px solid #d9d3bf; border-radius: 10px; padding: 0 8px; background: #fff; font-size: 13px; width: 100%; }
.media-item .badge { justify-self: start; }
.child-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.child-edit { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.child-edit input.note-input { height: 32px; border: 2px solid #d9d3bf; border-radius: 8px; padding: 0 8px; font-size: 13px; width: 180px; }
.child-edit input.child-name { height: 32px; border: 2px solid #d9d3bf; border-radius: 8px; padding: 0 8px; font-size: 13px; width: 150px; }
.child-edit label { display: inline-flex; gap: 4px; align-items: center; }
/* まとめて保存（開講日・アカウント・レポートの画像） */
.bulk-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.bulk-bar.bottom { margin: 12px 0 0; }
.btn.bulk-save.dirty { background: var(--g-600); color: #fff; }
table.list tr.unsaved > td { background: var(--y-100); }
.child-row.unsaved, .child-edit.unsaved, .media-fields.unsaved { background: var(--y-100); border-radius: 10px; box-shadow: 0 0 0 4px var(--y-100); }
.wd-mini { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wd-mini label { display: inline-flex; gap: 2px; align-items: center; }
/* 管理画面：定員・特別開講・承認待ち */
.cap-input { width: 72px; }
table.list tr.special > td:first-child { box-shadow: inset 4px 0 0 var(--o-400); }
.badge.spc { background: var(--o-100); color: var(--o-800); }
.pending-card { border-color: var(--o-200); }
.pending-card h2 { color: var(--o-800); }
/* いつもの参加時間 */
select.time-mini, input.time-mini { height: 30px; border: 2px solid #d9d3bf; border-radius: 8px; padding: 0 4px; font-size: 13px; background: #fff; }
.wd-times { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.wd-times .label { font-weight: 800; font-size: 14px; }
.times input[type=time] { border: 2px solid #d9d3bf; border-radius: 12px; padding: 6px 8px; font-size: 16px; font-weight: 700; background: #fff; color: var(--ink); min-width: 0; }
.times input[type=time]:focus { outline: none; border-color: var(--g-400); box-shadow: 0 0 0 3px var(--g-100); }
.times input[type=time]:disabled { opacity: .6; cursor: not-allowed; }
button.link { background: none; border: none; padding: 0; color: var(--g-600); text-decoration: underline; cursor: pointer; font: inherit; }
.spc-approve { display: inline-flex; gap: 4px; align-items: center; background: var(--o-100); color: var(--o-800); border-radius: 8px; padding: 2px 8px; }
/* 開講日のまとめて削除 */
.sel-col { width: 32px; text-align: center; }
.sel-col input { width: 18px; height: 18px; accent-color: var(--red); }
.bulk-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.child-edit input.name-input { height: 32px; border: 2px solid #d9d3bf; border-radius: 8px; padding: 0 8px; font-size: 13px; width: 110px; }

/* 授業レポートの編集：本文の書式ボタンと見え方 */
.rb-field > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.rb-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rb-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.rb-btn:hover, .rb-btn[aria-expanded="true"] { border-color: var(--g-200); background: var(--g-50); }
.rb-btn.big { font-size: 16px; font-weight: 800; }
.rb-btn.mid { font-size: 14px; font-weight: 800; }
.rb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rb-picker { border: 2px solid var(--g-200); background: var(--g-50); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.rb-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 6px; max-height: 320px; overflow-y: auto; }
.rb-pick { display: grid; gap: 4px; padding: 6px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; text-align: left; font-size: 12px; }
.rb-pick:hover, .rb-pick:focus-visible { border-color: var(--g-400); }
.rb-pick img, .rb-pick .pdf { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: grid; font-size: 16px; }
.rb-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-pick code { color: var(--sub); font-size: 11px; }
.rb-help code, .media-tags code { background: #f1ede2; border-radius: 6px; padding: 0 4px; }
.rb-preview-box { margin: 10px 0 14px; }
.rb-preview-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.rb-preview-label small { font-weight: 500; margin-left: 6px; }
.rb-preview { border: 2px dashed var(--line); border-radius: 14px; min-height: 60px; background: var(--card); padding: 14px 16px 2px; }
.rb-preview:empty::before { content: "（本文を入力すると、ここに保護者の見え方が出ます）"; color: var(--mute); font-size: 13px; }
.media-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
