:root {
  color-scheme: light;
  --ink: #182238;
  --muted: #687187;
  --surface: #ffffff;
  --canvas: #f3f6fb;
  --line: #e5e9f2;
  --brand: #516792;
  --accent: #ff4057;
  --shadow: 0 16px 40px rgba(24, 34, 56, .09);
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% -10%, rgba(81, 103, 146, .16), transparent 26rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.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;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 104px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand { width: 128px; height: auto; display: block; }

.avatar {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.store-shortcut[hidden] { display: none !important; }

body.account-auth-open { overflow: hidden; }

.account-auth-modal[hidden] { display: none !important; }

.account-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(8, 24, 49, .68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.account-auth-dialog {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(5, 25, 57, .34);
}

.account-auth-dialog iframe {
  display: block;
  width: 100%;
  height: min(560px, calc(100dvh - 28px));
  border: 0;
  background: #fff;
}

.account-auth-close {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #182238;
  background: rgba(240, 244, 250, .96);
  box-shadow: 0 5px 14px rgba(15, 35, 65, .14);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 520px) {
  .account-auth-modal { padding: 8px; }
  .account-auth-dialog { border-radius: 20px; }
  .account-auth-dialog iframe { height: calc(100dvh - 16px); }
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 9vw, 3.3rem); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 1.25rem; letter-spacing: -.025em; }

.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(24, 34, 56, .08);
  font-size: 1.25rem;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border: 3px solid var(--canvas);
  border-radius: 99px;
  color: #fff;
  background: var(--accent);
  font-size: .7rem;
  font-weight: 900;
}
.notification-count[hidden] { display: none; }
.push-permission { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 12px; padding: 13px 14px; border: 1px solid #d9e7fb; border-radius: 16px; background: #f0f6ff; }
.push-permission[hidden] { display: none; }
.push-permission div { display: grid; gap: 2px; min-width: 0; }
.push-permission strong { color: var(--ink); font-size: .88rem; }
.push-permission small { color: var(--muted); font-size: .75rem; line-height: 1.25; }
.push-permission-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.push-permission button { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 0; border-radius: 99px; color: #fff; background: #126cdd; font-size: .76rem; font-weight: 800; cursor: pointer; }
.push-permission #push-permission-test { color: #126cdd; background: #fff; box-shadow: inset 0 0 0 1px #b8d2f5; }
.push-permission button:disabled { opacity: .62; cursor: wait; }

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 7px 24px rgba(24, 34, 56, .045);
  backdrop-filter: blur(12px);
}

.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(81, 103, 146, .12); }
.search-icon { color: var(--brand); font-size: 1.65rem; transform: rotate(-18deg); }
.search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.search input::placeholder { color: #8b93a5; }

.favorites { margin-top: 30px; }
.app-view[hidden] { display: none; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 15px; }
.section-heading span { color: var(--muted); font-size: .86rem; }
.store-list { display: grid; gap: 16px; }

.store-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 142px;
  overflow: hidden;
  border: 1px solid rgba(229, 233, 242, .9);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(24, 34, 56, .07);
  animation: enter .35s ease both;
}
.store-card[hidden] { display: none; }

.cover { position: relative; display: grid; place-items: center; min-height: 100%; overflow: hidden; }
.cover::before, .cover::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.16); }
.cover::before { width: 110px; height: 110px; left: -70px; top: -25px; }
.cover::after { width: 80px; height: 80px; right: -50px; bottom: -30px; }
.cover .store-monogram { position: relative; z-index: 1; display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); font-size: 1.4rem; font-weight: 850; backdrop-filter: blur(8px); }
.cover.has-photo .store-monogram { display: none; }
.store-logo { position: relative; z-index: 1; display: block; width: 64px; height: 64px; padding: 3px; border: 2px solid #f5c645; border-radius: 50%; background: #fff; box-shadow: 0 5px 14px rgba(15, 27, 51, .2); object-fit: contain; }
.cover-blue { background: linear-gradient(145deg, #182238, #5f77a8); }
.cover-orange { background: linear-gradient(145deg, #5e2a19, #e4853e); }
.cover-red { background: linear-gradient(145deg, #7f1d36, #ff4057); }
.cover-green { background: linear-gradient(145deg, #17483d, #31a784); }

.store-content { display: flex; flex-direction: column; min-width: 0; padding: 16px 14px 13px 4px; }
.store-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.category { margin-bottom: 6px; color: var(--brand); font-size: .69rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.store-card h3 { margin-bottom: 0; font-size: 1.08rem; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.summary { display: -webkit-box; overflow: hidden; margin: 9px 0 13px; color: var(--muted); font-size: .86rem; line-height: 1.42; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.unread { display: grid; place-items: center; flex: 0 0 auto; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 99px; color: #fff; background: var(--accent); font-size: .72rem; font-weight: 900; box-shadow: 0 5px 14px rgba(255, 64, 87, .27); }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.open-store { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border: 0; border-radius: 11px; color: #fff; background: var(--ink); font-size: .78rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.remove-store { min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; color: #7d4752; background: #f6f7fa; font-size: .76rem; font-weight: 700; text-decoration: none; }
.open-store:hover, .open-store:focus-visible { background: #31456a; }
.remove-store:hover, .remove-store:focus-visible { background: #fcecef; }

.empty-state { padding: 42px 20px; border: 1px dashed #ccd3e1; border-radius: 24px; text-align: center; }
.empty-state span { color: var(--accent); font-size: 2.4rem; }
.empty-state h3 { margin: 7px 0 5px; }
.empty-state p { margin-bottom: 0; color: var(--muted); }

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 28px), 600px);
  padding: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 23px;
  background: rgba(24, 34, 56, .96);
  box-shadow: 0 18px 46px rgba(24, 34, 56, .3);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 51px; padding: 7px 4px; border: 0; border-radius: 16px; color: #aeb8cd; background: transparent; font-size: .7rem; }
.bottom-nav button span { font-size: 1.04rem; }
.bottom-nav button.active { color: #fff; background: rgba(255,255,255,.1); }

.nav-search-icon {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.directory-view { padding-top: 18px; }

body.directory-active .app-shell { width: min(100%, 1180px); }

.directory-header { margin-bottom: 20px; }

.directory-header h1 { font-size: clamp(2rem, 9vw, 3.3rem); }

.directory-search-panel {
  padding: 18px;
  border: 1px solid #efc24a;
  border-radius: 26px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
}

.directory-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.directory-field { display: grid; gap: 7px; }
.directory-field > span { color: var(--ink); font-size: .83rem; font-weight: 800; }

.directory-field select {
  width: 100%;
  height: 52px;
  padding: 0 40px 0 14px;
  border: 1px solid #e2b844;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
  outline: 0;
}

.directory-field select:disabled { color: #9aa2b2; background: #f4f5f8; }
.directory-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(81, 103, 146, .12); }

.directory-query-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

.directory-query {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #e2b844;
  border-radius: 17px;
  background: #fff;
}

.directory-query:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(81, 103, 146, .12); }
.directory-query input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.directory-query input::placeholder { color: #9099aa; }

.directory-query-icon {
  position: relative;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.directory-query-icon::after { content: ""; position: absolute; right: -7px; bottom: -4px; width: 8px; height: 3px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }

.directory-reset, .directory-submit {
  min-height: 54px;
  border: 0;
  border-radius: 17px;
  font-weight: 800;
}

.directory-reset { grid-column: 1 / -1; color: var(--ink); background: #eef1f6; }
.directory-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 58px; color: #fff; background: #263a5c; }
.directory-submit b { display: none; }

.popular-searches { margin: 22px 0 28px; }
.popular-searches > strong { display: block; margin-bottom: 12px; font-size: .92rem; }
.popular-searches > div { display: flex; gap: 9px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: none; }
.popular-searches > div::-webkit-scrollbar { display: none; }
.popular-searches button { flex: 0 0 auto; min-height: 42px; padding: 0 18px; border: 1px solid #edc559; border-radius: 99px; color: #536075; background: rgba(255,255,255,.8); font-size: .85rem; font-weight: 700; }
.popular-searches button.active { color: #fff; border-color: var(--ink); background: var(--ink); }

.directory-results { scroll-margin-top: 16px; }
.directory-results-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.directory-results-header h2 { font-size: 1.35rem; }
.directory-results-count { color: var(--muted); font-size: .87rem; white-space: nowrap; }
.directory-results-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.directory-result-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8c76e;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 12px 28px rgba(24,34,56,.08);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.directory-result-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(24,34,56,.13); }
.directory-result-cover { position: relative; height: 132px; background-position: center; background-size: cover; }
.directory-result-cover.no-image { background: linear-gradient(145deg, #263a5c, #6e82aa); }
.directory-result-cover::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.2)); }
.directory-result-cover > span { position: absolute; z-index: 1; right: 0; bottom: 0; max-width: 86%; padding: 6px 11px; overflow: hidden; border-radius: 14px 0 0 0; color: #25344f; background: rgba(245,247,251,.94); font-size: .72rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.directory-result-body { display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 12px; align-items: center; min-height: 94px; padding: 13px; }
.directory-result-avatar { display: grid; place-items: center; width: 62px; height: 62px; border: 3px solid #f4bd00; border-radius: 50%; background: #eef1f6 center / cover no-repeat; font-size: 1.2rem; font-weight: 900; }
.directory-result-copy { min-width: 0; }
.directory-result-copy strong { display: -webkit-box; overflow: hidden; margin-bottom: 6px; font-size: 1rem; line-height: 1.12; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.directory-result-copy span { display: block; overflow: hidden; color: #8992a4; font-size: .78rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.directory-result-actions { display: flex; gap: 9px; padding: 0 13px 13px; }
.directory-result-actions > * { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 12px; border-radius: 11px; font: inherit; font-size: .78rem; font-weight: 800; text-decoration: none; }
.directory-favorite-button { border: 1px solid #e5bed1; color: #c2235a; background: #fff4f8; cursor: pointer; }
.directory-favorite-button[aria-pressed="true"] { border-color: #eaa8c1; color: #fff; background: #cb245b; }
.directory-favorite-button:disabled { opacity: .6; cursor: wait; }
.directory-open-store { border: 1px solid #223a62; color: #fff; background: #223a62; }

.directory-result-skeleton { min-height: 226px; border-radius: 22px; background: linear-gradient(100deg, #e9edf4 30%, #f7f8fb 50%, #e9edf4 70%); background-size: 240% 100%; animation: shimmer 1.1s infinite linear; }
.directory-empty { padding: 42px 20px; border: 1px dashed #ccd3e1; border-radius: 22px; text-align: center; }
.directory-empty > span { color: var(--brand); font-size: 2.2rem; }
.directory-empty h3 { margin: 8px 0 5px; }
.directory-empty p { margin: 0; color: var(--muted); }
.directory-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.directory-pagination button { min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fff; font-weight: 750; }
.directory-pagination button:disabled { cursor: default; opacity: .45; }
.directory-pagination span { color: var(--muted); font-size: .82rem; }

.backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(9, 15, 28, .52); backdrop-filter: blur(3px); }
.notification-panel { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; width: min(100%, 620px); max-height: 88vh; margin: auto; padding: 8px 20px max(26px, env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 28px 28px 0 0; background: var(--surface); box-shadow: 0 -20px 60px rgba(9,15,28,.24); transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.notification-panel.open { transform: translateY(0); }
.panel-handle { width: 46px; height: 5px; margin: 2px auto 18px; border-radius: 99px; background: #d9deea; }
.panel-header { display: flex; align-items: center; justify-content: space-between; }
.panel-header h2 { font-size: 1.55rem; }
.close-button { width: 42px; height: 42px; border: 0; border-radius: 14px; color: var(--ink); background: var(--canvas); font-size: 1.5rem; }
.mark-all { width: 100%; margin: 18px 0 7px; padding: 10px; border: 0; color: var(--brand); background: transparent; text-align: right; font-size: .82rem; font-weight: 750; }
.mark-all:disabled { cursor: default; opacity: .45; }
.notification-list { display: grid; gap: 6px; }
.notification-empty { margin: 16px 0 30px; padding: 20px; border-radius: 18px; color: var(--muted); background: #f3f7ff; text-align: center; }
.notification-item { display: grid; grid-template-columns: 46px minmax(0,1fr) 10px; gap: 12px; align-items: center; min-height: 74px; padding: 12px; border-radius: 17px; color: var(--ink); text-decoration: none; }
.notification-item:hover, .notification-item:focus-visible { background: #eef4ff; }
.notification-item.unread-item { background: #f0f6ff; }
.notification-copy { min-width: 0; }
.notification-copy strong { display: block; font-size: .9rem; }
.notification-item p { margin: 3px 0; color: var(--muted); font-size: .88rem; }
.notification-item time { color: #9299aa; font-size: .74rem; }
.notification-item i { width: 8px; height: 8px; border-radius: 50%; background: #146ce0; }
.event-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #182238, #5f77a8); font-style: normal; font-weight: 900; }
.event-icon img { display: block; width: 100%; height: 100%; border-radius: inherit; background: #fff; object-fit: contain; }
.event-icon.orange { background: linear-gradient(145deg, #7f1d36, #ff6e4b); }
.event-icon.green { background: linear-gradient(145deg, #17483d, #31a784); }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 94px; max-width: calc(100% - 36px); padding: 12px 18px; border-radius: 13px; color: #fff; background: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease; font-size: .86rem; font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.install-shortcut { position: fixed; z-index: 25; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; width: min(calc(100% - 24px), 420px); padding: 17px 16px; border: 1px solid #cfddf4; border-radius: 22px; color: var(--ink); background: #fff; box-shadow: 0 18px 48px rgba(24,34,56,.22); transform: translateX(-50%); }
.install-shortcut[hidden] { display: none; }
.install-shortcut img { width: 48px; height: 48px; border-radius: 13px; }
.install-shortcut-copy { padding-right: 15px; }
.install-shortcut-copy strong { display: block; margin: 1px 0 4px; font-size: .93rem; }
.install-shortcut-copy p { margin: 0 0 10px; color: #59677f; font-size: .79rem; line-height: 1.4; }
.install-shortcut-copy button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; color: #fff; background: #0d60cc; font: inherit; font-size: .79rem; font-weight: 800; cursor: pointer; }
.install-shortcut-close { position: absolute; top: 7px; right: 10px; width: 28px; height: 28px; border: 0; color: #67758c; background: transparent; font-size: 1.3rem; cursor: pointer; }

.landing-clone-shell {
  width: min(100%, 1120px);
  margin: 0 auto 80px;
}

.landing-clone-shell iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 320px;
  box-sizing: border-box;
  border: 0;
  background: #f5f7fb;
}

body.directory-active .landing-clone-shell {
  display: none;
}

button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(81, 103, 146, .4); outline-offset: 2px; }

@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -140% 0; } }

@media (min-width: 680px) {
  .app-shell { padding-right: 24px; padding-left: 24px; }
  .store-list { grid-template-columns: 1fr 1fr; }
  .directory-filter-grid { grid-template-columns: .8fr 1.4fr 1.1fr; }
  .directory-query-row { grid-template-columns: minmax(0,1fr) 126px 146px; }
  .directory-reset { grid-column: auto; }
  .directory-submit { width: auto; }
  .directory-submit b { display: inline; }
  .directory-results-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (min-width: 1040px) {
  .directory-results-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Visual da coleção pessoal */
:root { --ink: #17263d; --brand: #126bdc; --canvas: #f4f8ff; --muted: #69758a; }
body { background: radial-gradient(circle at 85% 16%, #eaf3ff 0, transparent 30rem), linear-gradient(180deg, #fff 0, #f4f8ff 42rem); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-shell { width: min(100%, 960px); padding: 0 28px 132px; }

.topbar { position: relative; height: 138px; align-items: flex-start; padding-top: 26px; isolation: isolate; }
.brand { position: relative; z-index: 2; width: 172px; }
.header-ribbon { position: absolute; z-index: 0; top: 0; right: -28px; display: flex; align-items: center; width: 57%; height: 124px; padding-left: 55px; overflow: hidden; border-radius: 0 0 0 105px; color: #fff; background: linear-gradient(110deg, #294b9c, #103e78 55%, #0b2445); }
.header-ribbon::after { content: ""; position: absolute; right: -45px; bottom: -86px; width: 190px; height: 130px; border: 2px solid rgba(255,255,255,.14); border-radius: 50%; }
.header-ribbon span { position: relative; z-index: 1; margin-right: 94px; font: italic 1.25rem/1.05 "Segoe Script", "Brush Script MT", cursive; text-align: center; transform: rotate(-7deg); }
.topbar-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-actions svg, .search svg, .favorite-count svg, .category svg, .card-tools svg, .open-store svg, .favorites-note svg, .bottom-nav svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.notification-button, .avatar { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.24); border-radius: 17px; color: #fff; background: rgba(255,255,255,.14); box-shadow: none; }
.avatar { border-radius: 50%; }
.notification-button svg, .avatar svg { width: 26px; height: 26px; }
.notification-count { top: -7px; right: -6px; min-width: 22px; height: 22px; border: 2px solid #fff; background: #f43b55; font-size: .68rem; }

.intro { position: relative; display: block; min-height: 202px; margin: 0 0 14px; isolation: isolate; overflow: clip; }
.intro > div:first-child { position: relative; z-index: 2; }
.eyebrow { margin-bottom: 7px; color: #677388; font-size: .78rem; letter-spacing: .16em; }
.intro h1 { font-size: clamp(3.2rem, 7vw, 5rem); line-height: 1; white-space: nowrap; }
.intro h1 span { color: #0e64ce; background: linear-gradient(105deg, #247de9, #054eae); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.intro-copy { max-width: min(55%, 460px); margin: 12px 0 0; color: #58677f; font-size: 1.08rem; line-height: 1.35; }

.search { height: 70px; padding: 0 24px; border: 1px solid #e5edfb; border-radius: 35px; background: #fff; box-shadow: 0 15px 32px rgba(36,80,142,.08); }
.search .search-icon { flex: 0 0 auto; width: 25px; height: 25px; color: #17263d; transform: none; }
.search input { font-size: 1.08rem; }
.search input::placeholder { color: #7b879e; }
.search .search-filter { flex: 0 0 auto; width: 23px; height: 23px; color: #263d60; }
.favorites { margin-top: 28px; }
.section-heading { align-items: center; margin-bottom: 17px; }
.section-heading h2 { font-size: 1.75rem; letter-spacing: -.04em; }
.favorite-count { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 0 12px; border-radius: 99px; color: #0e61c9; background: #e9f1ff; font-size: .85rem; white-space: nowrap; }
.section-heading .favorite-count { color: #0e61c9; font-size: .85rem; }
.favorite-count svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.favorite-count #favorite-total { color: inherit; font-size: inherit; }
.store-list { grid-template-columns: 1fr; gap: 18px; }

.store-card { grid-template-columns: minmax(145px, 32%) minmax(0, 1fr); min-height: 222px; overflow: visible; border: 1px solid #e8eef8; border-radius: 26px; box-shadow: 0 18px 38px rgba(25,68,131,.08); }
.store-card[hidden] { display: none; }
.cover { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; padding: 18px; border-radius: 25px 0 0 25px; background: linear-gradient(140deg, #165fc2, #062448); isolation: isolate; }
.cover::before { z-index: 1; inset: 0; width: auto; height: auto; border-radius: 25px 0 0 25px; background: linear-gradient(180deg, rgba(7,34,75,.18), rgba(4,25,55,.78)); }
.cover::after { z-index: 1; right: -38px; bottom: -54px; width: 110px; height: 110px; background: rgba(30,109,215,.42); }
.store-cover-photo { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; border-radius: 25px 0 0 25px; object-fit: cover; }
.cover .store-monogram, .store-logo { z-index: 2; width: 100px; height: 100px; flex: 0 0 auto; margin: auto 0; border: 3px solid #f8c938; border-radius: 50%; background: #fff; box-shadow: 0 9px 25px rgba(4,26,57,.28); }
.cover .store-monogram { color: #155ec1; font-size: 2.8rem; }
.store-logo { padding: 4px; object-fit: contain; }
.cover-caption { position: relative; z-index: 2; align-self: stretch; color: #fff; text-align: left; text-shadow: 0 2px 5px rgba(0,0,0,.4); }
.cover-caption strong { display: block; font-size: 1rem; line-height: 1.15; }
.cover-caption small { display: block; margin-top: 3px; font-size: .75rem; line-height: 1.25; }
.store-content { position: relative; padding: 20px 22px 18px 24px; }
.card-heading { display: block; }
.card-heading-copy { min-width: 0; }
.category { display: flex; align-items: center; gap: 7px; max-width: calc(100% - 126px); margin: 0 0 8px; color: #65748b; font-size: .73rem; letter-spacing: .06em; }
.category svg { flex: 0 0 auto; width: 18px; height: 20px; color: #65748b; fill: currentColor; stroke: none; }
.category span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-card h3 { margin-top: 16px; font-size: clamp(1.22rem, 3.2vw, 1.8rem); line-height: 1.1; }
.card-tools { position: absolute; top: 18px; right: 18px; display: flex; align-items: center; gap: 4px; }
.card-notification-button { position: absolute; z-index: 3; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; color: #126cdd; background: #fff; box-shadow: 0 5px 14px rgba(7,37,84,.2); cursor: pointer; }
.card-notification-button[hidden] { display: none; }
.card-notification-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-notification-count { position: absolute; top: -5px; right: -6px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid #fff; border-radius: 99px; color: #fff; background: #f43b55; font-size: .6rem; font-weight: 900; }
.card-notification-button:focus-visible { outline: 3px solid #126cdd; outline-offset: 3px; }
.card-menu-button { display: grid; place-items: center; width: 34px; height: 38px; padding: 0; border: 0; border-radius: 10px; color: #1b3559; background: transparent; }
.card-menu-button:hover, .card-menu-button:focus-visible { background: #edf3ff; }
.card-menu-button svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.card-menu { position: absolute; z-index: 5; top: 42px; right: 0; min-width: 170px; padding: 5px; border: 1px solid #e1e8f2; border-radius: 13px; background: #fff; box-shadow: 0 14px 32px rgba(20,46,84,.18); }
.card-menu[hidden] { display: none; }
.remove-store { width: 100%; min-height: 38px; padding: 0 10px; color: #a3384a; background: transparent; text-align: left; }
.remove-store:hover, .remove-store:focus-visible { background: #fff0f3; }
.summary { display: -webkit-box; margin: 9px 0 10px; color: #4e5e74; font-size: .9rem; line-height: 1.3; -webkit-line-clamp: 2; }
.summary[hidden] { display: none; }
.store-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.store-tags[hidden] { display: none; }
.store-tags span { display: inline-block; max-width: 190px; padding: 5px 10px; overflow: hidden; border-radius: 99px; color: #29456e; background: #edf3ff; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.store-highlight { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 2px 0 12px; padding: 10px 12px; border-radius: 18px; color: #126bdc; background: linear-gradient(105deg, #eaf3ff, #e3f0ff); text-decoration: none; }
.store-highlight:hover, .store-highlight:focus-visible { filter: brightness(.97); }
.store-highlight--offer { color: #08752c; background: linear-gradient(105deg, #e9faee, #e4f8eb); }
.store-highlight-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.62); font-size: 1.25rem; font-weight: 800; }
.store-highlight--offer .store-highlight-icon { color: #fff; background: #09842f; }
.store-highlight-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.store-highlight-copy { display: grid; gap: 2px; min-width: 0; }
.store-highlight-copy strong { font-size: .82rem; line-height: 1.1; }
.store-highlight-copy small { color: #334b69; font-size: .71rem; line-height: 1.2; }
.store-highlight--offer .store-highlight-copy small { color: #305d3e; }
.store-highlight-arrow { flex: 0 0 auto; width: 17px; height: 17px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.card-tools .open-store { min-height: 32px; padding: 0 10px; border-radius: 99px; background: linear-gradient(100deg, #0b3774, #0965cb); box-shadow: none; font-size: .7rem; }
.open-store:hover, .open-store:focus-visible { background: linear-gradient(100deg, #0a2c5e, #0753ae); }

.favorites-note { display: grid; grid-template-columns: 48px minmax(0,1fr) 1px 52px auto; align-items: center; gap: 17px; min-height: 98px; margin-top: 22px; padding: 16px 22px; border: 1px solid #fff; border-radius: 26px; color: #123663; background: linear-gradient(105deg, #e4efff, #f3f8ff); }
.favorites-note-heart { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #0f6edd; background: #fff; }
.favorites-note-heart svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.favorites-note p { margin: 0; font-size: 1.05rem; font-style: italic; line-height: 1.25; }
.favorites-note-divider { width: 1px; height: 52px; background: #a9c7f8; }
.favorites-note-shop { width: 46px !important; height: 46px !important; color: #1370df; }
.favorites-note small { color: #1c3553; font-size: .78rem; line-height: 1.3; }

.bottom-nav { width: min(calc(100% - 28px), 900px); padding: 9px; border-radius: 30px; background: linear-gradient(110deg, #15263d, #1b304d); box-shadow: 0 18px 38px rgba(17,36,62,.27); }
.bottom-nav button { justify-content: center; gap: 5px; min-height: 66px; border-radius: 22px; color: #fff; font-size: .82rem; }
.bottom-nav button svg { width: 25px; height: 25px; }
.bottom-nav #nav-favorites svg { fill: currentColor; stroke: none; }
.bottom-nav button.active { background: linear-gradient(110deg, #1380f3, #075bd3); box-shadow: 0 8px 18px rgba(6,84,197,.25); }

@media (max-width: 600px) {
  .app-shell { padding-right: 16px; padding-left: 16px; }
  .topbar { height: 112px; padding-top: 18px; }
  .brand { width: 138px; }
  .header-ribbon { right: -16px; width: 59%; height: 101px; border-radius: 0 0 0 76px; }
  .header-ribbon span { display: none; }
  .topbar-actions { gap: 7px; }
  .notification-button, .avatar { width: 40px; height: 40px; border-radius: 13px; }
  .avatar { border-radius: 50%; }
  .notification-button svg, .avatar svg { width: 22px; height: 22px; }
  .intro { min-height: 173px; }
  .intro h1 { font-size: clamp(2.35rem, 10vw, 3.45rem); }
  .intro-copy { max-width: 235px; font-size: .88rem; }
  .search { height: 59px; padding: 0 17px; border-radius: 28px; }
  .search input { font-size: .91rem; }
  .favorites { margin-top: 26px; }
  .section-heading h2 { font-size: 1.47rem; }
  .favorite-count { min-height: 31px; padding: 0 9px; font-size: .75rem; }
  .store-card { grid-template-columns: 108px minmax(0, 1fr); min-height: 184px; border-radius: 21px; }
  .cover { min-height: 182px; padding: 10px; border-radius: 20px 0 0 20px; }
  .cover::before, .store-cover-photo { border-radius: 20px 0 0 20px; }
  .cover .store-monogram, .store-logo { width: 70px; height: 70px; margin: auto 0; }
  .cover .store-monogram { font-size: 2rem; }
  .cover-caption { display: none; }
  .store-content { padding: 13px 12px 13px 14px; }
  .category { gap: 5px; max-width: calc(100% - 108px); margin-bottom: 5px; font-size: .65rem; letter-spacing: .025em; }
  .category svg { width: 15px; height: 18px; }
  .store-card h3 { margin-top: 14px; font-size: 1.13rem; }
  .card-tools { top: 12px; right: 9px; gap: 1px; }
  .card-tools .open-store { min-height: 28px; padding: 0 7px; font-size: .62rem; }
  .card-notification-button { top: 7px; right: 7px; width: 32px; height: 32px; }
  .card-notification-button svg { width: 18px; height: 18px; }
  .card-menu-button { width: 25px; height: 33px; }
  .card-menu-button svg { width: 17px; height: 17px; }
  .summary { margin: 7px 0; font-size: .74rem; -webkit-line-clamp: 2; }
  .store-tags { gap: 4px; margin-bottom: 8px; }
  .store-tags span { max-width: 136px; padding: 4px 7px; font-size: .65rem; }
  .store-highlight { gap: 7px; margin: 2px 0 10px; padding: 8px; border-radius: 13px; }
  .store-highlight-icon { flex-basis: 28px; width: 28px; height: 28px; font-size: .94rem; }
  .store-highlight-icon svg { width: 18px; height: 18px; }
  .store-highlight-copy strong { font-size: .7rem; }
  .store-highlight-copy small { font-size: .63rem; }
  .store-highlight-arrow { width: 13px; height: 13px; }
  .favorites-note { grid-template-columns: 42px minmax(0,1fr); gap: 11px; min-height: 72px; padding: 14px; border-radius: 20px; }
  .favorites-note-heart { width: 42px; height: 42px; }
  .favorites-note p { font-size: .84rem; }
  .favorites-note-divider, .favorites-note-shop, .favorites-note small { display: none !important; }
  .bottom-nav { bottom: max(8px, env(safe-area-inset-bottom)); width: min(calc(100% - 20px), 420px); padding: 5px; border-radius: 20px; }
  .bottom-nav button { min-height: 46px; gap: 2px; border-radius: 15px; font-size: .64rem; }
  .bottom-nav button svg { width: 18px; height: 18px; }
}

@media (max-width: 370px) {
  .brand { width: 120px; }
  .intro h1 { font-size: 2.25rem; }
  .store-card { grid-template-columns: 88px minmax(0,1fr); }
  .cover .store-monogram, .store-logo { width: 60px; height: 60px; }
  .store-content { padding-left: 10px; }
  .category { font-size: .61rem; }
  .card-menu-button { width: 21px; }
}

/* Arte enviada para o cabeçalho das lojas favoritas. */
body:not(.directory-active) .app-shell {
  position: relative;
  isolation: isolate;
  overflow: clip;
  width: min(100%, 820px);
}

body:not(.directory-active) .app-shell::before,
body:not(.directory-active) .app-shell::after {
  content: "";
  position: absolute;
  top: 0;
  pointer-events: none;
  z-index: 0;
}

body:not(.directory-active) .app-shell::before {
  left: 0;
  right: 0;
  height: 345px;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(180deg, #fff 0%, #eef7ff 76%, #f5f9ff 100%);
}

body:not(.directory-active) .app-shell::after {
  top: 0;
  right: 0;
  width: 75%;
  height: auto;
  aspect-ratio: 1672 / 941;
  background: url("favorites-header-background-complete.svg") center top / contain no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%), linear-gradient(180deg, #000 0%, #000 75%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 24%), linear-gradient(180deg, #000 0%, #000 75%, transparent 100%);
  mask-composite: intersect;
}

body:not(.directory-active) .topbar,
body:not(.directory-active) .intro,
body:not(.directory-active) .search,
body:not(.directory-active) .favorite-quick-actions,
body:not(.directory-active) .favorites {
  position: relative;
  z-index: 1;
}

body:not(.directory-active) .header-ribbon { display: none; }
body:not(.directory-active) .topbar { height: 88px; padding-top: 16px; }
.brand-lockup { position: relative; z-index: 2; display: block; width: 125px; height: 66px; overflow: hidden; }
.brand-lockup .brand { display: block; width: 160px; max-width: none; height: auto; transform: translate(-20px, -14px); }

body:not(.directory-active) .intro { min-height: 188px; margin: 0 0 12px; padding: 8px 0 0 8px; overflow: visible; }
body:not(.directory-active) .intro > div:first-child { max-width: 56%; }
body:not(.directory-active) .intro h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.04; letter-spacing: -.05em; white-space: normal; }
body:not(.directory-active) .intro h1 span { background: linear-gradient(115deg, #348dff, #0759c5); background-clip: text; -webkit-background-clip: text; }
body:not(.directory-active) .intro-copy { max-width: 315px; margin-top: 10px; color: #596783; font-size: clamp(.85rem, 1.8vw, 1rem); line-height: 1.3; }

body:not(.directory-active) .search { height: 52px; width: 100%; margin-left: 0; padding: 0 18px; border: 0; box-shadow: 0 9px 22px rgba(27,83,165,.1); }
body:not(.directory-active) .search input { font-size: .95rem; }
body:not(.directory-active) .search input::placeholder { color: #687b9e; }

.favorite-quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.favorite-quick-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 38px; padding: 0 8px; border: 0; border-radius: 999px; color: #203755; background: #eaf0ff; font-size: .78rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.favorite-quick-actions button:hover, .favorite-quick-actions button:focus-visible { background: #dce8ff; }
.favorite-quick-actions button.is-active { color: #fff; background: #126cdd; box-shadow: 0 8px 18px rgba(18,108,221,.18); }
.favorite-quick-actions svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.favorite-quick-actions [data-favorite-quick="all"] svg { fill: currentColor; stroke: none; }

body:not(.directory-active) .favorites { margin-top: 22px; }
body:not(.directory-active) .favorites .section-heading { align-items: center; }
body:not(.directory-active) .favorites .section-heading h2 { position: relative; padding-bottom: 8px; font-size: clamp(1.4rem, 2.4vw, 1.7rem); }

@media (min-width: 601px) {
  body:not(.directory-active) .app-shell {
    min-height: 0;
    padding-bottom: 24px;
  }

  body:not(.directory-active) .bottom-nav {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(100%, 520px);
    margin: 28px auto 0;
    padding: 6px;
    border-radius: 22px;
    transform: none;
  }

  body:not(.directory-active) .bottom-nav button {
    min-height: 48px;
    gap: 2px;
    border-radius: 16px;
    font-size: .7rem;
  }

  body:not(.directory-active) .bottom-nav button svg {
    width: 19px;
    height: 19px;
  }
}
body:not(.directory-active) .favorites .section-heading h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 80px; height: 9px; background: url("minhas-lojas-underline.svg?v=2") left center / contain no-repeat; }
body:not(.directory-active) .favorite-count { gap: 9px; padding: 0; color: #243751; background: transparent; font-size: .92rem; font-weight: 600; }
body:not(.directory-active) .favorite-count svg { order: 2; width: 22px; height: 22px; fill: none; stroke: #126cdd; stroke-width: 2; }

@media (max-width: 600px) {
  body:not(.directory-active) .app-shell { min-height: 0; padding-bottom: 24px; }
  body:not(.directory-active) .app-shell::before { height: 330px; border-radius: 0 0 28px 28px; }
  body:not(.directory-active) .app-shell::after { top: 0; right: 0; width: 90%; }
  body:not(.directory-active) .topbar { height: 72px; padding-top: 12px; }
  .brand-lockup { width: 98px; height: 52px; }
  .brand-lockup .brand { width: 125px; transform: translate(-15px, -11px); }
  body:not(.directory-active) .intro { min-height: 0; padding-top: 0; }
  body:not(.directory-active) .intro > div:first-child { max-width: 58%; }
  body:not(.directory-active) .intro h1 { font-size: clamp(1.55rem, 6vw, 2rem); line-height: 1.05; }
  body:not(.directory-active) .intro-copy { max-width: 205px; margin-top: 9px; font-size: .76rem; line-height: 1.24; }
  body:not(.directory-active) .search { height: 48px; padding: 0 14px; }
  body:not(.directory-active) .search input { font-size: .82rem; }
  .favorite-quick-actions { gap: 5px; margin-top: 13px; }
  .favorite-quick-actions button { gap: 4px; min-height: 36px; padding: 0 3px; font-size: .62rem; letter-spacing: -.015em; }
  .favorite-quick-actions svg { width: 14px; height: 14px; }
  body:not(.directory-active) .favorites { margin-top: 26px; }
  body:not(.directory-active) .favorites .section-heading h2 { font-size: 1.55rem; }
  body:not(.directory-active) .favorite-count { font-size: .72rem; }
  body:not(.directory-active) .favorite-count svg { width: 19px; height: 19px; }
}

@media (max-width: 360px) {
  .brand-lockup { width: 94px; height: 49px; }
  .brand-lockup .brand { width: 119px; transform: translate(-14px, -10px); }
  body:not(.directory-active) .intro > div:first-child { max-width: 57%; }
  body:not(.directory-active) .intro h1 { font-size: 1.55rem; }
  .favorite-quick-actions { display: flex; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .favorite-quick-actions button { flex: 0 0 auto; padding: 0 12px; }
  .favorite-quick-actions::-webkit-scrollbar { display: none; }
}

/* Perfil pessoal do Meu Trilista */
body.profile-active { background: #eef4fc; }
.profile-view { position: relative; z-index: 2; padding: 16px 0 24px; }
.profile-view-header { padding: 10px 8px 24px; }
.profile-view-header h1 { margin-bottom: 10px; color: #10213d; font-size: clamp(2.2rem, 7vw, 3.5rem); }
.profile-view-header > p:last-child { max-width: 520px; margin: 0; color: #61708a; line-height: 1.5; }
.profile-identity-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 24px; overflow: hidden; border: 1px solid #e0e9f7; border-radius: 30px; background: linear-gradient(125deg,#102b55,#0d66ca); box-shadow: 0 22px 48px rgba(12,67,133,.2); color: #fff; }
.profile-avatar { display: grid; place-items: center; width: 94px; height: 94px; overflow: hidden; border: 4px solid rgba(255,255,255,.92); border-radius: 50%; background: linear-gradient(145deg,#6eb2ff,#1b6bd0); box-shadow: 0 12px 28px rgba(3,25,59,.28); color: #fff; font-size: 1.55rem; font-weight: 900; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-account-label { display: inline-flex; margin-bottom: 7px; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.14); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-identity-copy h2 { margin: 0 0 5px; font-size: clamp(1.4rem,4vw,2rem); }
.profile-identity-copy p { margin: 0; overflow: hidden; color: #d3e6ff; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-edit-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 17px; border: 1px solid rgba(255,255,255,.35); border-radius: 15px; color: #12335e; background: #fff; font-weight: 850; }
.profile-edit-primary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.profile-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.profile-summary-grid article { display: flex; align-items: center; gap: 13px; min-height: 94px; padding: 17px; border: 1px solid #e2eaf6; border-radius: 24px; background: #fff; box-shadow: 0 13px 30px rgba(18,58,111,.07); }
.profile-summary-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 16px; }
.profile-summary-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; }
.profile-summary-icon.is-heart { color: #d92862; background: #fff0f5; }
.profile-summary-icon.is-heart svg { fill: currentColor; stroke: none; }
.profile-summary-icon.is-check { color: #087c52; background: #e9faf3; }
.profile-summary-grid strong,.profile-summary-grid small { display: block; }
.profile-summary-grid strong { color: #15253f; font-size: 1.12rem; }
.profile-summary-grid small { margin-top: 2px; color: #718099; }
.profile-details-card { margin-top: 16px; padding: 22px; border: 1px solid #e2eaf6; border-radius: 28px; background: #fff; box-shadow: 0 15px 34px rgba(18,58,111,.07); }
.profile-details-card > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.profile-details-card > header button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 12px; color: #0d62c5; background: #eaf3ff; font-weight: 800; }
.profile-detail-row { display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-top: 1px solid #edf1f7; }
.profile-detail-row > span { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; color: #176dce; background: #edf5ff; }
.profile-detail-row svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.profile-detail-row small,.profile-detail-row strong { display: block; }
.profile-detail-row small { margin-bottom: 3px; color: #7b879a; font-size: .72rem; text-transform: uppercase; }
.profile-detail-row strong { color: #23344e; font-size: .94rem; }

body.mt-profile-dialog-open { overflow: hidden; }
.mt-profile-modal[hidden] { display: none !important; }
.mt-profile-modal { position: fixed; z-index: 25000; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(6,22,47,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mt-profile-dialog { position: relative; width: min(100%,480px); max-height: calc(100dvh - 24px); overflow-y: auto; border: 1px solid rgba(255,255,255,.65); border-radius: 30px; background: #fff; box-shadow: 0 30px 90px rgba(1,20,48,.38); }
.mt-profile-dialog-head { padding: 27px 62px 20px 26px; color: #fff; background: linear-gradient(125deg,#12305d,#0c70dc); }
.mt-profile-dialog-head h2 { margin: 4px 0 7px; font-size: 1.65rem; }
.mt-profile-dialog-head p { margin: 0; color: #d8e9ff; font-size: .88rem; line-height: 1.4; }
.mt-profile-close { position: absolute; z-index: 2; top: 15px; right: 15px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.16); font-size: 24px; }
.mt-profile-form { padding: 22px 26px 26px; }
.mt-profile-photo-field { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.mt-profile-photo-preview { display: grid; place-items: center; flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; border: 3px solid #d9e9ff; border-radius: 50%; color: #1767c8; background: #edf5ff; font-weight: 900; }
.mt-profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.mt-profile-photo-field label { display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; border-radius: 12px; color: #155fb9; background: #eaf3ff; font-size: .82rem; font-weight: 800; cursor: pointer; }
.mt-profile-photo-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mt-profile-photo-field small { display: block; margin-top: 6px; color: #7a8799; }
.mt-profile-field { display: grid; gap: 7px; margin-top: 14px; color: #33435a; font-size: .8rem; font-weight: 800; }
.mt-profile-field input { width: 100%; height: 51px; padding: 0 15px; border: 1px solid #dbe4f1; border-radius: 14px; color: #17263d; background: #f9fbfe; outline: none; }
.mt-profile-field input:focus { border-color: #2580e7; box-shadow: 0 0 0 4px rgba(37,128,231,.12); }
.mt-profile-private-note { display: flex; gap: 9px; margin: 16px 0; padding: 12px; border-radius: 14px; color: #53647d; background: #f1f6fc; font-size: .76rem; line-height: 1.4; }
.mt-profile-private-note svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: #1370d7; stroke-width: 2; }
.mt-profile-error { min-height: 20px; margin: 0 0 8px; color: #b42342; font-size: .8rem; font-weight: 700; }
.mt-profile-submit { width: 100%; min-height: 51px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(100deg,#1479e9,#0757bd); box-shadow: 0 11px 24px rgba(11,100,205,.23); font-weight: 900; }
.mt-profile-submit:disabled { opacity: .65; cursor: wait; }

@media (max-width:600px) {
  .profile-view { padding-top: 4px; }
  .profile-view-header { padding: 8px 2px 18px; }
  .profile-view-header h1 { font-size: 2.25rem; }
  .profile-identity-card { grid-template-columns: auto minmax(0,1fr); gap: 13px; padding: 18px; border-radius: 24px; }
  .profile-avatar { width: 72px; height: 72px; font-size: 1.2rem; }
  .profile-edit-primary { grid-column: 1/-1; width: 100%; }
  .profile-summary-grid { gap: 9px; }
  .profile-summary-grid article { min-height: 82px; padding: 12px; border-radius: 20px; }
  .profile-summary-icon { flex-basis: 40px; width: 40px; height: 40px; border-radius: 13px; }
  .profile-summary-grid strong { font-size: .92rem; }
  .profile-summary-grid small { font-size: .68rem; }
  .profile-details-card { padding: 18px; border-radius: 24px; }
  .profile-detail-row strong { font-size: .82rem; }
  .mt-profile-modal { align-items: end; padding: 0; }
  .mt-profile-dialog { width: 100%; max-height: 94dvh; border-radius: 28px 28px 0 0; }
  .mt-profile-dialog-head { padding: 24px 58px 18px 20px; }
  .mt-profile-form { padding: 19px 20px max(22px,env(safe-area-inset-bottom)); }
}
