* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 12px 80px; /* место под нижнюю навигацию */
}

.app-header {
  margin-bottom: 12px;
}

.app-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #6366f1, #4f46e5);
}

.app-header-name {
  font-size: 18px;
  font-weight: 600;
}

.app-header-sub {
  font-size: 12px;
  color: #9ca3af;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #1f2937;
  font-size: 12px;
}

.balance-star {
  color: #fde68a;
}

.panel {
  background: #020617;
  border-radius: 12px;
  padding: 10px 12px 12px;
  margin-bottom: 8px;
  border: 1px solid #1e293b;
}

.inner-panel {
  margin-top: 10px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
}

.panel-body {
  font-size: 14px;
}

.leaders-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.leaders-tab-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
}

.leaders-tab-btn.active {
  background: #2563eb;
}

.leaders-list {
  display: none;
}

.leaders-list.active {
  display: block;
}

.leader-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #020617;
  border: 1px solid #1e293b;
  margin-bottom: 6px;
}

.leader-rank {
  font-weight: 600;
  width: 20px;
}

.leader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111827;
  margin: 0 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-main {
  flex: 1;
}

.leader-name {
  font-size: 13px;
  font-weight: 500;
}

.leader-sub {
  font-size: 11px;
  color: #9ca3af;
}

button {
  cursor: pointer;
  background: #1d4ed8;
  color: #e5e7eb;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.search-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  margin-bottom: 8px;
  font-size: 13px;
}

.list {
  /* Базовая высота списка — так, чтобы комфортно видеть ~4 элемента */
  max-height: 260px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
}

/* Для списков подписок используем grid с двумя колонками */
#tasks-list,
#portal-tasks-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  max-height: none;
  overflow-y: auto;
}

.list.small {
  max-height: 220px;
  margin-top: 8px;
}

.sub-header {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #9ca3af;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #0f172a;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-main {
  min-width: 0;
}

.list-item-title {
  font-size: 14px;
  font-weight: 500;
}

.list-item-sub {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

/* Gift list styling */
.gift-item {
  gap: 8px;
}

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

.gift-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #4f46e5, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #e5e7eb;
  flex-shrink: 0;
}

.gift-text {
  min-width: 0;
}

.gift-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.gift-tags {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-info {
  background: rgba(59, 130, 246, 0.15);
  color: #bfdbfe;
}

.tag-danger {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
}

.gift-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-left: 8px;
}

.gift-price {
  font-size: 12px;
}

.price-star {
  color: #fde68a;
}

.price-ton {
  color: #6ee7b7;
}

/* Resale list styling */
.resale-item .resale-title {
  font-size: 13px;
}

.resale-avatar {
  background: radial-gradient(circle at 30% 20%, #10b981, #0f766e);
}

.resale-price-line {
  margin-top: 4px;
}

.gift-actions {
  display: flex;
  gap: 4px;
}

.small-link {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 6px;
  text-decoration: none;
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.4);
  background: rgba(15, 23, 42, 0.9);
}

.small-btn {
  font-size: 11px;
  padding: 4px 8px;
}

.small-btn.danger {
  background: #b91c1c;
}

.task-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.task-form label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #9ca3af;
}

.task-form input {
  margin-top: 3px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
}

.task-form select {
  margin-top: 3px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
}

.task-form button[type='submit'] {
  align-self: stretch;
}

.status {
  font-size: 12px;
  color: #a5b4fc;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e5e7eb;
}

.checkbox-row input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #4b5563;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.checkbox-row input[type='checkbox']::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.2s ease;
}

.checkbox-row input[type='checkbox']:checked {
  background: #6366f1;
  border-color: #818cf8;
}

.checkbox-row input[type='checkbox']:checked::before {
  transform: translateX(16px);
}

.btn-primary {
  background: #6366f1;
  border-radius: 999px;
}

.btn-secondary {
  background: #111827;
  border-radius: 999px;
}

