* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-family); font-weight: 500; color: var(--color-text-primary); background: var(--color-background); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { border: 0; padding: 0; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 4px; }
button:active { opacity: .8; }
.quick-create, .nav-create { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.quick-create:focus-visible, .nav-create:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 4px; }
.quick-create:active, .nav-create:active { opacity: .8; }
p, h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.icon { display: block; flex-shrink: 0; pointer-events: none; }
.app { position: relative; width: 100%; max-width: var(--page-width); height: 100vh; height: 100dvh; margin-inline: auto; overflow: hidden; background: var(--color-background); }
.hills { position: absolute; top: 78px; right: 0; pointer-events: none; }
.scroll-area { position: relative; height: calc(100% - var(--nav-height) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; }
.scroll-area::-webkit-scrollbar { display: none; }
.content-stack { display: flex; flex-direction: column; gap: var(--stack-gap); margin: 20px var(--page-inset) 0; padding-bottom: 20px; }
.app-header { position: relative; height: 53px; flex-shrink: 0; }
.brand-mark { position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 44px; height: 44px; background: var(--color-brand); border-radius: 15px; }
.brand-copy { position: absolute; left: 56px; top: 1px; }
.brand-name { font-size: 19.5px; font-weight: 800; line-height: 27px; }
.brand-caption { margin-top: 3px; font-size: 9.2px; line-height: 13px; white-space: nowrap; color: var(--color-text-muted); }
.notification-button { position: absolute; top: 3px; right: 44px; display: grid; place-items: center; width: 42px; height: 42px; background: #f1ecfa; border-radius: 50%; }
.unread-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: #f7a58e; border-radius: 50%; }
.profile-button { position: absolute; top: 3px; right: -6px; width: 42px; height: 42px; border-radius: 50%; background: transparent; }
.profile-button img { display: block; border-radius: inherit; object-fit: cover; }
.greeting { height: 72px; flex-shrink: 0; }
.greeting h1 { font-size: 25px; font-weight: 800; line-height: 34px; }
.greeting p { margin-top: 7px; font-size: 13.2px; line-height: 18px; color: var(--color-text-muted); }
.search-field { display: flex; align-items: center; gap: 15px; height: 46px; flex-shrink: 0; padding: 0 16px; border-radius: 24px; background: var(--color-search); }
.search-field input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--color-text-primary); font-size: 13.2px; line-height: 18px; }
.search-field input::placeholder { opacity: 1; color: var(--color-text-muted); }
.search-field:focus-within { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.search-field input:focus-visible { outline: none; }
.event-card { height: 384px; flex-shrink: 0; position: relative; }
.event-cover { position: relative; height: 185px; }
.event-photo { display: block; width: 100%; height: 185px; object-fit: cover; border-radius: var(--radius-card); }
.category-badge { position: absolute; top: 15px; left: 14px; display: flex; align-items: center; width: max-content; max-width: calc(100% - 80px); height: 32px; padding: 0 13px; border-radius: 16px; background: #ffeae3; color: #9f5b42; font-size: 11.7px; font-weight: 700; }
.favorite-button { position: absolute; top: 15px; right: 14px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fcfafe; }
.favorite-button[aria-pressed="true"] { background: #e1d3f6; box-shadow: 0 0 0 2px var(--color-brand) inset; }
.event-information { position: relative; z-index: 1; height: 224px; margin-top: -25px; padding: 14px 17px; background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.event-information h2 { font-size: 21.5px; line-height: 29px; font-weight: 800; }
.home-event-link { color: inherit; text-decoration: none; }
.home-event-link:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 3px; }
.event-meta { display: grid; grid-template-columns: 157px 1fr; margin-top: 13px; height: 43px; color: #29213e; }
.meta-item { display: flex; align-items: flex-start; gap: 6px; padding-top: 0; min-width: 0; }
.meta-item .icon { margin-top: 1px; }
.meta-date { padding-left: 1px; }
.meta-location { position: relative; padding-left: 10px; }
.meta-location::before { content: ''; position: absolute; top: 2px; left: -1px; height: 43px; width: 1px; background: #e5e0ed; }
.meta-value { font-size: 12.9px; line-height: 18px; font-weight: 700; white-space: nowrap; }
.meta-detail { margin-top: 2px; font-size: 11.5px; line-height: 16px; color: #817c91; white-space: nowrap; }
.meta-location .meta-value { font-size: 12.5px; line-height: 17px; }
.meta-location .meta-detail { margin-top: 3px; font-size: 10px; line-height: 14px; }
.attendees-row { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; height: 36px; padding: 0 3px 0 1px; }
.avatar-group { display: flex; align-items: center; width: 167px; height: 36px; flex-shrink: 0; }
.avatar-group img { border: 2px solid #fff; border-radius: 50%; object-fit: cover; }
.avatar-group img + img { margin-left: -6px; }
.avatar-more { display: grid; place-items: center; margin-left: 7px; width: 36px; height: 36px; border-radius: 50%; background: #eee7fa; color: #75658e; font-size: 12px; font-weight: 700; }
.confirmed-count { display: flex; align-items: center; gap: 4px; width: 137px; height: 32px; padding-left: 9px; border-radius: 16px; background: var(--color-confirmed); color: var(--color-confirmed-text); font-size: 11.1px; font-weight: 700; white-space: nowrap; }
.event-actions { display: grid; grid-template-columns: 151fr 152fr; gap: 13px; margin-top: 19px; }
.button { display: flex; align-items: center; justify-content: center; min-width: 0; height: 45px; padding: 0 12px; gap: 8px; border-radius: var(--radius-control); font: 700 14px/20px var(--font-family); text-align: center; text-decoration: none; white-space: nowrap; }
.button-primary {  background: var(--color-primary-button); color: white; font-size: 14px; font-weight: 700; }
.button-secondary {  background: var(--color-secondary); color: var(--color-secondary-text); font-size: 14px; font-weight: 700; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.quick-action { position: relative; height: 116px; padding: 17px 0 0 18px; text-align: left; border-radius: var(--radius-action); }
.quick-create { background: var(--color-peach); }
.quick-plans { background: var(--color-mint); }
.create-icon { position: absolute; top: 17px; left: 18px; display: block; height: 26px; }
.calendar-plus { position: absolute; left: 15px; top: 7px; }
.quick-title { position: absolute; left: 18px; top: 60px; font-size: 15px; font-weight: 700; line-height: 20px; white-space: nowrap; }
.quick-caption { position: absolute; left: 18px; top: 87px; font-size: 11.5px; line-height: 16px; color: var(--color-text-muted); white-space: nowrap; }
.quick-plans .quick-caption { font-size: 10.2px; line-height: 14px; }
.quick-action > .icon { position: absolute; top: 17px; left: 18px; }
.bottom-navigation { position: absolute; bottom: 0; width: 100%; height: calc(var(--nav-height) + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--color-surface); z-index: 3; }
.nav-link { position: absolute; top: 16px; display: flex; align-items: center; flex-direction: column; gap: 7px; width: 82px; height: 55px; background: transparent; font-size: 12.5px; line-height: 17px; color: var(--color-secondary-text); }
.nav-home { left: 37px; }
.nav-link { text-decoration: none; }
.nav-link[aria-current="page"] { color: #8f58dc; font-weight: 700; }
.nav-home:not([aria-current="page"]) .icon { filter: grayscale(1); opacity: .75; }
.nav-plans[aria-current="page"] .icon { filter: sepia(.7) saturate(3) hue-rotate(205deg); }
.nav-plans { right: 37px; }
.nav-create { position: absolute; top: -14px; left: calc(50% - 41px); display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: #9157de; }
.empty-state { padding: 28px 12px; font-size: 14px; line-height: 22px; text-align: center; color: var(--color-text-muted); }
.toast { position: absolute; z-index: 5; bottom: calc(110px + env(safe-area-inset-bottom)); left: 20px; right: 20px; padding: 14px 16px; border-radius: 16px; background: var(--color-text-primary); color: white; font-size: 13px; line-height: 20px; text-align: center; pointer-events: none; }
@media (max-width: 374px) {
  :root { --page-inset: 16px; }
  .brand-caption { max-width: 170px; white-space: normal; font-size: 8px; line-height: 11px; }
  .event-meta { grid-template-columns: 1fr 1fr; }
  .meta-location { padding-left: 6px; }
  .meta-item { gap: 4px; }
  .meta-value, .meta-location .meta-value { font-size: 11px; }
  .meta-location .meta-detail { font-size: 8.5px; }
  .avatar-group { width: 132px; }
  .avatar-more { margin-left: 0; }
  .confirmed-count { width: 114px; padding-left: 6px; gap: 2px; font-size: 10px; }
  .button-primary, .button-secondary { justify-content: center; padding-left: 0; gap: 7px; }
  .quick-title, .quick-caption { left: 14px; }
  .quick-title { font-size: 13px; }
  .nav-home { left: 25px; }
  .nav-plans { right: 25px; }
}
@media (hover: hover) {
  button:hover { filter: brightness(.97); }
}
