:root {
  --ui-bg: #fff8ef;
  --ui-surface: #ffffff;
  --ui-surface-soft: #fff0e1;
  --ui-ink: #30241d;
  --ui-muted: #7c695d;
  --ui-line: #ecd9ca;
  --ui-teal: #f28a2e;
  --ui-teal-dark: #c95020;
  --ui-mint: #ffd7b3;
  --ui-mint-light: #fff0df;
  --ui-orange: #ef573f;
  --ui-reserved: #ffe3cf;
  --ui-reserved-ink: #ad481f;
  --ui-bought: #f4e5dd;
  --ui-bought-ink: #80513f;
  --ui-shadow: 0 24px 70px rgba(112, 63, 28, 0.13);
  --ui-shadow-hover: 0 20px 46px rgba(112, 63, 28, 0.18);
  --bg: #fff8ef;
  --surface: #ffffff;
  --surface-soft: #fff0e1;
  --ink: #30241d;
  --muted: #7c695d;
  --line: #ecd9ca;
  --teal: #f28a2e;
  --teal-deep: #c95020;
}

:root[data-theme="dark"] {
  --ui-bg: #17110d;
  --ui-surface: #211914;
  --ui-surface-soft: #34241b;
  --ui-ink: #fff4e9;
  --ui-muted: #c2aa99;
  --ui-line: #493427;
  --ui-teal: #ff9a43;
  --ui-teal-dark: #ffc078;
  --ui-mint: #5a321d;
  --ui-mint-light: #3c281c;
  --ui-orange: #ff8b65;
  --ui-reserved: #54301d;
  --ui-reserved-ink: #ffd39c;
  --ui-bought: #493025;
  --ui-bought-ink: #ffd1bc;
  --ui-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --ui-shadow-hover: 0 20px 46px rgba(0, 0, 0, 0.42);
  --bg: #17110d;
  --surface: #211914;
  --surface-soft: #34241b;
  --ink: #fff4e9;
  --muted: #c2aa99;
  --line: #493427;
  --teal: #ff9a43;
  --teal-deep: #ffc078;
}

html,
body {
  background: var(--ui-bg);
  color: var(--ui-ink);
}

.preview-ribbon {
  position: fixed;
  z-index: 100;
  right: auto;
  bottom: 12px;
  left: 12px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(23, 48, 52, 0.88);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  backdrop-filter: blur(14px);
  pointer-events: none;
  animation: preview-ribbon-hide 0.35s ease 4s forwards;
}

@keyframes preview-ribbon-hide {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.page-shell {
  display: block;
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 215, 179, 0.72), transparent 25rem),
    radial-gradient(circle at 90% 88%, rgba(239, 87, 63, 0.1), transparent 28rem),
    var(--ui-bg);
}

#app,
.app-frame {
  width: 100%;
  max-width: none;
}

.app-frame {
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

.app-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 366px;
  grid-template-rows: 88px minmax(0, 1fr);
  min-height: 100dvh;
}

.desktop-sidebar {
  grid-column: 1 / -1;
  grid-row: 1;
}

.workspace-main {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  height: calc(100dvh - 88px);
  overflow: hidden;
}

.desktop-rail {
  grid-column: 2;
  grid-row: 2;
}

