/* AI-GEN: Claude | 2026-10-21 | 目的: 共有カレンダー試作の見た目（スマホ縦向き前提） | 関連: _docs/ai-handoffs/20261021_schedule-app_timetree-research.md */
:root {
  --bg: #ffffff; --bg2: #f5f6f5; --bg3: #ebedeb; --fg: #1f2421; --fg2: #6b726e; --fg3: #a3a9a5; --line: #e8eae8;
  --accent: #23b072; --accent-ink: #ffffff; --sun: #e5483d; --sat: #2f80e0; --today: #1f2421; --today-ink: #ffffff;
  --bubble-me: #2ec27e; --bubble-me-ink: #ffffff; --bubble: #f1f2f1; --shade: rgba(20, 24, 22, .38); --danger: #e5483d;
  --fs-ev: 10px; --row-h: 15px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121413; --bg2: #1c1f1d; --bg3: #262a28; --fg: #eceeed; --fg2: #a2a8a4; --fg3: #6c726e; --line: #2a2e2c;
    --accent: #3ccf8e; --accent-ink: #0d1a13; --sun: #ff7a70; --sat: #6aaaf5; --today: #eceeed; --today-ink: #121413;
    --bubble-me: #23a96b; --bubble-me-ink: #ffffff; --bubble: #232725; --shade: rgba(0, 0, 0, .55); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121413; --bg2: #1c1f1d; --bg3: #262a28; --fg: #eceeed; --fg2: #a2a8a4; --fg3: #6c726e; --line: #2a2e2c;
  --accent: #3ccf8e; --accent-ink: #0d1a13; --sun: #ff7a70; --sat: #6aaaf5; --today: #eceeed; --today-ink: #121413;
  --bubble-me: #23a96b; --bubble-me-ink: #ffffff; --bubble: #232725; --shade: rgba(0, 0, 0, .55); color-scheme: dark;
}
:root[data-size="0"] { --fs-ev: 9px; --row-h: 13px; }
:root[data-size="2"] { --fs-ev: 11.5px; --row-h: 17px; }
:root[data-size="3"] { --fs-ev: 13px; --row-h: 19px; }
:root[data-size="4"] { --fs-ev: 15px; --row-h: 22px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; touch-action: pan-x pan-y; overscroll-behavior: none; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
input, textarea, select, button { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea, input { -webkit-user-select: text; user-select: text; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.s { width: 18px; height: 18px; }
.ic.xs { width: 13px; height: 13px; stroke-width: 2; }

/* ===== 骨組み ===== */
#app { height: 100%; display: flex; flex-direction: column; padding-top: var(--safe-t); }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: var(--bg); padding-bottom: var(--safe-b); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; color: var(--fg3); font-size: 10px; position: relative; }
.tab[aria-current="page"] { color: var(--fg); }
.tab .dot { position: absolute; top: 6px; left: calc(50% + 9px); width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.tab .chev { position: absolute; top: 9px; left: calc(50% + 13px); width: 8px; height: 12px; }

/* ===== カレンダー画面 ===== */
.cal-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px 4px; }
.cal-head .ym { display: flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.cal-head .ym .tri { width: 10px; height: 10px; fill: var(--fg3); stroke: none; }
.cal-head .sub { font-size: 12px; color: var(--fg2); margin-top: -2px; }
.cal-head .grow { flex: 1; }
.cal-head .btn-i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--fg); }
.cal-cover { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.chips { display: flex; gap: 6px; padding: 6px 14px 4px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 10px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; max-width: 150px; }
.chip .sq { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex: none; }
.chip .sq svg { width: 15px; height: 15px; stroke-width: 3; }
.chip.off .sq { background: var(--bg3) !important; }
.chip.off .sq svg { visibility: hidden; }
.chip.off { color: var(--fg3); }
.chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; color: var(--fg2); text-align: center; padding: 4px 0 3px; border-bottom: 1px solid var(--line); }
.wk .sun { color: var(--sun); } .wk .sat { color: var(--sat); }
.pager { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: pan-y; }
/* 月表示は縦に動くものが無いので、上下のぐにぐに（ゴムのような戻り）も出さない。左右の月送りは swipe() が受け持つ */
.pager:not(.dpager) { touch-action: none; }
.track { position: absolute; inset: 0; display: flex; width: 300%; left: -100%; will-change: transform; }
/* 指を離した後の月送り。TimeTreeのように「ふわっ」と（2026-10-26 まのくん依頼で .28s→.46s→.92s）。秒数を変えるときは app.js の SLIDE_MS も合わせる */
.track.anim { transition: transform .92s cubic-bezier(.25, .75, .3, 1); }
.month { width: calc(100% / 3); height: 100%; display: flex; flex-direction: column; }
.week { flex: 1; position: relative; border-bottom: 1px solid var(--line); min-height: 0; overflow: hidden; }
.week .days { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.day { position: relative; padding-top: 2px; text-align: center; font-size: 11px; color: var(--fg); }
.day.other { color: var(--fg3); }
.day.sun, .day.hol { color: var(--sun); } .day.sat { color: var(--sat); }
.day.other.sun, .day.other.hol, .day.other.sat { opacity: .45; }
.day.is-today { background: var(--bg2); }
.day .n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; font-weight: 500; font-variant-numeric: tabular-nums; }
.day.is-today .n { background: var(--today); color: var(--today-ink); font-weight: 700; }
.bars { position: absolute; left: 0; right: 0; top: 21px; bottom: 0; pointer-events: none; }
.bar { position: absolute; height: calc(var(--row-h) - 2px); font-size: var(--fs-ev); line-height: calc(var(--row-h) - 2px); padding: 0 2px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: clip; font-weight: 600; text-align: center; }
.bar.solid { color: #fff; }
.bar.soft { text-align: left; }
.bar.hol { background: var(--sun); color: #fff; }
.more { position: absolute; font-size: 9.5px; color: var(--fg2); font-weight: 600; text-align: center; }
.last-seen { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 11.5px; color: var(--fg2); padding: 5px 0; border-bottom: 1px solid var(--line); }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.av.sm { width: 22px; height: 22px; font-size: 10.5px; }
.av.xs { width: 18px; height: 18px; font-size: 9px; }

.fab { position: absolute; right: 16px; bottom: 14px; width: 56px; height: 56px; border-radius: 50%; background: var(--bg); color: var(--fg); box-shadow: 0 4px 16px rgba(0, 0, 0, .18); display: grid; place-items: center; z-index: 3; }
.fab svg { width: 26px; height: 26px; stroke-width: 2.6; }
.mode-pop { pointer-events: auto; position: absolute; left: 10px; bottom: 6px; background: var(--bg); border-radius: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .2); padding: 6px 0; min-width: 190px; z-index: 30; }
.mode-pop button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 16px; font-size: 14px; }
.mode-pop button .ok { margin-left: auto; color: var(--accent); }

/* 週間・リスト表示 */
.agenda { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ag-day { display: grid; grid-template-columns: 56px 1fr; border-bottom: 1px solid var(--line); min-height: 52px; }
.ag-date { padding: 8px 0 0 12px; font-size: 11px; color: var(--fg2); }
.ag-date b { display: block; font-size: 20px; color: var(--fg); line-height: 1.1; }
.ag-date.sun b, .ag-date.hol b { color: var(--sun); } .ag-date.sat b { color: var(--sat); }
.ag-date.is-today b { color: var(--accent); }
.ag-list { padding: 6px 12px 6px 0; display: grid; gap: 4px; align-content: start; }
.ag-month { position: sticky; top: 0; background: var(--bg2); padding: 6px 12px; font-size: 13px; font-weight: 700; z-index: 1; }

/* 予定の行（日の一覧・リスト共通） */
.erow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-radius: 8px; text-align: left; width: 100%; }
.erow:active { background: var(--bg2); }
.erow .tm { width: 38px; flex: none; font-size: 10.5px; color: var(--fg2); text-align: center; line-height: 1.35; font-variant-numeric: tabular-nums; }
.erow .vb { width: 3px; align-self: stretch; border-radius: 2px; flex: none; min-height: 22px; }
.erow .tx { flex: 1; min-width: 0; }
.erow .tt { font-size: 14.5px; font-weight: 600; display: flex; gap: 4px; align-items: center; }
.erow .tt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erow .ds { font-size: 11.5px; color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.erow .cm { font-size: 11px; color: var(--fg2); display: flex; gap: 2px; align-items: center; }
.erow.mini { padding: 4px 4px; }
.erow.mini .tt { font-size: 13px; }

/* ===== シート・ページ ===== */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.shade { position: absolute; inset: 0; background: var(--shade); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.shade.on { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--safe-t) - 28px); background: var(--bg); border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; display: flex; flex-direction: column; padding-bottom: var(--safe-b); }
.sheet.on { transform: none; }
.sheet.tall { height: calc(100% - var(--safe-t) - 28px); }
.sheet.full { height: calc(100% - var(--safe-t) - 6px); max-height: calc(100% - var(--safe-t) - 6px); transition-duration: .34s; }
.sheet.full .sh-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.dpager { flex: 1; min-height: 0; }
.dpage { width: calc(100% / 3); height: 100%; display: flex; flex-direction: column; min-width: 0; contain: layout paint; }
.dpage + .dpage { box-shadow: -1px 0 0 var(--line, rgba(0,0,0,.06)); }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--bg3); margin: 7px auto 0; flex: none; }
.sh-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px 6px; flex: none; }
.sh-head h2 { font-size: 17px; margin: 0; flex: 1; min-width: 0; font-weight: 700; }
.sh-head .txtbtn { color: var(--accent); font-weight: 700; font-size: 15px; padding: 6px 2px; }
.sh-head .txtbtn:disabled { color: var(--fg3); }
.sh-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 18px; min-height: 0; }
.round-plus { width: 30px; height: 30px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; }
.round-plus svg { width: 18px; height: 18px; stroke-width: 2.6; }
.page { position: absolute; inset: 0; background: var(--bg); transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; display: flex; flex-direction: column; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
.page.on { transform: none; }
.pg-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; flex: none; min-height: 48px; }
.pg-head h2 { flex: 1; text-align: center; font-size: 16px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.pg-head .btn-i { width: 38px; height: 38px; display: grid; place-items: center; }
.pg-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }

