:root {
  color-scheme: light;
  --bg: #f7ede8;
  --card: rgba(255, 251, 247, 0.95);
  --card-strong: #fff8f3;
  --text: #311314;
  --muted: #825e5f;
  --border: rgba(133, 29, 29, 0.12);
  --accent: #b91f25;
  --accent-strong: #8d1018;
  --accent-soft: #f6d8d4;
  --accent-contrast: #fff7f3;
  --gold: #b97a21;
  --gold-soft: #fbecd2;
  --blue: #0c7a86;
  --blue-soft: #dff4f6;
  --success: #127446;
  --success-soft: #def3e7;
  --shadow: 0 20px 48px rgba(104, 19, 16, 0.11);
  --shadow-soft: 0 14px 30px rgba(115, 24, 20, 0.08);
  --max-width: 460px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  color: var(--text);
  background: #ffffff;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 18px 14px calc(124px + env(safe-area-inset-bottom, 0px));
}

body.is-auth-mode {
  overflow: hidden;
}

body.is-auth-mode .app-shell {
  min-height: 100dvh;
  padding-bottom: 24px;
}

body.is-auth-mode .page-main {
  margin-top: 0;
}

.hero,
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 20px;
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 46%),
    linear-gradient(135deg, var(--accent-strong), #c6292c 52%, #e35a3d 100%);
  color: var(--accent-contrast);
  box-shadow: var(--shadow);
}

.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 245, 235, 0.12);
  pointer-events: none;
}

.hero::before {
  width: 160px;
  height: 160px;
  top: -56px;
  right: -70px;
}

.hero::after {
  width: 110px;
  height: 110px;
  left: -36px;
  bottom: -38px;
}

.hero__badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.hero__badge {
  background: transparent;
  border: none;
  padding: 0;
  min-height: 0;
}

.hero__logo {
  display: block;
  height: 18px;
  width: auto;
}

.hero__title {
  margin: 16px 0 8px;
  font-family: "STZhongsong", "Source Han Serif SC", serif;
  font-size: 30px;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.hero__subtitle {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 246, 241, 0.86);
  line-height: 1.6;
  font-size: 15px;
  position: relative;
  z-index: 1;
}

.hero__logout {
  position: relative;
  z-index: 2;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 242, 0.2);
  background: rgba(255, 248, 244, 0.16);
  color: #fff8f4;
  font-size: 12px;
  letter-spacing: 0.04em;
  box-shadow: none;
  cursor: pointer;
}

.page-main {
  margin-top: 16px;
}

.app-view,
.auth-view {
  display: grid;
  gap: 8px;
}

.auth-view {
  min-height: calc(100dvh - 42px);
  align-content: stretch;
  padding-top: 0;
}

.auth-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 84px 10px 24px;
}

.auth-card__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 8px;
}

.auth-card__copy {
  flex: 1;
  min-width: 0;
}

.auth-card__title {
  margin: 0;
  font-family: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #261213;
}

.auth-card__desc {
  margin: 14px 0 0;
  color: #b09596;
  font-size: 15px;
  line-height: 1.7;
}

.auth-card__visual {
  flex: 0 0 128px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card__visual-image {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: flex;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 84px;
}

.auth-field {
  display: block;
}

.auth-field__control {
  position: relative;
}

.auth-field__input {
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  border: 1px solid rgba(185, 31, 37, 0.08);
  border-radius: 999px;
  background: #faf7f5;
  color: #271415;
  font-size: 18px;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(88, 28, 20, 0.04);
}

.auth-field__input--password {
  padding-right: 58px;
}

.auth-field__input::placeholder {
  color: #bda9aa;
}

.auth-field__input:focus {
  border-color: rgba(185, 31, 37, 0.28);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(185, 31, 37, 0.08);
}

.auth-field__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #bc9c9d;
  transform: translateY(-50%);
  cursor: pointer;
}

.auth-field__toggle:active {
  transform: translateY(-50%) scale(0.96);
}

.auth-field__toggle-icon {
  position: absolute;
  width: 20px;
  height: 20px;
}

.auth-field__toggle-icon--hide {
  display: none;
}

.auth-field__toggle.is-active {
  color: #b91f25;
}

.auth-field__toggle.is-active .auth-field__toggle-icon--show {
  display: none;
}

.auth-field__toggle.is-active .auth-field__toggle-icon--hide {
  display: block;
}

.auth-submit {
  min-height: 58px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #b91f25, #df5038);
  color: #fff7f3;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 18px 30px rgba(185, 31, 37, 0.18);
  cursor: pointer;
}

.auth-submit:active {
  transform: translateY(1px) scale(0.995);
}

.auth-support {
  margin: auto 0 0;
  padding-top: 12px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #b8a4a4;
}

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