.app-header {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 30px;
  border-bottom: 1px solid rgba(242, 138, 46, 0.18);
  background: rgba(255, 248, 239, 0.88);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .app-header {
  background: rgba(23, 17, 13, 0.92);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
}

.sidebar-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.sidebar-brand div,
.sidebar-user div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.sidebar-brand strong {
  color: var(--ui-ink);
  font-size: 18px;
  line-height: 1.1;
}

.sidebar-brand span,
.sidebar-user span {
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 5px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: var(--ui-surface);
}

.sidebar-nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 999px;
  background: transparent;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-nav button svg {
  width: 17px;
  height: 17px;
}

.sidebar-nav button:hover {
  color: var(--ui-teal-dark);
  background: var(--ui-surface-soft);
}

.sidebar-nav button.active {
  color: var(--ui-teal-dark);
  background: var(--ui-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(242, 138, 46, 0.12);
}

.sidebar-create {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid rgba(255, 196, 61, 0.46);
  background: linear-gradient(115deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #382116;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(239, 87, 63, 0.24);
}

.sidebar-create:hover {
  background: linear-gradient(115deg, #ffe07e, #ffaa45 55%, #f67457);
  color: #382116;
  transform: translateY(-1px);
}

.sidebar-create svg {
  width: 17px;
  height: 17px;
}

.sidebar-user {
  min-width: 168px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 18px;
  border-left: 1px solid var(--ui-line);
}

.sidebar-user strong {
  overflow: hidden;
  color: var(--ui-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user > button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-left: auto;
  border-radius: 50%;
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
}

.sidebar-user > button svg {
  width: 16px;
  height: 16px;
}

.workspace-main .screen {
  height: calc(100dvh - 88px);
  overflow-x: hidden;
  padding: 38px clamp(28px, 4vw, 66px) 60px;
  background: transparent;
}

.workspace-main .topbar {
  align-items: flex-end;
  margin-bottom: 24px;
}

.workspace-main .eyebrow,
.sheet-eyebrow,
.rail-label,
.ad-label {
  color: var(--ui-teal-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workspace-main .page-title {
  color: var(--ui-ink);
  font-size: clamp(31px, 4vw, 50px);
  letter-spacing: -0.05em;
}

.workspace-main .subtitle {
  color: var(--ui-muted);
}

.workspace-main .avatar {
  background: var(--ui-teal);
}

.sidebar-user > .avatar,
.list-members > .avatar,
.member-main > .avatar {
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  border: 2px solid var(--ui-surface);
  padding: 0;
  font-size: 13px;
  line-height: 1;
}

.sidebar-user > .avatar-logo,
.list-members > .avatar-logo,
.member-main > .avatar-logo {
  border-color: transparent;
  background: transparent !important;
  box-shadow: none;
}

.sidebar-user > .avatar img,
.list-members > .avatar img,
.member-main > .avatar img {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.sidebar-user > .avatar-logo img,
.list-members > .avatar-logo img,
.member-main > .avatar-logo img {
  padding: 0;
  background: transparent;
  object-fit: contain;
}

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

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

.summary-grid {
  max-width: 720px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.workspace-main .metric {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 17px;
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
}

:root[data-theme="dark"] .workspace-main .metric {
  background: rgba(23, 33, 35, 0.72);
}

.workspace-main .metric strong {
  color: var(--ui-ink);
  font-size: 25px;
}

.workspace-main .metric span {
  color: var(--ui-muted);
}

.list-sheet,
.product-sheet,
.profile-card,
.profile-product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(242, 138, 46, 0.22);
  border-radius: 28px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.list-sheet,
.product-sheet {
  padding: 28px 30px;
}

.mint-corner::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 210px;
  height: 210px;
  top: -125px;
  right: -74px;
  border-radius: 50%;
  background: var(--ui-mint);
  pointer-events: none;
}

.sheet-heading,
.product-sheet-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 0 24px;
}

.sheet-heading h2 {
  margin: 8px 0 0;
  color: var(--ui-ink);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.sheet-count {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--ui-mint-light);
  color: var(--ui-teal-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.workspace-main .list-grid {
  position: relative;
  z-index: 1;
  display: block;
}

.wishlist-card {
  width: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 12px;
  border: 0;
  border-top: 1px solid var(--ui-line);
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: var(--ui-ink);
  text-align: left;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.wishlist-card:hover {
  z-index: 2;
  transform: translateY(-3px) scale(1.006);
  border-color: transparent;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-hover);
}

.wishlist-card:hover + .wishlist-card {
  border-color: transparent;
}

.list-number,
.item-number,
.preview-number {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
  font-size: 17px;
  font-weight: 900;
}

.wishlist-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.wishlist-title {
  overflow: hidden;
  margin: 0;
  color: var(--ui-ink);
  font-size: 19px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wishlist-meta {
  margin-top: 7px;
}

.chip,
.status-pill {
  min-height: 24px;
  padding: 0 8px;
  background: var(--ui-surface-soft);
  color: var(--ui-muted);
  font-size: 10px;
}

.chip.teal {
  background: #fff0df;
  color: #a94b17;
}

:root[data-theme="dark"] .chip.teal {
  background: #4b2e1d;
  color: #ffc27c;
}

.chip.yellow {
  background: #fff5db;
  color: #806319;
}

:root[data-theme="dark"] .chip.yellow {
  background: #493f25;
  color: #ffe39c;
}

.list-members {
  flex: 0 0 auto;
}

.list-card-side {
  min-width: 185px;
  display: grid;
  grid-template-columns: auto auto 34px;
  align-items: center;
  justify-content: end;
  gap: 13px;
}

.state-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.state-pill.available,
.available {
  background: #fff0df;
  color: #a94b17;
}

.state-pill.reserved,
.reserved {
  background: var(--ui-reserved);
  color: var(--ui-reserved-ink);
}

.state-pill.bought,
.bought {
  background: var(--ui-bought);
  color: var(--ui-bought-ink);
}

:root[data-theme="dark"] .state-pill.available,
:root[data-theme="dark"] .available {
  background: #4b2e1d;
  color: #ffc27c;
}

.list-total {
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.list-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
  transition: transform 0.18s ease, background 0.18s ease;
}

.list-arrow svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.wishlist-card:hover .list-arrow {
  transform: translateX(3px);
  background: var(--ui-mint);
}

.detail-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
}

:root[data-theme="dark"] .detail-summary {
  background: rgba(23, 33, 35, 0.62);
}

.detail-summary .subtitle {
  flex: 1 1 100%;
  margin-bottom: 0;
}

.detail-summary .wishlist-meta,
.detail-summary .hero-actions {
  margin: 0;
}

.product-sheet .tabs {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 0 10px;
  padding: 5px;
  border-radius: 999px;
  background: var(--ui-surface-soft);
}

.product-sheet .tab {
  border-radius: 999px;
  color: var(--ui-muted);
}

.product-sheet .tab.active {
  color: var(--ui-teal-dark);
  background: var(--ui-surface);
}

.item-card {
  position: relative;
  width: 100%;
  min-height: 120px;
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 20px 12px;
  border: 0;
  border-top: 1px solid var(--ui-line);
  border-radius: 17px;
  background: transparent;
  box-shadow: none;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.item-card:hover {
  z-index: 2;
  transform: translateY(-3px) scale(1.004);
  border-color: transparent;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-hover);
}

.item-card:hover + .item-card {
  border-color: transparent;
}

.item-media {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 17px;
  background: var(--ui-surface-soft);
}

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

.item-media-empty {
  display: grid;
  place-items: center;
  color: var(--ui-teal-dark);
}

.item-media-empty svg {
  width: 25px;
  height: 25px;
}

.item-body {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 0;
}

.item-title-row {
  align-items: center;
}

.item-title {
  margin: 0;
  color: var(--ui-ink);
  font-size: 18px;
}

.item-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  color: var(--ui-muted);
  font-size: 12px;
}

.item-secondary .price {
  color: var(--ui-muted);
  font-weight: 700;
}

.item-author {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(242, 138, 46, 0.2);
  border-radius: 999px;
  background: rgba(255, 138, 43, 0.1);
  color: var(--ui-ink);
  font-size: 11px;
  font-weight: 800;
}

.item-author svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--ui-orange);
}

.item-author span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-author strong {
  color: var(--ui-orange);
}

.item-note {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
}

.item-actions {
  gap: 7px;
}

.item-actions .btn {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 11px;
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
  font-size: 10px;
  box-shadow: none;
}

.item-actions .btn-accent {
  border-color: rgba(255, 196, 61, 0.4);
  background: linear-gradient(115deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #382116;
  box-shadow: 0 8px 20px rgba(239, 87, 63, 0.18);
}

.item-actions .btn-danger {
  background: rgba(231, 91, 50, 0.1);
  color: var(--ui-orange);
}

.item-actions .product-link-button {
  margin-left: 0;
}

.section-divider {
  margin: 28px 0 14px;
  color: var(--ui-teal-dark);
}

.member-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-list-manageable {
  grid-template-columns: 1fr;
}

.member-row {
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: var(--ui-surface);
  box-shadow: none;
}

.member-management {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.member-menu-mobile {
  display: none;
}

.member-management .member-action {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 13px;
  font-size: 11px;
}

.member-management .member-admin-action {
  border-color: transparent;
  background: linear-gradient(115deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #382116;
  box-shadow: 0 8px 20px rgba(239, 87, 63, 0.18);
}

.member-management .member-admin-action.is-admin {
  border-color: transparent;
  background: linear-gradient(115deg, #ffc43d, #ff812b 55%, #ef573f);
  color: #382116;
}

.member-management .member-admin-action:hover,
.member-management .member-admin-action.is-admin:hover {
  background: linear-gradient(115deg, #ffe07e, #ffaa45 55%, #f67457);
  color: #382116;
}

.member-management .member-remove-action {
  border-color: rgba(231, 91, 50, 0.18);
  background: rgba(231, 91, 50, 0.08);
  color: var(--ui-orange);
}

.list-permissions-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(420px, 1.15fr);
  align-items: center;
  gap: 22px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(242, 138, 46, 0.24);
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(255, 244, 223, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 32px rgba(112, 63, 28, 0.06);
}

:root[data-theme="dark"] .list-permissions-panel {
  background: linear-gradient(120deg, #34241b, #211914);
}

.list-permissions-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.list-permissions-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffc43d, #ef573f);
  color: #2f2119;
}

.list-permissions-icon svg {
  width: 22px;
  height: 22px;
}

.list-permissions-copy h2 {
  margin: 3px 0 4px;
  color: var(--ui-ink);
  font-size: 17px;
}

.list-permissions-copy p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
}

.permission-toggle {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--ui-line);
  border-radius: 17px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.permission-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 138, 46, 0.46);
  box-shadow: 0 10px 26px rgba(112, 63, 28, 0.09);
}

.permission-toggle.is-on .switch-track {
  border-color: transparent;
  background: linear-gradient(135deg, #ffc43d, #ef573f);
}

.permission-toggle.is-on .switch-track span {
  transform: translateX(20px);
  background: #2f2119;
}

.permission-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.permission-toggle-copy strong {
  color: var(--ui-ink);
  font-size: 13px;
}

.permission-toggle-copy small {
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.4;
}

.modal .list-permissions-panel {
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 0;
  padding: 16px;
}

.modal .member-management {
  width: 100%;
}

.modal .member-management .member-action {
  flex: 1 1 180px;
}

.profile-dashboard {
  width: 100%;
  max-width: 1180px;
  display: grid;
  gap: 14px;
}

.workspace-main .profile-screen {
  padding-top: 24px;
  padding-bottom: 22px;
}

.workspace-main .profile-screen .topbar {
  margin-bottom: 14px;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 30px;
  padding: 22px 28px;
  border: 1px solid rgba(242, 138, 46, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(255, 240, 225, 0.92), rgba(255, 255, 255, 0.96)),
    var(--ui-surface);
  box-shadow: 0 16px 44px rgba(112, 63, 28, 0.08);
}

:root[data-theme="dark"] .profile-hero {
  background: linear-gradient(120deg, #34241b, #211914);
}

.orange-corner::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  top: -150px;
  right: -62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd16f, #ff7349);
  opacity: 0.72;
  pointer-events: none;
}

.profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-identity .avatar {
  width: 66px;
  height: 66px;
  font-size: 20px;
  border: 5px solid #fff;
  box-shadow: 0 12px 28px rgba(239, 87, 63, 0.16);
  background: linear-gradient(135deg, #ffc43d, #ef573f) !important;
}

.profile-identity .avatar-logo {
  border-color: transparent;
  background: transparent !important;
  box-shadow: none;
}

.profile-identity .avatar-logo img {
  padding: 0;
  background: transparent;
}

.profile-identity h2 {
  margin: 4px 0;
  color: var(--ui-ink);
  font-size: 28px;
  letter-spacing: -0.035em;
}

.profile-identity p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
}

.profile-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 130px);
  gap: 10px;
}

.profile-hero-stats button {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(242, 138, 46, 0.16);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ui-ink);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

:root[data-theme="dark"] .profile-hero-stats button {
  background: rgba(33, 25, 20, 0.78);
}

.profile-hero-stats button:hover {
  transform: translateY(-3px);
  box-shadow: var(--ui-shadow-hover);
}

.profile-hero-stats strong {
  font-size: 25px;
}

.profile-hero-stats span {
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 800;
}

.profile-hero .profile-logo {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  margin-right: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.profile-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--ui-line);
  border-radius: 22px;
  background: var(--ui-surface);
  box-shadow: 0 12px 32px rgba(112, 63, 28, 0.06);
}

.profile-panel-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-panel-heading h3 {
  margin: 3px 0 0;
  color: var(--ui-ink);
  font-size: 17px;
}

.sidebar-user > .avatar {
  background: linear-gradient(135deg, #ffc43d, #ef573f) !important;
}

.profile-panel-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd36d, #ff754b);
  color: #3b2517;
}

.profile-panel-icon svg {
  width: 19px;
  height: 19px;
}

.profile-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.profile-inline-form .btn {
  min-width: 155px;
}

.profile-secondary-action {
  justify-self: start;
}

.profile-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-quick-actions > button {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: var(--ui-bg);
  color: var(--ui-ink);
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-quick-actions > button:hover {
  transform: translateY(-3px);
  box-shadow: var(--ui-shadow-hover);
}

.profile-quick-actions > button > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
}

.profile-quick-actions > button svg {
  width: 17px;
  height: 17px;
}

.profile-quick-actions > button > svg {
  transform: rotate(180deg);
  color: var(--ui-teal-dark);
}

.profile-quick-actions div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-quick-actions strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-quick-actions small {
  color: var(--ui-muted);
  font-size: 10px;
}

.profile-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-account-actions .btn-danger {
  grid-column: 1 / -1;
}

.profile-product-list {
  max-width: 980px;
}

.profile-product-button {
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-product-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--ui-shadow-hover);
}

.profile-product-button span {
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
}

.profile-product-card {
  padding: 16px;
}

.workspace-main .btn,
.workspace-main .input,
.workspace-main .select,
.workspace-main .textarea,
.workspace-main .icon-btn {
  border-radius: 13px;
}

.workspace-main .btn-primary,
.modal .btn-primary {
  background: linear-gradient(115deg, #ffc43d, #ff8a2b 52%, #ef573f);
  color: #382116;
  box-shadow: 0 12px 28px rgba(239, 87, 63, 0.2);
}

.workspace-main .btn-primary:hover,
.modal .btn-primary:hover {
  background: linear-gradient(115deg, #ffd05d, #ff9841 52%, #f36a51);
}

.workspace-main .icon-btn {
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-teal-dark);
  box-shadow: none;
}

.workspace-main .icon-btn-invite-lock.unlocked {
  border-color: rgba(255, 196, 61, 0.42);
  background: linear-gradient(135deg, rgba(255, 212, 95, 0.22), rgba(255, 122, 66, 0.14));
  color: var(--ui-coral);
}

.workspace-main .icon-btn-invite-lock.locked {
  border-color: rgba(211, 47, 47, 0.25);
  background: rgba(211, 47, 47, 0.08);
  color: #d84a2f;
}

.empty-state {
  min-height: 220px;
  border-color: var(--ui-line);
  border-radius: 18px;
  background: var(--ui-surface-soft);
}

.fab {
  right: 394px;
  bottom: 28px;
  border-color: rgba(255, 196, 61, 0.5);
  background: linear-gradient(135deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #382116;
  box-shadow: 0 16px 34px rgba(239, 87, 63, 0.28);
}

.desktop-rail {
  height: calc(100dvh - 88px);
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 38px 28px 32px 0;
}

.rail-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(242, 138, 46, 0.2);
  border-radius: 22px;
  background: var(--ui-surface);
  box-shadow: 0 12px 36px rgba(112, 63, 28, 0.07);
}

.rail-card h2,
.rail-card h3 {
  position: relative;
  z-index: 1;
  color: var(--ui-ink);
}

.rail-card p {
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.55;
}

.rail-overview {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 18px;
}

.rail-overview .rail-label {
  position: relative;
  z-index: 1;
}

.rail-overview h2 {
  margin: 7px 0 18px;
  font-size: 24px;
  line-height: 1.12;
}

.rail-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  width: 100%;
  margin-top: auto;
}

.rail-stats div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 11px 4px;
  border-radius: 14px;
  background: var(--ui-surface-soft);
  text-align: center;
}

.rail-stats strong {
  color: var(--ui-ink);
  font-size: 19px;
  line-height: 1.1;
}

.rail-stats span {
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.ad-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
  justify-items: center;
}

.ad-card .ad-label {
  display: block;
  justify-self: stretch;
  margin: 0 2px;
  color: var(--ui-muted);
}

.listonoszek-ad-unit {
  width: min(100%, 300px) !important;
  height: 250px !important;
  min-width: 0 !important;
  min-height: 250px !important;
  max-width: 300px;
  max-height: 250px;
  margin: 0 auto;
  border-radius: 17px;
  border: 1px dashed rgba(242, 138, 46, 0.28);
  background:
    radial-gradient(circle at 100% 0, rgba(242, 138, 46, 0.18) 0 70px, transparent 72px),
    var(--ui-surface-soft);
  overflow: hidden;
}

.listonoszek-ad-unit iframe {
  width: 100% !important;
  max-width: 300px !important;
  max-height: 250px !important;
}

:root[data-theme="dark"] .listonoszek-ad-unit {
  background:
    radial-gradient(circle at 100% 0, rgba(242, 138, 46, 0.22) 0 70px, transparent 72px),
    #140d09;
}

.ad-preview-visual {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  justify-self: center;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed rgba(242, 138, 46, 0.34);
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0, var(--ui-mint) 0 74px, transparent 75px),
    var(--ui-bg);
  color: var(--ui-ink);
  text-align: center;
}

.ad-preview-visual span {
  color: var(--ui-teal-dark);
  font-size: 10px;
  font-weight: 900;
}

.ad-preview-visual strong {
  font-size: 14px;
}

.ad-preview-visual small {
  display: block;
  max-width: 230px;
  margin: 0 auto;
  color: var(--ui-muted);
  line-height: 1.45;
}

.rail-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 800;
}

.bottom-nav {
  display: none;
}

.modal-backdrop {
  background: rgba(58, 37, 24, 0.38);
  backdrop-filter: blur(7px);
  align-items: center;
  padding: 28px;
}

.modal {
  border: 1px solid rgba(242, 138, 46, 0.22);
  border-radius: 24px;
  background: var(--ui-surface);
}

.modal-header {
  border-color: var(--ui-line);
  padding: 18px 20px;
}

.modal-body {
  padding: 20px;
}

.modal-add-item,
.modal-edit-item {
  width: min(calc(100vw - 72px), 1160px);
  max-height: min(calc(100dvh - 56px), 840px);
  grid-template-rows: auto minmax(0, 1fr);
}

.modal-add-item .modal-header,
.modal-edit-item .modal-header {
  padding: 24px 30px;
}

.modal-add-item .modal-header h2,
.modal-edit-item .modal-header h2 {
  font-size: clamp(24px, 2vw, 30px);
}

.product-modal-body {
  overflow-y: auto;
  padding: 28px 30px 30px;
}

.product-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(130px, 0.42fr) minmax(130px, 0.42fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 18px 20px;
}

.product-form-grid .field {
  gap: 8px;
  min-width: 0;
}

.product-form-grid .input,
.product-form-grid .textarea {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 15px 17px;
  font-size: 15px;
}

.product-field-title {
  grid-column: 1 / 3;
}

.product-field-link {
  grid-column: 3 / -1;
}

.product-field-price {
  grid-column: 1 / 2;
}

.product-field-quantity {
  grid-column: 2 / 3;
}

.product-field-image-url {
  grid-column: 3 / -1;
}

.product-field-file {
  grid-column: 1 / 3;
}

.product-field-note {
  grid-column: 3 / -1;
}

.product-field-note .textarea {
  min-height: 134px;
}

.product-field-file input[type="file"] {
  min-height: 66px;
  padding: 13px 14px;
}

.product-field-file input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(115deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #2f1d14;
  font-weight: 900;
  padding: 10px 13px;
  cursor: pointer;
}

.product-form-help {
  grid-column: 1 / 3;
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid rgba(242, 138, 46, 0.22);
  border-radius: 18px;
  background: linear-gradient(120deg, #fff4df, #fff0e8);
}

:root[data-theme="dark"] .product-form-help {
  background: linear-gradient(120deg, #3d291b, #35231d);
}

.product-form-help-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffd16b, #ff764b);
  color: #3b2517;
}

.product-form-help-icon svg {
  width: 22px;
  height: 22px;
}

.product-form-help strong {
  color: var(--ui-ink);
  font-size: 15px;
}

.product-form-help p {
  margin: 5px 0 0;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.45;
}

.product-form-actions {
  grid-column: 3 / -1;
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1.2fr);
  align-items: stretch;
  gap: 12px;
}

.product-form-actions .btn {
  min-width: 0;
  min-height: 70px;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  padding: 14px 16px;
}

.input,
.select,
.textarea {
  border-color: var(--ui-line);
  border-radius: 13px;
  background: var(--ui-surface);
  color: var(--ui-ink);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--ui-teal);
  box-shadow: 0 0 0 3px rgba(242, 138, 46, 0.15);
}

.switch-row,
.share-box {
  border-color: var(--ui-line);
  border-radius: 16px;
  background: var(--ui-surface-soft);
}

.modal-share,
.modal-join-code,
.modal-scan-invite {
  width: min(calc(100vw - 72px), 940px);
  max-height: min(calc(100dvh - 56px), 820px);
}

.invite-share-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  overflow: hidden;
}

