/* Calendar stays the primary workspace. Supporting records never occupy slots. */
.today-actions { display:flex; gap:8px; align-items:center; }
.today-actions button { min-width:36px; min-height:40px; }
.today-actions .icon { width:19px; height:19px; }
.reminder-day-picker { display:grid; grid-template-columns:36px minmax(0,1fr) 36px; align-items:center; gap:2px; margin:-4px 0 10px; }
.reminder-day-picker > button { min-height:44px; display:grid; place-items:center; color:var(--blue); border-radius:9px; }
.reminder-day-picker > button:hover { background:var(--control-bg); }
.reminder-day-picker > button:disabled { opacity:.35; cursor:default; }
.reminder-day-picker .icon { width:17px; height:17px; }
.reminder-day-picker > div { text-align:center; min-width:0; }
.reminder-day-picker strong { display:block; font-size:13px; font-weight:700; }
.reminder-day-picker small { display:block; font-size:11px; color:var(--muted); margin-top:4px; }
.reminder-day-reset { margin:-5px auto 7px; min-height:36px; }
.reminder-row { display:flex; align-items:flex-start; gap:6px; padding:7px 0; }
.reminder-check { width:44px; min-height:44px; display:grid; place-items:center; flex:none; border-radius:10px; color:var(--blue); }
.reminder-check::before { content:''; width:19px; height:19px; border:1px solid var(--muted); border-radius:6px; grid-area:1/1; }
.reminder-check .icon { grid-area:1/1; width:18px; height:18px; }
.reminder-check[aria-pressed=true]::before { background:var(--green-bg); border-color:var(--green-edge); }
.reminder-check[aria-pressed=true] { color:var(--green-icon); }
.reminder-check:hover { background:var(--control-bg); }
.reminder-copy { padding:5px 0; text-align:left; min-height:44px; min-width:0; flex:1; }
.reminder-copy strong { display:block; font-size:14px; font-weight:400; overflow-wrap:anywhere; line-height:1.35; }
.reminder-copy small { display:block; font-size:11px; color:var(--muted); margin-top:4px; line-height:1.4; }
.reminder-row.is-done .reminder-copy strong { text-decoration:line-through; color:var(--muted); }
.reminder-group { max-width:680px; margin:24px 0; }
.reminder-group h2 { padding-bottom:8px; border-bottom:1px solid var(--line); }
.reminder-group h2 small { color:var(--muted); margin-left:8px; }
.reminder-group .reminder-row + .reminder-row { border-top:1px solid var(--line); }
.linked-reminders { margin:20px 0; padding-block:16px; border-block:1px solid var(--line); }
.linked-reminders.full { grid-column:1/-1; margin:4px 0; }
.linked-reminders .helper { margin:0; }
.linked-reminders .rail-heading button { display:flex; gap:5px; align-items:center; }
.linked-reminders > h3 { margin-bottom:12px; }
.editor:has(#reminderForm) { width:min(640px,calc(100vw - 32px)); }
#reminderForm { container-type:inline-size;container-name:reminder-form; }
#reminderForm .reminder-form-grid { grid-template-columns:minmax(0,1fr);gap:20px; }
.reminder-context-grid { display:grid;grid-template-columns:minmax(0,1fr);gap:18px 14px; }
.reminder-time-fields { display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start; }
.reminder-time-fields[hidden] { display:none; }
.reminder-event-status { margin:-6px 0 0;min-height:0; }
.reminder-event-status:empty { display:none; }
.reminder-form-note { margin-top:16px; }
@container reminder-form (min-width:520px) {
  .reminder-context-grid,.reminder-time-fields { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}
.event-reminder-draft { display:grid; grid-template-columns:minmax(0,1fr) minmax(115px,.8fr) 38px; align-items:start; gap:8px; margin:12px 0 18px; }
.event-reminder-draft > button { margin-top:22px; width:38px; }
.event-reminder-draft .field input, .event-reminder-draft .field select { padding-inline:8px; }
.event-reminder-badge { display:inline-flex; align-items:center; gap:3px; font-size:10px; color:var(--card-muted); }
.event-reminder-badge .icon { width:12px; height:12px; }
@container event (height < 65px) { .event-reminder-badge { display:none; } }
.flow-check { display:flex; align-items:center; gap:10px; min-height:44px; line-height:1.4; font-size:14px; cursor:pointer; }
.flow-check input { margin:0; }
.flow-check.full, .event-permissions.full { grid-column:1/-1; }
.completion-settings { display:grid; gap:10px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(135deg,color-mix(in srgb,var(--blue) 7%,var(--surface)),var(--surface) 68%); color:var(--ink); }
.completion-reminder { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 12px; border-radius:11px; background:color-mix(in srgb,var(--blue) 7%,var(--surface)); transition:opacity .2s,transform .2s; }
.completion-reminder>span { min-width:0; }
.completion-reminder strong,.completion-reminder small { display:block; }
.completion-reminder strong { font-size:13px; }
.completion-reminder small { color:var(--muted); font-size:11px; margin-top:3px; }
.completion-reminder select { width:auto; min-width:144px; min-height:38px; border:1px solid var(--line); border-radius:9px; padding:7px 9px; background:var(--surface); color:var(--ink); }
.completion-reminder.is-disabled { display:none; }
.event-permissions { padding:12px 0; border-top:1px solid var(--line); }
.event-permissions summary, .request-history summary { cursor:pointer; min-height:44px; padding-block:10px; }
.event-permissions .form-grid { padding-top:10px; }
.rules-group { border:0; padding:0; margin:0 0 20px; }
.rules-group legend { font-size:14px; font-weight:700; margin-bottom:7px; }
.rules-group + .field { margin-top:24px; }
.add-choices { display:grid; gap:12px; }
.add-choices .list-card { text-align:left; width:100%; min-height:76px; }
.add-choices span { min-width:0; }
.add-choices strong, .add-choices small { display:block; }
.add-choices small { color:var(--muted); line-height:1.5; margin-top:4px; }
.event-template-list { display:grid; gap:10px; }
.event-template-card { display:grid; grid-template-columns:minmax(0,1fr) 42px; gap:8px; align-items:stretch; }
.event-template-use { display:grid; grid-template-columns:48px minmax(0,1fr) 20px; gap:12px; align-items:center; min-height:70px; padding:10px 12px; text-align:left; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); }
.event-template-use:hover { border-color:color-mix(in srgb,var(--blue) 38%,var(--line)); background:color-mix(in srgb,var(--blue) 4%,var(--surface)); }
.event-template-use>span:nth-child(2) { min-width:0; }
.event-template-use strong,.event-template-use small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.event-template-use small { margin-top:5px; color:var(--muted); font-size:12px; }
.event-template-use>.icon { width:18px; color:var(--muted); }
.event-template-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:12px; background:var(--wash,#eef5ff); }
.event-template-icon .event-symbol { width:38px; height:38px; }
.event-template-delete { display:grid; place-items:center; border:1px solid var(--line); border-radius:12px; color:var(--muted); background:var(--surface); }
.event-template-delete:hover { color:#be5665; border-color:#efc9cf; background:#fff7f8; }
.event-template-delete .icon { width:18px; }
.event-template-empty { padding:30px 20px; text-align:center; border:1px dashed var(--line); border-radius:16px; color:var(--muted); }
.event-template-empty>.icon { width:32px; height:32px; margin-bottom:10px; color:var(--blue); }
.event-template-empty strong { display:block; color:var(--ink); }
.event-template-empty p { margin-top:7px; font-size:13px; line-height:1.5; }
.event-reuse-actions { display:grid!important; grid-template-columns:1fr 1fr; gap:10px; }

@media (max-width:560px) {
  .completion-reminder { align-items:stretch; flex-direction:column; }
  .completion-reminder select { width:100%; }
  .event-reuse-actions { grid-template-columns:1fr; }
}
.reminder-delete { margin-top:18px; }
.request-identity { flex:none; width:37px; display:flex; flex-direction:column; align-items:center; }
.request-copy { min-width:0; overflow-wrap:anywhere; }
.request-copy small { line-height:1.45; }
.request-copy p { white-space:pre-wrap; }
.request-explanation { margin-top:8px; }
.request-compact .detail-note, .page-request .detail-note { margin:12px 0; font-size:13px; }
.request-compact .request-actions button, .page-request .request-actions button { display:grid; place-items:center; min-height:44px; }
.request-history { margin-top:26px; }
.proposal-reminders { margin:12px 0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.proposal-reminders > strong { display:block; margin-bottom:8px; }
.proposal-reminders p { margin-bottom:10px; }
.proposal-reminders small { color:var(--muted); }
.pending-plan { padding:12px; border-radius:10px; background:var(--selection-bg); font-size:13px; line-height:1.5; }
.notice { border-bottom:1px solid var(--line); padding:15px 0; }
.notice:first-child { padding-top:0; }
.notice strong, .notice p { overflow-wrap:anywhere; }
.notice p { line-height:1.5; font-size:13px; margin-top:7px; white-space:pre-wrap; }
.notice small { display:block; color:var(--muted); margin-top:8px; }
.notice.is-unread strong::before { content:''; display:inline-block; width:7px; height:7px; margin-right:7px; background:var(--blue); border-radius:50%; }
.week-day-head { position:relative; min-width:0; border-left:1px solid var(--line); }
.week-date-button { width:100%; height:100%; padding:4px; min-width:0; }
.week-date-button > span { border-radius:9px; display:flex; flex-direction:column; justify-content:center; gap:3px; height:100%; font-size:13px; font-weight:400; }
.week-date-button:hover > span { box-shadow:inset 0 0 0 1px var(--blue-edge); }
.week-day-head:has(.day-record-badges) .week-date-button strong { padding-right:25px; }
.day-record-badges { display:inline-flex; flex:none; }
.week-day-head > .day-record-badges { position:absolute; top:5px; right:4px; }
.day-record-badges button { display:flex; align-items:center; justify-content:center; gap:2px; min-width:32px; height:30px; border-radius:8px; color:var(--blue); font-size:10px; padding:3px; font-variant-numeric:tabular-nums; }
.day-record-badges button:hover, .day-record-badges button:focus-visible { background:var(--selection-bg); }
.day-record-badges .icon { width:15px; height:15px; flex:none; }
.day-record-badges button > span { display:flex; align-items:center; }
.day-record-badges button > span > .icon { width:10px; height:10px; }
.day-record-badges .all-done { color:var(--muted); }
.day-record-badges .day-achievements { color:var(--violet); }
.day-bell > .icon { transform-origin:50% 15%; }
.day-bell:hover > .icon, .day-bell:focus-visible > .icon { animation:reminder-bell-sway .6s ease-in-out; }
.day-achievement-list { border-top:1px solid var(--line); padding-top:16px; margin-top:16px; }
.day-achievement-list h3 { margin-bottom:8px; }
@keyframes reminder-bell-sway { 0%,100% { transform:rotate(0); } 20% { transform:rotate(13deg); } 45% { transform:rotate(-10deg); } 70% { transform:rotate(5deg); } }
@media (prefers-reduced-motion:reduce) { .day-bell:hover > .icon, .day-bell:focus-visible > .icon { animation:none; } }
.calendar-mark { display:flex; align-items:flex-start; gap:5px; padding:7px 4px; width:100%; text-align:left; border-radius:6px; font-size:11px; line-height:1.3; min-height:36px; }
.calendar-mark > span { min-width:0; overflow-wrap:anywhere; }
.calendar-mark .icon { width:15px; height:15px; color:var(--blue); margin-top:1px; }
.calendar-mark.achievement .icon { color:var(--violet); }
.calendar-mark time { font-variant-numeric:tabular-nums; font-weight:700; }
.calendar-mark:hover { background:var(--control-bg); }
.calendar-mark.is-muted { color:var(--muted); }
.goal-reward-actions { font-size:13px; line-height:1.5; margin-top:16px; }
.goal-reward-actions button { margin-top:10px; width:100%; }
[data-log-fields][hidden] { display:none; }
[data-log-fields] { margin-top:12px; }
.mobile-today { display:none; }
.tablet-today-wrap { display:none; }
@media (max-width:1080px) and (min-width:761px) {
  .desktop-nav { gap:12px; }
  .app-header { gap:10px; }
  .brand { min-width:170px; }
  .tablet-today-wrap { display:block; }
  .tablet-today-wrap .mobile-today { display:block; margin:0 0 12px; padding:12px; border:1px solid var(--line); border-radius:12px; }
  .tablet-today-wrap summary { cursor:pointer; min-height:32px; }
}
@media (max-width:760px) {
  .desktop-add { display:none; }
  .mobile-today { display:block; margin:12px 18px 0; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
  .mobile-today > summary { cursor:pointer; min-height:46px; padding:12px 14px; font-size:15px; }
  .mobile-today > summary > span { font-size:12px; color:var(--blue); margin-left:8px; }
  .mobile-today > div { padding:0 12px 10px; }
  .mobile-today .rail-heading h2 { display:none; }
  .mobile-today .rail-heading { justify-content:flex-end; margin:0; }
  .mobile-month .day-record-badges button { min-width:44px; height:44px; margin:0; padding:6px; }
  .mobile-month .day-record-badges .icon { width:19px; height:19px; }
  .reminder-day-picker { grid-template-columns:44px minmax(0,1fr) 44px; }
  .calendar-mark { font-size:13px; min-height:44px; align-items:center; }
  .event-reminder-draft { grid-template-columns:minmax(0,1fr) 44px; }
  .event-reminder-draft > .field:nth-child(2) { grid-column:1; }
  .event-reminder-draft > button { grid-column:2; grid-row:1; width:44px; }
  .mobile-nav button[data-flow=add] { color:var(--ink); }
  .page-heading { flex-wrap:wrap; }
  .reminder-check { min-width:44px; }
}
.rules-empty{padding:18px;margin-bottom:18px;border:1px dashed var(--line);background:#fbfdff;color:var(--muted);font-size:13px;line-height:1.5}.rules-empty strong{display:block;color:var(--ink);font-size:14px;margin-bottom:4px}.rules-empty .secondary-button{margin-top:14px}

@media (max-width:760px) {
  .mobile-reminders-compact{margin:11px 18px 2px;padding:10px;border:1px solid var(--line);border-radius:16px;background:var(--surface,#fff);box-shadow:0 8px 24px rgb(37 70 112 / 7%)}
  .mobile-reminders-compact>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.mobile-reminders-compact>header>div{display:flex;align-items:center;gap:8px;min-width:0}.mobile-reminders-symbol{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;color:var(--blue);background:var(--blue-bg);flex:none}.mobile-reminders-symbol .icon{width:18px;height:18px}.mobile-reminders-compact header strong,.mobile-reminders-compact header small{display:block}.mobile-reminders-compact header strong{font-size:14px;line-height:1.1}.mobile-reminders-compact header small{color:var(--muted);font-size:10px;margin-top:3px}.mobile-reminders-compact header b{min-width:20px;height:20px;display:grid;place-items:center;padding:0 5px;border-radius:10px;color:var(--blue);background:var(--blue-bg);font-size:11px}.mobile-reminders-compact>header>div:last-child{gap:2px;flex:none}.mobile-reminders-compact>header button{min-width:38px;min-height:38px;padding:0 7px;display:grid;place-items:center;border-radius:10px;color:var(--blue);font-size:11px;font-weight:700}.mobile-reminders-compact>header button:hover{background:var(--control-bg)}.mobile-reminders-compact>header .icon{width:17px}
  .mobile-reminder-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.mobile-reminder-item{min-width:0;min-height:56px;display:flex;align-items:center;gap:6px;padding:6px;border:1px solid color-mix(in srgb,var(--line) 82%,transparent);border-radius:12px;background:color-mix(in srgb,var(--blue-bg) 45%,var(--surface));color:var(--ink)}.mobile-reminder-item:last-child:nth-child(odd){grid-column:1/-1}.mobile-reminder-check{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;color:var(--blue);flex:none}.mobile-reminder-check::before{content:'';width:17px;height:17px;border:1px solid var(--muted);border-radius:6px;grid-area:1/1}.mobile-reminder-check .icon{width:16px;height:16px;grid-area:1/1}.mobile-reminder-check[aria-pressed=true]::before{background:var(--green-bg);border-color:var(--green-edge)}.mobile-reminder-copy{min-width:0;flex:1;padding:2px 0;text-align:left}.mobile-reminder-copy strong,.mobile-reminder-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-reminder-copy strong{font-size:12px;line-height:1.3}.mobile-reminder-copy small{margin-top:3px;color:var(--muted);font-size:10px}.mobile-reminder-item.is-done .mobile-reminder-copy strong{color:var(--muted);text-decoration:line-through}
  .mobile-reminders-empty{grid-column:1/-1;min-height:42px;padding:0 10px;border-radius:11px;color:var(--muted);background:var(--control-bg);font-size:12px;text-align:left}.mobile-reminders-empty span{float:right;color:var(--blue);font-weight:700}.mobile-reminders-more{display:block;min-height:34px;margin:5px auto -4px;padding:0 10px;color:var(--blue);font-size:11px;font-weight:700}
}
@media (max-width:355px){.mobile-reminder-list{grid-template-columns:minmax(0,1fr)}.mobile-reminder-item:last-child:nth-child(odd){grid-column:auto}}
