:root {
  color-scheme: light;
  --bg: #f7f9f6;
  --surface: #ffffff;
  --surface-soft: #eef4ef;
  --ink: #1e2a2f;
  --muted: #68777c;
  --line: #dce6df;
  --teal: #17a398;
  --teal-deep: #0f766f;
  --coral: #e4572e;
  --yellow: #f2c14e;
  --blue: #4d6fff;
  --green: #2f9e44;
  --danger: #c92a2a;
  --brand-yellow: #ffc533;
  --brand-orange: #ff8a1f;
  --brand-coral: #ff4f3d;
  --brand-ink: #1e1712;
  --brand-gradient: linear-gradient(105deg, var(--brand-yellow) 0%, var(--brand-orange) 48%, var(--brand-coral) 100%);
  --brand-soft: rgba(255, 138, 31, 0.14);
  --brand-line: rgba(255, 138, 31, 0.28);
  --shadow: 0 18px 44px rgba(23, 59, 63, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --keyboard-inset: 0px;
  --visual-height: 100dvh;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1516;
  --surface: #172022;
  --surface-soft: #202b2d;
  --ink: #edf4f2;
  --muted: #a4b1b0;
  --line: #2d3a3d;
  --teal: #27c6b8;
  --teal-deep: #6be0d5;
  --coral: #ff8a66;
  --yellow: #ffd166;
  --blue: #8aa1ff;
  --green: #69db7c;
  --danger: #ff8787;
  --brand-yellow: #ffd56a;
  --brand-orange: #ff9f2f;
  --brand-coral: #ff654f;
  --brand-ink: #120f0c;
  --brand-soft: rgba(255, 159, 47, 0.16);
  --brand-line: rgba(255, 159, 47, 0.28);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

body {
  height: 100dvh;
}

.page-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px) minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
select,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

#app {
  grid-column: 2;
  height: 100dvh;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.ad-rail {
  display: none;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: 24px 18px;
}

.ad-rail-left {
  grid-column: 1;
  justify-self: end;
}

.ad-rail-right {
  grid-column: 3;
  justify-self: start;
}

.ad-rail.has-ad {
  width: 180px;
}

.side-ad {
  display: block;
  width: 160px;
  min-height: 600px;
}

@media (min-width: 1120px) {
  .ad-rail.has-ad {
    display: block;
  }
}

@media (min-width: 1440px) {
  .ad-rail.has-ad {
    width: 320px;
    padding-inline: 24px;
  }

  .side-ad {
    width: 300px;
  }
}

.app-frame {
  width: min(100%, 480px);
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px rgba(30, 42, 47, 0.06);
  overflow: hidden;
}

.screen {
  height: 100dvh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(92px + var(--safe-bottom));
}

.login-screen {
  display: grid;
  align-content: center;
  height: 100dvh;
  min-height: 0;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, rgba(255, 138, 31, 0.14), rgba(255, 138, 31, 0) 36%),
    var(--bg);
}

:root[data-theme="dark"] .login-screen {
  background:
    linear-gradient(180deg, rgba(255, 159, 47, 0.18), rgba(255, 159, 47, 0) 36%),
    var(--bg);
}

.brand-mark {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  color: var(--ink);
  margin-bottom: 22px;
  padding: 3px;
  box-shadow: 0 18px 38px rgba(255, 103, 49, 0.22);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: var(--surface);
  padding: 4px;
}

.brand-mark .avatar {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
  font-size: 30px;
}

.brand-mark .avatar img {
  border-radius: 6px;
  padding: 0;
}

.login-title {
  margin: 0 0 10px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-title {
  display: inline-block;
  width: fit-content;
  color: var(--brand-orange);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 16px rgba(255, 103, 49, 0.14));
}

.login-copy {
  margin: 0 0 26px;
  max-width: 29rem;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.login-panel {
  display: grid;
  gap: 14px;
}

.login-tabs {
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 48px;
  padding: 12px 13px;
  outline: none;
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 163, 152, 0.14);
}

.btn {
  min-height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 800;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--brand-ink);
  box-shadow: 0 10px 22px rgba(255, 103, 49, 0.2);
}

:root[data-theme="dark"] .btn-primary {
  background: var(--brand-gradient);
  color: var(--brand-ink);
}

.btn-accent {
  background: var(--brand-gradient);
  color: var(--brand-ink);
}

.btn-danger {
  background: #ffe3df;
  color: var(--danger);
}

:root[data-theme="dark"] .btn-danger {
  background: rgba(255, 135, 135, 0.14);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-google {
  background: linear-gradient(135deg, var(--surface), rgba(255, 197, 51, 0.1));
  border: 1px solid var(--brand-line);
  color: var(--ink);
}

.google-g {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-ink);
  font-weight: 900;
  background: var(--brand-gradient);
}