.invite-share-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.invite-share-copy h3 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 0.95;
}

.invite-share-copy p {
  max-width: 56ch;
  margin: 0;
  color: var(--ui-muted);
  line-height: 1.55;
}

.invite-lock-status {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(242, 138, 46, 0.22);
  background: rgba(255, 248, 239, 0.72);
  color: var(--ui-muted);
  font-weight: 850;
  line-height: 1.35;
}

.invite-lock-status svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.invite-lock-status.unlocked {
  border-color: rgba(255, 196, 61, 0.36);
  background: rgba(255, 212, 95, 0.16);
  color: var(--ui-coral);
}

.invite-lock-status.locked {
  border-color: rgba(216, 74, 47, 0.26);
  background: rgba(216, 74, 47, 0.08);
  color: #d84a2f;
}

.invite-code-display {
  width: fit-content;
  padding: 12px 18px;
  border: 1px solid rgba(242, 138, 46, 0.35);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 208, 93, 0.22), rgba(255, 152, 65, 0.16));
  color: var(--ui-ink);
  font-size: clamp(28px, 4.6vw, 52px);
  font-weight: 950;
  letter-spacing: 0.16em;
  line-height: 1;
}

.invite-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.invite-share-actions .btn {
  min-height: 48px;
}

.invite-qr-card {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 18px;
  border: 1px dashed rgba(242, 138, 46, 0.45);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 163, 83, 0.26) 0 70px, transparent 72px),
    rgba(255, 248, 239, 0.78);
}

