/* EventoParty — "Воздушный праздник" design system. */
:root {
  --blue: #2457ff;
  --blue-deep: #1744dc;
  --blue-soft: #eaf0ff;
  --navy: #111a46;
  --navy-soft: #536184;
  --coral: #ff6868;
  --coral-deep: #e84e5b;
  --coral-soft: #fff0f0;
  --lilac: #b987f2;
  --lilac-soft: #f0eaff;
  --paper: #ffffff;
  --canvas: #f8f7ff;
  --line: #e5e5f2;
  --shadow-sm: 0 8px 24px rgba(37, 43, 96, 0.07);
  --shadow-md: 0 18px 48px rgba(37, 43, 96, 0.1);
  --shadow-lg: 0 28px 80px rgba(37, 43, 96, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  color: var(--navy);
  font-family: "Manrope", "Nunito Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
  background: var(--canvas);
}

body,
.dashboard-body,
.wishlist-body,
.event-body,
.friends-body,
.profile-body,
.settings-body,
.auth-flow-body,
.invite-body {
  color: var(--navy);
  background:
    radial-gradient(circle at 9% 4%, rgba(185, 135, 242, 0.14), transparent 28rem),
    radial-gradient(circle at 94% 12%, rgba(36, 87, 255, 0.08), transparent 25rem),
    linear-gradient(145deg, #f8f6ff 0%, #fffefe 48%, #f7f5ff 100%);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.65;
  background-image:
    radial-gradient(circle at 13% 24%, rgba(255, 104, 104, 0.2) 0 3px, transparent 4px),
    radial-gradient(circle at 84% 30%, rgba(36, 87, 255, 0.16) 0 3px, transparent 4px),
    radial-gradient(circle at 73% 78%, rgba(185, 135, 242, 0.19) 0 4px, transparent 5px);
}

button,
input,
select,
textarea {
  min-width: 0;
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
dialog:focus-visible {
  outline: 3px solid rgba(36, 87, 255, 0.34);
  outline-offset: 3px;
}

input,
select,
textarea {
  min-height: 50px;
  border: 1px solid #dfe2ef;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--navy);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(22, 31, 78, 0.025);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

textarea {
  min-height: 120px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c8cce0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(36, 87, 255, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #9ba2b8;
}

label {
  margin: 18px 0 8px;
  color: #28345d;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p,
a,
button,
strong,
span {
  overflow-wrap: anywhere;
}

.event-theme,
.event-role,
.event-status,
.event-counter,
.quantity-badge,
.guest-status,
.app-nav-link,
.app-mobile-nav-link {
  overflow-wrap: normal;
  white-space: nowrap;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  letter-spacing: -0.055em;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 44px;
  align-items: center;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.055em;
  white-space: nowrap;
  overflow-wrap: normal;
  background: none;
  -webkit-text-fill-color: initial;
}

.brand-evento {
  color: var(--blue);
  -webkit-text-fill-color: var(--blue);
}

.brand-party {
  color: var(--coral);
  -webkit-text-fill-color: var(--coral);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.primary-button,
.secondary-button,
.icon-button,
.event-invite-button,
.friend-add-button,
.friend-remove-button,
.friend-request-button,
.reservation-button,
.rsvp-button,
.notification-button,
.app-menu-toggle {
  min-height: 46px;
  border-radius: 13px;
  transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #1b49eb);
  box-shadow: 0 10px 22px rgba(36, 87, 255, 0.22);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #174be9, #123bce);
  box-shadow: 0 13px 26px rgba(36, 87, 255, 0.25);
}

.secondary-button {
  min-height: 46px;
  border-color: #d5d9e9;
  border-radius: 13px;
  color: var(--blue);
  background: #fff;
}

.secondary-button:hover {
  transform: translateY(-1px);
  border-color: #b8c4f6;
  background: #f5f7ff;
}

.primary-button:disabled,
.secondary-button:disabled,
button:disabled {
  transform: none;
  box-shadow: none;
}

.field-note,
.legal {
  color: #7c849e;
  line-height: 1.55;
}

.form-message,
.dialog-message,
.dashboard-message,
.wishlist-message,
.event-page-message,
.friends-page-message,
.profile-page-message,
.settings-page-message {
  color: #bd3f4c;
}

.form-message.success {
  color: #14714a;
}

/* Authentication */
.page-shell {
  grid-template-columns: minmax(0, 1.16fr) minmax(430px, 0.84fr);
  gap: 18px;
  min-height: 100svh;
  padding: 18px;
}

.hero,
.auth-panel {
  min-height: calc(100svh - 36px);
  border: 1px solid rgba(226, 226, 241, 0.88);
  border-radius: 30px;
}

.hero {
  padding: clamp(34px, 5vw, 68px);
  background:
    radial-gradient(circle at 75% 20%, rgba(185, 135, 242, 0.2), transparent 18rem),
    linear-gradient(145deg, #f4f1ff 0%, #fcfbff 100%);
  box-shadow: var(--shadow-sm);
}

.hero::before,
.hero::after,
.dashboard-hero::before,
.dashboard-hero::after {
  position: absolute;
  z-index: 0;
  content: "";
  transform: rotate(35deg);
  border-radius: 3px;
  background: var(--coral);
}

.hero::before,
.dashboard-hero::before {
  top: 18%;
  right: 36%;
  width: 9px;
  height: 17px;
  box-shadow: 72px 98px 0 var(--blue), -42px 172px 0 var(--lilac), 118px 218px 0 var(--coral);
}

.hero::after,
.dashboard-hero::after {
  right: 8%;
  bottom: 12%;
  width: 8px;
  height: 8px;
  background: var(--lilac);
  box-shadow: -90px -30px 0 var(--coral), 38px -120px 0 var(--blue);
}

.hero-copy {
  max-width: 610px;
  margin-top: clamp(120px, 19vh, 220px);
}

.hero-copy h1 {
  max-width: 650px;
  color: var(--navy);
  font-size: clamp(46px, 4.7vw, 74px);
  line-height: 0.98;
}

.lead {
  max-width: 500px;
  margin-top: 22px;
  color: var(--navy-soft);
  font-size: 17px;
}

.hero-art {
  right: clamp(2px, 2vw, 36px);
  top: 6%;
  width: min(34vw, 470px);
  max-height: 91%;
  filter: drop-shadow(0 26px 30px rgba(76, 53, 149, 0.18));
}

.auth-panel {
  align-items: center;
  padding: clamp(36px, 6vw, 78px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.auth-heading,
.auth-tabs,
.auth-panel form,
.auth-panel .legal {
  width: 100%;
  max-width: 410px;
}

.auth-heading h2 {
  color: var(--navy);
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.05;
}

.auth-heading p:not(.eyebrow) {
  color: #707996;
}

.auth-tabs {
  padding: 5px;
  border-radius: 15px;
  background: #f0f2f8;
}

.tab {
  min-height: 44px;
  border-radius: 11px;
}

.tab.is-active {
  color: var(--blue);
  box-shadow: 0 4px 14px rgba(29, 43, 92, 0.1);
}

.auth-flow-shell,
.invite-shell {
  width: min(100% - 40px, 720px);
  padding: 34px 0 72px;
}

.auth-flow-card,
.invite-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(224, 224, 239, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
}

.auth-flow-card {
  padding: clamp(32px, 6vw, 58px);
}

.auth-flow-card::after,
.invite-card::after {
  position: absolute;
  z-index: 0;
  top: -85px;
  right: -95px;
  width: 270px;
  height: 405px;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background: url("assets/eventoparty-hero-transparent.png") center / contain no-repeat;
}

.auth-flow-card > *,
.invite-card > * {
  position: relative;
  z-index: 1;
}

.auth-flow-icon,
.invite-icon {
  width: 66px;
  height: 66px;
  border-radius: 21px;
  background: linear-gradient(145deg, var(--blue), #765ee5);
  box-shadow: 0 13px 28px rgba(36, 87, 255, 0.22);
}

.invite-card {
  margin-top: 8vh;
  padding: clamp(38px, 7vw, 72px);
}

.invite-back {
  min-height: 50px;
}

.auth-gate {
  background:
    radial-gradient(circle at center, rgba(185, 135, 242, 0.17), transparent 22rem),
    var(--canvas);
}

.auth-gate p {
  border-radius: 17px;
  box-shadow: var(--shadow-sm);
}

/* Shared authenticated layout and navigation */
.dashboard-shell,
.wishlist-shell,
.event-shell,
.friends-shell,
.profile-shell,
.settings-shell {
  width: min(100%, 1320px);
  max-width: 1320px;
  padding: 22px 42px 90px;
}

.app-header {
  position: sticky;
  z-index: 40;
  top: 14px;
  min-height: 64px;
  padding: 8px 12px 8px 18px;
  border: 1px solid rgba(224, 225, 239, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 11px 30px rgba(38, 43, 92, 0.08);
  backdrop-filter: blur(16px);
}

.app-nav {
  height: 100%;
  align-self: center;
  gap: 4px;
}

.app-nav-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1;
}

.app-nav-icon {
  display: none;
}

.app-nav-label {
  display: block;
  white-space: nowrap;
}

.app-nav-link:hover,
.app-nav-link.is-current,
.app-mobile-nav-link:hover,
.app-mobile-nav-link.is-current {
  color: var(--blue);
  background: var(--blue-soft);
}

.account-profile {
  min-height: 44px;
  padding: 3px 8px 3px 4px;
  border-radius: 14px;
}

.account-profile:hover {
  background: #f4f6ff;
}

.account-avatar {
  width: 38px;
  height: 38px;
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(25, 34, 75, 0.12);
}

.notification-button,
.app-menu-toggle {
  width: 44px;
  height: 44px;
  border-color: #dfe2ef;
  background: #fff;
}

.notification-button {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.notification-button:hover,
.notification-button[aria-expanded="true"] {
  border-color: transparent;
  background: var(--blue-soft);
}

.notification-panel,
.app-mobile-menu {
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.notification-panel {
  top: calc(100% + 14px);
  border-color: #e0e2ee;
}

.notification-heading {
  padding: 19px 20px 15px;
}

.notification-item.is-unread {
  background: #f0f4ff;
}

.notification-content {
  min-height: 64px;
  padding: 16px 20px;
}

.notification-content p {
  overflow-wrap: anywhere;
}

/* Dashboard */
.dashboard-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  min-height: 420px;
  margin-top: 30px;
  border: 1px solid rgba(224, 222, 241, 0.92);
  border-radius: 34px;
  color: var(--navy);
  background:
    radial-gradient(circle at 78% 12%, rgba(185, 135, 242, 0.2), transparent 18rem),
    linear-gradient(135deg, #f5f1ff 0%, #fff 72%);
  box-shadow: var(--shadow-md);
}

.dashboard-hero-copy {
  padding: clamp(42px, 5vw, 68px);
}

.dashboard-hero .eyebrow {
  color: var(--blue);
}

.dashboard-hero h1 {
  max-width: 700px;
  color: var(--navy);
  font-size: clamp(44px, 4.6vw, 68px);
  line-height: 0.99;
}

.dashboard-hero-copy > p:not(.eyebrow) {
  max-width: 560px;
  color: var(--navy-soft);
}

.dashboard-actions .dashboard-create {
  color: #fff;
  border-color: transparent;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(36, 87, 255, 0.2);
}

.dashboard-actions .dashboard-create:hover {
  color: #fff;
  background: var(--blue-deep);
}

.dashboard-actions .dashboard-wishlist-link {
  color: var(--blue);
  border-color: #c8d2fc;
  background: #fff;
}

.dashboard-actions .dashboard-wishlist-link:hover {
  color: var(--blue-deep);
  border-color: var(--blue);
  background: var(--blue-soft);
}

.dashboard-hero-art img {
  right: clamp(8px, 3vw, 48px);
  bottom: -46px;
  width: min(100%, 410px);
  filter: drop-shadow(0 24px 25px rgba(64, 45, 126, 0.2));
}

.dashboard-dot.dot-coral {
  background: var(--coral);
}

.dashboard-dot.dot-blue {
  border-color: rgba(36, 87, 255, 0.22);
}

.events-section,
.birthdays-section {
  margin-top: 54px;
}

.section-heading h2 {
  color: var(--navy);
  font-size: clamp(27px, 3vw, 34px);
}

.event-counter,
.quantity-badge {
  color: #596999;
  background: #eeedff;
}

.event-tabs {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.event-tab {
  min-height: 42px;
  border-radius: 11px;
}

.events-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.event-card,
.birthday-card,
.empty-state {
  border-color: rgba(225, 226, 239, 0.94);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.event-card {
  min-height: 278px;
  padding: 24px;
  border-radius: 24px;
}

.event-card::before {
  height: 6px;
  background: linear-gradient(90deg, var(--blue), #6d67e8);
}

.event-card.theme-birthday::before {
  background: linear-gradient(90deg, var(--coral), #ff9a85);
}

.event-card.theme-wedding::before {
  background: linear-gradient(90deg, var(--lilac), #8065e8);
}

.event-card h3 {
  min-height: 2.2em;
  color: var(--navy);
}

.event-card-footer {
  margin-top: auto;
}

.event-invite-button {
  min-height: 44px;
  padding: 0 14px;
}

.event-open,
.section-link,
.product-link,
.profile-summary-card a,
.auth-back-link,
.auth-text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.birthday-card {
  border-radius: 22px;
}

.birthday-date {
  background: linear-gradient(145deg, var(--blue), #705de4);
  box-shadow: 0 9px 20px rgba(36, 87, 255, 0.18);
}

.empty-state,
.wishlist-empty,
.items-empty,
.friends-empty,
.profile-empty,
.guest-empty,
.birthday-empty,
.request-empty {
  border-color: #d9d9ed;
  background: rgba(255, 255, 255, 0.66);
}

.empty-icon {
  border-radius: 17px;
  color: var(--blue);
  background: var(--blue-soft);
}

/* Shared page intros */
.wishlist-top,
.friends-top,
.settings-top {
  margin-top: 44px;
}

.wishlist-top h1,
.friends-top h1,
.settings-top h1,
.profile-hero-copy h1 {
  color: var(--navy);
  line-height: 1;
}

.wishlist-top > div > p:not(.eyebrow),
.friends-top > div > p:not(.eyebrow),
.settings-top > p:not(.eyebrow) {
  color: var(--navy-soft);
}

/* Wishlists and gifts */
.wishlist-layout {
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 30px;
}

.wishlist-sidebar,
.friend-search,
.friend-request-panel,
.settings-card,
.settings-session-card,
.profile-hero-card,
.profile-summary-card,
.event-fact,
.guest-card,
.wish-item,
.event-gift-card {
  border-color: rgba(224, 225, 238, 0.94);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.wishlist-sidebar {
  position: sticky;
  top: 104px;
  border-radius: 24px;
}

.wishlist-nav {
  min-height: 62px;
  border-radius: 15px;
}

.wishlist-nav:hover,
.wishlist-nav.is-selected {
  background: var(--blue-soft);
}

.wishlist-empty {
  border-radius: 30px;
}

.items-grid {
  gap: 16px;
}

.wish-item {
  min-height: 184px;
  border-radius: 24px;
}

.wish-item-image {
  min-height: 184px;
  background: linear-gradient(145deg, #efebff, #f9f7ff);
}

.wish-item h3,
.event-gift-body h3 {
  color: var(--navy);
}

.icon-button {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.event-gift-card {
  border-radius: 24px;
}

.event-gift-image {
  background: linear-gradient(145deg, #eeebff, #f8f6ff);
}

.event-product-link {
  min-height: 46px;
  border-radius: 13px;
}

/* Event and RSVP */
.event-hero-detail {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 200px;
  min-height: 410px;
  margin-top: 30px;
  border: 1px solid rgba(224, 222, 240, 0.94);
  border-radius: 34px;
  color: var(--navy);
  background:
    linear-gradient(90deg, rgba(248, 245, 255, 0.98) 0 57%, rgba(248, 245, 255, 0.55) 72%, rgba(248, 245, 255, 0.08) 100%),
    url("assets/eventoparty-hero-transparent.png") calc(100% - 28px) 44% / 310px auto no-repeat,
    #f8f5ff;
  box-shadow: var(--shadow-md);
}

.event-hero-main {
  position: relative;
  z-index: 2;
}

.event-hero-detail .event-theme,
.event-hero-detail .event-role {
  color: #415584;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 12px rgba(38, 43, 92, 0.06);
}

.event-hero-detail h1 {
  max-width: 660px;
  color: var(--navy);
  font-size: clamp(42px, 5vw, 66px);
}

.event-description {
  max-width: 630px;
  color: var(--navy-soft);
}

.event-date-poster {
  position: relative;
  z-index: 2;
  width: 174px;
  height: 205px;
  color: var(--blue);
  box-shadow: 0 20px 42px rgba(43, 47, 100, 0.16);
}

.event-date-poster span {
  font-size: 68px;
}

.event-rsvp {
  max-width: 520px;
  border-color: #e1e3ef;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow-sm);
}

.event-rsvp > p {
  color: var(--navy);
}

.event-rsvp small {
  color: #77809d;
}

.rsvp-button {
  border: 0;
  color: #fff;
  background: var(--blue);
}

.rsvp-button + .rsvp-button {
  background: var(--coral);
}

.rsvp-button:hover {
  transform: translateY(-1px);
  background: var(--blue-deep);
}

.rsvp-button + .rsvp-button:hover {
  background: var(--coral-deep);
}

.rsvp-button.is-selected {
  color: #fff;
  background: var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(36, 87, 255, 0.16);
}

.rsvp-button + .rsvp-button.is-selected {
  background: var(--coral-deep);
  box-shadow: 0 0 0 4px rgba(255, 104, 104, 0.17);
}

.event-owner-actions .event-share,
.event-owner-actions .event-edit,
.event-owner-actions .event-cancel,
.event-owner-actions .event-delete {
  min-height: 48px;
  border-radius: 13px;
}

.event-owner-actions .event-share {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.event-owner-actions .event-share-link,
.event-owner-actions .event-edit {
  color: var(--blue);
  border-color: #cbd3f7;
  background: #fff;
}

.event-owner-actions .event-cancel,
.event-owner-actions .event-delete {
  color: #b2404c;
  border-color: #f0c8cd;
  background: #fff7f8;
}

.event-owner-actions .event-cancel:hover,
.event-owner-actions .event-delete:hover {
  color: #fff;
  border-color: var(--coral-deep);
  background: var(--coral-deep);
}

.event-owner-actions .event-cancel.is-restore {
  color: #19734b;
  border-color: #b9dfcd;
  background: #f1fbf6;
}

.event-hero-detail.is-cancelled {
  background:
    linear-gradient(90deg, rgba(244, 244, 248, 0.98) 0 60%, rgba(244, 244, 248, 0.66) 100%),
    url("assets/eventoparty-hero-transparent.png") calc(100% - 28px) 44% / 310px auto no-repeat,
    #f2f2f5;
}

.event-info-layout {
  gap: 18px;
}

.event-fact {
  border-radius: 22px;
}

.event-map-wrap {
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
}

.event-guests,
.event-gifts-grid {
  gap: 16px;
}

.guest-card {
  border-radius: 21px;
}

.guest-copy h3 {
  color: var(--navy);
}

/* Friends */
.friends-top {
  grid-template-columns: minmax(0, 1fr) minmax(350px, 440px);
}

.friend-search {
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.friend-request-panel,
.friend-card {
  border-radius: 23px;
}

.friend-card {
  background: rgba(255, 255, 255, 0.95);
}

.friend-card-body h3 {
  color: var(--navy);
}

.friend-add-button {
  background: var(--blue);
}

.friend-remove-button {
  color: #b2404c;
  border-color: #f0c8cd;
  background: #fff7f8;
}

.friend-request-button {
  color: var(--blue);
  border-color: #ccd5f8;
  background: #f6f8ff;
}

/* Profile and settings */
.profile-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow-md);
}

.profile-hero-card::after {
  position: absolute;
  right: -36px;
  bottom: -116px;
  width: 260px;
  height: 390px;
  pointer-events: none;
  content: "";
  opacity: 0.08;
  background: url("assets/eventoparty-hero-transparent.png") center / contain no-repeat;
}

.profile-hero-card > * {
  position: relative;
  z-index: 1;
}

.profile-hero-avatar,
.profile-avatar-preview {
  border-color: #fff;
  box-shadow: 0 16px 36px rgba(46, 44, 97, 0.15);
}

.profile-summary-card {
  border-radius: 22px;
}

.profile-wishlist-item {
  border: 1px solid #e8e8f2;
  background: #f8f7ff;
}

.profile-feed-card.is-unread::before {
  background: var(--coral);
}

.settings-card {
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.settings-session-card {
  border-radius: 24px;
}

.file-input::file-selector-button {
  min-height: 38px;
  border-radius: 11px;
  color: var(--blue);
  background: var(--blue-soft);
}

.checkbox-row input {
  min-height: 20px;
}

/* Dialogs */
.app-dialog {
  width: min(94vw, 590px);
  max-height: min(90vh, 820px);
  overflow: hidden;
  border: 1px solid rgba(228, 228, 239, 0.92);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(20, 25, 68, 0.3);
}

.app-dialog::backdrop {
  background: rgba(21, 25, 59, 0.48);
  backdrop-filter: blur(7px);
}

.app-dialog form {
  max-height: min(calc(90vh - 2px), 818px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #a8afc2 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  padding: 38px;
}

.app-dialog form::-webkit-scrollbar {
  width: 10px;
}

.app-dialog form::-webkit-scrollbar-track {
  margin-block: 12px;
  background: transparent;
}

.app-dialog form::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #a8afc2;
  background-clip: padding-box;
}

.app-dialog h2 {
  padding-right: 38px;
  color: var(--navy);
  font-size: clamp(27px, 5vw, 34px);
}

.dialog-close {
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #5f6989;
  background: #f1f3f9;
}

.dialog-close:hover {
  color: var(--coral-deep);
  background: var(--coral-soft);
}

@media (max-width: 1120px) {
  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-nav {
    display: flex;
  }

  .app-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .app-header-actions {
    grid-column: auto;
  }

  .app-menu-toggle {
    display: none !important;
  }

  .app-nav-link {
    padding-inline: 8px;
    font-size: 11px;
  }

  .account-profile-copy {
    display: none;
  }
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: minmax(0, 0.92fr) minmax(390px, 1.08fr);
  }

  .hero-copy {
    margin-top: 16vh;
  }

  .hero-copy h1 {
    font-size: 48px;
  }

  .hero-art {
    width: 42vw;
    opacity: 0.75;
  }

  .dashboard-shell,
  .wishlist-shell,
  .event-shell,
  .friends-shell,
  .profile-shell,
  .settings-shell {
    padding-inline: 26px;
  }

  .event-hero-detail {
    background:
      linear-gradient(90deg, rgba(248, 245, 255, 0.98) 0 68%, rgba(248, 245, 255, 0.5) 100%),
      url("assets/eventoparty-hero-transparent.png") calc(100% - 8px) 50% / 270px auto no-repeat,
      #f8f5ff;
  }

  .event-gifts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 84px;
  }

  .page-shell {
    display: block;
    padding: 0;
  }

  body:not([data-auth-page="protected"]) {
    padding-bottom: 0;
  }

  .hero {
    display: block;
    min-height: 250px;
    margin: 12px;
    padding: 25px;
    border-radius: 26px;
  }

  .hero-copy {
    display: none;
  }

  .hero-art {
    top: -52px;
    right: 4px;
    width: 230px;
    max-height: 330px;
    opacity: 1;
  }

  .auth-panel {
    width: calc(100% - 24px);
    min-height: auto;
    margin: -52px 12px 12px;
    padding: 34px 24px 30px;
    border-radius: 26px;
  }

  .mobile-brand {
    display: none;
  }

  .dashboard-shell,
  .wishlist-shell,
  .event-shell,
  .friends-shell,
  .profile-shell,
  .settings-shell {
    padding: 14px 16px 34px;
  }

  .app-header {
    top: 8px;
    min-height: 58px;
    padding: 6px 8px 6px 13px;
    border-radius: 18px;
    backdrop-filter: none;
  }

  .app-header .brand {
    font-size: 24px;
  }

  .app-header-actions {
    grid-column: auto;
  }

  .app-menu-toggle,
  .app-mobile-menu {
    display: none !important;
  }

  .app-nav {
    display: grid;
    position: fixed;
    z-index: 60;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    min-height: 66px;
    padding: 6px;
    border: 1px solid rgba(218, 220, 235, 0.96);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 17px 42px rgba(31, 37, 82, 0.18);
    backdrop-filter: blur(18px);
  }

  .app-nav-link {
    display: flex;
    min-width: 0;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 16px;
    font-size: clamp(8px, 2.3vw, 9px);
    white-space: normal;
  }

  .app-nav-icon {
    display: block;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
  }

  .app-nav-icon svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .app-nav-label {
    max-width: 100%;
    overflow-wrap: normal;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
  }

  .app-nav-link.is-current {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 8px 18px rgba(36, 87, 255, 0.22);
  }

  .notification-panel {
    top: 76px;
    right: 12px;
    left: 12px;
    max-height: calc(100svh - 174px);
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-top: 22px;
    border-radius: 28px;
  }

  .dashboard-hero-copy {
    padding: 34px 25px 20px;
  }

  .dashboard-hero h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .dashboard-hero-copy > p:not(.eyebrow) {
    font-size: 15px;
  }

  .dashboard-hero-art {
    min-height: 220px;
    margin-top: -10px;
  }

  .dashboard-hero-art img {
    right: 50%;
    bottom: -32px;
    width: 270px;
    transform: translateX(50%);
  }

  .events-section,
  .birthdays-section {
    margin-top: 42px;
  }

  .events-grid,
  .birthday-grid,
  .event-guests,
  .event-gifts-grid,
  .friends-grid,
  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    min-height: 0;
  }

  .event-card h3 {
    min-height: 0;
  }

  .event-tab {
    min-height: 44px;
  }

  .wishlist-top,
  .friends-top,
  .settings-top {
    margin-top: 30px;
  }

  .wishlist-top h1,
  .friends-top h1,
  .settings-top h1 {
    font-size: clamp(38px, 11vw, 46px);
  }

  .wishlist-layout {
    grid-template-columns: 1fr;
  }

  .wishlist-sidebar {
    position: static;
  }

  .wishlist-list {
    scrollbar-width: thin;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .wish-item {
    min-height: 164px;
  }

  .wish-item-image {
    min-height: 164px;
  }

  .event-hero-detail {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 32px 24px 210px;
    border-radius: 28px;
    background:
      linear-gradient(180deg, rgba(248, 245, 255, 0.98) 0 67%, rgba(248, 245, 255, 0.34) 100%),
      url("assets/eventoparty-hero-transparent.png") 50% calc(100% + 102px) / 250px auto no-repeat,
      #f8f5ff;
  }

  .event-hero-detail h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .event-date-poster {
    display: none;
  }

  .event-owner-actions,
  .rsvp-actions {
    flex-direction: column;
  }

  .event-owner-actions > *,
  .rsvp-button {
    width: 100% !important;
  }

  .event-info-layout {
    grid-template-columns: 1fr;
  }

  .friends-top {
    grid-template-columns: 1fr;
  }

  .friend-search {
    padding: 20px;
  }

  .profile-hero-card {
    border-radius: 27px;
  }

  .settings-card {
    border-radius: 27px;
  }

  .app-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
    border-radius: 24px;
  }

  .app-dialog form {
    max-height: calc(100svh - 22px);
    padding: 31px 20px 24px;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 220px;
  }

  .hero-art {
    top: -65px;
    width: 215px;
  }

  .auth-panel {
    margin-top: -42px;
  }

  .auth-heading h2 {
    font-size: 32px;
  }

  .dashboard-actions {
    flex-direction: column;
  }

  .dashboard-actions .primary-button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
  }

  .event-tabs {
    display: flex;
    width: 100%;
  }

  .event-tab {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .event-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .event-invite-button {
    width: 100%;
  }

  .wish-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .wish-item-image {
    width: 118px;
    min-height: 100%;
  }

  .wish-item-body {
    padding: 17px 15px;
  }

  .friend-search-row {
    flex-direction: column;
  }

  .friend-search-row .primary-button {
    width: 100%;
  }

  .profile-hero-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 17px;
  }

  .profile-hero-avatar {
    width: 82px;
    height: 82px;
    border-radius: 23px;
  }

  .profile-hero-copy h1 {
    font-size: 32px;
  }

  .profile-wishlist-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .profile-wishlist-item a {
    grid-column: 1 / -1;
  }

  .settings-card {
    padding: 22px 18px;
  }

  .avatar-settings {
    align-items: center;
  }

  .profile-avatar-preview {
    width: 88px;
    height: 88px;
  }

  .auth-flow-shell,
  .invite-shell {
    width: min(100% - 24px, 720px);
    padding-top: 20px;
  }

  .auth-flow-card,
  .invite-card {
    padding: 28px 20px;
    border-radius: 25px;
  }

  .auth-flow-card::after,
  .invite-card::after {
    opacity: 0.07;
  }
}

@media (max-width: 350px) {
  .dashboard-hero-art {
    min-height: 240px;
    margin-top: 0;
    overflow: hidden;
  }

  .dashboard-hero-art img {
    bottom: -18px;
    width: 205px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
