/* Material-inspired surfaces shared with the Chinese-class reference. */
:root {
  color-scheme: light;
  --bg: #fff; --surface: #fff; --surface-1: #f8fafd; --surface-2: #f0f4f9; --surface-3: #e9eef6;
  --outline: #dadce0; --outline-soft: #e8eaed;
  --on-surface: #1f1f1f; --on-surface-2: #444746; --on-surface-3: #5f6368;
  --blue: #0b57d0; --blue-cont: #d3e3fd; --blue-soft: #e8f0fe;
  --green: #146c2e; --green-soft: #e6f4ea; --amber: #8a5a00; --amber-soft: #fef7e0;
  --red: #b3261e; --purple: #6b3fa0;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 28px;
  --rail-w: 88px; --appbar-h: 64px; --maxw: 1320px;
  --shadow-1: 0 1px 2px #3c404333, 0 1px 3px 1px #3c404314;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--appbar-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--on-surface); font: 14px/1.6 "Roboto", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
b, strong { font-weight: 600; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 18px; font-weight: 500; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:where(a, button, input, textarea, select, [tabindex]):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
main:focus, h1:focus { outline: none; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--blue); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.appbar { position: sticky; top: 0; z-index: 30; height: var(--appbar-h); display: grid; grid-template-columns: 230px minmax(180px, 600px) 1fr; align-items: center; gap: 24px; padding: 0 24px; background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; min-height: 44px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 21px; font-weight: 700; }
.brand-name { font-size: 20px; color: var(--on-surface-2); letter-spacing: -.5px; }
.brand-name b { color: var(--on-surface); font-weight: 500; }
.searchbar { display: flex; align-items: center; gap: 12px; min-width: 0; height: 46px; padding: 0 18px; border-radius: 28px; background: var(--surface-2); color: var(--on-surface-3); }
.searchbar input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; outline: none; }
.searchbar:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; background: var(--surface-1); }
.searchbar .icon-btn { margin-right: -14px; }
.appbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 14px; border-radius: 99px; white-space: nowrap; font-size: 12px; }
.pill-quiet { background: var(--surface-2); color: var(--on-surface-3); }
.pill-tonal { background: var(--blue-soft); color: var(--blue); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 20px; border: 1px solid transparent; border-radius: 99px; background: transparent; font-weight: 500; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn-filled { background: var(--blue); color: #fff; }
.btn-filled:hover { background: #0849b0; box-shadow: var(--shadow-1); }
.btn-tonal { background: var(--blue-cont); color: #0842a0; }
.btn-tonal:hover { background: #c3d8fa; }
.btn-outline { border-color: var(--outline); color: var(--blue); }
.btn-outline:hover, .btn-quiet:hover { background: var(--surface-2); }
.btn-quiet { color: var(--blue); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: #fce8e6; }
.btn-small { padding: 6px 16px; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--on-surface-3); font-size: 25px; line-height: 1; }
.icon-btn:hover { background: var(--surface-2); }
.shell { display: flex; align-items: flex-start; }
.rail { position: sticky; top: var(--appbar-h); width: var(--rail-w); flex: 0 0 var(--rail-w); height: calc(100dvh - var(--appbar-h)); padding: 12px 0 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail a { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; padding: 5px 0; font-size: 12px; font-weight: 500; color: var(--on-surface-2); }
.rail-icon { width: 56px; height: 32px; border-radius: 99px; display: grid; place-items: center; }
.rail a:hover .rail-icon { background: var(--surface-2); }
.rail a.active, .rail a[aria-current="page"] { color: var(--blue); }
.rail a.active .rail-icon, .rail a[aria-current="page"] .rail-icon { background: var(--blue-cont); }
main { width: calc(100% - var(--rail-w)); max-width: var(--maxw); min-width: 0; flex: 1; padding: 20px 32px 36px; }
.page-head { padding: 0 0 18px; }
.page-head h1 { font-size: 27px; font-weight: 400; letter-spacing: -.8px; line-height: 1.5; }
.page-sub { margin-top: 5px; color: var(--on-surface-3); font-size: 13px; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.summary-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 8px; margin-bottom: 18px; border-radius: var(--r-md); background: var(--surface-2); }
.overview-item { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--on-surface-2); font-size: 13px; }
.overview-item:hover { background: var(--surface-3); }
.overview-item strong { color: var(--blue); font-size: 18px; font-weight: 500; }
.goal-overview { margin-left: auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.quiet { color: var(--on-surface-3); font-size: 12px; }
.channel-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.channel-chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--outline-soft); border-radius: 99px; background: #fff; font-size: 13px; }
.channel-chip:hover { background: var(--surface-1); }
.channel-chip.active { background: var(--blue-soft); border-color: var(--blue-cont); color: var(--blue); }
.channel-mark { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--channel-color, var(--blue)); color: #fff; font: 600 12px/1 "Roboto", sans-serif; flex-shrink: 0; }
.channel-count { font-size: 11px; color: var(--on-surface-3); }
.planner-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 20px; align-items: start; }
.calendar-panel { min-width: 0; border: 1px solid var(--outline); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 12px; }
.month-controls { display: flex; align-items: center; gap: 2px; min-width: 0; }
.month-controls h2 { font-size: 18px; white-space: nowrap; font-weight: 500; margin: 0 4px; }
.month-controls .btn { margin-left: 7px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--surface-2); }
.segmented button { min-width: 44px; min-height: 44px; border: 0; padding: 5px 12px; border-radius: 99px; background: transparent; color: var(--on-surface-3); font-size: 12px; }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--blue); box-shadow: 0 1px 3px #3c404320; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { padding: 5px 0 9px; color: var(--on-surface-3); text-align: center; font-size: 11px; }
.sat { color: var(--blue); }
.sun { color: var(--red); }
.calendar-grid { background: var(--outline-soft); gap: 1px; border-top: 1px solid var(--outline-soft); border-bottom: 1px solid var(--outline-soft); }
.calendar-cell { position: relative; min-width: 0; min-height: 68px; display: flex; flex-direction: column; align-items: stretch; padding: 5px; border: 0; background: #fff; text-align: left; }
.calendar-cell:hover { background: var(--surface-1); }
.calendar-cell.outside { background: #fafbfc; }
.calendar-cell.outside .date-number { color: #80868b; }
.calendar-cell.selected { background: #edf3fe; box-shadow: inset 0 0 0 2px var(--blue); }
.calendar-cell:focus-visible { z-index: 2; outline-offset: -3px; }
.date-number { display: grid; place-items: center; align-self: flex-start; width: 27px; height: 27px; margin-bottom: 3px; border-radius: 50%; font-size: 12px; line-height: 1; color: var(--on-surface-2); }
.is-today .date-number { background: var(--blue); color: #fff; font-weight: 600; }
.day-events { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.calendar-post-icon { position: relative; display: inline-grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 6px; background: var(--channel-color, var(--blue)); color: #fff; }
.calendar-post-icon svg, .channel-mark svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.calendar-post-icon::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 6px; height: 6px; border: 1.5px solid #fff; border-radius: 50%; background: var(--blue); box-sizing: content-box; }
.calendar-post-icon.draft::after { background: var(--amber); }
.calendar-post-icon.ready::after { background: var(--purple); }
.calendar-post-icon.published::after { background: var(--green); }
.calendar-post-icon.idea::after { background: var(--on-surface-3); }
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; padding: 8px 14px; font-size: 12px; color: var(--on-surface-3); }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.dot.draft { background: #be8600; }
.dot.ready { background: var(--purple); }
.dot.published { background: var(--green); }
.day-panel { display: flex; flex-direction: column; min-width: 0; background: var(--surface-2); border-radius: var(--r-lg); padding: 19px 16px 16px; }
.day-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 18px; }
.eyebrow { font-size: 11px; color: var(--on-surface-3); }
.day-heading h2 { margin-top: 3px; font-size: 18px; }
.day-heading .icon-btn { background: #fff; color: var(--blue); }
.day-posts { display: flex; flex-direction: column; gap: 10px; }
.day-card, .post-card { min-width: 0; border: 1px solid var(--outline-soft); border-radius: var(--r-md); background: #fff; overflow-wrap: anywhere; }
.day-card { padding: 0; overflow: hidden; }
.day-card .card-open { padding: 14px 14px 8px; }
.post-card { overflow: hidden; }
.card-open { display: block; width: 100%; border: 0; padding: 17px 18px 12px; background: transparent; text-align: left; }
.card-open:hover { background: var(--surface-1); }
.card-open:focus-visible { outline-offset: -3px; }
.post-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.channel-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--on-surface-2); }
.channel-badge .channel-mark { width: 19px; height: 19px; font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 2px 7px; background: var(--surface-2); color: var(--on-surface-3); font-size: 11px; font-weight: 500; white-space: nowrap; }
.status-badge.planned { background: var(--blue-soft); color: var(--blue); }
.status-badge.draft { background: var(--amber-soft); color: var(--amber); }
.status-badge.ready { background: #f3e8fd; color: var(--purple); }
.status-badge.published { background: var(--green-soft); color: var(--green); }
.post-title { display: block; font-size: 14px; font-weight: 500; line-height: 1.6; }
.post-meta { display: block; margin-top: 7px; font-size: 12px; color: var(--on-surface-3); }
.post-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 9px; color: var(--on-surface-3); font-size: 13px; line-height: 1.7; white-space: pre-line; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 0 14px 4px; }
.day-card .card-actions { padding: 0 14px 4px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; border: 0; padding: 4px 0; background: transparent; color: var(--blue); font-size: 13px; font-weight: 500; }
.text-link:hover { text-decoration: underline; }
.empty-state { grid-column: 1 / -1; padding: 26px 20px; border: 1px dashed var(--outline); border-radius: var(--r-lg); background: var(--surface-1); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 10px; background: var(--surface-3); color: var(--on-surface-3); border-radius: 50%; font-size: 21px; }
.empty-title { font-size: 14px; font-weight: 500; }
.empty-copy { margin: 6px auto 12px; color: var(--on-surface-3); font-size: 13px; max-width: 44ch; }
.day-posts .empty-state { background: #ffffff80; padding: 25px 12px; }
.upcoming-heading { margin-top: 24px; }
.upcoming-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.upcoming-list .empty-state { padding: 19px; }
.upcoming-list .empty-icon { display: none; }
.list-toolbar, .library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 12px; }
.status-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.status-filters button { min-height: 44px; border: 0; padding: 8px 13px; border-radius: 99px; background: var(--surface-2); font-size: 12px; color: var(--on-surface-2); }
.status-filters button.active, .status-filters button[aria-pressed="true"] { background: var(--blue-cont); color: var(--blue); }
.sort-control { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--on-surface-3); white-space: nowrap; }
.sort-control select { width: auto; background: transparent; }
.result-count { color: var(--on-surface-3); font-size: 12px; margin: 16px 0 10px; }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.post-list > li { min-width: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-card { min-width: 0; padding: 24px; border-radius: var(--r-lg); background: var(--surface-2); }
.settings-card h2 { margin-bottom: 12px; }
.settings-card p { color: var(--on-surface-2); font-size: 13px; margin: 10px 0; }
.settings-card label { display: block; margin-top: 18px; font-size: 12px; }
.inline-form, .settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 9px; }
.inline-form input { width: 80px; }
.settings-card .note { font-size: 11px; color: var(--on-surface-3); margin-top: 18px; }
.channel-directory { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.channel-directory > div, .channel-directory > a { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.notice { margin-bottom: 18px; padding: 14px 18px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--outline-soft); color: var(--on-surface-3); font-size: 11px; }
/* Native dialogs retain browser focus handling and Escape behavior. */
dialog { width: min(640px, calc(100% - 40px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--on-surface); box-shadow: 0 12px 48px #20212440; }
dialog::backdrop { background: #20212473; }
dialog[open] { animation: dialog-in .18s ease-out; }
#post-form { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px 17px; }
.dialog-head h2 { margin-top: 3px; font-size: 22px; font-weight: 400; }
.dialog-body { min-height: 0; padding: 3px 26px 18px; overflow-y: auto; overscroll-behavior: contain; }
.dialog-body label { display: block; margin: 14px 0 7px; font-size: 12px; font-weight: 500; }
.dialog-body > label:first-of-type { margin-top: 0; }
input:not([type="hidden"]), select, textarea { max-width: 100%; }
.dialog-body input:not([type="hidden"]), textarea, select, .inline-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--outline); border-radius: 8px; background: #fff; }
textarea { display: block; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #73777c; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row > div { min-width: 0; }
.required { color: var(--red); }
.optional { font-size: 11px; color: var(--on-surface-3); font-weight: 400; margin-left: 3px; }
.field-hint { margin-top: 8px; color: var(--on-surface-3); font-size: 11px; }
.body-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0 8px; }
.body-label label { margin: 0; }
.body-label select { width: auto; min-height: 44px; padding: 6px 10px; font-size: 12px; }
.text-tools { display: flex; justify-content: space-between; align-items: center; color: var(--on-surface-3); font-size: 11px; }
.photo-section { margin: 12px 0 18px; padding: 14px; border: 1px solid var(--outline-soft); border-radius: var(--r-md); }
.photo-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-heading h3 { font-size: 13px; font-weight: 500; }
.photo-heading .btn { padding-inline: 14px; font-size: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-item { min-width: 0; margin: 12px 0 0; overflow: hidden; border: 1px solid var(--outline-soft); border-radius: 8px; }
.photo-item img, .photo-placeholder { display: block; width: 100%; height: 110px; object-fit: cover; background: var(--surface-2); }
.photo-placeholder { display: grid; place-items: center; color: var(--on-surface-3); font-size: 11px; }
.photo-item figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 0 8px; font-size: 11px; }
.photo-item .text-link { font-size: 11px; }
.photo-removed img { opacity: .35; }
#photo-login-form input { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--outline); border-radius: 8px; background: #fff; font-size: 16px; }
#photo-account-status { overflow-wrap: anywhere; }
.dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--outline-soft); background: var(--surface); }
.secondary-actions, .primary-actions { display: flex; gap: 4px; }
.form-error { padding: 10px 12px; margin-top: 12px; background: #fce8e6; color: var(--red); font-size: 12px; border-radius: 8px; }
#confirm-dialog { width: min(440px, calc(100% - 32px)); }
.confirm-content { padding: 28px; }
.confirm-content p { margin: 16px 0 24px; color: var(--on-surface-2); white-space: pre-line; overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 8px 12px 8px 20px; background: #303236; color: #fff; border-radius: 12px; box-shadow: var(--shadow-1); font-size: 13px; }
.toast button { flex-shrink: 0; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #a8c7fa; font-weight: 500; }
#toast-close { color: #fff; font-size: 23px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 1200px) {
  .appbar { grid-template-columns: 200px minmax(180px, 1fr) auto; gap: 18px; }
  .appbar-right .pill { display: none; }
  main { padding-inline: 24px; }
  .planner-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
}
@media (max-width: 1000px) {
  .planner-layout { grid-template-columns: minmax(0, 1fr); }
  .day-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-panel { padding: 16px; }
  .day-heading { margin-bottom: 12px; }
}
@media (max-width: 900px) {
  :root { --appbar-h: 108px; }
  .appbar { height: auto; min-height: var(--appbar-h); grid-template-columns: 1fr auto; gap: 7px 12px; padding: 7px 20px 9px; border-bottom: 1px solid var(--outline-soft); }
  .searchbar { grid-column: 1 / -1; grid-row: 2; height: 44px; }
  .searchbar input { font-size: 16px; }
  .brand-name { font-size: 18px; }
  .rail { position: fixed; z-index: 40; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: auto; flex-direction: row; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); gap: 0; border-top: 1px solid var(--outline-soft); background: var(--surface-1); }
  .rail a { flex: 1 1 0; padding: 0; gap: 3px; font-size: 11px; }
  .rail-icon { height: 30px; }
  main { width: 100%; max-width: 100%; padding: 18px 24px calc(96px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 24px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .list-toolbar, .library-toolbar { align-items: stretch; flex-direction: column; gap: 8px; margin: 12px 0 8px; }
  .status-filters { flex-wrap: nowrap; overflow-x: auto; padding: 1px 0 4px; scrollbar-width: thin; }
  .status-filters button { flex: 0 0 auto; }
  .sort-control { align-self: flex-start; }
}
@media (max-width: 600px) {
  :root { --appbar-h: 102px; }
  .appbar { padding: 7px 16px 8px; gap: 6px 10px; }
  .brand-mark { width: 32px; height: 32px; font-size: 19px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 17px; }
  .appbar-right .btn { padding-inline: 14px; font-size: 12px; }
  main { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); }
  .page-head { padding-bottom: 10px; }
  .summary-strip { gap: 0; padding: 3px; margin-bottom: 10px; }
  .overview-item { flex: 1 1 auto; justify-content: center; gap: 7px; padding: 5px 8px; font-size: 13px; }
  .overview-item strong { font-size: 16px; }
  .goal-overview { margin-left: 0; }
  .page-head h1 { font-size: 22px; }
  .page-sub { margin-top: 2px; font-size: 12px; max-width: 31ch; }
  .page-head > .pill { display: none; }
  .heading-row { align-items: flex-start; }
  .heading-row > .btn { padding: 8px 12px; font-size: 12px; }
  .section-head { margin: 18px 0 8px; }
  .section-head h2 { font-size: 16px; }
  .section-head .quiet { font-size: 10px; }
  .channel-filters { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-bottom: 8px; padding: 2px 0 4px; scrollbar-width: thin; }
  .channel-chip { flex: 0 0 auto; gap: 6px; padding: 6px 11px; font-size: 13px; }
  .channel-mark { width: 18px; height: 18px; font-size: 10px; }
  .channel-count { font-size: 12px; }
  .calendar-toolbar { padding: 5px; gap: 2px; flex-wrap: wrap; }
  .month-controls { gap: 0; }
  .month-controls h2 { margin-inline: 0; font-size: 15px; }
  .month-controls .icon-btn { width: 44px; flex-basis: 44px; }
  .month-controls .btn { margin-left: 2px; padding: 4px 10px; font-size: 11px; }
  .segmented { padding: 0; }
  .segmented button { min-width: 44px; min-height: 44px; padding: 5px 8px; }
  .calendar-cell { min-height: 60px; padding: 3px 2px; }
  .date-number { width: 24px; height: 24px; font-size: 12px; }
  .day-events { gap: 2px; }
  .calendar-post-icon { flex-basis: 19px; width: 19px; height: 19px; border-radius: 5px; }
  .calendar-post-icon svg { width: 14px; height: 14px; }
  .calendar-post-icon::after { width: 5px; height: 5px; border-width: 1px; }
  .calendar-legend { padding: 8px 10px; gap: 6px 10px; font-size: 11px; }
  .day-panel { padding: 14px; }
  .day-heading h2 { font-size: 17px; }
  .day-posts, .post-list, .upcoming-list, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-card { padding: 20px; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .post-top { gap: 8px; }
  .empty-state { padding: 24px 16px; }
  footer { font-size: 10px; gap: 4px; margin-top: 26px; }
  dialog { width: 100%; max-width: 100%; max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top) - 8px)); margin: auto 0 0; border-radius: 24px 24px 0 0; }
  #post-form { max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top) - 8px)); }
  .dialog-head { padding: 16px 18px 10px; }
  .dialog-head h2 { font-size: 20px; }
  .dialog-body { padding: 0 18px 12px; }
  .dialog-body label { margin: 10px 0 5px; }
  .dialog-body input:not([type="hidden"]), .dialog-body textarea, .dialog-body select { font-size: 16px; }
  .dialog-body label { font-size: 12px; }
  .body-label { margin: 12px 0 6px; }
  .body-label select { font-size: 13px; }
  .photo-section { padding: 10px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { gap: 10px; }
  .dialog-foot { position: sticky; bottom: 0; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); gap: 4px; }
  .dialog-foot .btn { padding-inline: 14px; font-size: 13px; }
  .secondary-actions, .primary-actions { gap: 0; }
  #confirm-dialog { margin: auto; border-radius: 24px; }
  .confirm-content { padding: 24px; }
  .toast { gap: 6px; width: calc(100% - 24px); max-width: none; padding-left: 14px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