.invite-share-box.locked .invite-qr-card {
  opacity: 0.58;
  filter: grayscale(0.35);
}

.invite-share-box.locked .invite-code-display {
  opacity: 0.68;
}

:root[data-theme="dark"] .invite-qr-card {
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 163, 83, 0.22) 0 70px, transparent 72px),
    rgba(255, 248, 239, 0.08);
}

.invite-qr-svg {
  width: min(100%, 250px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(112, 63, 28, 0.16);
}

.join-code-form {
  gap: 18px;
}

.invite-code-input {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 900;
  text-align: center;
}

.qr-help-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(242, 138, 46, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 208, 93, 0.16), rgba(255, 152, 65, 0.08));
}

.qr-help-card > span {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #382116;
}

.qr-help-card svg {
  width: 22px;
  height: 22px;
}

.qr-help-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.qr-help-card p {
  margin: 0;
  color: var(--ui-muted);
  line-height: 1.45;
}

.qr-scan-panel {
  display: grid;
  gap: 16px;
}

.qr-video-frame {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid rgba(242, 138, 46, 0.28);
  border-radius: 24px;
  background: #120c08;
}

.qr-video-frame video {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.qr-video-disabled {
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ui-surface-soft);
}

.qr-video-disabled p {
  max-width: 38ch;
  margin: 0;
  text-align: center;
  color: var(--ui-muted);
}

