* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f4f6fa 0%, #eef2f7 100%);
  color: #18202a;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 100px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
.topbar h1 { margin: 4px 0 0; font-size: 30px; letter-spacing: -0.03em; }
.eyebrow {
  color: #6f7d8c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ghost-link { color: #58677a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.top-alchemy-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.78); border: 1px solid #e7ecf2; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.top-alchemy-link:hover { background: #fff; box-shadow: 0 10px 20px rgba(15,23,42,.08); transform: translateY(-1px); }
.top-alchemy-link:focus-visible { outline: 2px solid var(--theme-primary, #1f6fff); outline-offset: 2px; }
.top-alchemy-icon { font-size: 19px; line-height: 1; }


.hero-card, .panel, .stat-card {
  background: rgba(255,255,255,.92);
  border: 1px solid #e7ecf2;
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(24, 33, 48, 0.07);
}
.hero-card {
  padding: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #edf4ff 58%, #f8f9ff 100%);
}
.hero-card.compact { margin-bottom: 18px; }
.hero-dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.hero-dashboard h2, .hero-card h2 { margin: 6px 0 10px; font-size: 32px; letter-spacing: -0.04em; }
.hero-card p { margin: 0; color: #566476; line-height: 1.68; max-width: 700px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions.wrap { justify-content: flex-end; }

.hero-home {
  padding: 28px;
  overflow: hidden;
}
.hero-home-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr);
  gap: 22px;
  align-items: stretch;
}
.hero-home-main,
.hero-home-side {
  min-width: 0;
}
.hero-home-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.hero-home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-panel-bg, #fff) 72%, transparent);
  color: var(--theme-primary, #1f6fff);
  font-size: 13px;
  font-weight: 800;
  width: fit-content;
}
.hero-home-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}
.hero-home-description {
  margin: 0;
  max-width: 680px;
  font-size: 15px;
  line-height: 1.75;
}
.hero-search-soft {
  margin-top: 0;
}
.hero-home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.hero-home-stat {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--theme-border, #e7ecf2) 85%, transparent);
  background: color-mix(in srgb, var(--theme-panel-bg, #fff) 84%, transparent);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}
.hero-home-stat-label {
  display: block;
  color: var(--theme-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}
.hero-home-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}
.hero-home-stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.hero-home-stat-link:hover,
.hero-home-stat-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.98);
}
.hero-home-stat-button {
  appearance: none;
  width: 100%;
  border: 0;
  font: inherit;
}
.hero-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-home-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-home-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.hero-side-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--theme-border, #e7ecf2) 85%, transparent);
  background: color-mix(in srgb, var(--theme-panel-bg, #fff) 88%, transparent);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}
.hero-side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.hero-side-card-head h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.03em;
}
.hero-weather-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.hero-weather-summary strong {
  font-size: 18px;
  line-height: 1.3;
}
.hero-weather-summary span {
  color: var(--theme-muted, #64748b);
  font-size: 13px;
  font-weight: 700;
}
.hero-weather-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-weather-mini-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--theme-soft-bg, #eef3fb);
  color: #435065;
  font-size: 12px;
}
.hero-event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-event-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
}
.hero-event-time {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  background: var(--theme-soft-bg, #eef3fb);
  color: var(--theme-primary, #1f6fff);
  font-size: 12px;
  font-weight: 800;
}
.hero-home-photo {
  position: relative;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--theme-border, #e7ecf2) 85%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-hero-start, #ffffff) 40%, #fff), color-mix(in srgb, var(--theme-hero-end, #f8f9ff) 52%, #fff));
}
.hero-home-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-home-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-hero-start, #1d4ed8) 42%, transparent), color-mix(in srgb, var(--theme-hero-mid, #2563eb) 18%, transparent), transparent);
  opacity: var(--hero-overlay-opacity, .18);
  pointer-events: none;
}

.primary-btn, .secondary-btn, .text-link, .board-link, .shortcut-card, .chip {
  transition: all .18s ease;
}
.primary-btn, .secondary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}
.primary-btn {
  background: #1f6fff;
  color: #fff;
}
.primary-btn:hover { background: #115ee7; transform: translateY(-1px); }
.primary-btn.small { padding: 10px 14px; font-size: 14px; }
.secondary-btn {
  background: #eef3fb;
  color: #1c3d77;
}
.secondary-btn:hover { background: #e2ebfb; transform: translateY(-1px); }
.text-link {
  color: #1f6fff;
  font-weight: 700;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef3fb;
  color: #365b91;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.badge.soft { background: #f3f6fb; color: #53657b; }
.badge-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge-row.compact { margin-bottom: 6px; }
.muted { color: #77869a; font-size: 13px; }
.helper-inline { display: block; margin-top: 6px; color: #77869a; font-size: 12px; }

.stats-grid, .dashboard-grid, .schedule-layout, .board-layout, .summary-grid {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}
.stats-grid { grid-template-columns: repeat(3, 1fr); }
.stats-grid.four { grid-template-columns: repeat(4, 1fr); }
.stats-grid.five { grid-template-columns: repeat(5, 1fr); }
.summary-grid { grid-template-columns: 1.1fr 1fr; }
.dashboard-grid { grid-template-columns: 1.25fr 1fr; }
.dashboard-grid.expanded { grid-template-columns: 1.05fr .95fr; }
.schedule-layout { grid-template-columns: 380px 1fr; }
.board-layout { grid-template-columns: 280px 1fr; align-items: start; }
.board-layout.wide { grid-template-columns: 300px 1fr; }

.panel { padding: 24px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.panel-head.mini { margin-bottom: 12px; }
.panel h3 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.panel h4 { margin: 0; font-size: 16px; }
.spaced-top { margin-top: 28px; }
.empty-state {
  padding: 28px 16px;
  border-radius: 16px;
  background: #f7f9fc;
  color: #708197;
  text-align: center;
}

.stat-card { padding: 18px 20px; }
.stat-card span { display: block; color: #6c7a8b; font-size: 14px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 32px; letter-spacing: -0.04em; }

.agenda-list, .timeline { list-style: none; margin: 0; padding: 0; }
.agenda-list li, .timeline li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #eef2f7;
}
.agenda-list li:last-child, .timeline li:last-child { border-bottom: 0; }
.agenda-time, .timeline-date { font-weight: 800; color: #21344d; }
.timeline.plain li { padding: 12px 0; }
.compact-timeline li { grid-template-columns: 88px 1fr; }
.timeline-body p { margin: 8px 0 0; color: #576576; }

.board-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.shortcut-card {
  padding: 14px;
  border: 1px solid #edf1f7;
  border-radius: 16px;
  background: #f8fafc;
}
.shortcut-card:hover { transform: translateY(-2px); background: #f0f5ff; }
.shortcut-card strong { display: block; font-size: 15px; margin-bottom: 4px; }
.shortcut-card span { color: #78889a; font-size: 13px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.post-card {
  overflow: hidden;
  border: 1px solid #eef2f7;
  border-radius: 20px;
  background: #fff;
}
.post-card img {
  width: 100%;
  aspect-ratio: 1.25 / 1;
  object-fit: contain;
  background: #f6f8fc;
}
.post-card.compact .post-meta,
.post-card.compact h4,
.post-card.compact p,
.post-card.compact .muted,
.post-card.compact .tag-row { padding-left: 16px; padding-right: 16px; }
.post-card h4 { margin: 10px 0 8px; font-size: 18px; }
.post-card p { margin: 0 0 12px; color: #5d6b7b; line-height: 1.5; }
.post-card .muted { padding-bottom: 16px; }

.post-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 14px;
}

.feed-list { display: flex; flex-direction: column; gap: 16px; }
.feed-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  border: 1px solid #edf1f7;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}
.feed-cover img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: contain;
  background: #f6f8fc;
}
.feed-body { padding: 18px 18px 18px 0; }
.feed-body h4 { margin: 12px 0 10px; font-size: 23px; letter-spacing: -0.03em; }
.feed-body p { margin: 0 0 12px; color: #586677; line-height: 1.6; }

.sidebar { position: sticky; top: 12px; }
.board-menu { display: flex; flex-direction: column; gap: 10px; }
.board-link {
  display: block;
  padding: 14px;
  border-radius: 16px;
  background: #f7f9fc;
  border: 1px solid #edf2f7;
}
.board-link strong { display: block; margin-bottom: 4px; }
.board-link span { color: #7a899b; font-size: 13px; }
.board-link.active, .board-link:hover { background: #edf4ff; border-color: #d8e6ff; }
.filter-box { margin-top: 18px; padding-top: 12px; border-top: 1px solid #eef2f7; }

.stack-form { display: flex; flex-direction: column; gap: 16px; }
.stack-form label { display: flex; flex-direction: column; gap: 8px; }
.stack-form span { font-weight: 700; color: #2c3d54; }
input[type=text], input[type=password], input[type=datetime-local], input[type=date], select, textarea, input[type=file] {
  width: 100%;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  padding: 14px 15px;
  background: #fff;
  font: inherit;
}
textarea { resize: vertical; min-height: 120px; }
.form-panel { max-width: 920px; margin: 0 auto; }
.form-panel.wide-form { max-width: 980px; }
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.2fr 420px;
  gap: 18px;
  align-items: center;
  min-height: calc(100vh - 190px);
}
.login-panel { padding: 28px; }
.helper-text { margin-top: 12px; color: #73839a; font-size: 13px; }
.helper-text a { color: #1f6fff; }

.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.flash { padding: 12px 16px; border-radius: 14px; font-weight: 700; }
.flash.success { background: #e8f7ef; color: #1f6a43; }
.flash.error { background: #fdecec; color: #8e3131; }
.flash.info { background: #eaf2ff; color: #244f91; }

.post-view h2 { margin: 8px 0 18px; font-size: 34px; letter-spacing: -0.04em; }
.post-content { line-height: 1.8; color: #2c3f54; margin-bottom: 22px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery-grid figure {
  margin: 0; overflow: hidden; border-radius: 18px; background: #f4f7fb; border: 1px solid #ebf0f5;
}
.gallery-grid figure.cover-figure { outline: 3px solid #dbe8ff; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f6f8fc; }
.inline-actions { margin-top: 22px; display: flex; gap: 10px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid #edf2f7; text-align: left; }
.data-table th { color: #607289; font-size: 13px; font-weight: 800; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 24px));
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(225,232,241,.9);
  box-shadow: 0 12px 30px rgba(28, 40, 57, .14);
  border-radius: 18px;
  display: flex;
  justify-content: space-around;
  gap: 6px;
  padding: 10px;
  z-index: 30;
}
.bottom-nav a {
  flex: 1; text-align: center; padding: 12px 8px; border-radius: 12px; color: #627488; font-weight: 700;
}
.bottom-nav a.active { background: #edf4ff; color: #1f6fff; }

.next-event-card { padding: 6px 4px 6px 0; }
.next-event-card h3 { font-size: 28px; margin: 10px 0 6px; }
.next-event-card p { margin: 0; color: #607086; }
.d-day { display: inline-block; margin-top: 16px; font-size: 30px; color: #1f6fff; }
.importance-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #a6b3c7; display: inline-block;
}
.importance-dot.high, .calendar-event.high { background: #ffdfe1; }
.importance-dot.normal, .calendar-event.normal { background: #eaf1ff; }
.importance-dot.low, .calendar-event.low { background: #eef4ef; }
.importance-dot.high { box-shadow: 0 0 0 4px rgba(255,95,109,.16); background: #ff6070; }
.importance-dot.normal { box-shadow: 0 0 0 4px rgba(58,118,255,.12); background: #3a76ff; }
.importance-dot.low { box-shadow: 0 0 0 4px rgba(86,153,103,.12); background: #569967; }

.checklist-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mini-checklist-card {
  border: 1px solid #edf2f7;
  background: #fbfcff;
  border-radius: 18px;
  padding: 14px;
}
.mini-checklist-card strong { display: block; margin: 10px 0 12px; }
.progress-bar {
  background: #edf1f7;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-bar.large { height: 12px; }
.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b89ff 0%, #7aa7ff 100%);
}
.progress-caption { margin-top: 8px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.tag-row.generous { margin-bottom: 18px; }
.tag-row.filter { gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: #f4f7fb;
  color: #49617f;
  border: 1px solid #e2e8f1;
  font-size: 13px;
  font-weight: 700;
}
.chip.active, .chip:hover { background: #edf4ff; color: #1f6fff; border-color: #d8e6ff; }

.photo-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.photo-thumb {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #edf2f7;
  background: #fff;
}
.photo-thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #f6f8fc; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.header-row { color: #7c8a9c; font-weight: 800; margin-bottom: 10px; text-align: center; }
.calendar-wrap { display: flex; flex-direction: column; gap: 10px; }
.calendar-day {
  min-height: 126px;
  border-radius: 18px;
  border: 1px solid #edf2f7;
  background: #fafcff;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.calendar-day.muted-day { opacity: .48; }
.calendar-day.today { border-color: #cfe0ff; background: #f4f8ff; }
.calendar-day-num { font-weight: 800; margin-bottom: 10px; }

.calendar-day.is-sunday .calendar-day-num,
.calendar-day.is-saturday .calendar-day-num,
.calendar-day.is-holiday-day .calendar-day-num {
  color: #d64545;
}
.calendar-day.is-sunday.today .calendar-day-num,
.calendar-day.is-saturday.today .calendar-day-num,
.calendar-day.is-holiday-day.today .calendar-day-num {
  color: #c73434;
}

.calendar-day-events { display: flex; flex-direction: column; gap: 6px; }
.calendar-event {
  border-radius: 12px;
  padding: 7px 8px;
  font-size: 12px;
}
.calendar-event span { display: block; color: #67798e; font-size: 11px; }
.calendar-event strong { display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-more { color: #7f8da0; font-size: 12px; font-weight: 700; }
.calendar-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.calendar-tag-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #d8e6ff;
  color: #2758a3;
  font-size: 11px;
  font-weight: 700;
}
.calendar-post-meta {
  margin-top: 8px;
  color: #7b8899;
  font-size: 11px;
  font-weight: 700;
}
.compact-inline-actions {
  margin-top: 8px;
  gap: 14px;
}
.month-nav { align-items: center; }
.sticky-column { align-self: start; position: sticky; top: 12px; }

.checklist-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.list-card {
  border: 1px solid #edf2f7;
  border-radius: 20px;
  padding: 18px;
  background: #fff;
}
.list-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}
.list-card-head h3 { margin: 8px 0 0; font-size: 24px; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(79,124,255,.12); }
.inline-add-form {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 14px;
}
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 10px 12px;
  background: #fbfcff;
}
.todo-item.done { background: #f3f8f3; }
.todo-item.done strong { text-decoration: line-through; color: #6e7d8b; }
.toggle-check {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #d7dfeb; background: #fff; color: #1f6fff; font-weight: 800; cursor: pointer;
}
.todo-main strong { display: block; margin-bottom: 4px; }

.flash strong { font-weight: 800; }

@media (max-width: 1100px) {
  .stats-grid.four, .stats-grid.five, .summary-grid, .dashboard-grid, .schedule-layout, .board-layout, .login-shell, .checklist-board {
    grid-template-columns: 1fr;
  }
  .post-grid, .photo-strip-grid, .checklist-summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .board-shortcuts, .two-col-grid, .inline-add-form { grid-template-columns: 1fr; }
  .post-grid, .photo-strip-grid, .checklist-summary-grid { grid-template-columns: 1fr; }
  .feed-card { grid-template-columns: 1fr; }
  .feed-body { padding: 0 18px 18px; }
  .hero-dashboard { flex-direction: column; align-items: start; }
  .hero-home { padding: 22px; }
  .hero-home-shell, .hero-home-side-grid, .hero-home-stats { grid-template-columns: 1fr; }
  .hero-home-title { font-size: 30px; }
  .hero-home-actions > * { flex: 1 1 calc(50% - 10px); }
  .hero-home-photo { min-height: 180px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .calendar-grid { gap: 8px; }
  .calendar-day { min-height: 96px; padding: 10px; }
  .bottom-nav { width: calc(100% - 16px); padding: 8px; }
  .bottom-nav a { font-size: 12px; padding: 10px 6px; }
}

.hidden { display: none !important; }
.top-search-link { font-weight: 700; }
.hero-search {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 520px;
}
.hero-search input,
.inline-search-bar input,
.inline-filter-bar input,
.inline-filter-bar select { min-width: 0; }
.upload-summary {
  border: 1px dashed #cdd9ea;
  border-radius: 16px;
  padding: 12px 14px;
  background: #f8fbff;
  color: #45617f;
}
.upload-panel {
  border: 1px solid #dbe8ff;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border-radius: 20px;
  padding: 18px;
}
.upload-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.upload-progress { margin-bottom: 10px; }
.small-note { font-size: 12px; margin-top: 8px; }
.compact-hero-panel { margin-bottom: 18px; }
.inline-search-bar, .inline-filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px auto auto;
  gap: 10px;
  align-items: center;
}
.inline-filter-bar { grid-template-columns: 180px 220px auto auto; }
.album-section { margin-top: 18px; }
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.album-card {
  overflow: hidden;
  border: 1px solid #edf2f7;
  border-radius: 20px;
  background: #fff;
}
.album-card img {
  width: 100%;
  aspect-ratio: 1.15 / 1;
  object-fit: contain;
  background: #f6f8fc;
}
.album-card-body { padding: 14px; }
.album-card h4 { margin: 0 0 8px; font-size: 18px; }
.favorite-list, .archive-summary-list { display: flex; flex-direction: column; gap: 12px; }
.favorite-card, .archive-summary-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  padding: 10px;
  background: #fff;
}
.favorite-card img, .archive-summary-card img {
  width: 96px;
  height: 72px;
  object-fit: contain;
  background: #f6f8fc;
  border-radius: 12px;
}
.wrap-actions { flex-wrap: wrap; }
.inline-form { display: inline-flex; }
.compact-search-card .feed-cover img { min-height: 170px; }
.v3-stats { margin-bottom: 18px; }
@media (max-width: 1100px) {
  .album-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-search, .inline-search-bar, .inline-filter-bar { grid-template-columns: 1fr; }
  .album-grid { grid-template-columns: 1fr; }
  .favorite-card, .archive-summary-card { grid-template-columns: 84px 1fr; }
  .favorite-card img, .archive-summary-card img { width: 84px; height: 64px; }
}


.dashboard-admin-grid {
  margin-top: 18px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-section { min-width: 0; }
.dashboard-span-2 { grid-column: span 2; }
.inside-grid { margin-top: 0; }
.mini-post-list {
  display: grid;
  gap: 12px;
}
.mini-post-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #edf1f7;
}
.mini-post-item img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: #f6f8fc;
  border-radius: 14px;
}
.mini-post-item strong {
  display: block;
  margin-bottom: 6px;
}
.mini-post-item span {
  color: #718195;
  font-size: 13px;
}
.admin-settings-form { margin-top: 18px; }
.admin-config-grid { align-items: start; }
.compact-form { gap: 12px; }
.admin-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9fc;
  color: #69798c;
  line-height: 1.6;
}
.layout-config-list {
  display: grid;
  gap: 12px;
}
.layout-section-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid #edf1f7;
  border-radius: 18px;
  background: #fbfcfe;
}
.layout-section-main { min-width: 0; }
.layout-section-controls {
  display: grid;
  grid-template-columns: 92px 112px auto;
  gap: 10px;
  align-items: end;
}
.checkbox-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
}
.checkbox-inline input {
  width: auto;
  margin: 0;
}
.form-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}
.sticky-submit {
  position: sticky;
  bottom: 76px;
  z-index: 8;
}
.admin-quick-links { align-self: stretch; }
@media (max-width: 980px) {
  .dashboard-admin-grid { grid-template-columns: 1fr; }
  .dashboard-span-2 { grid-column: auto; }
  .layout-section-card { grid-template-columns: 1fr; }
  .layout-section-controls { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 720px) {
  .layout-section-controls { grid-template-columns: 1fr; }
  .sticky-submit {
    position: static;
  }
}


.login-shell-rich {
  grid-template-columns: minmax(0, 1.3fr) 420px;
}
.login-hero-visual {
  --login-hero-x: flex-start;
  --login-hero-y: flex-end;
  --login-hero-text-align: left;
  --login-hero-offset-x: 0px;
  --login-hero-offset-y: 0px;
  position: relative;
  min-height: 540px;
  display: block;
  background: linear-gradient(145deg, #ffffff 0%, #edf4ff 48%, #dde8ff 100%);
  overflow: hidden;
}
.login-hero-visual.has-photo {
  background-size: cover;
  background-position: center;
  color: #fff;
}
.login-hero-positioner {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: var(--login-hero-y);
  align-items: var(--login-hero-x);
  padding: 18px;
}
.login-hero-overlay {
  width: min(520px, calc(100% - 10px));
  padding: 18px;
  transform: translate(var(--login-hero-offset-x), var(--login-hero-offset-y));
  text-align: var(--login-hero-text-align);
}
.login-hero-visual .login-hero-overlay {
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.55);
}
.login-hero-visual.has-photo .login-hero-overlay {
  background: rgba(14, 25, 39, .38);
  border-color: rgba(255,255,255,.18);
}
.login-hero-visual.has-photo .eyebrow,
.login-hero-visual.has-photo p {
  color: rgba(255,255,255,.92);
}
.login-hero-visual.has-photo h2 {
  color: #fff;
}

.layout-dnd-list {
  display: grid;
  gap: 12px;
}
.layout-draggable-card {
  display: grid;
  grid-template-columns: 54px 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #edf1f7;
  border-radius: 18px;
  background: #fbfcfe;
  cursor: grab;
}
.layout-draggable-card.is-dragging {
  opacity: .55;
  transform: scale(.995);
}
.drag-handle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3fb;
  color: #365b91;
  font-size: 18px;
  font-weight: 800;
}
.layout-order-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fb;
  color: #56677c;
  font-weight: 800;
}
.layout-card-body { min-width: 0; }
.layout-card-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.compact-checkbox {
  padding-bottom: 0;
}
.drag-note {
  margin-top: 14px;
}
.login-hero-preview-card {
  border: 1px solid #edf1f7;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}
.login-hero-preview-card img {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  object-fit: contain;
  background: #f6f8fc;
}
.image-remove-check {
  padding: 14px 16px;
}
.check-group-stack {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 980px) {
  .layout-draggable-card {
    grid-template-columns: 46px 46px minmax(0, 1fr);
  }
  .layout-card-controls {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .login-shell-rich {
    grid-template-columns: 1fr;
  }
  .login-hero-visual {
    min-height: 320px;
  }
}

/* patch: calendar-first schedule + wider full-width photos */
.schedule-layout.calendar-first { grid-template-columns: 1fr; }
.schedule-main-panel.full-width { max-width: none; }
.month-nav-actions { display: flex; align-items: center; gap: 10px; }
.calendar-guide {
  margin: -4px 0 14px;
  color: #6e7d90;
  font-size: 13px;
}
.calendar-day.clickable {
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.calendar-day.clickable:hover,
.calendar-day.clickable:focus-visible {
  transform: translateY(-1px);
  border-color: #cfe0ff;
  box-shadow: 0 10px 24px rgba(31, 111, 255, 0.08);
  outline: none;
}

.calendar-event-button {
  width: 100%;
  text-align: left;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.calendar-event-button:hover,
.calendar-event-button:focus-visible {
  filter: brightness(0.98);
  outline: 2px solid rgba(31,111,255,0.18);
  outline-offset: 1px;
}
.calendar-add-btn {
  margin-top: auto;
  width: 100%;
  min-height: 32px;
  border: 1px dashed #cfe0ff;
  border-radius: 12px;
  background: #f6f9ff;
  color: #1f6fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.calendar-add-btn:hover,
.calendar-add-btn:focus-visible {
  background: #edf4ff;
  border-color: #b9d2ff;
  outline: none;
}
.schedule-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.schedule-modal-backdrop.open { display: flex; }
.schedule-modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  border: 1px solid #e6ecf5;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
  padding: 24px;
}

.post-card img,
.feed-cover img,
.gallery-grid img,
.album-card img,
.photo-thumb img {
  aspect-ratio: auto !important;
  height: auto !important;
  max-height: 720px;
  object-fit: contain;
}
.feed-card {
  grid-template-columns: minmax(320px, 42%) 1fr;
  align-items: start;
}
.feed-cover {
  padding: 0;
  background: #f6f8fc;
}
.feed-cover img {
  width: 100%;
  min-height: 0;
}
.post-card img,
.album-card img,
.gallery-grid img,
.photo-thumb img {
  width: 100%;
}
.gallery-grid figure {
  padding: 0;
  background: #f6f8fc;
}
@media (max-width: 860px) {
  .month-nav-actions { width: 100%; justify-content: space-between; }
  .feed-card { grid-template-columns: 1fr; }
  .schedule-modal-card { padding: 20px; }
}


/* patch 3.1: holiday + weather + wider images */
.calendar-day { position: relative; }
.calendar-holiday-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 8px;
}
.calendar-holiday-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff3f3;
  border: 1px solid #ffd4d4;
  color: #bf3b3b;
  font-size: 11px;
  font-weight: 800;
}
.calendar-holiday-chip.is-holiday {
  background: #ffeaea;
  border-color: #ffc5c5;
}
.calendar-day-events,
.calendar-tag-row,
.calendar-post-meta {
  position: relative;
  z-index: 2;
}
.calendar-add-btn {
  position: relative;
  z-index: 3;
}
.weather-inline-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}
.panel-head.subhead {
  margin-bottom: 10px;
}
.panel-head.subhead h4 {
  margin: 0;
  font-size: 16px;
}
.weather-table-wrap {
  overflow-x: auto;
}
.weather-table-simple {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.weather-table-simple th,
.weather-table-simple td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  white-space: nowrap;
}
.weather-table-simple th {
  color: #6d7e92;
  font-weight: 800;
  background: #f8fafc;
}
.weather-table-simple tr:last-child td {
  border-bottom: 0;
}
.compact-note {
  margin-top: 0;
}
.post-card img,
.feed-cover img,
.gallery-grid img,
.album-card img,
.photo-thumb img,
.mini-post-item img,
.favorite-card img,
.archive-summary-card img {
  width: 100%;
  object-fit: contain;
  background: #f6f8fc;
}
.post-card img,
.album-card img {
  min-height: 260px;
}
.feed-cover img {
  min-height: 360px;
}
@media (max-width: 860px) {
  .feed-cover img {
    min-height: 220px;
  }
  .post-card img,
  .album-card img {
    min-height: 180px;
  }
}

.weather-headline {
  align-items: center;
  gap: .65rem;
}

.weather-location-wrap {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.weather-source-badge {
  display: inline-flex;
  align-items: center;
  padding: .22rem .55rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 700;
  background: rgba(22, 37, 66, .08);
  color: #42526b;
}

.weather-source-badge.is-current {
  background: rgba(48, 120, 255, .12);
  color: #1859c9;
}

.weather-loading-note {
  margin: .4rem 0 .7rem;
  padding: .6rem .8rem;
  border-radius: 12px;
  background: rgba(48, 120, 255, .08);
  color: #1b3e7c;
  font-size: .88rem;
}

.field-with-action-group { display: flex; flex-direction: column; gap: 10px; }
.field-with-action { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.special-setting-checkbox { min-width: 0; }
.special-setting-checkbox span { white-space: nowrap; }
.small-btn { padding: 11px 14px; white-space: nowrap; }
.api-test-result {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e3e9f2;
  background: #f8fbff;
  color: #304255;
  font-size: 14px;
  line-height: 1.55;
}
.api-test-result.ok {
  border-color: #b8e0c4;
  background: #f1fbf4;
  color: #1f5e36;
}
.api-test-result.error {
  border-color: #f3c3c3;
  background: #fff6f6;
  color: #9b2d2d;
}
.api-test-result strong { display: block; margin-bottom: 4px; }
.api-test-meta { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.api-test-meta li { display: flex; justify-content: space-between; gap: 10px; }
.api-test-meta span { color: inherit; opacity: .75; font-weight: 600; }
.api-test-meta strong { margin: 0; font-size: 13px; text-align: right; }
@media (max-width: 720px) {
  .field-with-action { grid-template-columns: 1fr; }
  .small-btn { width: 100%; }
  .api-test-meta li { flex-direction: column; }
  .api-test-meta strong { text-align: left; }
}

.school-search-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.school-result-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #d9e6fb;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}
.school-result-btn:hover,
.school-result-btn:focus-visible {
  border-color: #9cc0ff;
  background: #f8fbff;
  outline: none;
}
.school-result-btn span,
.school-result-btn small {
  color: #6d7e92;
}
.school-meal-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}
.school-meal-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e7edf6;
  background: #fbfcff;
}
.school-meal-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.school-meal-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.55;
}
.school-meal-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: #1f6fff;
  font-weight: 800;
}
.empty-state.slim {
  padding: 0;
  border: 0;
  background: transparent;
}


/* patch: checklist modal ui + hybrid admin ordering */
.modal-style-board {
  gap: 16px;
}
.checklist-card-modern {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.checklist-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.todo-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.todo-toggle-form { margin: 0; }
.todo-edit-btn { white-space: nowrap; }
.empty-state.with-action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.checklist-add-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 14px;
  border: 1px dashed #d3dced;
  background: #f7f9fd;
  color: #47648f;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.checklist-add-btn:hover {
  background: #eef4ff;
}
.layout-position-control {
  min-width: 96px;
  padding-bottom: 0;
}
.layout-position-control span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #6b7890;
}
.layout-position-select {
  width: 100%;
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d8e0ef;
  background: #fff;
}
@media (max-width: 980px) {
  .layout-position-control {
    min-width: 84px;
  }
}
@media (max-width: 700px) {
  .todo-item {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .todo-edit-btn {
    grid-column: 2;
    justify-self: end;
  }
}

.today-tomorrow-header {
  align-items: center;
  gap: 16px;
}
.today-tomorrow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.today-tomorrow-grid.mode-today-only .day-column-tomorrow {
  display: none;
}
.today-tomorrow-grid.mode-today-only .day-column-today {
  min-width: 0;
}
.today-tomorrow-grid.mode-today-tomorrow.is-fixed-split {
  grid-template-columns: 1fr 1fr;
}
.day-column {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e8edf6;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.day-column-head h4 {
  margin: 0;
  font-size: 18px;
}
.day-subpanel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.compact-agenda-list li {
  padding-left: 0;
  padding-right: 0;
}
.compact-school-meal-card {
  padding: 12px 14px;
}
.compact-school-meal-list {
  gap: 6px;
}
.day-weather-block {
  margin-top: 0;
}
@media (min-width: 900px), (orientation: landscape) and (max-width: 899px) {
  .today-tomorrow-grid.mode-today-tomorrow.is-mobile-responsive {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  .today-tomorrow-header {
    align-items: flex-start;
  }
}


.weather-title-wrap {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.weather-summary-inline {
  font-size: 12px;
  color: #6b7890;
  line-height: 1.45;
}
.today-tomorrow-grid.is-fixed-split {
  overflow: hidden;
}
.today-tomorrow-grid.is-fixed-split .day-column {
  min-width: 0;
}
.today-tomorrow-grid.is-fixed-split .day-subpanel,
.today-tomorrow-grid.is-fixed-split .day-column-head {
  display: flex;
  flex-direction: column;
}
@media (max-width: 680px) {
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .day-column {
    padding: 10px;
    gap: 10px;
    border-radius: 18px;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .day-column-head h4,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .panel-head.subhead h4 {
    font-size: 15px;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .muted,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .weather-summary-inline,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .school-meal-list li,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .agenda-list li,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .weather-table-simple {
    font-size: 11px;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .agenda-time {
    font-size: 11px;
    min-width: 40px;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .weather-headline,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .school-meal-headline,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .panel-head.subhead {
    align-items: flex-start;
    gap: 6px;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .weather-location-wrap {
    align-self: stretch;
    justify-content: space-between;
    width: 100%;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .weather-table-simple th,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .weather-table-simple td {
    padding: 6px 4px;
  }
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .compact-school-meal-card,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .day-weather-block,
  .today-tomorrow-grid.mode-today-tomorrow.is-fixed-split .day-subpanel {
    min-width: 0;
  }
}


.stat-card-button {
  position: relative;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.alert-badge {
  background: #ff5f7a;
  color: #fff;
}
.badge-pill.alert-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
}
.badge.alert-badge.small {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 40, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}
.modal-card {
  width: min(640px, 100%);
  max-height: min(78vh, 760px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 31, 55, 0.22);
  padding: 22px;
}
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notification-item {
  display: block;
  border: 1px solid #e7edf6;
  border-radius: 18px;
  padding: 14px 16px;
  background: #fbfdff;
  color: inherit;
  text-decoration: none;
}
.notification-item:hover {
  border-color: #cfdcf0;
  background: #f6faff;
}
.notification-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.notification-item p {
  margin: 8px 0 0;
  color: #415469;
  line-height: 1.6;
}
body.modal-open { overflow: hidden; }

.comment-section { margin-top: 18px; }
.comment-form-card {
  padding: 18px;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  background: #f9fbff;
  margin-bottom: 18px;
}
.comment-form-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comment-card {
  border: 1px solid #e9eef5;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}
.comment-card.is-reply {
  margin-top: 12px;
  border-left: 4px solid #d9e7ff;
  background: #fbfdff;
}
.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}
.comment-body {
  color: #304255;
  line-height: 1.7;
}
.comment-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.danger-link {
  color: #c84b61;
}
.comment-reply-list {
  margin-top: 12px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment-links { margin-top: 0; }
@media (max-width: 860px) {
  .login-hero-positioner { padding: 14px; }
  .login-hero-overlay { width: min(100%, 100%); }
  .comment-head, .comment-form-head { flex-direction: column; align-items: flex-start; }
  .comment-reply-list { padding-left: 10px; }
}


.top-notify-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.top-notify-badge,
.inline-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 6px;
  background: #ff5f7a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.comment-alert-launcher {
  position: relative;
}
.login-check-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: -4px;
}
.check-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  color: #506175;
  font-weight: 700;
}
.check-inline input {
  width: 18px;
  height: 18px;
  accent-color: #1f6fff;
}
.reply-inline-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dce7f5;
  border-radius: 16px;
  background: #f8fbff;
}
.reply-inline-box[hidden] {
  display: none !important;
}
.inline-reply-form textarea {
  min-height: 92px;
}
.comment-inline-btn {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
@media (max-width: 860px) {
  .login-check-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}


.board-layout.only-list { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); }
.board-layout.only-list .board-placeholder-panel { background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.92)); }
@media (max-width: 900px) {
  .board-layout.only-list { grid-template-columns: 1fr; }
}


.board-stack-layout {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.board-stack-top,
.board-stack-bottom {
  width: 100%;
}
.board-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.board-filter-box {
  margin-top: 18px;
}

/* patch: weekend/holiday date only red, no holiday text row */
.calendar-holiday-row { display:none !important; }
.calendar-holiday-chip { display:none !important; }

/* Admin-customizable dashboard theme */
body {
  background: linear-gradient(180deg, var(--theme-bg-start, #f4f6fa) 0%, var(--theme-bg-end, #eef2f7) 100%);
  color: var(--theme-text, #18202a);
}
.eyebrow, .muted, .ghost-link, .stat-card span, .hero-card p {
  color: var(--theme-muted, #6f7d8c);
}
.hero-card, .panel, .stat-card {
  background: color-mix(in srgb, var(--theme-panel-bg, #ffffff) 92%, transparent);
  border-color: var(--theme-border, #e7ecf2);
}
.hero-card {
  background: linear-gradient(135deg, var(--theme-hero-start, #ffffff) 0%, var(--theme-hero-mid, #edf4ff) 58%, var(--theme-hero-end, #f8f9ff) 100%);
}
.primary-btn, .bottom-nav a.active {
  background: var(--theme-primary, #1f6fff);
  color: #fff;
}
.primary-btn:hover { background: var(--theme-primary, #1f6fff); filter: brightness(.94); }
.text-link, .panel-head a, .top-notify-link, .comment-alert-launcher .inline-count-badge {
  color: var(--theme-primary, #1f6fff);
}
.secondary-btn, .badge, .shortcut-card, .empty-state, .admin-note, .mini-checklist-card, .school-meal-card, .day-subpanel {
  background: var(--theme-soft-bg, #eef3fb);
}
.secondary-btn { color: var(--theme-primary, #1f6fff); }
.badge { color: var(--theme-primary, #1f6fff); }
.badge.soft { color: var(--theme-muted, #53657b); }
.chip, .alert-badge, .top-notify-badge {
  background: var(--theme-accent, #7c3aed);
  color: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid color-mix(in srgb, var(--theme-primary, #1f6fff) 30%, transparent);
  border-color: var(--theme-primary, #1f6fff) !important;
}
.color-grid input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--theme-border, #e7ecf2);
  border-radius: 12px;
  background: var(--theme-panel-bg, #ffffff);
}
.layout-card-body textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}


/* v4 video extension */
.video-section {
  margin-top: 22px;
}
.section-mini-title {
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--theme-text, #18202a);
}
.video-list,
.video-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.video-card,
.video-library-card {
  overflow: hidden;
  border: 1px solid var(--theme-border, #e7ecf2);
  border-radius: 18px;
  background: var(--theme-panel-bg, #fff);
}
.video-card video,
.video-library-card video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #0f172a;
  border-radius: 18px 18px 0 0;
}
.video-card figcaption,
.video-library-body {
  padding: 12px 14px 14px;
}
.video-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--theme-muted, #6f7d8c);
  font-size: .92rem;
}
.video-library-body h4 {
  margin: 10px 0 6px;
}
.video-library-body p {
  margin: 0 0 10px;
  color: var(--theme-muted, #6f7d8c);
}
.video-cover-placeholder {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #334155);
}
.video-cover-placeholder span {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  font-size: 24px;
  padding-left: 4px;
}
.video-cover-placeholder strong {
  color: #fff;
}
@media (max-width: 640px) {
  .video-list,
  .video-library-grid {
    grid-template-columns: 1fr;
  }
  .video-card video,
  .video-library-card video {
    max-height: 62vh;
  }
}

/* v4 video upload diagnostics */
.upload-meter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 4px;
}
.upload-meter-grid > div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.06);
}
.meter-label {
  display: block;
  font-size: 12px;
  color: var(--muted, #667085);
  margin-bottom: 3px;
}
.upload-meter-grid strong {
  font-size: 14px;
  word-break: keep-all;
}
@media (max-width: 520px) {
  .upload-meter-grid {
    grid-template-columns: 1fr;
  }
}

/* v4.1 video layout + stable upload speed display */
.post-view .video-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}
.post-view .video-card {
  margin: 0;
  width: 100%;
  max-width: 100%;
}
.post-view .video-card video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(72vh, 760px);
  object-fit: contain;
  background: #0f172a;
}
.video-library-card {
  margin: 0;
}
.video-library-card video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  background: #0f172a;
}
.post-card-video-thumb {
  width: 100%;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px 18px 0 0;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #334155);
}
.post-card-video-thumb span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 22px;
  padding-left: 4px;
}
.post-card-video-thumb strong {
  color: #fff;
  font-size: .95rem;
}
.video-cover-placeholder {
  margin: 0;
}
.upload-meter-grid strong {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .post-view .video-card video {
    max-height: 62vh;
  }
  .post-card-video-thumb {
    min-height: 140px;
  }
}

/* v4.2 video fit + thumbnail hardening */
.panel.post-view,
.video-section,
.video-list,
.video-card,
.video-library-card,
.media-video-frame {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
.panel.post-view {
  overflow: hidden;
}
.video-list {
  grid-template-columns: minmax(0, 1fr) !important;
}
.video-card,
.video-library-card {
  width: 100% !important;
  overflow: hidden !important;
}
.media-video-frame {
  width: 100% !important;
  overflow: hidden !important;
  background: #0f172a;
  border-radius: 18px 18px 0 0;
}
.media-video-player,
.video-card video,
.video-library-card video,
.post-view video {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: min(68vh, 620px) !important;
  object-fit: contain !important;
  background: #0f172a !important;
  box-sizing: border-box !important;
}
.video-library-card .media-video-player {
  max-height: 420px !important;
}
.post-card.compact .post-card-video-thumb {
  border-radius: 20px 20px 0 0;
  min-height: 180px;
}
.mini-post-item .post-card-video-thumb {
  width: 88px;
  min-width: 88px;
  height: 72px;
  min-height: 72px;
  border-radius: 14px;
  gap: 3px;
}
.mini-post-item .post-card-video-thumb span {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.mini-post-item .post-card-video-thumb strong {
  font-size: 11px;
}
@media (max-width: 640px) {
  .media-video-player,
  .video-card video,
  .video-library-card video,
  .post-view video {
    max-height: 58vh !important;
  }
}


/* v4.4 async video conversion mini popup */
.video-queue-mini {
  position: fixed;
  right: 18px;
  bottom: 82px;
  width: min(360px, calc(100vw - 28px));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line, rgba(15, 23, 42, 0.12));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  border-radius: 22px;
  padding: 14px;
  z-index: 2000;
  backdrop-filter: blur(14px);
}
.video-queue-mini.hidden { display: none; }
.video-queue-mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.video-queue-mini-head strong { font-size: 15px; }
.mini-badge {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent, #ef4444);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.mini-close {
  margin-left: auto;
  border: 0;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text, #111827);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 18px;
  cursor: pointer;
}
.video-queue-mini-list {
  display: grid;
  gap: 10px;
  max-height: 300px;
  overflow: auto;
}
.video-queue-mini-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.94);
  border-radius: 16px;
  padding: 10px;
}
.video-queue-mini-item.failed {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 242, 242, 0.96);
}
.video-queue-mini-title {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 3px;
}
.video-queue-mini-file {
  font-size: 12px;
  color: var(--muted, #64748b);
  word-break: break-all;
}
.video-queue-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}
.mini-progress {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.10);
  overflow: hidden;
  margin-top: 6px;
}
.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary, #2563eb), var(--accent, #f97316));
}
.video-queue-mini-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.video-pending-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.70));
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.video-pending-frame.has-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}
.video-pending-frame {
  position: relative;
}
.video-pending-overlay {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  display: grid;
  gap: 6px;
  padding: 16px;
}
.video-pending-overlay strong {
  font-size: 18px;
}
.video-pending-overlay span {
  font-size: 13px;
  opacity: 0.9;
}

/* v4.5 inline video conversion progress */
.inline-video-conversion .video-pending-overlay {
  width: min(520px, calc(100% - 28px));
  margin: 0 auto;
}
.inline-video-progress {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.22);
  overflow: hidden;
  margin-top: 8px;
}
.inline-video-progress-bar {
  display: block;
  height: 100%;
  width: 2%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #fbbf24);
  transition: width .35s ease;
}
.inline-video-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  font-size: 13px;
}
.inline-video-percent,
.inline-video-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.20);
}
.inline-video-message {
  line-height: 1.45;
}
.inline-video-kick {
  justify-self: center;
  background: rgba(255,255,255,0.94) !important;
  color: #0f172a !important;
  border: 0 !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}
.inline-video-conversion.is-failed .inline-video-progress-bar {
  background: linear-gradient(90deg, #fb7185, #ef4444);
}
.inline-video-conversion.is-failed .inline-video-message {
  color: #fecaca;
  font-weight: 800;
}


/* v4.6 삭제/변환 안정화 패치 */
.secondary-btn.danger-btn,
.danger-btn {
  background: #fff0f3;
  color: #b4233a;
}
.secondary-btn.danger-btn:hover,
.danger-btn:hover {
  background: #ffe1e8;
}
.delete-post-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(20, 35, 60, .1);
}
.media-delete-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(20, 35, 60, .1);
  border-radius: 18px;
  background: rgba(248, 250, 255, .72);
}
.media-delete-subtitle {
  font-weight: 800;
  color: #26364f;
}
.media-delete-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.media-delete-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(20, 35, 60, .1);
  border-radius: 14px;
  background: #fff;
  font-weight: 700;
  color: #314056;
}
.media-delete-card img,
.media-delete-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #eef3fb;
}
.media-delete-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60708b;
  font-weight: 900;
  letter-spacing: .08em;
}
.media-delete-card input {
  margin-right: 6px;
}

/* 가족 생일 반복 일정 */
.hidden-field { display: none !important; }
.three-col-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.birthday-fieldset { display: flex; flex-direction: column; gap: 14px; padding: 14px; border: 1px solid #e3e9f3; border-radius: 18px; background: #fbfdff; }
.birthday-date-grid .checkbox-label { justify-content: end; }
.checkbox-label input[type="checkbox"] { width: auto; min-height: auto; }
.calendar-event.birthday-event { background: #fff0f5; }
.calendar-lunar-label { display: block; margin-top: 2px; color: #7a5b6a; font-size: 10px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.birthday-meta { color: #7a5b6a; }
@media (max-width: 720px) {
  .three-col-grid { grid-template-columns: 1fr; }
}

.video-download-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.video-download-link::after {
  content: " ⬇";
  font-size: 0.9em;
  opacity: 0.72;
}
.video-download-link:hover {
  opacity: 0.82;
}

/* v4 video queue visibility patch */
.video-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.video-status-pill.encoding {
  color: #8a5a00;
  background: rgba(255, 193, 7, 0.18);
  border: 1px solid rgba(255, 193, 7, 0.35);
}
.video-status-pill.ready {
  color: #0f6848;
  background: rgba(46, 204, 113, 0.16);
  border: 1px solid rgba(46, 204, 113, 0.3);
}
.video-status-pill.failed {
  color: #9b1c1c;
  background: rgba(239, 68, 68, 0.13);
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.dashboard-inline-pill {
  margin-top: 8px;
  width: fit-content;
}
.video-pending-frame .video-pending-overlay strong,
.inline-video-status .inline-video-title {
  letter-spacing: -0.02em;
}

/* 댓글/대댓글 중복 제출 방지: 제출 중 상태 */
.comment-form-card.is-submitting,
.inline-reply-form.is-submitting {
  opacity: 0.82;
}
.comment-form-card.is-submitting textarea,
.inline-reply-form.is-submitting textarea {
  background: #f7f7f7;
}
.comment-form-card button[disabled],
.inline-reply-form button[disabled] {
  cursor: wait;
  opacity: 0.68;
}

/* 게시글 상세: 사진/동영상이 긴 게시글에서 빠르게 이동하는 스크롤바 최상단 고정 팝업 */
.post-page-anchor {
  position: relative;
  top: 0;
}

.post-float-nav {
  display: none !important;
}

.post-scroll-quick-panel {
  position: fixed !important;
  right: 0 !important;
  top: max(8px, env(safe-area-inset-top)) !important;
  z-index: 2147483000 !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: 62px;
  padding: 7px 4px 8px 5px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  transform: translateZ(0);
}

.post-scroll-quick-title {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  letter-spacing: -0.02em;
}

.post-scroll-quick-panel button {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 999px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
  white-space: nowrap;
}

.post-scroll-quick-panel button:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  .post-scroll-quick-panel {
    top: max(6px, env(safe-area-inset-top)) !important;
    width: 56px;
    gap: 4px;
    padding: 6px 3px 7px 4px;
    border-radius: 15px 0 0 15px;
  }

  .post-scroll-quick-panel button {
    padding: 7px 3px;
    font-size: 10.5px;
  }
}

@media print {
  .post-scroll-quick-panel {
    display: none !important;
  }
}


/* Cute hero upgrade */
.hero-home-cute {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(255, 224, 218, .82), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 245, 214, .75), transparent 30%),
    linear-gradient(135deg, #fffaf7 0%, #fff5ef 46%, #fdf9ff 100%);
  border-color: #f2e3dc;
}
.hero-home-cute::before,
.hero-home-cute::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.65) 0%, rgba(255,255,255,0) 72%);
  pointer-events: none;
}
.hero-home-cute::before {
  top: -52px;
  left: -36px;
}
.hero-home-cute::after {
  right: -44px;
  bottom: -58px;
}
.hero-sticker {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(242, 223, 215, .95);
  box-shadow: 0 12px 24px rgba(194, 145, 124, .14);
  color: #f28b82;
  font-size: 22px;
  transform: rotate(-10deg);
}
.hero-sticker-heart {
  top: 8px;
  right: 300px;
}
.hero-sticker-star {
  bottom: 12px;
  left: 45%;
  color: #ffb84d;
  transform: rotate(8deg);
}
.hero-home-kicker {
  background: rgba(255,255,255,.82);
  color: #d97757;
  border: 1px solid rgba(243, 211, 195, .9);
}
.hero-home-title {
  color: #2f241f;
}
.hero-home-description {
  color: #6d5d53;
}
.hero-home-stat,
.hero-side-card,
.hero-home-photo {
  border-color: #f0e2db;
}
.hero-home-stat {
  background: rgba(255,255,255,.88);
}
.hero-home-stat:nth-child(1) strong { color: #ef6b6b; }
.hero-home-stat:nth-child(2) strong { color: #52a986; }
.hero-home-stat:nth-child(3) strong { color: #f2a33b; }
.hero-home-stat:nth-child(4) strong { color: #6f88ef; }
.hero-home-actions .primary-btn {
  background: linear-gradient(135deg, #ff9d8a 0%, #ff7d73 100%);
  box-shadow: 0 14px 24px rgba(255, 125, 115, .24);
}
.hero-home-actions .secondary-btn {
  background: #fff5ee;
  color: #7a5846;
  border: 1px solid #f2dfd4;
}
.hero-home-photo {
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.06)),
    linear-gradient(135deg, #ffe8df 0%, #fff6ec 52%, #fff9f7 100%);
}
.hero-home-photo::after {
  content: '우리 가족';
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(242, 223, 215, .95);
  color: #8b6555;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.hero-weather-mini-list span,
.hero-event-time {
  background: #fff4ef;
}
@media (max-width: 860px) {
  .hero-sticker-heart { right: 20px; top: 10px; }
  .hero-sticker-star { left: auto; right: 74px; bottom: 14px; }
}

/* User avatar system */
.user-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: #f4f6fa;
  border: 1px solid rgba(226, 232, 240, .95);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}
.user-avatar img,
.user-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-avatar img {
  object-fit: cover;
}
.user-avatar-fallback {
  background: linear-gradient(135deg, hsl(var(--avatar-seed-hue, 220deg) 75% 74%), hsl(calc(var(--avatar-seed-hue, 220deg) + 34deg) 78% 62%));
  color: #fff;
  font-weight: 800;
}
.user-avatar-xs { width: 22px; height: 22px; font-size: 10px; }
.user-avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.user-avatar-md { width: 32px; height: 32px; font-size: 13px; }
.user-avatar-lg { width: 80px; height: 80px; font-size: 28px; }

.user-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  vertical-align: middle;
}
.user-identity-name {
  min-width: 0;
  font-weight: 700;
  color: #374151;
}
.inline-user-meta .user-identity-name {
  font-weight: 600;
  color: #516172;
  font-size: 13px;
}
.top-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid #e7ecf2;
}
.top-user-link {
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.top-user-link:hover {
  background: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.top-user-link:focus-visible {
  outline: 2px solid var(--theme-primary, #1f6fff);
  outline-offset: 2px;
}
.top-user-identity .user-identity-name {
  color: #283646;
  font-size: 14px;
}
.top-user-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3fb;
  color: #415779;
  font-size: 11px;
  font-weight: 800;
}
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e7ecf2;
}
.author-chip-name {
  color: #455569;
  font-size: 13px;
  font-weight: 700;
}
.comment-author-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.album-meta-line,
.mini-post-meta-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.account-card-list {
  display: grid;
  gap: 16px;
}
.account-edit-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e7ecf2;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
}
.account-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.account-edit-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.account-edit-grid {
  align-items: end;
}
@media (max-width: 860px) {
  .top-user-pill {
    order: -1;
  }
  .account-edit-head,
  .account-edit-identity {
    align-items: flex-start;
    flex-direction: column;
  }
}


.hero-side-card-weather-summary .hero-weather-summary {
  margin-bottom: 6px;
}
.hero-side-card-weather-summary .hero-weather-summary strong {
  font-size: 20px;
}
.single-column-layout {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}
.profile-panel {
  max-width: 720px;
  margin: 0 auto;
}
.profile-avatar-form {
  gap: 14px;
}
.profile-avatar-preview-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(248, 250, 255, .92));
  border: 1px solid #e8edf5;
}
.profile-avatar-preview.user-avatar {
  box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}
@media (max-width: 860px) {
  .profile-avatar-preview-wrap {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* hero upgrade: family dashboard */
.hero-home-shell-upgraded {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .95fr);
  align-items: start;
}
.hero-home-main-upgraded {
  gap: 16px;
}
.hero-home-photo-inline {
  min-height: 220px;
  margin: 6px 0 0;
}
.hero-home-photo-inline img {
  object-position: center;
}
.hero-home-stats-fixed4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.hero-home-stats-fixed4 .hero-home-stat {
  min-width: 0;
  text-align: center;
  padding: 14px 10px;
}
.hero-home-stats-fixed4 .hero-home-stat strong {
  font-size: 24px;
}
.hero-home-side-grid-upgraded {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero-side-card-button {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--theme-border, #e7ecf2) 82%, transparent);
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.hero-side-card-button:hover,
.hero-side-card-button:focus-visible,
.day-weather-block:hover,
.day-weather-block:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  outline: none;
}
.hero-side-card-weather { background: color-mix(in srgb, var(--theme-hero-weather-bg, #eef6ff) 88%, #fff); }
.hero-side-card-meal { background: color-mix(in srgb, var(--theme-hero-meal-bg, #fff7e8) 88%, #fff); }
.hero-side-card-event { background: color-mix(in srgb, var(--theme-hero-event-bg, #f4efff) 88%, #fff); }
.hero-side-card-birthday { background: color-mix(in srgb, var(--theme-hero-birthday-bg, #fff0f5) 88%, #fff); }
.hero-weather-main,
.hero-meal-main,
.weather-preview-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}
.weather-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255,255,255,0.7);
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}
.weather-hero-icon.is-sunny { background: #fff4c8; }
.weather-hero-icon.is-partly { background: #eef5ff; }
.weather-hero-icon.is-cloudy { background: #eef1f6; }
.weather-hero-icon.is-rain { background: #e8f0ff; }
.weather-hero-icon.is-snow { background: #eef7ff; }
.meal-hero-icon { background: #fff3da; }
.hero-weather-main-title,
.weather-preview-title {
  font-size: 17px;
  line-height: 1.3;
}
.hero-side-inline-label {
  white-space: nowrap;
}
.hero-birthday-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.hero-birthday-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: start;
}
.hero-birthday-date {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  color: #b34e73;
  font-size: 12px;
  font-weight: 800;
}
.weather-open-note {
  margin-top: 8px;
}
.day-weather-block {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.detail-modal-card {
  width: min(760px, 100%);
}
.detail-segmented {
  display: inline-flex;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 6px;
  border-radius: 999px;
  background: #f2f5fb;
}
.detail-tab {
  border: 0;
  background: transparent;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 800;
  color: #50627a;
  cursor: pointer;
}
.detail-tab.active {
  background: #fff;
  color: #1e2d45;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.weather-modal-summary-grid,
.meal-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.weather-modal-summary-card,
.meal-modal-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #e5ebf5;
  background: #fbfdff;
}
.weather-modal-summary-head,
.meal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.weather-modal-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.weather-hourly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.weather-hourly-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #e6edf7;
}
.weather-hourly-time {
  font-weight: 800;
  color: #48607f;
}
.weather-hourly-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.weather-hourly-emoji { font-size: 18px; }
.meal-modal-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.meal-modal-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.5;
}
.meal-modal-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: #ff8f2c;
  font-weight: 800;
}
.recent-photo-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.recent-photo-user-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid #e7edf6;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.recent-photo-user-card:hover {
  border-color: #d6dfed;
  background: #fbfdff;
}
.recent-photo-user-image-wrap {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  background: #f0f4fb;
}
.recent-photo-user-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-preview.user-avatar {
  width: 80px;
  height: 80px;
}
.avatar-crop-panel {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #e5ebf5;
  background: #fbfdff;
}
.avatar-crop-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.avatar-crop-canvas {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: #f3f6fb;
  box-shadow: inset 0 0 0 1px #e2e8f3;
}
.avatar-crop-controls {
  display: grid;
  gap: 14px;
}
.compact-head { margin-bottom: 12px; }
@media (max-width: 1100px) {
  .hero-home-shell-upgraded { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero-home-stats-fixed4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .hero-home-stats-fixed4 .hero-home-stat {
    padding: 12px 6px;
    border-radius: 16px;
  }
  .hero-home-stats-fixed4 .hero-home-stat strong { font-size: 20px; }
  .hero-home-stat-label { font-size: 11px; }
  .weather-modal-summary-grid,
  .meal-modal-grid,
  .weather-hourly-grid,
  .hero-home-side-grid-upgraded,
  .avatar-crop-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .hero-home-photo-inline { min-height: 160px; }
  .hero-home-title { font-size: 28px; }
  .hero-home-stats-fixed4 .hero-home-stat strong { font-size: 18px; }
  .hero-home-stat-label { font-size: 10px; }
  .weather-hero-icon { width: 44px; height: 44px; font-size: 24px; }
  .weather-hourly-item { grid-template-columns: 56px 1fr auto; padding: 10px 12px; }
}

.top-suika-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.78); border: 1px solid #e7ecf2; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.top-suika-link:hover { background: #fff; box-shadow: 0 10px 20px rgba(15,23,42,.08); transform: translateY(-1px); }
.top-suika-link:focus-visible { outline: 2px solid var(--theme-primary, #1f6fff); outline-offset: 2px; }
.top-suika-icon { font-size: 18px; line-height: 1; }