.panel {
  border-radius: 28px;
  padding: 18px;
}

.panel__header,
.section-heading,
.summary-strip__header,
.item-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel__eyebrow,
.toolbar__title,
.field__label,
.bottom-stat__label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel__title {
  margin: 5px 0 0;
  font-family: "STZhongsong", "Source Han Serif SC", serif;
  font-size: 24px;
}

.pill {
  background: rgba(255, 248, 244, 0.82);
  color: var(--accent-strong);
  border: 1px solid rgba(185, 31, 37, 0.08);
}

.form-grid,
.toolbar-panel,
.category-summary,
.list-container {
  display: grid;
  gap: 14px;
}

.toolbar-sticky-sentinel {
  height: 1px;
}

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

.field--search {
  flex: 1;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(145, 48, 43, 0.12);
  border-radius: 16px;
  background: #fffdfb;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(79, 19, 19, 0.04);
}

.field__input:focus {
  border-color: rgba(185, 31, 37, 0.4);
  box-shadow: 0 0 0 4px rgba(185, 31, 37, 0.12);
}

.primary-button,
.ghost-button,
.filter-button,
.role-chip,
.purchase-toggle,
.item-thumb,
.bottom-stat,
.scroll-fab,
.link-button,
.copy-button {
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
  min-height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #db4a36);
  color: var(--accent-contrast);
  box-shadow: 0 12px 24px rgba(185, 31, 37, 0.2);
}

.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(185, 31, 37, 0.08);
  color: var(--accent-strong);
  text-decoration: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.summary-panel__progress {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(185, 31, 37, 0.06), rgba(255, 252, 248, 0.9));
  border: 1px solid rgba(185, 31, 37, 0.1);
  overflow: hidden;
}

.summary-toggle {
  width: 100%;
  padding: 16px 18px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  box-shadow: none;
}

.summary-toggle__copy,
.summary-toggle__aside {
  display: grid;
  gap: 4px;
}

.summary-toggle__aside {
  justify-items: end;
}

.summary-toggle__title {
  margin: 0;
  font-size: 18px;
}

.summary-toggle__meta {
  font-size: 12px;
  color: var(--muted);
}

.summary-toggle__chevron {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(185, 31, 37, 0.08);
  color: var(--accent-strong);
  transition: transform 0.2s ease, background 0.2s ease;
}

.summary-toggle__chevron svg {
  width: 18px;
  height: 18px;
}

.summary-toggle[aria-expanded="true"] .summary-toggle__chevron {
  transform: rotate(180deg);
  background: rgba(185, 31, 37, 0.14);
}

.summary-panel__body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.24s ease;
}

.summary-panel__body.is-collapsed {
  grid-template-rows: 0fr;
}

.summary-panel__body > .category-summary {
  min-height: 0;
  padding: 0 14px 14px;
  overflow: hidden;
}

.summary-card {
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(185, 31, 37, 0.08), rgba(255, 251, 247, 0.96));
  border: 1px solid rgba(185, 31, 37, 0.08);
}

.summary-card__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-card__value {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  font-weight: 700;
}

.search-row {
  display: flex;
  align-items: end;
  gap: 10px;
}

.toolbar-panel {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top, 0px));
  z-index: 8;
  padding: 14px;
  gap: 12px;
  transition: box-shadow 0.26s ease, transform 0.26s ease, border-radius 0.26s ease, background 0.26s ease;
}

.toolbar-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -12px;
  bottom: -12px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: rgba(255, 251, 247, 0.96);
  box-shadow: 0 18px 34px rgba(115, 24, 20, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.toolbar-panel.is-sticky {
  border-radius: 0 0 26px 26px;
  box-shadow: 0 18px 30px rgba(115, 24, 20, 0.1);
}

.toolbar-panel.is-sticky::before {
  opacity: 1;
}

.toolbar-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chip-row--toolbar {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-row--toolbar::-webkit-scrollbar {
  display: none;
}

.chip-row--toolbar .role-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.filter-button {
  flex: 0 0 auto;
  min-width: 80px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(185, 31, 37, 0.08);
  color: var(--accent-strong);
  align-self: start;
  font-size: 14px;
  white-space: nowrap;
}

.filter-button__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
}

.filter-button__icon svg,
.scroll-fab svg {
  width: 100%;
  height: 100%;
}

.filter-panel,
.toolbar__group {
  display: grid;
  gap: 8px;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.role-chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fffdfb;
  border: 1px solid rgba(145, 48, 43, 0.12);
  color: var(--muted);
}

.role-chip.is-active {
  background: linear-gradient(135deg, var(--accent), #dc4d39);
  color: var(--accent-contrast);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(185, 31, 37, 0.16);
}

.section-heading__title {
  margin: 4px 0 0;
  font-family: "STZhongsong", "Source Han Serif SC", serif;
  font-size: 22px;
}

.section-heading__meta,
.summary-strip__meta,
.category-header__meta,
.stamp,
.modal__meta,
.empty-state {
  margin: 2px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.summary-strip {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 251, 247, 0.86);
  border: 1px solid rgba(185, 31, 37, 0.08);
}

.summary-strip__name,
.category-header__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.category-header__meta--summary {
  font-size: 14px;
}

.progress-track {
  margin-top: 6px;
  height: 8px;
  border-radius: 999px;
  background: rgba(185, 31, 37, 0.08);
  overflow: hidden;
}

.progress-track__value {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), #ef7a47);
}

.category-section,
.item-list {
  display: grid;
  gap: 8px;
}

.category-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px 10px;
}