.qr-corners::before,
.qr-corners::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 3px solid rgba(255, 190, 72, 0.94);
  border-radius: 22px;
  pointer-events: none;
}

.qr-corners::after {
  inset: 52px;
  border-color: rgba(255, 255, 255, 0.22);
}

.qr-gallery-picker {
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 16px;
  border: 1px dashed rgba(242, 138, 46, 0.38);
  border-radius: 18px;
  background: var(--ui-surface-soft);
  color: var(--ui-ink);
  font-weight: 900;
}

.qr-gallery-picker svg {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  color: var(--ui-coral);
}

.qr-gallery-picker small {
  color: var(--ui-muted);
  font-weight: 700;
}

.qr-gallery-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.invite-fab-stack {
  position: fixed;
  right: 394px;
  bottom: 28px;
  z-index: 35;
  display: grid;
  justify-items: center;
  gap: 12px;
  pointer-events: none;
}

.invite-main-fab {
  position: static;
  pointer-events: auto;
}

.invite-fab-options {
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.invite-fab-stack.open .invite-fab-options {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.invite-mini-fab {
  position: relative;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 196, 61, 0.5);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff3df, #ffd45f 46%, #ff7a42);
  color: #382116;
  box-shadow: 0 14px 28px rgba(239, 87, 63, 0.24);
  cursor: pointer;
}

.invite-mini-fab svg {
  width: 24px;
  height: 24px;
}

.invite-mini-fab span {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  border: 1px solid rgba(242, 138, 46, 0.2);
  border-radius: 999px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  white-space: nowrap;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(112, 63, 28, 0.12);
}

.preview-login {
  width: min(1180px, calc(100% - 64px));
  height: min(760px, calc(100dvh - 72px));
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-content: stretch;
  margin: 36px auto;
  padding: 0;
  border: 1px solid rgba(242, 138, 46, 0.22);
  border-radius: 30px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
  overflow: hidden;
}

.login-showcase {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 34px 40px 40px;
  background:
    radial-gradient(circle at 92% 4%, var(--ui-mint) 0 120px, transparent 121px),
    var(--ui-bg);
}

.showcase-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ui-ink);
  font-size: 18px;
  font-weight: 900;
}