.btn-primary.large {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* Нижняя навигация */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-around;
  gap: 6px;
  z-index: 20;
}

.bottom-nav-btn {
  flex: 1;
  background: transparent;
  border-radius: 12px;
  border: none;
  font-size: 11px;
  padding: 4px 0;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.bottom-nav-icon {
  font-size: 18px;
}

.bottom-nav-label {
  font-size: 11px;
}

.bottom-nav-btn.active {
  color: #e5e7eb;
}

.muted {
  font-size: 13px;
  color: #9ca3af;
}

.gift-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.gift-switcher-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.gift-switcher-title {
  padding: 6px 10px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid #1f2937;
  font-size: 13px;
}

.pill-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-btn.ghost {
  background: #020617;
}

.filters-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.gift-filters-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-direction: column;
}

.filter-search-wrapper {
  position: relative;
  width: 100%;
}

.filter-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  min-height: 24px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 12px;
  color: #e5e7eb;
}

.filter-tag-remove {
  cursor: pointer;
  color: #9ca3af;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
}

.filter-tag-remove:hover {
  color: #ef4444;
}

.gift-filters-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-direction: column;
}

.gift-filters-row > .gift-search-input {
  position: relative;
  width: 100%;
}

.filter-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 8px;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.filter-result-item {
  padding: 8px 12px;
  font-size: 14px;
  color: #e5e7eb;
  cursor: pointer;
  border-bottom: 1px solid #1f2937;
}

.filter-result-item:last-child {
  border-bottom: none;
}

.filter-result-item:hover {
  background: rgba(79, 70, 229, 0.16);
}

.chip-select {
  flex: 1;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #020617;
  font-size: 12px;
  color: #e5e7eb;
  width: 100%;
}

.chip.active {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.16);
}

.actions-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.actions-row-center {
  justify-content: center;
}

.actions-row-center .btn-primary {
  min-width: 220px;
  padding: 10px 20px;
  font-size: 15px;
}

.search-block {
  margin-bottom: 8px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

@media (max-width: 600px) {
  /* На мобильных также даём увидеть до ~4 элементов списка */
  .list {
    max-height: 260px;
  }
  .list.small {
    max-height: 220px;
  }
  
  /* На мобильных подписки остаются в две колонки, но с меньшим gap */
  #tasks-list,
  #portal-tasks-list {
    gap: 4px;
    padding: 4px;
  }
  
  .subscription-card {
    padding: 5px;
    gap: 4px;
  }
  
  .subscription-top {
    gap: 4px;
  }
  
  .subscription-image {
    width: 40px;
    height: 40px;
  }
  
  .subscription-title {
    font-size: 11px;
  }
  
  .subscription-model,
  .subscription-backdrop {
    font-size: 9px;
  }
  
  .subscription-settings {
    font-size: 8px;
    gap: 4px;
  }
  
  .btn-edit,
  .btn-delete {
    font-size: 8px;
    padding: 2px 5px;
  }
}

@media (max-width: 430px) {
  .app-header h1 {
    font-size: 20px;
  }
  .app-header p {
    font-size: 12px;
  }
  .panel {
    padding: 8px 10px 10px;
  }
}

/* Стили для профиля */
#profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.profile-avatar-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #3b82f6;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.profile-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.profile-name {
  font-size: 24px;
  font-weight: 600;
  color: #e5e7eb;
}

.profile-username {
  font-size: 18px;
  color: #60a5fa;
  font-weight: 500;
}

.profile-id {
  font-size: 14px;
  color: #9ca3af;
  font-family: 'Courier New', monospace;
}

.profile-joined {
  font-size: 14px;
  color: #60a5fa;
  margin-top: 4px;
}

/* Новый дизайн карточек подписок */
.subscription-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  border-radius: 6px;
  background: #1e293b;
  border: 1px solid #334155;
  width: 100%;
  box-sizing: border-box;
}