.category-header__main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-left: 8px;
}

.category-header__aside {
  flex: 0 0 auto;
  min-width: 106px;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(185, 31, 37, 0.06), rgba(255, 251, 247, 0.9));
  border: 1px solid rgba(185, 31, 37, 0.08);
  text-align: right;
  box-shadow: 0 10px 22px rgba(115, 24, 20, 0.06);
}

.category-header__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.category-header__count {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.1;
  color: var(--accent-strong);
}

.item-card {
  padding: 16px;
  border-radius: 26px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease, background 0.32s ease;
}

.item-card.is-purchased {
  border-color: rgba(18, 116, 70, 0.2);
  background:
    linear-gradient(180deg, rgba(222, 243, 231, 0.42), rgba(255, 250, 246, 0.96)),
    var(--card-strong);
}

.item-card.is-just-purchased {
  animation: purchasedCardPulse 1s ease;
}

.item-card.is-marking-exit {
  pointer-events: none;
  will-change: transform, opacity;
  animation: purchasedCardExit 0.46s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.item-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  line-height: 0;
  background: linear-gradient(135deg, rgba(185, 31, 37, 0.12), rgba(255, 225, 214, 0.8));
  box-shadow: inset 0 0 0 1px rgba(185, 31, 37, 0.08);
}

.item-thumb img,
.item-thumb svg,
.modal__media img,
.modal__media svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.item-card__identity {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.item-card__name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 19px;
}

.item-card__order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, rgba(185, 31, 37, 0.14), rgba(227, 90, 61, 0.2));
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.item-card__tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 8px;
  overflow: hidden;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tag--state {
  background: rgba(185, 31, 37, 0.08);
  color: var(--accent);
}

.tag--state.is-purchased {
  background: var(--success-soft);
  color: var(--success);
}

.tag--online {
  background: rgba(185, 31, 37, 0.12);
  color: var(--accent-strong);
}

.tag--company {
  background: var(--gold-soft);
  color: var(--gold);
}

.tag--contact {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag--other {
  background: rgba(68, 57, 56, 0.08);
  color: #6b5050;
}

.purchase-toggle {
  flex: 0 0 auto;
  min-width: 86px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(185, 31, 37, 0.12);
  color: var(--accent-strong);
  position: relative;
  overflow: hidden;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.purchase-toggle.is-active {
  background: linear-gradient(135deg, var(--success), #2ead67);
  color: #f7fff8;
}

.purchase-toggle.is-celebrating::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(120deg, transparent 28%, rgba(255, 255, 255, 0.72) 50%, transparent 72%);
  transform: translateX(-120%);
  animation: buttonSweep 0.72s ease;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.meta-card,
.detail-block {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(185, 31, 37, 0.04);
}

.meta-card__label,
.detail-block__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.meta-card__value,
.detail-block__content {
  display: block;
  margin-top: 8px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.item-card__details {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.item-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.link-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: #fffdfb;
  color: var(--text);
  border: 1px solid rgba(145, 48, 43, 0.12);
  text-decoration: none;
}

.link-button {
  background: linear-gradient(135deg, rgba(185, 31, 37, 0.1), rgba(239, 122, 71, 0.14));
  color: var(--accent-strong);
}

.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 24;
  width: min(100%, var(--max-width));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(135deg, rgba(129, 14, 22, 0.98), rgba(186, 27, 33, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  box-shadow: 0 -22px 40px rgba(104, 20, 17, 0.24);
  backdrop-filter: blur(18px);
}

.bottom-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: rgba(255, 245, 238, 0.18);
}

.bottom-bar.is-celebrating {
  animation: bottomBarPulse 0.85s ease;
}

.bottom-stat {
  flex: 1;
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 247, 243, 0.14), rgba(255, 247, 243, 0.08));
  color: var(--accent-contrast);
  text-align: left;
  border: 1px solid rgba(255, 247, 243, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 250, 246, 0.06);
}

.bottom-stat.is-active {
  background: linear-gradient(180deg, rgba(255, 247, 243, 0.24), rgba(255, 247, 243, 0.16));
  border-color: rgba(255, 247, 243, 0.18);
}

.bottom-stat.is-celebrating {
  animation: purchasedStatPulse 0.8s ease;
}

.bottom-stat__label {
  color: rgba(255, 246, 240, 0.76);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.bottom-stat__value {
  display: block;
  margin-top: 2px;
  font-size: 34px;
  line-height: 1;
  color: #fffaf7;
  text-shadow: 0 6px 14px rgba(75, 10, 13, 0.16);
}

.scroll-fab {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 247, 243, 0.2), rgba(255, 247, 243, 0.1));
  color: var(--accent-contrast);
  border: 1px solid rgba(255, 247, 243, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 249, 245, 0.1);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 144px;
  z-index: 42;
  transform: translate(-50%, 20px);
  min-width: 180px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(50, 20, 22, 0.9);
  color: #fffaf4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.purchase-flight {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #ef7a47);
  color: #fffaf7;
  box-shadow: 0 18px 28px rgba(185, 31, 37, 0.24);
  pointer-events: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  will-change: transform, opacity;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 14px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 11, 12, 0.55);
  backdrop-filter: blur(6px);
}