:root[data-theme="dark"] .google-g {
  background: var(--brand-gradient);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-soft), rgba(255, 79, 61, 0.1));
  color: var(--brand-coral);
  border: 1px solid var(--brand-line);
  box-shadow: 0 8px 18px rgba(255, 103, 49, 0.12);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.3;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.topbar-title {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-btn-danger {
  color: var(--danger);
  background: rgba(255, 135, 135, 0.12);
  border-color: rgba(255, 135, 135, 0.34);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border: 2px solid var(--surface);
}

.avatar-logo {
  background: var(--surface);
  border-color: var(--brand-orange);
  padding: 2px;
  box-shadow: 0 7px 16px rgba(255, 103, 49, 0.22);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  margin-left: -9px;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 18px;
}

.metric {
  min-height: 78px;
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  align-content: space-between;
}

.metric strong {
  font-size: 22px;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.list-grid {
  display: grid;
  gap: 12px;
}

.wishlist-card,
.item-card,
.profile-card {
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(23, 59, 63, 0.06);
}

.wishlist-card {
  width: 100%;
  text-align: left;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.wishlist-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.wishlist-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.wishlist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chip.teal {
  background: rgba(23, 163, 152, 0.12);
  color: var(--teal-deep);
}

:root[data-theme="dark"] .chip.teal {
  background: rgba(39, 198, 184, 0.16);
  color: #8ff1e8;
}

.chip.coral {
  background: rgba(228, 87, 46, 0.13);
  color: #9c341b;
}

:root[data-theme="dark"] .chip.coral {
  background: rgba(255, 138, 102, 0.16);
  color: #ffb199;
}

.chip.yellow {
  background: rgba(242, 193, 78, 0.24);
  color: #72520b;
}

:root[data-theme="dark"] .chip.yellow {
  background: rgba(255, 209, 102, 0.18);
  color: #ffe39b;
}

.chip.green {
  background: rgba(47, 158, 68, 0.13);
  color: var(--green);
}

:root[data-theme="dark"] .chip.green {
  background: rgba(105, 219, 124, 0.15);
  color: #a9f2b4;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e8eee9;
  overflow: hidden;
}

:root[data-theme="dark"] .progress {
  background: #273436;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--brand-gradient);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
}

.detail-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-actions,
.row-actions,
.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
  margin: 14px 0;
}

.tab {
  min-height: 38px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(23, 59, 63, 0.08);
}

.item-card {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--brand-gradient) border-box;
  box-shadow: 0 10px 26px rgba(255, 103, 49, 0.08);
  overflow: hidden;
}

.item-media {
  height: 168px;
  background: var(--surface-soft);
  position: relative;
}

.item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-body {
  padding: 13px;
  display: grid;
  gap: 11px;
}

.item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.price {
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.item-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.item-actions .btn {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.product-link-button {
  margin-left: auto;
  color: var(--teal-deep);
  background: rgba(23, 163, 152, 0.12);
}

.product-link-button svg {
  width: 18px;
  height: 18px;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 12px;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--brand-gradient);
  opacity: 0.72;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 480px);
  transform: translateX(-50%);
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: rgba(247, 249, 246, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

:root[data-theme="dark"] .bottom-nav {
  background: rgba(15, 21, 22, 0.94);
}

.nav-btn {
  min-height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  color: var(--brand-orange);
  stroke-width: 2.25;
}

.nav-btn.active {
  background: var(--brand-gradient);
  color: var(--brand-ink);
  box-shadow: 0 8px 20px rgba(255, 103, 49, 0.2);
}

.nav-btn.active svg {
  color: var(--brand-ink);
}

.fab {
  position: fixed;
  right: max(18px, calc((100vw - 480px) / 2 + 18px));
  bottom: calc(86px + var(--safe-bottom));
  z-index: 25;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--brand-gradient);
  color: var(--brand-ink);
  box-shadow: 0 16px 34px rgba(255, 103, 49, 0.28);
}

.fab svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.6;
}

.fab:active {
  transform: scale(0.97);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(17, 29, 33, 0.42);
  padding: 18px 12px calc(18px + var(--safe-bottom) + var(--keyboard-inset));
}

.modal {
  width: min(100%, 480px);
  max-height: min(88dvh, 720px);
  margin: 0 auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 19px;
}

.modal-body {
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding: 90px 0 190px;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.form-grid {
  display: grid;
  gap: 13px;
  padding-bottom: 10px;
}

.modal-body .form-grid {
  padding-bottom: calc(28px + var(--safe-bottom));
}

.modal-body .form-grid::after {
  content: "";
  display: block;
  height: 6px;
}

.two-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 197, 51, 0.1), rgba(255, 79, 61, 0.08));
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 3px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.switch-track span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch-row input:checked + .switch-track {
  border-color: transparent;
  background: var(--brand-gradient);
}

.switch-row input:checked + .switch-track span {
  transform: translateX(20px);
  background: var(--brand-ink);
}