.subscription-top {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: flex-start;
}

.subscription-image {
  width: 45px;
  height: 45px;
  border-radius: 5px;
  background: #0f172a;
  border: 1px solid #334155;
  flex-shrink: 0;
  /* Пока пустое место для будущего изображения */
}

.subscription-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.subscription-title {
  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.subscription-model {
  font-size: 10px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.subscription-backdrop {
  font-size: 10px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.subscription-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subscription-settings {
  display: flex;
  flex-direction: row;
  gap: 6px;
  font-size: 11px;
  flex-wrap: wrap;
}

.subscription-notify {
  color: #60a5fa;
  white-space: nowrap;
}

.subscription-autobuy {
  color: #9ca3af;
  white-space: nowrap;
}

.subscription-autobuy.enabled {
  color: #22c55e;
}

.subscription-actions {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}

.btn-edit {
  padding: 3px 6px;
  border-radius: 4px;
  border: none;
  background: #6366f1;
  color: #ffffff;
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  flex: 1;
}

.btn-edit:hover {
  background: #4f46e5;
}

.btn-delete {
  padding: 3px 6px;
  border-radius: 4px;
  border: none;
  background: #475569;
  color: #ffffff;
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  flex: 1;
}

.btn-delete:hover {
  background: #334155;
}

.profile-tip {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  margin-top: 20px;
  padding: 12px;
  background: #1e293b;
  border-radius: 8px;
}

/* Новый дизайн для выбранного подарка */
.selected-gift-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #020617;
  border: 1px solid #1e293b;
}

.gift-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #1f2937;
  background: #111827;
  color: #e5e7eb;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.gift-nav-btn:hover:not(:disabled) {
  background: #1f2937;
  border-color: #4f46e5;
}

.gift-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.selected-gift-display {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
}

.selected-gift-display:hover {
  background: rgba(79, 70, 229, 0.1);
}

.selected-gift-image {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 20%, #4f46e5, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  border: 2px solid #1e293b;
}

.selected-gift-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.selected-gift-title {
  font-size: 16px;
  font-weight: 600;
  color: #e5e7eb;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Сетка предложений 3 колонки */
.resale-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.resale-grid-item {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.resale-grid-item:hover {
  transform: translateY(-2px);
  border-color: #4f46e5;
}

.resale-grid-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: radial-gradient(circle at 30% 20%, #4f46e5, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
}

.resale-grid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resale-grid-title {
  font-size: 11px;
  font-weight: 500;
  color: #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.resale-grid-price {
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
}

.resale-grid-price .price-star {
  color: #fde68a;
}

.resale-grid-price .price-ton {
  color: #6ee7b7;
}

/* Модальное окно выбора подарка */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1e293b;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #1f2937;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Поисковая строка в модальном окне */
.gift-search-container {
  margin-bottom: 8px;
}

.gift-search-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  font-size: 14px;
  box-sizing: border-box;
}

.gift-search-input:focus {
  outline: none;
  border-color: #4f46e5;
}

/* Сетка подарков в модальном окне (адаптивная, примерно 2 ряда) */
.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  flex: 1;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 14px;
}

.gift-grid-item {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.gift-grid-item:hover {
  transform: translateY(-2px);
  border-color: #4f46e5;
  background: #1f2937;
}

.gift-grid-item.active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.2);
}

.gift-grid-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 20%, #4f46e5, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.gift-grid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-grid-title {
  font-size: 10px;
  font-weight: 500;
  color: #e5e7eb;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
  .resale-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  
  .resale-grid-item {
    padding: 6px;
  }
  
  .resale-grid-image {
    font-size: 24px;
  }
  
  .resale-grid-title {
    font-size: 10px;
  }
  
  .gifts-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
  }
  
  .selected-gift-container {
    padding: 10px;
  }
  
  .selected-gift-image {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .selected-gift-title {
    font-size: 14px;
  }
  
  .gift-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}


