:root {
  color-scheme: light;
  --page: #f4f7f2;
  --surface: #fff;
  --ink: #19392c;
  --muted: #52685e;
  --line: #e2ebe2;
  --forest: #215f46;
  --deep-forest: #174a36;
  --mint: #e5f1e7;
  --pale-mint: #f0f7ef;
  --cream: #faf3dc;
  --red: #aa3d43;
  --soft-red: #fff1f1;
  --shadow: 0 10px 32px #23432b08;
  --radius: 22px;
  --page-width: 1280px;
  --mobile-nav-height: 67px;
  font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 16px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
:root[data-font-size='large'] { font-size: 18px; }
:root[data-font-size='extra-large'] { font-size: 20px; }

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 280px; min-height: 100vh; margin: 0; background: var(--page); color: var(--ink); line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex: none; vertical-align: middle; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -.035em; }
small { font-size: .82em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #479269; outline-offset: 3px; }
::selection { color: var(--deep-forest); background: #d8ead6; }

.muted { color: var(--muted); }
.stack { display: grid; gap: 16px; }
.skip-link { position: fixed; z-index: 40; inset: 7px auto auto 7px; transform: translateY(-160%); padding: 9px 13px; border-radius: 10px; background: var(--deep-forest); color: #fff; }
.skip-link:focus { transform: none; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fbfdfaf0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--page-width);
  min-height: 65px;
  margin-inline: auto;
  padding: env(safe-area-inset-top, 0px) 18px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-weight: 800; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--forest);
  color: #e9f4bf;
  font-size: 20px;
}
.brand-mark svg { width: 23px; height: 23px; }
img.brand-mark { object-fit: cover; }
.brand-copy { display: grid; line-height: 1.12; font-size: 1.2rem; letter-spacing: -.045em; }
.brand-copy small, .brand-copy span + span { margin-top: 4px; color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: -.02em; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.header-actions > .avatar, .header-actions .avatar { flex: 0 0 auto; }
.header-actions .btn { min-height: 40px; }
.header-actions .mobile-deal-link { flex: 0 0 auto; gap: 4px; min-height: 44px; padding-inline: 8px; white-space: nowrap; }
.mobile-deal-link[aria-current='page'] { background: var(--mint); color: var(--deep-forest); }
.private-mark { display: none; align-items: center; gap: 5px; margin-inline-end: 6px; color: var(--muted); font-size: .78rem; font-weight: 650; white-space: nowrap; }
.profile-button { min-width: 0; max-width: 150px; }
.profile-button > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 20px 16px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 28px);
}
.sidebar { display: none; }
.main-content, .rightbar { min-width: 0; }
.mobile-install { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.mobile-install:empty, .sidebar-footer:empty { display: none; }
.mobile-install .btn { font-size: .88rem; }
.rightbar { display: grid; gap: 16px; }
.mobile-nav:empty, .rightbar:empty { display: none; }
.family-tile { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px 9px; border: 1px solid var(--line); border-radius: 15px; background: #fbfdf9; }
.family-tile > div { min-width: 0; }
.family-tile strong, .family-tile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-tile strong { line-height: 1.3; }
.family-tile small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.family-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--mint); color: var(--forest); }
.sidebar-label { margin: 19px 0 5px; padding-inline: 11px; color: var(--muted); font-size: .74rem; font-weight: 760; }
.sidebar-footer { margin-top: 18px; padding-top: 11px; border-top: 1px solid var(--line); }
.sidebar-footer .nav-link { font-size: .81rem; }
.nav-list { display: grid; gap: 5px; padding: 0; list-style: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 48px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  text-align: start;
  font-weight: 650;
  white-space: nowrap;
}
.nav-link svg { width: 20px; height: 20px; }
.nav-link[aria-current='page'], .nav-link.is-active {
  background: var(--mint);
  color: var(--deep-forest);
  font-weight: 780;
}
.mobile-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 12;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 1px;
  min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
  padding: 7px 7px calc(7px + env(safe-area-inset-bottom, 0px));
  background: #fbfdfaf7;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.mobile-nav .nav-link {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  min-height: 49px;
  padding: 4px 2px;
  border-radius: 10px;
  font-size: .7rem;
  text-align: center;
}
.mobile-nav .nav-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 182px;
  overflow: hidden;
  border-radius: 25px;
  padding: 24px;
  background: #dcebd4;
  color: #173e2c;
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 90% 86%, #e9f0be 0%, transparent 56%), linear-gradient(112deg, #e7f2df 3%, #d8e9cf 60%, #dce9c7);
  content: '';
}
.hero-copy { position: relative; z-index: 1; min-width: 0; max-width: 88%; overflow-wrap: anywhere; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--forest);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.hero h1 { margin: 7px 0 8px; font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -.06em; }
.hero p { color: #375d4a; font-size: clamp(.85rem, 2.5vw, .98rem); word-break: keep-all; }
.hero .btn { margin-top: 16px; }
.hero-art { position: absolute; z-index: -1; inset: auto -11px 1px auto; width: clamp(147px, 52%, 325px); height: auto; opacity: .83; pointer-events: none; }
.hero-art svg, svg.hero-art { height: auto; overflow: visible; }
.hero-art img { width: 100%; }

.home-stack { gap: 22px; }
.home-compact { display: grid; gap: 10px; }
.home-compact-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.home-compact-top h1 { min-width: 0; font-size: clamp(.98rem, 4.5vw, 1.1rem); }
.home-compact-top h1 a { display: inline-flex; align-items: center; gap: 5px; min-height: 43px; color: var(--deep-forest); word-break: keep-all; }
.home-compact-top .btn { flex: 0 0 auto; padding-inline: 10px; font-size: .8rem; white-space: nowrap; }
.home-brief { display: grid; gap: 5px; min-width: 0; padding: 8px 11px 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.home-brief-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.home-brief-head h2 { display: flex; align-items: center; gap: 6px; color: var(--deep-forest); font-size: .9rem; }
.home-brief-head .text-link { min-height: 30px; font-size: .76rem; }
.home-brief-head .text-link svg { width: 13px; height: 13px; }
.home-post-preview { display: grid; gap: 2px; min-width: 0; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 9px; background: #f5f9f4; color: var(--ink); line-height: 1.35; text-align: start; }
.home-post-preview > * { min-width: 0; overflow: hidden; }
.home-post-preview strong { font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.home-post-preview span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}
.home-post-preview span, .home-brief-empty, .home-brief-description { color: var(--muted); font-size: .77rem; }
.home-brief-empty { padding: 4px 2px; }
.home-story-preview { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 6px; }
.home-story-preview .home-post-preview { align-content: center; }
.home-story-preview .photo-fallback { line-height: 1.15; }
.home-photo-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.home-photo-thumb.photo { aspect-ratio: 1; border-radius: 9px; }
.home-photo-thumb .photo-fallback { gap: 2px; padding: 2px; font-size: .65rem; text-align: center; word-break: keep-all; }
.home-photo-thumb .photo-fallback svg { width: 19px; height: 19px; }
.home-compact-install { justify-self: end; }
.home-compact-install:empty { display: none; }
.home-compact-install .btn { padding-inline: 6px; font-size: .76rem; }
.home-section { display: grid; gap: 9px; }
.home-section .section-head h2 { display: flex; align-items: center; gap: 8px; }
.home-section .section-head h2 svg { color: var(--forest); }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-tile { display: grid; align-content: start; justify-items: start; gap: 2px; border-radius: 17px; padding: 13px; }
.quick-tile strong { margin-top: 4px; font-size: .94rem; }
.quick-tile small { color: var(--muted); font-size: .73rem; word-break: keep-all; }
.quick-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: var(--mint); color: var(--forest); }
.quick-notice { background: var(--cream); color: #785520; }
.quick-photo { background: #e7eef5; color: #37566f; }
.quick-calendar { background: var(--mint); color: var(--forest); }
.quick-members { background: #f1eaf3; color: #63416d; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--forest); font-size: .83rem; font-weight: 750; white-space: nowrap; }
.connection-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; padding: 8px 12px; border: 1px solid #eadfbf; border-radius: 12px; background: var(--cream); color: #695022; font-size: .86rem; }
.connection-note .btn { min-height: 36px; padding-block: 6px; }

.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.section-head h1 { font-size: clamp(1.65rem, 5vw, 2.25rem); }
.section-head h2, .card h2 { font-size: 1.18rem; }
.section-head > div > p, .section-head h1 + p { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.section-head .btn { flex: 0 0 auto; }
.card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card > .section-head { margin-bottom: 12px; }
.card + .card { scroll-margin-top: 85px; }
.rightbar .card { padding: 17px; }
.rightbar .section-head h2, .rightbar .card h2 { font-size: 1.02rem; }
.side-card .section-head { gap: 4px; margin-bottom: 5px; }
.side-card .section-head .icon-btn { min-width: 36px; width: 36px; min-height: 36px; }
.side-card .muted { font-size: .84rem; }
.today-card { display: grid; gap: 2px; background: #eff6ec; }
.today-card .eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #4b8761; }
.today-card > strong { font-size: 1.57rem; line-height: 1.36; letter-spacing: -.06em; }
.today-card > span:last-child { color: var(--muted); font-size: .85rem; }
.small-count { display: inline-grid; place-items: center; min-width: 20px; min-height: 20px; margin-inline-start: 2px; padding: 0 4px; border-radius: 99px; background: var(--mint); color: var(--forest); font-size: .74rem; vertical-align: middle; }
.avatar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0; }

.deal-board .card { gap: 10px; }
.deal-card-head, .deal-alert { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.deal-card-head h2 { display: flex; align-items: center; gap: 6px; }
.deal-card-head h2 svg { color: var(--forest); }
.deal-card-head .text-link { min-height: 40px; }
.deal-form-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-top: 5px; }
.deal-form-line + .form-error { margin-top: 7px; }
.deal-empty { padding: 12px; border-radius: 12px; background: var(--pale-mint); color: var(--muted); font-size: .9rem; }
.deal-list, .deal-keyword-list { padding: 0; list-style: none; }
.deal-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 8px 0; }
.deal-row + .deal-row { border-top: 1px solid var(--line); }
.deal-row > div { min-width: 0; overflow-wrap: anywhere; }
.deal-row time { display: block; color: var(--muted); font-size: .79rem; }
.deal-title { display: flex; align-items: center; gap: 5px; min-height: 44px; color: var(--deep-forest); font-weight: 740; }
.deal-title svg { color: var(--forest); }
.deal-alert { padding: 10px; border-radius: 11px; background: var(--pale-mint); color: var(--muted); font-size: .86rem; }
.deal-alert .btn { padding-inline: 5px; }
.deal-keyword-list { display: flex; flex-wrap: wrap; gap: 7px; }
.deal-keyword-list li { display: flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 3px 2px 10px; border: 1px solid var(--line); border-radius: 13px; color: var(--deep-forest); font-size: .86rem; font-weight: 730; }
.deal-keyword-list li span { min-width: 0; overflow-wrap: anywhere; }
.deal-keyword-list .icon-btn { flex: 0 0 auto; }

.btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  max-width: 100%;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--mint);
  color: var(--deep-forest);
  font-size: .9rem;
  line-height: 1.3;
  font-weight: 740;
  text-align: center;
  text-decoration: none;
}
.btn svg, .icon-btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-secondary { border-color: #d6e6d9; background: var(--pale-mint); color: var(--deep-forest); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--forest); }
.icon-btn { width: 44px; min-width: 44px; min-height: 44px; padding: 0; border-color: var(--line); background: #fafcf9; color: var(--forest); }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--mint);
  color: var(--deep-forest);
  font-size: .72rem;
  font-weight: 750;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-muted { background: #eff3ee; color: var(--muted); }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: #e5efe1;
  color: var(--deep-forest);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
}
.avatar[data-tone='0'] { background: #deefdf; color: #285741; }
.avatar[data-tone='1'] { background: #f7edd0; color: #71551e; }
.avatar[data-tone='2'] { background: #e4edf4; color: #31566a; }
.avatar[data-tone='3'] { background: #f0e6f2; color: #654271; }
.avatar[data-tone='4'] { background: #f6e7dc; color: #70462f; }
.avatar-small { width: 32px; height: 32px; font-size: .76rem; }

.notice {
  display: grid;
  gap: 10px;
  border: 1px solid #e4ebd4;
  background: #fcfdf9;
  overflow-wrap: anywhere;
}
.notice .badge { background: var(--cream); color: #6c4c1d; }
.post-card { display: grid; gap: 13px; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head strong { display: block; }
.post-head > div:not(.avatar) { min-width: 0; }
.post-head time, .post-head small { color: var(--muted); font-size: .77rem; }
.post-head .item-tools, .post-head > .badge { margin-inline-start: auto; }
.post-author { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; line-height: 1.33; }
.post-author strong { overflow-wrap: anywhere; }
.item-tools, .member-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.item-tools .icon-btn, .comment > .icon-btn { min-width: 36px; width: 36px; min-height: 36px; }
.item-tools .icon-btn svg, .comment > .icon-btn svg { width: 16px; height: 16px; }
.post-body { display: grid; gap: 8px; overflow-wrap: anywhere; }
.post-body h3 { font-size: 1.13rem; }
.post-body p, .comment p, .notice p, .event-row p { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.post-actions .btn { min-height: 37px; padding-inline: 7px; }
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: hidden; border-radius: 15px; }
.photos.photo-single { grid-template-columns: minmax(0, 1fr); }
.photo { display: block; width: 100%; min-width: 0; aspect-ratio: 4 / 3; padding: 0; border: 0; overflow: hidden; border-radius: 12px; background: var(--pale-mint); }
.photos > .photo:only-child { aspect-ratio: 16 / 10; }
.photo img, img.photo { width: 100%; height: 100%; object-fit: cover; }
.photo img[src$='hero.svg'] { object-fit: contain; }
.photo-fallback { display: grid; place-items: center; align-content: center; gap: 5px; height: 100%; color: var(--forest); font-size: .84rem; }
.photo-viewer { display: grid; gap: 12px; }
.photo-viewer img { width: 100%; min-height: 80px; border-radius: 12px; background: var(--pale-mint); }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-bar label { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 700; }
.filter-bar label input { width: 150px; }
.album-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.album-view-toggle { display: inline-flex; gap: 2px; max-width: 100%; margin-inline-start: auto; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--pale-mint); }
.album-view-toggle .btn { gap: 4px; min-height: 35px; padding: 5px 8px; border-radius: 8px; color: var(--muted); font-size: .79rem; white-space: nowrap; }
.album-view-toggle .btn svg { width: 15px; height: 15px; }
.album-view-toggle .btn[aria-pressed='true'] { border-color: #c8ddcd; background: var(--surface); color: var(--deep-forest); box-shadow: 0 1px 3px #23432b13; }
.album-group { gap: 10px; }
.album-date { display: flex; align-items: center; gap: 6px; color: var(--forest); font-size: .98rem; }
.album-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.album-preview-tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.album-preview-image { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: 100%; aspect-ratio: 1; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 13px 13px 0 0; background: var(--pale-mint); }
.album-preview-image img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.album-preview-image img[src$='hero.svg'] { object-fit: contain; }
.album-preview-image:focus-visible { outline-offset: -4px; }
.album-preview-details { display: flex; flex: 1; min-width: 0; padding: 3px; }
.album-preview-post { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; width: 100%; min-height: 38px; padding: 5px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--deep-forest); font-size: .79rem; font-weight: 750; line-height: 1.3; text-align: start; overflow-wrap: anywhere; }
.album-preview-post > :first-child { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.album-preview-post > :not(:first-child) { flex: 0 0 auto; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.album-preview-post svg { width: 13px; height: 13px; }
.album-preview-post:focus-visible { outline-offset: 0; }
.comments { display: grid; gap: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.comment { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; }
.comment .avatar { width: 30px; height: 30px; font-size: .78rem; }
.comment small, .comment time { color: var(--muted); }
.comment > div { flex: 1; min-width: 0; }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px; }
.comment-form .form-error { grid-column: 1 / -1; }

.member-list, .event-list { display: grid; gap: 0; padding: 0; list-style: none; }
.member-row, .event-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 0; }
.member-row + .member-row, .event-row + .event-row { border-top: 1px solid var(--line); }
.member-row > :nth-child(2), .event-row > :nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.member-row strong, .event-row strong { display: block; }
.member-row small, .event-row small, .event-row time { color: var(--muted); }
.event-date-box { display: grid; place-items: center; align-content: center; flex: 0 0 auto; min-width: 43px; min-height: 45px; padding: 4px; border-radius: 12px; background: var(--pale-mint); color: var(--deep-forest); line-height: 1.08; text-align: center; }
.event-date-box strong { font-size: 1.05rem; }
.event-date-box small { margin-bottom: 3px; font-size: .68rem; }
.event-info, .member-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.event-info p, .member-info p { color: var(--muted); font-size: .87rem; }
.event-info strong { line-height: 1.35; }
.event-meta { display: flex; flex-wrap: wrap; gap: 2px 7px; margin-top: 2px; color: var(--muted); font-size: .76rem; }
.event-meta span { min-width: 0; }
.event-meta svg { color: var(--forest); }
.event-info p { margin-top: 5px; }
.member-info > span, .member-info strong > small { color: var(--muted); font-size: .76rem; }
.member-info strong > small { margin-inline-start: 3px; }
.member-tools .btn { min-height: 36px; padding: 5px 7px; font-size: .77rem; }
.member-tools [data-action='remove-member'] { color: var(--red); }

.calendar { display: grid; gap: 12px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-head h2 { flex: 1; font-size: clamp(.94rem, 4.5vw, 1.15rem); text-align: center; white-space: nowrap; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calendar-weekday { padding: 3px 0; color: var(--muted); font-size: .75rem; font-weight: 700; text-align: center; }
.calendar-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 43px; padding: 6px 0; border: 1px solid transparent; border-radius: 10px; background: #f4f8f3; color: var(--ink); font-size: .84rem; }
.calendar-weekday.is-sunday, .calendar-day.is-sunday:not(.is-muted, [aria-pressed='true']) { color: var(--red); }
.calendar-day.is-muted { background: transparent; color: #617368; }
.calendar-day.is-today { border-color: #85a88c; font-weight: 800; }
.calendar-day[aria-pressed='true'] { background: var(--forest); color: #fff; }
.calendar-dot { display: inline-block; width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.day-events .section-head .btn { min-height: 36px; padding-inline: 5px; font-size: .79rem; }

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-height: 155px;
  padding: 23px 16px;
  border: 1px dashed #dce8dd;
  border-radius: 17px;
  background: #fafcf9;
  text-align: center;
  word-break: keep-all;
}
.empty-state svg { width: 25px; height: 25px; color: var(--forest); }
.empty-state h3 { font-size: 1rem; }
.empty-state p { max-width: 34ch; color: var(--muted); font-size: .88rem; }
.empty-state .btn { margin-top: 4px; }

.field, form > label { display: grid; gap: 5px; min-width: 0; color: var(--ink); font-size: .9rem; font-weight: 700; }
.field small { font-weight: 450; }
input:not([type='checkbox'], [type='radio'], [type='hidden']), textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #789482;
  border-radius: 11px;
  background: #fbfdfa;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 450;
}
input:focus, textarea:focus, select:focus { border-color: #48936b; }
input::placeholder, textarea::placeholder { color: #657970; opacity: 1; }
input[type='radio'], input[type='checkbox'] { width: 1.05em; height: 1.05em; accent-color: var(--forest); vertical-align: middle; }
input[type='file'] { max-width: 100%; }
input::file-selector-button { margin: 0 7px 0 0; padding: 5px 7px; border: 0; border-radius: 5px; background: var(--mint); color: var(--forest); font: inherit; font-size: .82rem; font-weight: 750; }
textarea { min-height: 102px; resize: vertical; }
.comment-form textarea { min-height: 44px; }
.form-grid { display: grid; gap: 12px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.form-error { padding: 9px 11px; border-radius: 9px; background: var(--soft-red); color: var(--red); font-size: .88rem; }
.form-error:empty { display: none; }
.form-note, .confirm-copy { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.invite-code { display: block; width: 100%; padding: 12px; border-radius: 11px; background: var(--pale-mint); color: var(--forest); font-size: clamp(.88rem, 4vw, 1.15rem); font-weight: 800; text-align: center; overflow-wrap: anywhere; }
dialog {
  width: min(calc(100% - 24px), 510px);
  max-width: none;
  max-height: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 22px 85px #102d2060;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop { background: #18332670; backdrop-filter: blur(2px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.dialog-head h2 { font-size: 1.3rem; }
.dialog-body, dialog form { display: grid; gap: 12px; }
.dialog-actions { margin-top: 5px; }
.dialog-body > .btn-ghost { justify-self: start; padding-inline: 0; }
.dialog-body.profile-detail { display: flex; align-items: center; gap: 10px; }
.profile-detail p { min-width: 0; overflow-wrap: anywhere; }
.profile-font-size { margin-block: 14px; }
.install-copy p { padding: 10px; border-radius: 10px; background: var(--pale-mint); font-size: .9rem; }
.install-address { overflow-wrap: anywhere; user-select: all; }
dialog img { max-height: 70vh; margin: 0 auto; object-fit: contain; }
.toast {
  position: fixed;
  inset: auto 12px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 12px) 12px;
  z-index: 30;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--deep-forest);
  color: #fff;
  box-shadow: 0 8px 28px #18332629;
  font-size: .9rem;
  overflow-wrap: anywhere;
}
.toast:empty { display: none; }

@media (hover: hover) {
  .nav-link:not([aria-current='page']):hover, .btn-ghost:hover { background: var(--pale-mint); color: var(--deep-forest); }
  .btn-primary:hover { background: var(--deep-forest); }
  .btn-secondary:hover, .icon-btn:hover, .calendar-day:not([aria-pressed='true']):hover { background: var(--mint); }
  .quick-tile:hover { border-color: #b9d5be; background: #fcfefb; }
  .text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .deal-title:hover { text-decoration: underline; text-underline-offset: 3px; }
  .album-preview-post:hover { background: var(--pale-mint); }
}

@media (max-width: 400px) {
  .header-inner { padding-inline: 12px; }
  .header-actions { gap: 3px; }
  .header-actions .btn { padding-inline: 8px; font-size: .79rem; }
  .app-shell { padding-inline: 12px; }
  .hero { padding: 20px; }
  .card, .rightbar .card { padding: 13px; }
  .hero-art { opacity: .51; }
  .calendar-head { gap: 4px; }
  .calendar-head .icon-btn { min-width: 36px; width: 36px; }
  .calendar-head .btn { padding-inline: 6px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 540px) {
  .member-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 9px; }
  .member-tools { grid-column: 2 / -1; }
}

@media (min-width: 500px) {
  .private-mark { display: flex; }
  .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .header-actions .mobile-deal-link { display: none; }
  .mobile-install { display: none; }
  .header-inner { min-height: 74px; padding-inline: 25px; }
  .app-shell { grid-template-columns: 162px minmax(0, 1fr); gap: 22px; padding: 27px 25px 45px; }
  .sidebar { position: sticky; top: 101px; display: grid; gap: 16px; }
  .rightbar { grid-column: 2; }
  .rightbar > .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-nav { display: none; }
  .hero { min-height: 245px; padding: 26px; }
  .hero-art { inset: auto 4px 5px auto; }
  .card { padding: 20px; }
  .toast { inset-block-end: 22px; }
  .calendar-grid { gap: 5px; }
  .calendar-day { min-height: 54px; }
  .quick-tile { padding: 13px; }
  .album-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
}

@media (min-width: 1060px) {
  .header-inner { padding-inline: 29px; }
  .app-shell { grid-template-columns: 173px minmax(0, 1fr) 268px; gap: 24px; padding-inline: 29px; }
  .rightbar { position: sticky; top: 101px; grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .rightbar > .stack { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 251px; padding: 29px 31px; }
  .hero-art { inset: auto 9px 3px auto; }
}

@media (min-width: 1220px) {
  .album-preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.challenge-rules,.challenge-event{padding:24px;margin-bottom:20px}
.challenge-rules p{color:var(--muted);line-height:1.7;margin-top:10px}
.challenge-goal{border-top:1px solid #e6e9e6;padding:20px 0;min-width:0}
.challenge-goal h3{overflow-wrap:anywhere}
.challenge-weeks{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:16px 0}
.challenge-week{display:flex;flex-direction:column;gap:8px;background:#f4f5f2;border-radius:12px;padding:12px;font-size:13px}
.challenge-week.is-achieved{background:#e8f4e8}
.challenge-week progress{width:100%;accent-color:#52755b}
.challenge-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:12px;margin-top:12px}
.challenge-photos a{min-width:0;color:inherit;font-size:12px}
.challenge-photos img{display:block;width:100%;height:110px;object-fit:cover;border-radius:10px;margin-bottom:6px}
.challenge-goal summary{cursor:pointer}
@media(max-width:759px){.challenge-rules,.challenge-event{padding:16px}.challenge-event .section-head{flex-wrap:wrap;gap:12px}}