.switch-row input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.22);
}

.switch-copy {
  display: grid;
  gap: 3px;
}

.switch-copy strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.switch-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .modal-backdrop {
    align-items: stretch;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(10px + var(--safe-bottom));
  }

  .modal {
    height: min(calc(var(--visual-height) - 20px - var(--safe-bottom)), 720px);
    max-height: min(calc(var(--visual-height) - 20px - var(--safe-bottom)), 720px);
    align-self: stretch;
  }

  .keyboard-active .modal-backdrop {
    align-items: start;
  }

  .keyboard-active .modal {
    height: min(calc(var(--visual-height) - 12px), 720px);
    max-height: min(calc(var(--visual-height) - 12px), 720px);
  }

  .keyboard-active.keyboard-fallback .modal {
    height: min(62dvh, 520px);
    max-height: min(62dvh, 520px);
  }

  .keyboard-active .modal-body {
    padding-bottom: calc(30px + var(--safe-bottom));
    scroll-padding-bottom: calc(220px + var(--safe-bottom) + var(--keyboard-inset));
  }

  .keyboard-active .modal-body .form-grid {
    padding-bottom: calc(86px + var(--safe-bottom) + var(--keyboard-inset));
  }

  .textarea {
    min-height: 128px;
  }
}

.share-box {
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.share-url {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.member-list,
.activity-list {
  display: grid;
  gap: 8px;
}

.member-row,
.activity-row {
  border-radius: 8px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.member-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.member-main strong,
.member-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-main span,
.activity-row span {
  color: var(--muted);
  font-size: 12px;
}

.member-row {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface-soft), var(--surface-soft)) padding-box,
    var(--brand-gradient) border-box;
  box-shadow: 0 8px 20px rgba(255, 103, 49, 0.08);
}

.profile-card {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.profile-product-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.profile-product-button {
  min-height: 68px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--brand-gradient) border-box;
  box-shadow: 0 10px 26px rgba(255, 103, 49, 0.08);
}

.profile-product-button span {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  color: var(--brand-ink);
}

.profile-product-button svg {
  width: 20px;
  height: 20px;
}

.profile-product-button strong {
  font-size: 15px;
}

.profile-product-button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.profile-product-list {
  display: grid;
  gap: 12px;
}

.profile-product-card {
  border: 1px solid transparent;
  border-radius: 8px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--brand-gradient) border-box;
  box-shadow: 0 10px 26px rgba(255, 103, 49, 0.08);
  overflow: hidden;
}

.profile-product-media {
  height: 118px;
  background: var(--surface-soft);
}

.profile-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-product-body {
  padding: 13px;
  display: grid;
  gap: 11px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-row > div {
  min-width: 0;
  flex: 1;
}

.profile-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  border: 2px solid var(--brand-orange);
  box-shadow: 0 8px 18px rgba(255, 103, 49, 0.18);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + var(--safe-bottom));
  z-index: 60;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 452px);
  border-radius: 8px;
  background: var(--brand-gradient);
  color: var(--brand-ink);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.file-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.sync-banner {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 12px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.sync-banner strong {
  color: var(--ink);
}

.sync-banner.online {
  border-color: rgba(23, 163, 152, 0.38);
  background: rgba(23, 163, 152, 0.1);
}

.sync-banner.linked {
  border-color: rgba(242, 193, 78, 0.45);
  background: rgba(242, 193, 78, 0.13);
  color: var(--ink);
  margin-bottom: 14px;
}

.sync-banner.alert {
  border-color: rgba(228, 87, 46, 0.45);
  background: rgba(228, 87, 46, 0.1);
  color: var(--ink);
  margin-bottom: 14px;
}

.profile-section {
  display: grid;
  gap: 8px;
}

.section-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.segment {
  min-height: 42px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.segment svg {
  width: 18px;
  height: 18px;
}

.segment.active {
  background: var(--brand-gradient);
  color: var(--brand-ink);
  box-shadow: 0 6px 16px rgba(255, 103, 49, 0.16);
}

.segment.active svg {
  color: var(--brand-ink);
}

.readonly-user {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--brand-gradient) border-box;
  box-shadow: 0 8px 20px rgba(255, 103, 49, 0.08);
}

.members-block {
  margin-top: 16px;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-logo img {
  object-fit: contain;
  background: var(--surface);
  padding: 1px;
}

@media (min-width: 760px) {
  body,
  .page-shell {
    background:
      linear-gradient(90deg, rgba(23, 163, 152, 0.08), transparent 28%, transparent 72%, rgba(228, 87, 46, 0.07)),
      var(--bg);
  }

  .app-frame {
    height: calc(100dvh - 24px);
    min-height: 0;
    margin-top: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
  }

  .screen,
  .login-screen {
    height: calc(100dvh - 24px);
    min-height: 0;
  }
}