.empty { color: var(--fg2); text-align: center; padding: 34px 20px; font-size: 13.5px; line-height: 1.7; }

/* ===== 予定の作成 ===== */
.f-title { width: 100%; border: 0; font-size: 22px; font-weight: 700; padding: 6px 0 12px; background: none; outline: none; }
.f-title:focus-visible { outline: none; }
.f-title::placeholder { color: var(--fg3); }
.f-row { display: flex; align-items: center; gap: 12px; min-height: 50px; border-top: 1px solid var(--line); padding: 6px 0; }
.f-row > .ic { color: var(--accent); }
.f-row .lb { flex: 1; min-width: 0; }
.f-row .val { color: var(--fg2); font-size: 14px; }
.f-row.sub { border-top: 0; min-height: 40px; padding-left: 36px; }
.f-row button.wide { flex: 1; text-align: left; display: flex; align-items: center; gap: 8px; min-height: 38px; }
.dchip { background: var(--bg2); border-radius: 8px; padding: 7px 10px; font-size: 14px; position: relative; font-variant-numeric: tabular-nums; }
.dchip.pending { box-shadow: inset 0 0 0 2px var(--accent, #2ec27e); }
.dchip input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--bg3); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px 36px; border-top: 1px solid var(--line); }
.opt { display: flex; align-items: center; gap: 5px; background: var(--bg2); border-radius: 18px; padding: 7px 12px; font-size: 13px; }
.f-area { width: 100%; border: 0; background: var(--bg2); border-radius: 10px; padding: 10px; min-height: 70px; resize: vertical; outline: none; }
.f-input { width: 100%; border: 0; background: var(--bg2); border-radius: 10px; padding: 10px; outline: none; }
.sugg { display: flex; flex-direction: column; margin: -4px 0 8px; border-radius: 12px; overflow: hidden; background: var(--bg2); }
.sugg:empty { display: none; }
.sugg button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; text-align: left; color: var(--fg); border-top: 1px solid var(--line); min-width: 0; }
.sugg button:first-child { border-top: 0; }
.sugg button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sugg button svg { flex: none; color: var(--fg3); }
.lb-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pick { display: flex; align-items: center; gap: 12px; padding: 13px 4px; width: 100%; border-bottom: 1px solid var(--line); text-align: left; }
.pick .ok { margin-left: auto; color: var(--accent); }
.ck { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ck .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--fg3); display: grid; place-items: center; flex: none; }
.ck .box.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ck .box svg { width: 14px; height: 14px; stroke-width: 3; }
.ck input { flex: 1; border: 0; background: none; outline: none; padding: 4px 0; }
.ck.done input, .ck.done span { color: var(--fg3); text-decoration: line-through; }
.seg { display: flex; background: var(--bg2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 7px 0; border-radius: 8px; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--bg); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.wd { display: flex; gap: 6px; }
.wd button { width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); font-size: 13px; }
.wd button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ===== 予定の詳細 ===== */
.dt { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 18px 14px; border-bottom: 1px solid var(--line); flex: none; }
.dt .d { font-size: 13px; font-weight: 700; }
.dt .t { font-size: 30px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dt .end .d { font-weight: 500; } .dt .end .t { font-weight: 400; }
.dt .arr { color: var(--accent); }
.info { padding: 2px 18px; }
.info .r { display: flex; align-items: flex-start; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.info .r > .ic { color: var(--accent); }
.info .r .x { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }
.info a { color: var(--accent); }
.tl { padding: 8px 14px 20px; display: grid; gap: 10px; }
.tl .sep { text-align: center; font-size: 11.5px; color: var(--fg2); display: flex; align-items: center; gap: 10px; }
.tl .sep::before, .tl .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tl .sys { text-align: center; font-size: 11.5px; color: var(--fg2); display: flex; align-items: center; justify-content: center; gap: 6px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.msg .col { display: grid; gap: 3px; min-width: 0; max-width: 78%; }
.msg .who { font-size: 10.5px; color: var(--fg2); }
.msg .bb { background: var(--bubble); border-radius: 16px; padding: 9px 12px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }
.msg .at { font-size: 10px; color: var(--fg3); flex: none; padding-bottom: 2px; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .bb { background: var(--bubble-me); color: var(--bubble-me-ink); }
.msg .ph { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.msg .ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.msg .ph img:only-child { grid-column: span 2; aspect-ratio: auto; max-height: 280px; }
.msg .stk { font-size: 54px; line-height: 1; }
mark { background: #ffe68a; color: inherit; border-radius: 2px; }
.linked { display: flex; gap: 6px; overflow-x: auto; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.linked img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }
.cbar { flex: none; display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg); }
.cbar .ib { font-size: 11px; gap: 1px; grid-auto-flow: column; width: 38px; height: 38px; display: grid; place-items: center; color: var(--fg2); border-radius: 50%; flex: none; }
.cbar .ib.on { color: var(--danger); }
.cbar .ib.on.join { color: var(--accent); }
.cbar textarea { flex: 1; min-width: 0; border: 0; background: var(--bg2); border-radius: 19px; padding: 9px 14px; max-height: 120px; resize: none; outline: none; line-height: 1.4; height: 38px; }
.send { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.send:disabled { background: var(--bg3); color: var(--fg3); }
.stk-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 6px 10px 10px; font-size: 30px; }
.stk-pad button { padding: 6px 0; border-radius: 10px; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding: 6px 10px 0; scrollbar-width: none; }
.quick button { flex: none; background: var(--bg2); border-radius: 14px; padding: 5px 10px; font-size: 12px; }
.menu { padding: 4px 6px 10px; }
.menu button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 12px; font-size: 15px; border-radius: 10px; text-align: left; }
.menu button.danger { color: var(--danger); }
.menu button:active { background: var(--bg2); }

/* ===== リスト・新着・その他 ===== */
.list-head { padding: 14px 16px 8px; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.list-head .grow { flex: 1; }
.calrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.calrow .nm { flex: 1; min-width: 0; }
.calrow .nm b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calrow .nm small { color: var(--fg2); font-size: 12px; }
.calrow .new { background: var(--danger); color: #fff; border-radius: 9px; min-width: 18px; height: 18px; font-size: 11px; display: grid; place-items: center; padding: 0 5px; font-weight: 700; }
.faces { display: flex; }
.faces .av { margin-left: -6px; border: 2px solid var(--bg); }
.feed { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; align-items: flex-start; }
.feed .x { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; }
.feed .x small { display: block; color: var(--fg2); font-size: 11.5px; }
.feed.unread { background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.grid-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 16px 16px; }
.grid-menu button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0; background: var(--bg2); border-radius: 14px; font-size: 12.5px; }
.grid-menu button .ic { color: var(--accent); width: 26px; height: 26px; }
.setrow { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.setrow .lb { flex: 1; }
.setrow .val { color: var(--fg2); font-size: 14px; }
.sec-t { padding: 18px 16px 6px; font-size: 12px; color: var(--fg2); font-weight: 700; letter-spacing: .04em; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--bg2); border-radius: 12px; padding: 0 12px; margin: 0 14px; }
.search-box input { flex: 1; border: 0; background: none; padding: 11px 0; outline: none; font-size: 15px; }
.hit { padding: 10px 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; display: block; }
.hit .h1 { font-size: 14.5px; font-weight: 600; }
.hit .h2 { font-size: 12px; color: var(--fg2); margin-top: 2px; }
.hit .h3 { font-size: 13px; margin-top: 4px; background: var(--bg2); border-radius: 8px; padding: 6px 8px; }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.album button { position: relative; aspect-ratio: 1; overflow: hidden; }
.album img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album .lk { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 6px; padding: 1px 5px; font-size: 10px; }
.album .sel { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); }
.album .sel.on { background: var(--accent); }
.album-month { padding: 12px 14px 6px; font-weight: 700; font-size: 14px; }
.viewer { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; pointer-events: auto; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
.viewer .zoom { flex: 1; min-height: 0; overflow: hidden; touch-action: none; }
.viewer .zoom img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: 0 0; will-change: transform; }
.viewer .pg-head { color: #fff; }
.btn { display: block; width: 100%; padding: 13px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center; font-size: 15px; }
.btn.ghost { background: var(--bg2); color: var(--fg); }
.btn.danger { background: none; color: var(--danger); }
.login { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 24px 28px 60px; max-width: 420px; margin: 0 auto; width: 100%; }
.login h1 { font-size: 26px; margin: 0 0 4px; }
.login p { color: var(--fg2); margin: 0 0 10px; font-size: 14px; line-height: 1.7; }
.who-list { display: grid; gap: 8px; }
.who-list button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg2); border-radius: 12px; font-weight: 600; }
.colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 10px 0; }
.colors button { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.colors svg { width: 18px; height: 18px; stroke-width: 3; }
.move-banner { position: absolute; left: 12px; right: 12px; top: 8px; z-index: 6; background: var(--fg); color: var(--bg); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.move-banner b { flex: 1; }
.move-banner button { color: var(--accent); font-weight: 700; }
.day.drop { background: color-mix(in srgb, var(--accent) 22%, transparent); }
#toast { position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 20px; font-size: 13.5px; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; max-width: calc(100% - 40px); }
#toast.on { opacity: 1; transform: translateX(-50%); }
.help-item { border-bottom: 1px solid var(--line); }
.help-item summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 13px 16px; font-size: 15px; cursor: pointer; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary span { flex: 1; min-width: 0; }
.help-item summary svg { flex: none; color: var(--fg3); transition: transform .2s; }
.help-item[open] summary svg { transform: rotate(90deg); }
.help-item p { margin: 0; padding: 0 16px 14px; font-size: 14px; line-height: 1.8; color: var(--fg2); }
.ymshade { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 45%, transparent); pointer-events: auto; }
.ympop { position: absolute; left: 10px; right: 10px; height: 182px; border-radius: 16px; background: var(--bg); box-shadow: 0 10px 34px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .08); pointer-events: auto; display: flex; overflow: hidden; transform-origin: 30% 0; }
.wheel-band { position: absolute; left: 8px; right: 8px; top: 78px; height: 26px; border-radius: 8px; background: var(--bg3); pointer-events: none; }
.wheel { position: relative; flex: 1; height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.wheel::-webkit-scrollbar { display: none; }
.wheel-in { padding: 78px 0; }
.wheel-item { height: 26px; line-height: 26px; text-align: center; font-size: 17px; color: var(--fg); scroll-snap-align: center; font-variant-numeric: tabular-nums; cursor: pointer; will-change: transform, opacity; }
.wheel-item.on { font-weight: 600; }

/* 病害虫日誌 */
.bcard { display: block; width: 100%; text-align: left; padding: 12px 16px 12px 13px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.bmeta { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.bmeta .grow { flex: 1; }
.bmeta b { white-space: nowrap; flex: none; }
.bplace { display: inline-flex; align-items: center; gap: 3px; color: var(--fg2); font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bplace .ic { color: var(--accent); flex: none; }
.btext { margin-top: 6px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bthumbs { display: flex; gap: 4px; margin-top: 8px; align-items: center; }
.bthumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.bthumbs span { color: var(--fg2); font-size: 12px; padding-left: 4px; }
.bdetail { padding: 0 16px 12px; }
.bfull { padding: 14px 0 6px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.bedit { padding: 4px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
.bedit label { display: flex; flex-direction: column; gap: 4px; }
.bedit small { color: var(--fg2); font-size: 12px; font-weight: 700; }
.bedit .f-area { min-height: 160px; resize: none; line-height: 1.6; font-size: 15px; }
.brow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bedit-ph { display: flex; flex-wrap: wrap; gap: 6px; }
.bph { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--bg2); display: grid; place-items: center; }
.bph img { width: 100%; height: 100%; object-fit: cover; }
.bph button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.bph.add { color: var(--accent); border: 1.5px dashed var(--line); }
.barch { flex: none; font-size: 10.5px; font-weight: 700; color: #93766a; border: 1px solid #93766a; border-radius: 6px; padding: 0 5px; }
.barch-note { font-size: 12.5px; color: var(--fg2); background: var(--bg2); border-radius: 8px; padding: 8px 10px; margin: 6px 0 4px; line-height: 1.6; }
.bcount { display: flex; gap: 12px; margin-top: 6px; color: var(--fg2); font-size: 12px; }
.bcount span { display: inline-flex; align-items: center; gap: 3px; }
.bsearch { padding: 0 14px 8px; display: flex; flex-direction: column; gap: 6px; }
.bsearch .bord { align-self: flex-end; width: 168px; }
.bsearch .bord button { padding: 5px 0; font-size: 12px; }
.blabel-wrap { display: flex; flex-direction: column; gap: 4px; }
.blabels { display: flex; flex-wrap: wrap; gap: 6px; }
.blab { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 9px; border: 1px solid var(--line); font-size: 12.5px; }
.blab.on { border-color: var(--fg); font-weight: 700; }
.blab .dot { width: 12px; height: 12px; border-radius: 50%; }
.lcards { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.lcard { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px; color: var(--fg); text-decoration: none; max-width: 320px; background: var(--bg); }
.lcard img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex: none; }
.lcard span { display: flex; flex-direction: column; min-width: 0; }
.lcard b { font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard small { color: var(--fg2); font-size: 11px; }
.bfull a, .bb a { color: var(--accent); overflow-wrap: anywhere; }
.msg.mine .bb a { color: inherit; text-decoration: underline; }
.note-seg { display: grid; grid-template-columns: 1fr 1fr; }
.note-seg button { position: relative; }
.segdot { position: absolute; top: 6px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.bwip { flex: none; font-size: 10.5px; font-weight: 700; color: #e5483d; border: 1px solid #e5483d; border-radius: 6px; padding: 0 5px; }
.bmeta b.mtitle { white-space: normal; flex: 0 1 auto; font-size: 15px; line-height: 1.4; }
.btext.two { -webkit-line-clamp: 2; color: var(--fg2); font-size: 13px; }
/* シフト */
.sh-banner { display: flex; flex-direction: column; gap: 4px; padding: 4px 10px 6px; }
.sh-banner button { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, var(--bg)); color: var(--fg); font-size: 13px; font-weight: 600; text-align: left; }
.sh-banner button span { flex: 1; }
.sh-banner .ic { color: var(--accent); }
.pg-body.sh-body { padding: 0 0 20px; }
.sh-month { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 2px 14px 6px; }
.sh-month b { font-size: 17px; }
.sh-info { margin: 0 14px 10px; padding: 10px 12px; background: var(--bg2); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.6; }
.sh-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-status { color: var(--fg2); font-size: 12.5px; }
.sh-subs { display: flex; flex-direction: column; gap: 4px; }
.sh-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.sh-sub .ok { color: var(--accent); font-weight: 700; }
.sh-sub .no { color: var(--danger); font-weight: 700; }
.sh-sub small { width: 100%; color: var(--fg2); padding-left: 26px; }
.sh-brush { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.sh-brush .chip, .sh-fixed .chip, .sh-pat .chip { padding: 6px 10px; max-width: none; }
.chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.chip.off-chip.on { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, var(--bg)); }
.sh-maybe { display: flex; align-items: center; gap: 6px; font-size: 13px; width: 100%; padding-top: 2px; }
.sh-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 0 10px; }
.sh-wd { text-align: center; font-size: 11px; color: var(--fg2); padding: 2px 0; }
.sh-wd.sun { color: var(--sun); } .sh-wd.sat { color: var(--sat); }
.sh-day { min-height: 54px; border-radius: 8px; background: var(--bg2); display: flex; flex-direction: column; align-items: center; padding: 4px 1px; gap: 2px; }
.sh-day .n { font-size: 12px; font-weight: 700; }
.sh-day .v { font-size: 10px; line-height: 1.2; text-align: center; font-variant-numeric: tabular-nums; white-space: pre-line; }
.sh-day.ok { background: color-mix(in srgb, var(--accent) 24%, var(--bg)); }
.sh-day.maybe { background: var(--bg); outline: 1.5px dashed var(--accent); outline-offset: -2px; }
.sh-day.off { background: color-mix(in srgb, var(--danger) 16%, var(--bg)); }
.sh-day.off .v { color: var(--danger); font-weight: 700; }
.sh-day.fixed { background: var(--accent); color: var(--accent-ink); }
.sh-day.today .n { text-decoration: underline; }
.sh-day:disabled { opacity: 1; }
.sh-sum { padding: 8px 14px; font-size: 12.5px; color: var(--fg2); }
.sh-fixed { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.btn.ghost { background: var(--bg2); color: var(--fg); }
.btn.small { display: inline-block; width: auto; padding: 7px 12px; font-size: 13px; }
.sh-body .btn.ghost:not(.small) { margin: 0 14px; width: calc(100% - 28px); }
.sh-body > div > .btn.ghost:not(.small) { margin: 0; width: 100%; }
.sh-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 0 4px; }
.sh-table { border-collapse: collapse; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.sh-table th, .sh-table td { border: 1px solid var(--line); text-align: center; padding: 3px 2px; min-width: 34px; height: 34px; }
.sh-table.wide th, .sh-table.wide td { min-width: 66px; font-size: 11.5px; white-space: pre-line; }
.sh-table th { background: var(--bg2); font-weight: 700; cursor: pointer; }
.sh-table th span { display: block; font-size: 12px; } .sh-table th small { display: block; font-weight: 400; color: var(--fg2); }
.sh-table th.sun span { color: var(--sun); } .sh-table th.sat span { color: var(--sat); } .sh-table th.today { background: color-mix(in srgb, var(--accent) 20%, var(--bg2)); }
.sh-table .nm { position: sticky; left: 0; background: var(--bg); z-index: 1; text-align: left; min-width: 78px; white-space: nowrap; padding: 0 6px; }
.sh-table td.nm { display: table-cell; } .sh-table td.nm .av { margin-right: 4px; vertical-align: middle; }
.sh-table td.cell { cursor: pointer; }
.sh-table td.cell.self { position: relative; }
.sh-table td.cell.self::before { content: ''; position: absolute; top: 3px; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: #4aa8f0; }
.sh-table td.plan { background: color-mix(in srgb, var(--accent) 30%, var(--bg)); }
.sh-table td.plan b { font-weight: 800; }
.sh-table td.req { color: var(--fg2); }
.sh-table td.req.off { color: var(--danger); font-weight: 700; }
.sh-table td.req.maybe span { text-decoration: underline dashed; }
.sh-table td.other { opacity: .45; }
.sh-table .tot { background: var(--bg2); min-width: 46px; font-weight: 700; }
.sh-table tr.cnt td { font-weight: 700; background: var(--bg2); }
.sh-table tr.cnt td.short { color: #fff; background: var(--danger); }
.sh-legend { padding: 6px 14px; font-size: 11.5px; color: var(--fg2); line-height: 1.6; }
.sh-warn { margin: 6px 14px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 12%, var(--bg)); font-size: 13px; line-height: 1.7; }
.sh-dayrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sh-dayrow small { width: 100%; color: var(--fg2); padding-left: 36px; }
.sh-call, .sh-req { margin: 0 14px 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.sh-req { flex-direction: row; flex-wrap: wrap; align-items: center; }
.sh-req b { flex: 1; min-width: 60%; } .sh-req small, .sh-call small { color: var(--fg2); width: 100%; }
.sh-req .st { font-size: 12px; font-weight: 700; } .sh-req .st.pending { color: var(--fg2); } .sh-req .st.ok { color: var(--accent); } .sh-req .st.ng { color: var(--danger); }
.sh-body .pick { padding: 13px 14px; gap: 10px; }
.sh-body .pick span { flex: 1; }
.sh-pat { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.sh-pat .f-input { flex: 1; }
.sh-need { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sh-need label, .sh-wage label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--fg2); }
.sh-need .f-input { padding: 8px 4px; text-align: center; }
.sh-wage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sh-wage b { grid-column: 1 / -1; }
.sh-brkwarn { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, #f7b524 22%, var(--bg)); font-size: 12.5px; line-height: 1.6; }
.sh-day.brkw .v::after { content: ' ⚠'; }
.sh-table td.brkw { box-shadow: inset 0 0 0 2px #f7b524; }
.sh-table td.brkw b::after { content: '⚠'; }
.sh-contract { grid-column: 1 / -1; flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 12.5px !important; color: var(--fg) !important; }
.sh-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.sh-quick small { width: 100%; color: var(--fg2); font-size: 11.5px; }
.sh-quick .chip { padding: 5px 12px; }
.sh-req.new { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.sh-table td.nm small.guest { margin-left: 4px; font-size: 10px; padding: 1px 5px; border-radius: 6px; background: var(--bg3); color: var(--fg2); }
.admin-entry { border: 1.5px solid var(--accent); border-radius: 14px; margin: 4px 16px 6px; width: calc(100% - 32px); }
.admin-entry .ic { color: var(--accent); }
.admin-entry .new, .sec-t .adm-n { background: var(--danger, #e5483d); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
.adm-members .setrow { width: 100%; }

.admin-entry .lb, .adm-members .lb { display: flex; flex-direction: column; gap: 2px; }
.admin-entry .lb small, .adm-members .lb small { color: var(--fg2); font-size: 12px; }
.sh-day { position: relative; }
.sh-day .stm { position: absolute; left: 0; right: 0; bottom: 1px; font-size: 8.5px; line-height: 1; color: var(--fg2); }
.sh-day.st-draft, .sh-day.st-sent { outline: 1.5px dashed var(--accent); outline-offset: -2px; }
.sh-day.st-rejected { opacity: .55; }
.adm-send { display: flex; flex-direction: column; gap: 6px; }
.adm-send-h { display: flex; align-items: center; gap: 8px; }
.adm-send-h small { margin-left: auto; color: var(--fg2); }
.adm-day { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-top: 1px solid var(--line); }
.adm-day span { flex: 1; font-size: 13px; }
.adm-day.brkw span { color: var(--danger, #e5483d); }
.tbtn { font: inherit; color: inherit; text-align: left; font-variant-numeric: tabular-nums; cursor: pointer; }
.dchip .tbtn { position: absolute; inset: 0; opacity: 0; width: 100%; }
.tpop { z-index: 60; }

.barch-ph { display: block; font-size: 11px; color: var(--fg2); margin-top: 2px; }
.login-note { font-size: 12.5px !important; }
.login-who { font-size: 18px; font-weight: 700; padding: 6px 2px; }
.code-in { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.totp-key { font-family: ui-monospace, Menlo, monospace; font-size: 15px; padding: 10px 12px; background: var(--bg2); border-radius: 10px; word-break: break-all; user-select: all; }
.login a.btn { text-align: center; text-decoration: none; display: block; }
.adm-log { padding: 0 14px; }
.adm-log-r { display: grid; grid-template-columns: 88px 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.adm-log-r small { grid-column: 2 / 4; color: var(--fg2); }
.adm-log-r.bad span:nth-child(3) { color: var(--danger, #e5483d); font-weight: 600; }