.modal__surface {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 28px), 420px);
  margin: 0;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 251, 247, 0.98);
  box-shadow: var(--shadow);
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(185, 31, 37, 0.8), rgba(239, 122, 71, 0.94));
  color: #ffffff;
  font-size: 14px;
  border: none;
  box-shadow: 0 14px 28px rgba(121, 22, 19, 0.16);
}

.modal__close--footer {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.modal__close svg {
  width: 22px;
  height: 22px;
}

.modal__media {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  line-height: 0;
  background: linear-gradient(135deg, rgba(185, 31, 37, 0.12), rgba(255, 225, 214, 0.8));
}

.modal__content {
  margin-top: 14px;
}

.modal__title {
  margin: 6px 0 0;
  font-size: 22px;
}

.empty-state {
  padding: 28px 18px;
  border-radius: 24px;
  background: rgba(255, 251, 247, 0.88);
  border: 1px dashed rgba(145, 48, 43, 0.18);
  text-align: center;
}

.is-hidden {
  display: none !important;
}

@keyframes purchasedCardPulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: var(--shadow-soft);
  }

  35% {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 24px 38px rgba(18, 116, 70, 0.16);
  }

  100% {
    transform: translateY(0) scale(1);
    box-shadow: var(--shadow-soft);
  }
}

@keyframes purchasedCardExit {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  22% {
    opacity: 0.98;
    transform: translate3d(0, 6px, 0) scale(0.996);
  }

  68% {
    opacity: 0.36;
    transform: translate3d(0, -10px, 0) scale(0.985);
  }

  100% {
    opacity: 0;
    transform: translate3d(0, -22px, 0) scale(0.972);
    box-shadow: 0 10px 18px rgba(104, 19, 16, 0.06);
  }
}

@keyframes buttonSweep {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

@keyframes bottomBarPulse {
  0% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-4px);
  }

  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes purchasedStatPulse {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 380px) {
  .auth-card__hero {
    align-items: flex-start;
    gap: 14px;
  }

  .auth-card__visual {
    flex-basis: 88px;
  }

  .auth-card__visual-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    font-size: 12px;
  }

  .auth-card__title {
    font-size: 28px;
  }

  .auth-field__input,
  .auth-submit {
    min-height: 54px;
    font-size: 17px;
  }

  .summary-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .panel__header,
  .search-row,
  .item-card__top,
  .section-heading,
  .summary-toggle {
    flex-direction: column;
  }

  .purchase-toggle,
  .ghost-button,
  .ghost-link,
  .primary-button {
    width: 100%;
  }

  .toolbar-strip {
    align-items: center;
  }
}

@media (max-height: 760px) {
  .modal {
    justify-content: flex-start;
    padding-top: 26px;
  }
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 920px;
  }

  .bottom-bar {
    width: min(100%, 520px);
  }
}

.infinite-scroll-sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px 36px;
  color: #8c736a;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.infinite-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(179, 39, 31, 0.2);
  border-top-color: #b3271f;
  border-radius: 50%;
  animation: infinite-spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes infinite-spin {
  to {
    transform: rotate(360deg);
  }
}

.infinite-scroll-end {
  text-align: center;
  padding: 24px 16px 40px;
  color: #a8948d;
  font-size: 13px;
  letter-spacing: 0.5px;
}
