.calendar-page { min-height:100dvh; overflow:hidden; background:linear-gradient(180deg,#e9f5f9 0%,#fafdfe 62%,#eaf4f8 100%); }
.calendar-page * { -webkit-tap-highlight-color:transparent; -webkit-touch-callout:none; }
.calendar-shell[hidden],.calendar-composer[hidden],.calendar-login[hidden] { display:none !important; }
.calendar-login { display:grid; min-height:100dvh; place-items:center; color:var(--muted); font-size:13px; }
.calendar-shell { --composer-height:178px; display:grid; position:relative; grid-template-rows:59px minmax(0,1fr) 54px auto 14px; gap:5px; width:min(900px,100%); height:100dvh; min-height:100dvh; margin:0 auto; padding:7px 8px 5px; color:var(--ink); }
.calendar-shell.composer-open { height:100dvh; }
.calendar-nav { display:grid; grid-template-columns:42px minmax(0,1fr) 42px; align-items:center; }
.calendar-back { display:grid; width:35px; height:35px; place-items:center; border:0; border-radius:50%; color:var(--ink); background:rgba(255,255,255,.7); box-shadow:0 4px 13px rgba(69,112,122,.09); text-decoration:none; font-size:24px; line-height:1; }
.calendar-monthbar { display:grid; grid-template-columns:40px minmax(0,1fr) 40px; align-items:center; width:min(290px,100%); margin:auto; }
.calendar-monthbar > button { min-height:38px; border:0; color:var(--ink); background:transparent; cursor:pointer; }.calendar-monthbar > button:not(.calendar-month-label) { font-size:31px; line-height:1; }
.calendar-month-label { display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1; }.calendar-month-label span { font-size:10px; font-weight:700; }.calendar-month-label strong { margin-top:2px; font-size:22px; }
.calendar-board { display:grid; grid-template-rows:28px minmax(0,1fr); min-height:0; overflow:hidden; border:1px solid rgba(190,218,228,.9); border-radius:18px; background:rgba(255,255,255,.93); box-shadow:0 8px 24px rgba(69,112,122,.1); }
.composer-open .calendar-board { overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none; }.composer-open .calendar-board::-webkit-scrollbar { display:none; }.composer-open .calendar-grid { min-height:calc(100% + var(--composer-height)); }
.weekday-row,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }.weekday-row { align-items:center; padding:0 4px; border-bottom:1px solid #deedf1; color:var(--muted); font-size:11px; text-align:center; }.weekday-row span:first-child { color:#cf858a; }.weekday-row span:last-child { color:#719bc0; }
.calendar-grid { grid-template-rows:repeat(6,minmax(0,1fr)); min-height:0; }.calendar-day { position:relative; min-width:0; min-height:0; padding:3px 2px; border:0; border-right:1px solid #e7f0f3; border-bottom:1px solid #e7f0f3; color:var(--ink); background:transparent; text-align:left; cursor:pointer; }.calendar-day:nth-child(7n) { border-right:0; }.calendar-day:nth-last-child(-n+7) { border-bottom:0; }.calendar-day.is-outside { background:rgba(241,247,249,.55); color:#afc2c8; }.calendar-day.is-selected { background:#edf9fa; box-shadow:inset 0 0 0 2px rgba(105,164,194,.42); }.calendar-day.is-drop-target { background:#dceff5; box-shadow:inset 0 0 0 2px #6ba8c9; }
.day-number { position:absolute; z-index:4; top:3px; left:3px; display:grid; width:21px; height:21px; place-items:center; border-radius:50%; color:inherit; font-size:12px; font-weight:700; }.calendar-day.is-today .day-number { color:#fff; background:#70a8c6; }.calendar-day:nth-child(7n + 1) .day-number { color:#d08086; }.calendar-day:nth-child(7n) .day-number { color:#6594b9; }.calendar-day.is-today:nth-child(7n + 1) .day-number,.calendar-day.is-today:nth-child(7n) .day-number { color:#fff; }
.day-event-layer { position:absolute; inset:0; z-index:2; overflow:visible; }.calendar-stamp-event { --stamp-scale:1; position:absolute; z-index:3; display:grid; width:38px; height:38px; place-items:center; padding:0; border:0; border-radius:10px; color:var(--ink); background:transparent; cursor:grab; font-size:31px; line-height:1; touch-action:none; user-select:none; -webkit-user-drag:none; transform:translate(-50%,-50%) scale(var(--stamp-scale)); }.calendar-stamp-event img { display:block; width:100%; height:100%; object-fit:contain; -webkit-user-drag:none; user-select:none; }.calendar-stamp-event:active { cursor:grabbing; }.calendar-stamp-event.is-touch-dragging { opacity:.25; }.calendar-text-event { position:absolute; z-index:4; max-width:calc(100% - 4px); min-height:17px; padding:2px 4px; border:0; border-radius:4px; color:#fff; background:#76aac4; cursor:grab; font-size:9px; font-weight:700; line-height:1.1; text-align:left; touch-action:none; transform:translateX(-50%); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.calendar-text-event[data-participant="me"] { background:#77a6c4; }.calendar-text-event[data-participant="partner"] { background:#d89c98; }.calendar-text-event.is-touch-dragging { opacity:.3; }
.calendar-composer { position:fixed; z-index:20; bottom:6px; left:50%; width:min(890px,calc(100% - 10px)); max-height:var(--composer-height); padding:8px; overflow-y:auto; border:1px solid rgba(194,220,229,.95); border-radius:18px 18px 0 0; background:rgba(255,255,255,.97); box-shadow:0 -8px 24px rgba(69,112,122,.16); transform:translateX(-50%); }.stamp-list { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }.stamp-card { --stamp-scale:1; display:grid; min-width:0; aspect-ratio:1.12; place-items:center; padding:3px; border:1px solid #d5e7ec; border-radius:12px; color:var(--ink); background:#fff; cursor:grab; user-select:none; touch-action:none; -webkit-user-drag:none; }.stamp-card:active { border-color:#6ca9ca; background:#eaf7fa; box-shadow:inset 0 0 0 1px #6ca9ca; }.stamp-symbol { display:grid; width:100%; height:100%; place-items:center; font-size:31px; line-height:1; transform:scale(var(--stamp-scale)); }.stamp-symbol img { display:block; width:82%; height:82%; object-fit:contain; -webkit-user-drag:none; user-select:none; }.stamp-set-tabs { display:flex; justify-content:center; gap:7px; overflow-x:auto; padding:9px 1px 1px; scrollbar-width:none; }.stamp-set-tabs::-webkit-scrollbar { display:none; }.stamp-set-tabs button { flex:0 0 auto; display:grid; width:38px; height:38px; place-items:center; padding:3px; border:1px solid #d5e6eb; border-radius:12px; color:var(--muted); background:#fff; cursor:pointer; font-size:21px; line-height:1; }.stamp-set-tabs button img { display:block; width:29px; height:29px; object-fit:contain; }.stamp-set-tabs button.is-active { border-color:#70a9ca; background:#eaf7fa; box-shadow:inset 0 0 0 1px #70a9ca; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:7px; }.text-event-form { display:grid; gap:7px; }.text-event-form label,.calendar-dialog-card label { display:grid; gap:3px; color:var(--muted); font-size:11px; }.text-event-form input,.text-event-form select,.calendar-dialog-card input,.calendar-dialog-card select { width:100%; min-height:34px; padding:6px 8px; border:1px solid #c9dfe7; border-radius:9px; color:var(--ink); background:#fff; font:inherit; }.primary-button,.danger-button { min-height:37px; padding:7px 13px; border:0; border-radius:999px; cursor:pointer; font:700 12px inherit; }.primary-button { color:#fff; background:#6ca9ca; }.danger-button { color:#bf6e73; background:#fdecee; }
.calendar-tool-dock { display:grid; grid-template-columns:1fr 64px 1fr; align-items:center; width:min(330px,100%); margin:auto; }.composer-plus { display:grid; width:53px; height:53px; place-items:center; margin:auto; border:0; border-radius:50%; color:#fff; background:#5f9fc1; box-shadow:0 5px 13px rgba(69,112,122,.26); cursor:pointer; font-size:39px; line-height:1; }
.calendar-status { min-height:12px; margin:0; color:var(--muted); text-align:center; font-size:9px; }.calendar-drop-preview { --stamp-scale:1; position:absolute; z-index:8; display:grid; width:38px; height:38px; place-items:center; opacity:.5; pointer-events:none; transform:translate(-50%,-50%) scale(var(--stamp-scale)); font-size:31px; line-height:1; }.calendar-drop-preview img { display:block; width:100%; height:100%; object-fit:contain; }.calendar-drag-ghost { display:none; }
.calendar-dialog { max-width:390px; width:calc(100% - 28px); padding:0; border:0; border-radius:24px; background:transparent; }.calendar-dialog::backdrop { background:rgba(37,71,84,.34); }.calendar-dialog-card { position:relative; display:grid; gap:11px; padding:25px 20px 20px; border:1px solid #d3e7ed; border-radius:24px; color:var(--ink); background:#fbfeff; box-shadow:var(--shadow); }.dialog-close { position:absolute; top:8px; right:12px; border:0; color:var(--muted); background:transparent; font-size:28px; cursor:pointer; }.event-dialog-icon { --stamp-scale:1; display:grid; min-height:54px; place-items:center; font-size:44px; text-align:center; }.event-dialog-icon img { display:block; width:66px; height:66px; object-fit:contain; transform:scale(var(--stamp-scale)); }.dialog-actions { display:flex; align-items:center; justify-content:space-between; margin-top:5px; }.stamp-dialog-card output { display:block; color:var(--muted); font-size:11px; text-align:center; }
@media (max-width:620px) { .calendar-shell { --composer-height:160px; grid-template-rows:52px minmax(330px,1fr) 51px auto 12px; padding:5px 2px 3px; }.calendar-nav { padding:0 5px; }.calendar-board { border-radius:0; border-right:0; border-left:0; }.calendar-day { padding:2px 1px; }.day-number { top:2px; left:2px; width:20px; height:20px; font-size:11px; }.calendar-day.is-today .day-number { width:20px; height:20px; }.calendar-stamp-event,.calendar-drop-preview { width:34px; height:34px; font-size:29px; }.calendar-text-event { min-height:15px; padding:2px 3px; font-size:8px; }.calendar-composer { bottom:0; width:100%; max-height:var(--composer-height); margin:0; border-radius:15px 15px 0 0; }.stamp-list { gap:5px; }.stamp-card { padding:2px; border-radius:10px; }.stamp-symbol { font-size:28px; }.composer-plus { width:49px; height:49px; font-size:36px; } }
@media (max-height:720px) { .calendar-shell { --composer-height:145px; grid-template-rows:45px minmax(260px,1fr) 48px auto 11px; gap:3px; }.calendar-month-label strong { font-size:19px; }.weekday-row { font-size:10px; }.calendar-composer { padding:5px; }.stamp-card { min-height:30px; }.stamp-set-tabs { padding-top:3px; }.stamp-set-tabs button { width:31px; height:31px; }.calendar-stamp-event { font-size:23px; }.calendar-text-event { font-size:7px; } }

/* v72: 下部パネルは画面に固定し、カレンダー側だけをスクロールする */
.calendar-page * { user-select:none; }
.calendar-page input,.calendar-page textarea,.calendar-page select { user-select:text; -webkit-touch-callout:default; }
.calendar-board { touch-action:pan-y; }
.calendar-composer { bottom:58px; height:var(--composer-height); max-height:var(--composer-height); overflow:hidden; }
.stamp-panel,.text-event-form { height:100%; }
.stamp-list { height:calc(100% - 46px); }
.stamp-card { aspect-ratio:auto; }
.palette-footer { display:flex; align-items:center; gap:8px; height:40px; padding-top:6px; }
.composer-mode-tabs { display:flex; gap:5px; }
.composer-mode-tabs button { display:grid; width:35px; height:35px; place-items:center; border:1px solid #d5e6eb; border-radius:11px; color:var(--muted); background:#fff; cursor:pointer; font-size:19px; font-weight:700; }
.composer-mode-tabs button.is-active { border-color:#70a9ca; color:#4e8db2; background:#eaf7fa; box-shadow:inset 0 0 0 1px #70a9ca; }
.stamp-set-tabs { flex:1; justify-content:flex-start; padding:0 1px; }
.stamp-set-tabs button { --stamp-scale:1; width:35px; height:35px; border-radius:11px; }
.stamp-set-tabs button img { width:28px; height:28px; transform:scale(var(--stamp-scale)); }
.text-event-form { grid-template-rows:auto auto auto 37px; gap:6px; }
.text-event-form label,.calendar-dialog-card label,.calendar-day-detail label { display:grid; gap:3px; color:var(--muted); font-size:11px; }
.text-event-form input,.text-event-form select,.calendar-dialog-card input,.calendar-dialog-card select,.calendar-day-detail textarea { box-sizing:border-box; width:100%; min-height:34px; padding:6px 8px; border:1px solid #c9dfe7; border-radius:9px; color:var(--ink); background:#fff; font:inherit; }
.calendar-tool-dock { position:fixed; z-index:25; bottom:3px; left:50%; transform:translateX(-50%); }
.calendar-day-detail { position:fixed; z-index:20; bottom:58px; left:50%; display:grid; grid-template-rows:47px minmax(0,1fr); width:min(890px,calc(100% - 10px)); height:50dvh; padding:8px; overflow:hidden; border:1px solid rgba(194,220,229,.95); border-radius:18px 18px 0 0; background:rgba(255,255,255,.98); box-shadow:0 -8px 24px rgba(69,112,122,.16); transform:translateX(-50%); }
.day-detail-head { display:grid; grid-template-columns:42px 1fr 42px; align-items:center; text-align:center; }
.day-detail-head button { width:34px; height:34px; margin:auto; border:0; border-radius:50%; color:#4e8db2; background:#eef8fb; cursor:pointer; font-size:28px; line-height:1; }
.day-detail-head strong { font-size:15px; }
.day-detail-scroll { min-height:0; overflow-y:auto; padding:3px 5px 8px; scrollbar-width:thin; }
.day-event-summary { display:grid; gap:6px; margin-bottom:12px; }
.day-summary-item { display:flex; align-items:center; gap:7px; min-height:36px; padding:5px 7px; border:1px solid #deedf1; border-radius:10px; background:#fff; color:var(--ink); cursor:pointer; text-align:left; }
.day-summary-item img { width:28px; height:28px; object-fit:contain; }
.day-summary-item > span:first-child { display:grid; width:30px; place-items:center; font-size:23px; }
.day-summary-item small { color:var(--muted); font-size:10px; }
.calendar-day-detail textarea { min-height:120px; resize:none; }
.calendar-stamp-event img.stamp-asset,.calendar-drop-preview img.stamp-asset,.stamp-symbol img.stamp-asset,.event-dialog-icon img.stamp-asset,.day-summary-item img.stamp-asset { transform:scale(var(--asset-fit,1)); }
.stamp-set-tabs button img.stamp-asset { transform:scale(calc(var(--asset-fit,1) * var(--stamp-scale,1))); }
.history-tab-icon { display:block; width:25px; height:25px; background:#2f7f8a; -webkit-mask:url("./assets/stamps/history-icon.png") center/contain no-repeat; mask:url("./assets/stamps/history-icon.png") center/contain no-repeat; }
.calendar-page [hidden] { display:none !important; }
.panel-swipe-handle { position:absolute; top:7px; left:50%; width:42px; height:4px; border-radius:999px; background:#c8dce3; transform:translateX(-50%); }
.calendar-composer .panel-swipe-handle { top:5px; }
.calendar-composer { padding-top:14px; }
.calendar-day-detail { padding-top:15px; }
.calendar-page { touch-action:manipulation; }
.composer-open .calendar-tool-dock { display:none; }
.composer-open .calendar-composer { bottom:6px; }
.calendar-composer { --composer-height:232px; }
.stamp-list { grid-template-rows:repeat(2,minmax(0,1fr)); align-items:stretch; }
.stamp-card { min-height:0; }
.stamp-asset { --asset-shift-x:0%; --asset-shift-y:0%; }
.calendar-stamp-event img.stamp-asset,.calendar-drop-preview img.stamp-asset,.stamp-symbol img.stamp-asset,.event-dialog-icon img.stamp-asset,.day-summary-item img.stamp-asset { transform:translate(var(--asset-shift-x),var(--asset-shift-y)) scale(var(--asset-fit,1)); }
.stamp-set-tabs button img.stamp-asset { transform:translate(var(--asset-shift-x),var(--asset-shift-y)) scale(calc(var(--asset-fit,1) * var(--stamp-scale,1))); }
@media (max-width:620px) { .calendar-shell { --composer-height:232px; }.composer-open .calendar-composer { bottom:0; }.text-event-form input,.text-event-form select,.calendar-dialog-card input,.calendar-dialog-card select { font-size:16px; }.stamp-list { gap:6px; } }
@media (max-height:720px) { .calendar-composer { --composer-height:210px; } }

/* v75: 文字予定も日付・時刻を余裕を持って扱える固定パネル */
.calendar-composer { --composer-height:286px; }
.form-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-row > label { min-width:0; }
.form-row select { min-width:0; }
#event-form .form-row { margin-bottom:8px; }
.text-event-form { grid-template-rows:auto auto auto auto 40px; }
.text-panel-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.text-panel-footer .primary-button { min-width:112px; }
@media (max-width:620px) { .calendar-composer { --composer-height:286px; }.text-event-form input,.text-event-form select,.calendar-dialog-card input,.calendar-dialog-card select { font-size:16px; } }
@media (max-height:720px) { .calendar-composer { --composer-height:250px; } }
@media (max-width:620px) { .calendar-composer,.calendar-day-detail { bottom:55px; width:100%; }.calendar-composer { height:var(--composer-height); }.calendar-day-detail { height:50dvh; border-radius:15px 15px 0 0; }.stamp-set-tabs button { width:33px; height:33px; }.composer-mode-tabs button { width:33px; height:33px; } }

/* v76: 文字予定は日時まで一画面に収め、時刻は「時」「分」を別々に選ぶ */
.calendar-composer { --composer-height:348px; }
.text-event-form { grid-template-rows:auto auto auto auto 42px; min-height:0; }
.event-date-field,.text-event-form > label,.calendar-dialog-card > label { inline-size:100%; max-inline-size:100%; }
.event-date-field input { inline-size:100%; max-inline-size:100%; }
.time-fields { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; align-items:center; gap:3px; }
.time-fields select { min-width:0; padding-right:3px; text-align:center; }
@media (max-width:620px) { .calendar-composer { --composer-height:348px; }.time-fields { gap:2px; }.time-fields select { padding:6px 2px; } }
@media (max-height:720px) { .calendar-composer { --composer-height:310px; } }

/* v77: スタンプと文字予定は別の高さにし、文字予定は期間・色までその場で設定する */
.calendar-composer.composer-stamp { --composer-height:232px; }
.calendar-composer.composer-text { --composer-height:min(430px,calc(100dvh - 84px)); }
.composer-mode-switch { display:grid; width:35px; height:35px; flex:0 0 35px; place-items:center; padding:0; border:1px solid #d5e6eb; border-radius:11px; color:#4e8db2; background:#f7fcfe; cursor:pointer; }
.composer-mode-switch svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.text-event-form { grid-template-rows:auto auto auto auto auto 42px; align-content:stretch; }
.date-range-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
.date-range-row > label { min-width:0; }
.date-range-row input { min-width:0; }
.time-trigger { box-sizing:border-box; display:block; width:100%; min-height:34px; padding:6px 8px; border:1px solid #c9dfe7; border-radius:9px; color:var(--ink); background:#fff; font:inherit; text-align:left; cursor:pointer; }
.time-trigger::after { content:"⌄"; float:right; color:#7fa8b9; }
.event-color-picker { min-width:0; margin:0; padding:0; border:0; }
.event-color-picker legend { padding:0; color:var(--muted); font-size:11px; }
.event-color-picker > div { display:flex; flex-wrap:nowrap; justify-content:space-between; gap:4px; padding-top:4px; }
.event-color-picker label { position:relative; display:block; width:23px; height:23px; }
.event-color-picker input { position:absolute; opacity:0; pointer-events:none; }
.event-color-picker span { display:block; width:100%; height:100%; box-sizing:border-box; border:2px solid rgba(255,255,255,.9); border-radius:50%; background:var(--swatch); box-shadow:0 0 0 1px rgba(85,120,135,.18); }
.event-color-picker input:checked + span { border-color:#fff; box-shadow:0 0 0 2px #4f8eaf; }
.calendar-text-event { left:0; right:0; width:auto; max-width:none; min-height:17px; padding:2px 4px; transform:none; background:var(--event-color,#789eb5); border-radius:4px; }
.calendar-text-event.is-range-start:not(.is-range-end) { right:-1px; border-radius:4px 0 0 4px; }
.calendar-text-event.is-range-end:not(.is-range-start) { left:-1px; border-radius:0 4px 4px 0; }
.calendar-text-event.is-range-middle { left:-1px; right:-1px; border-radius:0; color:transparent; }
.calendar-tool-dock { bottom:12px; }
.calendar-composer { bottom:74px; }
.composer-open .calendar-composer { bottom:12px; }
.calendar-day-detail { bottom:74px; }
.time-picker-dialog { width:min(330px,calc(100% - 28px)); padding:0; border:0; border-radius:22px; background:transparent; }
.time-picker-dialog::backdrop { background:rgba(37,71,84,.34); }
.time-picker-card { display:grid; gap:15px; padding:22px 18px 18px; border:1px solid #d3e7ed; border-radius:22px; color:var(--ink); background:#fbfeff; box-shadow:var(--shadow); }
.time-picker-focus { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; pointer-events:none; }
.time-picker-card strong { text-align:center; font-size:15px; }
.time-picker-fields { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; align-items:center; gap:6px; font-weight:700; }
.time-picker-fields select { min-width:0; min-height:42px; padding:7px; border:1px solid #c9dfe7; border-radius:10px; color:var(--ink); background:#fff; font:inherit; text-align:center; }
.time-picker-actions { display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:7px; }
.time-picker-actions button { min-height:36px; padding:6px 9px; border:0; border-radius:999px; color:#5b8397; background:#edf7fa; font:700 11px inherit; cursor:pointer; }
.time-picker-actions .primary-button { color:#fff; background:#6ca9ca; }
@media (max-width:620px) { .calendar-composer.composer-stamp { --composer-height:224px; }.calendar-composer.composer-text { --composer-height:min(430px,calc(100dvh - 84px)); }.composer-open .calendar-composer { bottom:12px; }.calendar-day-detail { bottom:74px; }.event-color-picker label { width:22px; height:22px; } }

/* v78: 範囲の入力を崩さず、文字予定はスタンプより後ろに描く */
.composer-mode-switch { width:45px; flex-basis:45px; }
.composer-mode-switch svg { width:35px; height:21px; }
.composer-mode-switch svg text { fill:currentColor; stroke:none; font:700 17px system-ui,sans-serif; }
.date-range-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
.date-range-row > label,.date-range-row input { min-width:0; max-width:100%; }
.date-range-row input { box-sizing:border-box; padding:6px 3px; font-size:12px; letter-spacing:-.25px; }
.calendar-text-event { z-index:2; }
.calendar-stamp-event { z-index:3; }
@media (max-width:380px) { .date-range-row input { padding:6px 1px; font-size:11px; letter-spacing:-.5px; } }

/* v79: 月ごとに必要な行数だけ描画し、各下部パネルに合わせてカレンダーを送れるようにする */
.calendar-grid { grid-template-rows:repeat(var(--week-count,5),minmax(0,1fr)); }
.calendar-shell.detail-open .calendar-board { overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none; }
.calendar-shell.detail-open .calendar-board::-webkit-scrollbar { display:none; }
.calendar-shell.detail-open .calendar-grid { min-height:calc(100% + 50dvh); }
.date-trigger { box-sizing:border-box; display:block; width:100%; min-width:0; min-height:34px; padding:6px 5px; overflow:hidden; border:1px solid #c9dfe7; border-radius:9px; color:var(--ink); background:#fff; font:inherit; font-size:12px; letter-spacing:-.25px; line-height:1; text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.date-trigger::after { content:"⌄"; float:right; color:#7fa8b9; }
.date-range-row > label { min-width:0; }
.date-picker-dialog { width:min(330px,calc(100% - 28px)); padding:0; border:0; border-radius:22px; background:transparent; }
.date-picker-dialog::backdrop { background:rgba(37,71,84,.34); }
.date-picker-card { position:relative; display:grid; gap:15px; padding:22px 18px 18px; border:1px solid #d3e7ed; border-radius:22px; color:var(--ink); background:#fbfeff; box-shadow:var(--shadow); }
.date-picker-card strong { text-align:center; font-size:15px; }
.date-picker-card input[type="date"] { box-sizing:border-box; width:100%; min-height:43px; padding:7px 9px; border:1px solid #c9dfe7; border-radius:10px; color:var(--ink); background:#fff; font:inherit; }
.date-picker-actions { display:grid; grid-template-columns:1fr auto auto; gap:7px; }
.date-picker-actions button { min-height:36px; padding:6px 11px; border:0; border-radius:999px; color:#5b8397; background:#edf7fa; font:700 11px inherit; cursor:pointer; }
.date-picker-actions .primary-button { color:#fff; background:#6ca9ca; }
.calendar-dialog { max-height:calc(100dvh - 26px); }
.calendar-dialog-card { max-height:calc(100dvh - 48px); overflow-y:auto; }
@media (max-width:620px) { .date-trigger { padding:6px 3px; font-size:11px; }.calendar-shell.detail-open .calendar-grid { min-height:calc(100% + 50dvh); } }

/* v80: カレンダーのマスは伸ばさず、下部パネルぶんだけ余白をスクロールする */
.calendar-scroll { min-height:0; overflow:hidden; }
.calendar-grid { min-height:100%; }
.calendar-scroll-spacer { height:0; }
.calendar-shell.composer-open .calendar-board,.calendar-shell.detail-open .calendar-board { overflow:hidden; }
.calendar-shell.composer-open .calendar-scroll,.calendar-shell.detail-open .calendar-scroll { overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none; }
.calendar-shell.composer-open .calendar-scroll::-webkit-scrollbar,.calendar-shell.detail-open .calendar-scroll::-webkit-scrollbar { display:none; }
.calendar-shell.composer-open .calendar-grid,.calendar-shell.detail-open .calendar-grid { min-height:100%; }
.calendar-shell.composer-open .calendar-scroll-spacer { height:var(--composer-height); }
.calendar-shell.detail-open .calendar-scroll-spacer { height:50dvh; }
.date-range-row { grid-template-columns:1fr; gap:6px; }
.date-range-row input[type="date"] { box-sizing:border-box; width:100%; min-width:0; max-width:100%; min-height:34px; padding:6px 8px; font:inherit; }
.date-trigger { min-height:34px; padding:6px 8px; font-size:13px; letter-spacing:0; }
.calendar-composer.composer-text { --composer-height:min(450px,calc(100dvh - 84px)); }
.month-picker-dialog { width:min(340px,calc(100% - 28px)); padding:0; border:0; border-radius:22px; background:transparent; }
.month-picker-dialog::backdrop { background:rgba(37,71,84,.34); }
.month-picker-card { position:relative; display:grid; gap:15px; padding:22px 18px 18px; border:1px solid #d3e7ed; border-radius:22px; color:var(--ink); background:#fbfeff; box-shadow:var(--shadow); }
.month-picker-card strong { text-align:center; font-size:15px; }
.month-picker-card > div:first-of-type { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; align-items:center; gap:6px; font-weight:700; }
.month-picker-card select { min-width:0; min-height:42px; padding:7px; border:1px solid #c9dfe7; border-radius:10px; color:var(--ink); background:#fff; font:inherit; text-align:center; }
@media (max-width:620px) { .calendar-composer.composer-text { --composer-height:min(450px,calc(100dvh - 84px)); } }

/* v81: 入力パネルが開いても日付マスを伸ばさず、最後の週まで見渡せる */
.calendar-shell.composer-open { --calendar-panel-height:232px; }
.calendar-shell.text-composer-open { --calendar-panel-height:min(450px,calc(100dvh - 84px)); }
.calendar-shell.detail-open { --calendar-panel-height:50dvh; }
.calendar-shell.composer-open .calendar-scroll-spacer,
.calendar-shell.detail-open .calendar-scroll-spacer { height:calc(var(--calendar-panel-height) + 28px); }
#text-event-form .date-range-row,#event-form .date-range-row { display:grid; inline-size:100%; grid-template-columns:minmax(0,1fr); }
#text-event-form .date-range-row > label,#event-form .date-range-row > label { inline-size:100%; min-width:0; }
#text-event-form .date-range-row input[type="date"],#event-form .date-range-row input[type="date"] { box-sizing:border-box; inline-size:100%; min-width:0; max-inline-size:100%; }
.day-summary-item { align-items:center; }
.day-summary-item .day-summary-icon { display:grid; flex:0 0 30px; width:30px; place-items:center; font-size:23px; }
.day-summary-item .day-summary-copy { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; min-width:0; }
.day-summary-copy strong { flex-basis:100%; color:var(--ink); font-size:13px; }
.day-summary-copy span { color:var(--muted); font-size:10px; }
.day-summary-entry { display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; gap:5px; }
.day-summary-entry .day-summary-item { min-width:0; }
.day-summary-reorder { display:grid; gap:3px; }
.day-summary-move { display:grid; width:28px; height:18px; place-items:center; padding:0; border:1px solid #d5e6eb; border-radius:6px; color:#578fae; background:#f7fcfe; font:700 13px/1 inherit; cursor:pointer; }
.day-summary-move:disabled { opacity:.3; cursor:default; }
.calendar-frog-icon { display:block; width:100%; height:100%; object-fit:contain; }
.calendar-text-overflow { position:absolute; z-index:5; right:3px; bottom:3px; min-height:17px; padding:1px 4px; border:0; border-radius:4px; color:#5b8397; background:#edf7fa; font:700 9px/1.2 inherit; cursor:pointer; }

/* v82: 10個ずつの透過スタンプシートを、個別のスタンプとして表示する */

/* v85: 下部のスタンプタブは切替ボタンを含めて画面中央にそろえ、個別PNGの標準倍率を「ふつう」にする */
.palette-footer { display:grid; grid-template-columns:45px minmax(0,1fr) 45px; gap:8px; }
.palette-footer > .composer-mode-switch { grid-column:1; }
.palette-footer::after { content:""; grid-column:3; width:45px; height:1px; }
.palette-footer .stamp-set-tabs { grid-column:2; width:100%; flex:none; justify-content:center; padding:0 1px; }
.stamp-symbol img.stamp-asset { width:100%; height:100%; }
@media (max-width:620px) {
  .palette-footer { grid-template-columns:33px minmax(0,1fr) 33px; gap:6px; }
  .palette-footer::after { width:33px; }
  .palette-footer > .composer-mode-switch { width:33px; height:33px; flex-basis:33px; }
  .palette-footer .stamp-set-tabs { gap:4px; }
  .palette-footer .stamp-set-tabs button { width:30px; height:30px; }
  .palette-footer .stamp-set-tabs button img { width:25px; height:25px; }
}

/* v86: タブ画像・切替・日付入力・日付詳細の表示をそろえる */
.palette-footer > .composer-mode-switch,
.text-panel-footer > .composer-mode-switch { width:45px; height:35px; flex:0 0 45px; }
.palette-footer .stamp-set-tabs button { position:relative; overflow:hidden; }
.palette-footer .stamp-set-tabs button img.stamp-asset { position:absolute; top:50%; left:50%; display:block; transform:translate(-50%,-50%) scale(var(--stamp-scale,1)) !important; transform-origin:center; }
#text-event-form .date-range-row,
#event-form .date-range-row { display:grid; grid-template-columns:minmax(0,1fr); inline-size:100%; max-inline-size:100%; }
#text-event-form .date-range-row > label,
#event-form .date-range-row > label,
#text-event-form .date-range-row input[type="date"],
#event-form .date-range-row input[type="date"] { box-sizing:border-box; inline-size:100%; min-inline-size:0; max-inline-size:100%; }
@media (max-width:620px) {
  .palette-footer { grid-template-columns:45px minmax(0,1fr) 45px; gap:6px; }
  .palette-footer::after { width:45px; }
  .palette-footer > .composer-mode-switch { width:45px; height:35px; flex-basis:45px; }
}

/* v87: 文字予定・予定詳細の日付欄は、予定名と同じ一列幅だけを使う */
#text-event-form > .date-range-row,
#event-form > .date-range-row {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:6px;
  width:100%;
  max-width:100%;
  min-width:0;
}
#text-event-form > .date-range-row > label,
#event-form > .date-range-row > label {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:3px;
  width:100%;
  max-width:100%;
  min-width:0;
}
#text-event-form > .date-range-row > label > input[type="date"],
#event-form > .date-range-row > label > input[type="date"] {
  box-sizing:border-box;
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  margin:0;
}

/* v88: Safariの日付コントロールは透明な操作面にし、表示枠は予定名と完全に共有する */
.date-field { position:relative; display:block; width:100%; min-width:0; height:34px; }
.date-display { box-sizing:border-box; display:flex; width:100%; height:34px; align-items:center; padding:6px 8px; overflow:hidden; border:1px solid #c9dfe7; border-radius:9px; color:var(--ink); background:#fff; font:inherit; line-height:1; white-space:nowrap; }
.date-display::after { content:"⌄"; margin-left:auto; color:#7fa8b9; font-size:16px; line-height:1; }
#text-event-form > .date-range-row > label > .date-field > input[type="date"],
#event-form > .date-range-row > label > .date-field > input[type="date"] { position:absolute; z-index:1; inset:0; display:block; width:100%; height:100%; min-width:0; max-width:none; margin:0; padding:0; border:0; opacity:0; cursor:pointer; -webkit-appearance:none; appearance:none; }

/* v89: 日付も時刻と同じ、1段・2列の入力レイアウト */
#text-event-form > .date-range-row,
#event-form > .date-range-row { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:7px; }

/* v90: 祝日は手動予定と別の表示専用レイヤー。赤い日付と帯を最優先で見せる */
.calendar-day.is-holiday .day-number { color:#b95d68; }
.calendar-day.is-today.is-holiday .day-number { color:#fff; background:#bd7078; }
.calendar-holiday-event { position:absolute; z-index:5; top:2px; left:25px; right:2px; display:block; max-height:19px; padding:1px 2px; overflow:hidden; border-radius:4px; color:#fff; background:#c77a82; font-size:8px; font-weight:700; line-height:1.08; white-space:normal; overflow-wrap:anywhere; text-align:center; pointer-events:none; }
@media (max-width:620px) { .calendar-holiday-event { top:2px; left:24px; right:1px; max-height:17px; padding:1px; font-size:7px; } }
.day-holiday-summary { display:flex; align-items:center; gap:8px; min-height:36px; padding:5px 8px; border:1px solid #eed6d9; border-radius:10px; color:#a95d67; background:#fff7f7; font-size:11px; }
.day-holiday-summary span { display:grid; flex:0 0 auto; min-width:30px; min-height:24px; place-items:center; border-radius:7px; color:#fff; background:#c77a82; font-weight:700; font-size:10px; }
.day-holiday-summary strong { color:#a95d67; font-size:13px; }