.showcase-brand .brand-mark {
  width: 48px;
  height: 48px;
  margin: 0;
}

.login-list-preview {
  position: relative;
  width: 100%;
  max-width: 610px;
  margin: auto 0;
  padding: 28px;
  border: 1px solid rgba(242, 138, 46, 0.22);
  border-radius: 27px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.login-list-preview::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  top: -110px;
  right: -74px;
  border-radius: 50%;
  background: var(--ui-mint);
}

.preview-list-heading {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
}

.showcase-kicker {
  color: var(--ui-teal-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.preview-list-heading h2 {
  margin: 8px 0 0;
  color: var(--ui-ink);
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.preview-list-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 96px;
  border-top: 1px solid var(--ui-line);
  transition: transform 0.18s ease, padding 0.18s ease, background 0.18s ease;
}

.preview-list-row:hover {
  transform: translateX(4px);
}

.preview-list-row div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.preview-list-row strong {
  overflow: hidden;
  color: var(--ui-ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-list-row small {
  color: var(--ui-muted);
}

.login-form-card {
  align-self: center;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 42px clamp(32px, 4vw, 58px);
}

.login-form-card .login-title {
  margin-bottom: 10px;
  color: var(--ui-ink);
  font-size: 34px;
  letter-spacing: -0.04em;
}

.login-form-card .login-copy {
  color: var(--ui-muted);
}

.login-mobile-brand {
  display: none;
}

.preview-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-note {
  margin: 17px 0 0;
  color: var(--ui-muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.login-form-card .segmented {
  border-radius: 999px;
}

.login-form-card .segment {
  border-radius: 999px;
}

.login-form-card .segment.active {
  background: linear-gradient(115deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #382116;
  box-shadow: 0 8px 20px rgba(239, 87, 63, 0.2);
}

.login-form-card .btn {
  border-radius: 13px;
}

.login-form-card .btn-primary {
  background: linear-gradient(115deg, #ffd45f, #ff9b2f 55%, #f15b40);
  color: #382116;
  box-shadow: 0 12px 28px rgba(239, 87, 63, 0.22);
}

.login-form-card .btn-primary:hover {
  background: linear-gradient(115deg, #ffe07e, #ffaa45 55%, #f67457);
}

.login-form-card .btn-google,
.login-form-card .btn-apple {
  border-color: var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-ink);
}

.google-g,
.apple-mark {
  background: var(--ui-surface-soft);
  color: var(--ui-teal-dark);
}

@media (max-width: 1180px) {
  .app-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-rail {
    display: none;
  }

  .workspace-main {
    grid-column: 1;
  }

  .fab {
    right: 28px;
  }

  .sidebar-user {
    min-width: auto;
  }

  .sidebar-user div {
    display: none;
  }
}

@media (max-width: 980px) {
  .list-permissions-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .member-row {
    position: relative;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
  }

  .member-main {
    min-width: 0;
    flex: 1 1 auto;
  }

  .member-side {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 7px;
  }

  .member-management {
    display: none;
  }

  .member-menu-mobile {
    display: block;
  }

  .member-menu-mobile .member-menu-trigger {
    width: 38px;
    height: 38px;
    border-color: rgba(242, 138, 46, 0.34);
    border-radius: 12px;
    background: var(--ui-surface-soft);
    color: var(--ui-teal-dark);
  }

  .member-menu-mobile .member-menu-popover {
    z-index: 40;
    top: calc(100% + 8px);
    width: min(250px, calc(100vw - 48px));
    border-color: var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface);
    box-shadow: 0 18px 42px rgba(44, 25, 15, 0.24);
  }

  .member-menu-mobile .member-menu-popover button {
    border-radius: 10px;
  }
}

@media (max-width: 900px) {
  .sidebar-brand {
    min-width: auto;
  }

  .sidebar-brand div {
    display: none;
  }

  .sidebar-nav {
    margin-left: 0;
  }

  .sidebar-nav button span,
  .sidebar-create span {
    display: none;
  }

  .sidebar-nav button {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  .sidebar-create {
    width: 44px;
    padding: 0;
  }
}

@media (max-width: 760px) {
  .preview-ribbon {
    display: none;
  }

  .app-workspace {
    display: block;
  }

  .app-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    min-height: 66px;
    padding: 10px 16px;
  }

  .sidebar-brand img {
    width: 42px;
    height: 42px;
  }

  .sidebar-nav,
  .sidebar-create,
  .sidebar-user > div,
  .sidebar-user > button {
    display: none;
  }

  .sidebar-user {
    margin-left: auto;
    padding: 0;
    border: 0;
  }

  .workspace-main,
  .workspace-main .screen {
    height: 100dvh;
  }

  .workspace-main .screen {
    padding: calc(84px + env(safe-area-inset-top, 0px)) 14px calc(98px + var(--safe-bottom));
  }

  .workspace-main .topbar {
    align-items: center;
    margin-bottom: 18px;
  }

  .workspace-main .page-title {
    font-size: 30px;
  }

  .summary-grid {
    gap: 7px;
    margin-bottom: 14px;
  }

  .workspace-main .metric {
    min-height: 68px;
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: 14px;
  }

  .workspace-main .metric strong {
    font-size: 21px;
  }

  .workspace-main .metric span {
    font-size: 9px;
  }

  .list-sheet,
  .product-sheet {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .mint-corner::before {
    width: 155px;
    height: 155px;
    top: -96px;
    right: -58px;
  }

  .sheet-heading {
    padding-bottom: 17px;
  }

  .sheet-heading h2 {
    font-size: 26px;
  }

  .sheet-count {
    min-height: 30px;
    padding: 0 10px;
    font-size: 10px;
  }

  .wishlist-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 5px;
    border-radius: 14px;
  }

  .list-number,
  .item-number,
  .preview-number {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 15px;
  }

  .wishlist-title {
    font-size: 16px;
  }

  .wishlist-head {
    gap: 8px;
  }

  .list-members {
    display: none;
  }

  .list-card-side {
    grid-column: 2;
    min-width: 0;
    grid-template-columns: auto 1fr 30px;
    justify-content: stretch;
    gap: 8px;
    margin-top: -3px;
  }

  .state-pill {
    width: fit-content;
    min-height: 29px;
    padding: 5px 10px;
    font-size: 9px;
  }

  .list-total {
    text-align: right;
  }

  .list-arrow {
    width: 30px;
    height: 30px;
  }

  .detail-summary {
    padding: 13px;
  }

  .product-sheet .tabs {
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 14px;
  }

  .product-sheet .tab {
    border-radius: 10px;
  }

  .item-card {
    grid-template-columns: 44px 58px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 16px 4px;
    border-radius: 14px;
  }

  .item-media {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .item-title-row {
    display: grid;
    gap: 8px;
  }

  .item-title-row .state-pill {
    justify-self: start;
  }

  .item-title {
    font-size: 15px;
  }

  .item-actions {
    grid-column: 1 / -1;
  }

  .member-list {
    grid-template-columns: 1fr;
  }

  .list-permissions-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .member-row {
    position: relative;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
  }

  .member-main {
    min-width: 0;
    flex: 1 1 auto;
  }

  .member-side {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 7px;
  }

  .member-management {
    display: none;
  }

  .member-menu-mobile {
    display: block;
  }

  .member-menu-mobile .member-menu-trigger {
    width: 38px;
    height: 38px;
    border-color: rgba(242, 138, 46, 0.34);
    border-radius: 12px;
    background: var(--ui-surface-soft);
    color: var(--ui-teal-dark);
  }

  .member-menu-mobile .member-menu-popover {
    z-index: 40;
    top: calc(100% + 8px);
    width: min(250px, calc(100vw - 48px));
    border-color: var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface);
    box-shadow: 0 18px 42px rgba(44, 25, 15, 0.24);
  }

  .member-menu-mobile .member-menu-popover button {
    border-radius: 10px;
  }

  .profile-dashboard {
    gap: 14px;
  }

  .profile-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .profile-identity .avatar {
    width: 56px;
    height: 56px;
  }

  .profile-identity h2 {
    font-size: 23px;
  }

  .profile-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-hero .profile-logo {
    display: none;
  }

  .profile-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .profile-panel {
    padding: 18px;
  }

  .profile-inline-form {
    grid-template-columns: 1fr;
  }

  .profile-inline-form .btn {
    width: 100%;
  }

  .profile-quick-actions,
  .profile-account-actions {
    grid-template-columns: 1fr;
  }

  .profile-account-actions .btn-danger {
    grid-column: auto;
  }

  .modal-add-item,
  .modal-edit-item {
    width: min(calc(100% - 20px), 620px);
    height: min(calc(var(--visual-height) - 20px), 760px);
    max-height: min(calc(var(--visual-height) - 20px), 760px);
  }

  .product-modal-body {
    overflow-y: auto;
    padding: 16px;
  }

  .product-form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .product-field-title,
  .product-field-link,
  .product-field-price,
  .product-field-quantity,
  .product-field-image-url,
  .product-field-file,
  .product-field-note,
  .product-form-help,
  .product-form-actions {
    grid-column: 1;
  }

  .product-form-actions {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-nav {
    display: grid;
    width: 100%;
    max-width: none;
    background: rgba(255, 248, 239, 0.95);
  }

  :root[data-theme="dark"] .bottom-nav {
    background: rgba(23, 17, 13, 0.95);
  }

  .nav-btn.active {
    background: linear-gradient(115deg, #ffd45f, #ff9b2f 55%, #f15b40);
    color: #382116;
    box-shadow: 0 8px 20px rgba(239, 87, 63, 0.2);
  }

  .nav-btn.active svg {
    color: #382116;
  }

  .fab {
    right: 17px;
    bottom: calc(86px + var(--safe-bottom));
  }

  .preview-login {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    margin: 0;
    padding: 52px 18px 30px;
    border: 0;
    border-radius: 0;
    background: var(--ui-bg);
    overflow-y: auto;
  }

  .login-showcase {
    display: none;
  }

  .login-form-card {
    max-width: 520px;
    margin: auto;
    padding: 0;
    overflow: visible;
  }

  .login-mobile-brand {
    display: block;
  }

  .login-mobile-brand .brand-mark {
    width: 70px;
    height: 70px;
    margin-bottom: 12px;
  }

  .login-mobile-brand .login-title {
    margin-bottom: 22px;
    color: var(--ui-teal-dark);
    font-size: 34px;
  }

  .login-form-card > .login-title {
    font-size: 27px;
  }
}

@media (max-width: 1180px) {
  .invite-fab-stack {
    right: 28px;
  }
}

@media (max-width: 820px) {
  .modal-share,
  .modal-join-code,
  .modal-scan-invite {
    width: calc(100vw - 28px);
  }

  .invite-share-box {
    grid-template-columns: 1fr;
  }

  .invite-code-display {
    width: 100%;
    text-align: center;
  }

  .invite-qr-card {
    min-height: 230px;
  }

  .qr-video-frame,
  .qr-video-frame video {
    min-height: 260px;
  }
}

@media (max-width: 760px) {
  .invite-fab-stack {
    right: 17px;
    bottom: calc(86px + var(--safe-bottom));
  }

  .invite-mini-fab span {
    right: 68px;
    max-width: min(56vw, 210px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .invite-share-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .invite-share-actions .btn {
    width: 100%;
  }
}

@supports (content-visibility: auto) {
  .wishlist-card,
  .item-card,
  .member-row,
  .profile-product-card {
    content-visibility: auto;
    contain-intrinsic-size: 140px;
  }

  .item-card {
    contain-intrinsic-size: 190px;
  }
}
