/* Canonical MAX Mini App UI derived from the approved day/night mockups.
   Mobile is the reference layout. Desktop extends the same visual system. */

:root {
  --max-bg: #08131d;
  --max-bg-2: #0b1822;
  --max-panel: rgba(12, 25, 35, 0.92);
  --max-panel-solid: #0d1a24;
  --max-panel-soft: #101f2a;
  --max-text: #eadcc5;
  --max-text-strong: #fff0d7;
  --max-muted: #a89f92;
  --max-line: rgba(205, 167, 111, 0.26);
  --max-line-strong: rgba(215, 174, 110, 0.46);
  --max-red: #a51c26;
  --max-red-strong: #c72b31;
  --max-red-dark: #711018;
  --max-gold: #d2a14e;
  --max-gold-soft: #b98b45;
  --max-green: #7e9d58;
  --max-danger: #d63a42;
  --max-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  --max-radius: 18px;
  --max-radius-sm: 12px;
  --max-serif: Georgia, "Times New Roman", serif;
  --max-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg: var(--max-bg);
  --surface: var(--max-panel-solid);
  --surface-2: var(--max-panel-soft);
  --surface-3: #152833;
  --glass: rgba(10, 23, 33, 0.94);
  --text: var(--max-text);
  --text-strong: var(--max-text-strong);
  --muted: var(--max-muted);
  --line: var(--max-line);
  --line-strong: var(--max-line-strong);
  --red: var(--max-red-strong);
  --red-deep: var(--max-red-dark);
  --gold: var(--max-gold);
  --shadow: var(--max-shadow);
  --serif: var(--max-serif);
  --sans: var(--max-sans);
}

html[data-theme="light"] {
  --max-bg: #f3ecdf;
  --max-bg-2: #f8f2e9;
  --max-panel: rgba(255, 250, 242, 0.94);
  --max-panel-solid: #fffaf2;
  --max-panel-soft: #f7efe3;
  --max-text: #493d34;
  --max-text-strong: #2c211b;
  --max-muted: #887b70;
  --max-line: rgba(133, 95, 61, 0.2);
  --max-line-strong: rgba(161, 111, 65, 0.37);
  --max-red: #8f111b;
  --max-red-strong: #a51d26;
  --max-red-dark: #6e0d15;
  --max-gold: #b98537;
  --max-gold-soft: #c99c58;
  --max-green: #718b4e;
  --max-danger: #aa2631;
  --max-shadow: 0 16px 38px rgba(77, 49, 31, 0.13);

  --bg: var(--max-bg);
  --surface: var(--max-panel-solid);
  --surface-2: var(--max-panel-soft);
  --surface-3: #efe3d3;
  --glass: rgba(255, 250, 242, 0.96);
  --text: var(--max-text);
  --text-strong: var(--max-text-strong);
  --muted: var(--max-muted);
  --line: var(--max-line);
  --line-strong: var(--max-line-strong);
  --red: var(--max-red-strong);
  --red-deep: var(--max-red-dark);
  --gold: var(--max-gold);
  --shadow: var(--max-shadow);
}

html,
body {
  background: var(--max-bg);
}

body {
  position: relative;
  font-family: var(--max-sans);
  background:
    radial-gradient(circle at 78% -8%, rgba(192, 147, 77, 0.09), transparent 30rem),
    radial-gradient(circle at 20% 10%, rgba(92, 117, 130, 0.08), transparent 27rem),
    linear-gradient(180deg, var(--max-bg-2) 0, var(--max-bg) 34rem, var(--max-bg) 100%);
}

html[data-theme="dark"] body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background:
    radial-gradient(circle at 84% 8%, rgba(244, 226, 187, 0.18) 0 0.55rem, transparent 0.62rem),
    linear-gradient(165deg, transparent 0 55%, rgba(0, 0, 0, 0.14) 55% 100%);
}

body button,
body input,
body select,
body textarea {
  font-family: var(--max-sans);
}

body button {
  -webkit-tap-highlight-color: transparent;
}

body .app-shell {
  width: min(100%, 520px);
  padding:
    max(12px, env(safe-area-inset-top))
    14px
    calc(104px + env(safe-area-inset-bottom));
}

body .topbar {
  min-height: 64px;
  margin-bottom: 8px;
}

body .identity-button {
  max-width: calc(100% - 52px);
}

body .avatar {
  width: 48px;
  height: 48px;
  border: 1px solid var(--max-gold-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--max-gold) 16%, transparent);
}

body .identity-copy strong {
  font-family: var(--max-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

body .identity-copy span {
  margin-top: 3px;
  color: var(--max-muted);
  font-size: 11px;
}

body .header-actions {
  gap: 4px;
}

body #theme-toggle,
body #luxury-status {
  display: none;
}

body .notification-button {
  display: grid;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--max-text-strong);
  font-size: 21px;
}

body .page-heading {
  align-items: end;
  margin: 5px 0 12px;
}

body .page-heading h1,
body .secondary-heading h1,
body #profile-title,
body .ui-support-view > h1 {
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-weight: 500;
  letter-spacing: -0.035em;
}

body #day-title {
  font-size: 0;
}

body #day-title::before {
  content: "Аукционы";
  font-size: clamp(31px, 9.2vw, 40px);
  line-height: 0.98;
}

body .day-date {
  margin-top: 5px;
  color: var(--max-muted);
  font-family: var(--max-serif);
  font-size: 13px;
}

body .outline-button,
body .small-button,
body .plain-button,
body .secondary-action,
body .primary-action,
body .flow-danger {
  min-height: 42px;
  border-radius: 11px;
}

body #free-slots {
  min-height: 37px;
  padding: 0 12px;
  border: 1px solid var(--max-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--max-gold);
  font-family: var(--max-serif);
  font-size: 12px;
}

body .segment,
body .flow-tabs {
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--max-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--max-panel-soft) 58%, transparent);
}

body .segment-button,
body .flow-tab {
  min-height: 38px;
  flex: 1 1 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--max-muted);
  font-family: var(--max-serif);
  font-size: 12px;
  white-space: nowrap;
}

body .segment-button.active,
body .flow-tab.active {
  border: 0;
  background: linear-gradient(135deg, var(--max-red-dark), var(--max-red));
  color: #fff1df;
  box-shadow: inset 0 0 0 1px rgba(255, 109, 109, 0.23);
}

body .calendar-panel,
body .free-slots-panel,
body .status-card,
body .service-card,
body .info-panel,
body .profile-card,
body .ui-support-card,
body .ui-support-list,
body .ui-support-recent,
body .active-auction,
body .upcoming-list,
body .rules-strip {
  border: 1px solid var(--max-line);
  background: var(--max-panel);
  box-shadow: none;
}

body .active-auction {
  position: relative;
  display: grid;
  grid-template-columns: minmax(128px, 43%) minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  padding: 7px;
  border-radius: 16px;
}

body .active-auction::after,
body .profile-card::after,
body .ui-support-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 5px;
  border: 1px solid color-mix(in srgb, var(--max-gold) 24%, transparent);
  border-radius: 12px;
  opacity: 0.35;
}

body .active-media {
  min-height: 250px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--max-gold) 50%, transparent);
  border-radius: 12px;
  background: #17171a;
}

body .active-media .card-image,
body .active-media .image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
}

body .live-badge {
  top: 7px;
  left: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(88, 12, 18, 0.88);
  color: #ffe9d6;
  font-family: var(--max-serif);
  font-size: 11px;
}

body .active-details {
  min-width: 0;
  padding: 2px 4px 3px 0;
}

body .lot-number {
  color: var(--max-muted);
  font-family: var(--max-serif);
  font-size: 10px;
}

body .auction-name {
  margin: 2px 0 5px;
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-size: clamp(18px, 5.5vw, 24px);
  font-weight: 500;
  line-height: 1.02;
}

body .rarity-line {
  display: inline-flex;
  margin: 0 0 7px;
  padding: 4px 7px;
  border: 1px solid var(--max-line);
  border-radius: 999px;
  color: var(--max-text);
  font-family: var(--max-serif);
  font-size: 10px;
}

body .seller-line {
  margin: 0 0 9px;
  color: var(--max-muted);
  font-family: var(--max-serif);
  font-size: 10px;
}

body .seller-line.unverified {
  color: var(--max-danger);
}

body .price-row {
  align-items: end;
  gap: 8px;
  margin-top: 4px;
  padding: 9px 0 8px;
  border-top: 1px dotted var(--max-line);
  border-bottom: 1px dotted var(--max-line);
}

body .meta-label,
body .start-price,
body .deadline span,
body .deck-line,
body .story-line,
body .telegram-note {
  font-family: var(--max-serif);
}

body .current-price {
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-size: clamp(27px, 7.5vw, 35px);
  font-weight: 500;
}

body .deadline strong {
  color: var(--max-danger);
  font-family: var(--max-serif);
}

body .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 8px;
  color: var(--max-text);
  font-family: var(--max-serif);
  font-size: 10px;
}

body .telegram-button,
body .primary-action,
body .ui-support-create {
  border: 1px solid rgba(194, 50, 52, 0.75);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--max-red-dark), var(--max-red-strong));
  color: #fff4e4;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  font-family: var(--max-serif);
  font-weight: 500;
}

body .telegram-button {
  min-height: 40px;
  margin-top: 9px;
  font-size: 12px;
}

body .section-heading {
  margin: 12px 3px 6px;
}

body .section-heading h2,
body .lot-detail-section-title {
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-weight: 500;
}

body .section-note {
  color: var(--max-red-strong);
  font-family: var(--max-serif);
  font-size: 11px;
}

body .upcoming-list {
  overflow: hidden;
  border-radius: 13px;
}

body .upcoming-row {
  min-height: 56px;
  padding: 5px 7px;
  border: 0;
  border-bottom: 1px solid var(--max-line);
  background: transparent;
}

body .upcoming-row:last-child {
  border-bottom: 0;
}

body .upcoming-media {
  width: 72px;
  height: 45px;
  border-radius: 8px;
}

body .upcoming-copy strong,
body .upcoming-price strong {
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-weight: 500;
}

body .upcoming-copy small,
body .upcoming-price small {
  color: var(--max-muted);
  font-family: var(--max-serif);
}

body .rules-strip {
  min-height: 48px;
  margin-top: 10px;
  border-radius: 12px;
  color: var(--max-text);
  font-family: var(--max-serif);
}

body .rules-icon {
  border-color: var(--max-line-strong);
}

body .secondary-view {
  padding-top: 4px;
}

body .secondary-heading {
  margin-bottom: 13px;
}

body .secondary-heading .secondary-icon,
body .secondary-heading .eyebrow {
  display: none;
}

body .secondary-heading h1 {
  margin: 0;
  font-size: clamp(31px, 9vw, 40px);
  line-height: 1;
}

body .service-card {
  position: relative;
  border-radius: 15px;
}

body .service-card h2 {
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-weight: 500;
}

body .service-card p,
body .muted-line {
  color: var(--max-muted);
}

body .service-kicker {
  color: var(--max-gold);
  font-family: var(--max-serif);
}

/* Dynamic user-flow UI. Specificity deliberately beats the runtime inline styles. */
body .flow-stack {
  gap: 10px;
}

body #my-lots-view .flow-stack {
  gap: 9px;
}

body .flow-lot {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 14px;
}

body .flow-lot h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.08;
}

body .flow-id {
  background: transparent;
  color: var(--max-muted);
  font-family: var(--max-serif);
}

body .flow-status {
  padding: 4px 9px;
  border: 1px solid var(--max-line-strong);
  border-radius: 999px;
  color: var(--max-gold);
  font-family: var(--max-serif);
  opacity: 1;
}

body .flow-metrics {
  gap: 5px;
}

body .flow-metrics span {
  padding: 0;
  background: transparent;
  color: var(--max-text);
  font-family: var(--max-serif);
}

body .flow-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 7px;
  margin-top: 5px;
}

body .flow-danger {
  border: 1px solid color-mix(in srgb, var(--max-danger) 58%, transparent);
  background: transparent;
  color: var(--max-danger);
  font-family: var(--max-serif);
}

body .flow-form {
  gap: 11px;
}

body .flow-form label {
  color: var(--max-muted);
  font-family: var(--max-serif);
}

body .flow-form input,
body .flow-form select,
body .flow-form textarea {
  min-height: 46px;
  border: 1px solid var(--max-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--max-panel-soft) 72%, transparent);
  color: var(--max-text-strong);
}

body .flow-form textarea {
  min-height: 96px;
}

body .flow-check-grid,
body .flow-preset-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--max-line);
  border-radius: 12px;
}

body .flow-check,
body .flow-preset {
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--max-line);
  border-radius: 0;
  background: transparent;
}

body .flow-preset:last-child,
body .flow-check:last-child {
  border-bottom: 0;
}

body .flow-preset.active {
  background: color-mix(in srgb, var(--max-gold) 10%, transparent);
}

body .flow-switch span {
  background: color-mix(in srgb, var(--max-muted) 30%, transparent);
}

body .flow-switch input:checked + span {
  background: var(--max-red);
}

body .flow-sub-row {
  min-height: 50px;
  border-color: var(--max-line);
}

body .flow-loading,
body .flow-error,
body .flow-warning,
body .flow-success {
  border: 1px solid var(--max-line);
  background: var(--max-panel);
}

body .flow-warning {
  border-color: color-mix(in srgb, var(--max-gold) 48%, transparent);
}

body .profile-card {
  position: relative;
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
}

body .profile-avatar {
  width: 112px;
  height: 112px;
  border: 2px solid var(--max-gold-soft);
}

body .profile-copy .eyebrow {
  display: none;
}

body #profile-title {
  margin: 0;
  font-size: 27px;
}

body #profile-username {
  margin-top: 5px;
  font-family: var(--max-serif);
}

body .profile-settings,
body .ui-profile-menu {
  overflow: hidden;
  padding: 0;
}

body .setting-row,
body .ui-profile-link {
  min-height: 62px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--max-line);
}

body .setting-row:last-child,
body .ui-profile-link:last-child {
  border-bottom: 0;
}

body .setting-row strong,
body .ui-profile-link strong {
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-size: 16px;
  font-weight: 500;
}

body .setting-row span,
body .ui-profile-link span {
  color: var(--max-muted);
  font-size: 11px;
}

body .ui-profile-link {
  display: grid;
  width: 100%;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 9px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--max-line);
  background: transparent;
  color: inherit;
  text-align: left;
}

body .ui-profile-link-icon {
  color: var(--max-red-strong);
  font-family: var(--max-serif);
  font-size: 23px;
  text-align: center;
}

body .ui-profile-link-copy {
  display: grid;
  gap: 2px;
}

body .ui-profile-link-chevron {
  color: var(--max-gold-soft);
  font-family: var(--max-serif);
  font-size: 23px;
}

/* Support screen from the approved UI set. */
body .ui-support-view {
  padding-top: 4px;
}

body .ui-support-view > h1 {
  margin: 0 0 13px;
  font-size: clamp(31px, 9vw, 40px);
}

body .ui-support-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-radius: 16px;
}

body .ui-support-hero-icon,
body .ui-support-icon {
  display: grid;
  place-items: center;
  border: 1px solid var(--max-line-strong);
  border-radius: 50%;
  color: var(--max-gold);
  font-family: var(--max-serif);
}

body .ui-support-hero-icon {
  width: 52px;
  height: 52px;
  font-size: 25px;
}

body .ui-support-card strong,
body .ui-support-row strong,
body .ui-support-recent strong {
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-weight: 500;
}

body .ui-support-card p {
  margin: 5px 0 0;
  color: var(--max-muted);
  font-size: 11px;
  line-height: 1.45;
}

body .ui-support-list {
  overflow: hidden;
  margin-top: 12px;
  border-radius: 15px;
}

body .ui-support-row {
  display: grid;
  width: 100%;
  min-height: 64px;
  grid-template-columns: 42px 1fr 18px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--max-line);
  background: transparent;
  color: inherit;
  text-align: left;
}

body .ui-support-row:last-child {
  border-bottom: 0;
}

body .ui-support-icon {
  width: 36px;
  height: 36px;
  font-size: 17px;
}

body .ui-support-row.danger .ui-support-icon {
  border-color: color-mix(in srgb, var(--max-danger) 58%, transparent);
  background: color-mix(in srgb, var(--max-red) 78%, transparent);
  color: #fff3e1;
}

body .ui-support-row-copy {
  display: grid;
  gap: 2px;
}

body .ui-support-row-copy span {
  color: var(--max-muted);
  font-size: 10px;
}

body .ui-support-chevron {
  color: var(--max-gold-soft);
  font-family: var(--max-serif);
  font-size: 23px;
}

body .ui-support-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 2px 7px;
}

body .ui-support-section-head h2 {
  margin: 0;
  color: var(--max-text-strong);
  font-family: var(--max-serif);
  font-size: 19px;
  font-weight: 500;
}

body .ui-support-section-head button {
  border: 0;
  background: transparent;
  color: var(--max-red-strong);
  font-family: var(--max-serif);
  font-size: 11px;
}

body .ui-support-recent {
  padding: 14px;
  border-radius: 14px;
  color: var(--max-muted);
  font-size: 11px;
}

body .ui-support-create {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  font-size: 15px;
}

body .bottom-nav {
  width: min(calc(100% - 20px), 500px);
  min-height: 74px;
  right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 10px;
  padding: 6px 7px;
  border: 1px solid var(--max-line);
  border-radius: 17px;
  background: color-mix(in srgb, var(--max-panel-solid) 92%, transparent);
  box-shadow: 0 13px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

body .nav-item {
  min-width: 0;
  color: var(--max-muted);
  font-family: var(--max-serif);
  font-size: 10px;
}

body .nav-icon {
  color: currentColor;
  font-size: 19px;
}

body .nav-item.active {
  color: var(--max-red-strong);
}

body .nav-submit {
  margin-top: -24px;
  color: var(--max-text);
}

body .submit-icon {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(222, 74, 73, 0.58);
  background: linear-gradient(145deg, var(--max-red-dark), var(--max-red));
  color: #fff2df;
  box-shadow: 0 8px 18px rgba(112, 17, 23, 0.24);
  font-family: var(--max-sans);
  font-size: 34px;
  font-weight: 200;
}

body .toast,
body .lot-detail-toast {
  border: 1px solid var(--max-line);
  background: var(--glass);
  color: var(--max-text-strong);
}

/* Lot detail keeps the approved mobile geometry and gains a desktop composition. */
body .lot-detail-root {
  width: min(100%, 520px);
  color: var(--max-text);
}

body .lot-detail-header {
  background: linear-gradient(180deg, var(--max-bg) 72%, transparent);
}

body .lot-detail-header-title,
body .lot-detail-hero-name,
body .lot-detail-card-name,
body .lot-detail-price,
body .lot-detail-countdown,
body .lot-detail-section-title,
body .lot-detail-rules-head strong,
body .lot-detail-story-line,
body .lot-detail-quote {
  font-family: var(--max-serif);
}

body .lot-detail-panel,
body .lot-detail-price-card,
body .lot-detail-reward,
body .lot-detail-rule-chip {
  border-color: var(--max-line);
  background: var(--max-panel);
}

body .lot-detail-image-frame {
  border-color: color-mix(in srgb, var(--max-gold) 72%, transparent);
}

body .lot-detail-badge.rarity,
body .lot-detail-row-icon {
  color: var(--max-gold);
}

body .lot-detail-telegram,
body .lot-detail-bottom-telegram {
  border-color: rgba(207, 61, 60, 0.72);
  background: linear-gradient(135deg, var(--max-red-dark), var(--max-red-strong));
  font-family: var(--max-serif);
  font-weight: 500;
}

body .lot-detail-seller.unverified,
body .lot-detail-countdown {
  color: var(--max-danger);
}

@media (max-width: 380px) {
  body .app-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  body .identity-copy strong {
    font-size: 20px;
  }

  body .active-auction {
    grid-template-columns: minmax(116px, 42%) minmax(0, 1fr);
    gap: 9px;
  }

  body .active-media,
  body .active-media .card-image,
  body .active-media .image-placeholder {
    min-height: 226px;
  }

  body .auction-name {
    font-size: 18px;
  }

  body .flow-form-grid {
    grid-template-columns: 1fr;
  }

  body .profile-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }

  body .profile-avatar {
    width: 92px;
    height: 92px;
  }
}

@media (min-width: 700px) and (max-width: 899px) {
  body .app-shell,
  body .lot-detail-root {
    width: min(100%, 680px);
  }

  body .active-auction {
    grid-template-columns: 270px 1fr;
  }

  body .active-media,
  body .active-media .card-image,
  body .active-media .image-placeholder {
    min-height: 360px;
  }
}

@media (min-width: 900px) {
  body {
    min-height: 100vh;
  }

  body .app-shell {
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 30px 34px 42px 142px;
  }

  body .topbar {
    min-height: 74px;
    margin-bottom: 18px;
  }

  body .avatar {
    width: 56px;
    height: 56px;
  }

  body .identity-copy strong {
    font-size: 25px;
  }

  body .identity-copy span {
    font-size: 12px;
  }

  body #auction-view {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
    gap: 15px 22px;
    align-items: start;
  }

  body #auction-view > .page-heading,
  body #auction-view > .segment,
  body #auction-view > .calendar-panel,
  body #auction-view > .free-slots-panel,
  body #auction-view > .rules-strip,
  body #auction-view > .info-panel {
    grid-column: 1 / -1;
  }

  body #auction-view > section:not(.upcoming-section) {
    grid-column: 1;
  }

  body #auction-view > .upcoming-section {
    grid-column: 2;
  }

  body .page-heading {
    margin-top: 0;
  }

  body #day-title::before {
    font-size: 48px;
  }

  body .segment {
    max-width: 520px;
  }

  body .active-auction {
    grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
    gap: 18px;
    padding: 11px;
  }

  body .active-media,
  body .active-media .card-image,
  body .active-media .image-placeholder {
    min-height: 420px;
  }

  body .auction-name {
    font-size: clamp(26px, 2.1vw, 34px);
  }

  body .current-price {
    font-size: 40px;
  }

  body .upcoming-section {
    position: sticky;
    top: 24px;
  }

  body .upcoming-row {
    min-height: 68px;
  }

  body .upcoming-media {
    width: 82px;
    height: 54px;
  }

  body .secondary-view {
    max-width: 1080px;
  }

  body .secondary-heading h1,
  body .ui-support-view > h1 {
    font-size: 46px;
  }

  body #my-lots-view .flow-stack:not(.flow-compact) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  body #my-lots-view .flow-tabs {
    max-width: 720px;
    margin-bottom: 14px;
  }

  body #submit-view #submit-content,
  body #subscriptions-view #subscriptions-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }

  body #submit-view #submit-content > :first-child,
  body #subscriptions-view #subscriptions-content > :first-child {
    grid-column: 1 / -1;
  }

  body #profile-view {
    display: grid;
    grid-template-columns: minmax(340px, 0.78fr) minmax(480px, 1.22fr);
    gap: 18px;
    align-items: start;
  }

  body #profile-view > .profile-card {
    grid-column: 1;
    position: sticky;
    top: 22px;
  }

  body #profile-view > .profile-settings,
  body #profile-view > .service-card:not(.profile-card),
  body #profile-view > .ui-profile-menu {
    grid-column: 2;
  }

  body .profile-card {
    grid-template-columns: 150px minmax(0, 1fr);
    padding: 22px;
  }

  body .profile-avatar {
    width: 140px;
    height: 140px;
  }

  body #profile-title {
    font-size: 33px;
  }

  body .ui-support-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
    gap: 14px 18px;
    align-items: start;
  }

  body .ui-support-view > h1 {
    grid-column: 1 / -1;
  }

  body .ui-support-card,
  body .ui-support-list {
    grid-column: 1;
  }

  body .ui-support-side {
    grid-column: 2;
    grid-row: 2 / span 2;
    position: sticky;
    top: 22px;
  }

  body .bottom-nav {
    top: 28px;
    right: auto;
    bottom: 28px;
    left: max(22px, calc(50vw - 620px));
    width: 102px;
    min-height: 0;
    height: calc(100vh - 56px);
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 13px 8px;
    border-radius: 24px;
  }

  body .nav-item {
    width: 100%;
    min-height: 74px;
    flex: 0 0 auto;
    border-radius: 15px;
  }

  body .nav-item.active {
    background: color-mix(in srgb, var(--max-red) 12%, transparent);
  }

  body .nav-submit {
    margin: 8px 0;
  }

  body .submit-icon {
    width: 54px;
    height: 54px;
  }

  body.lot-detail-open .bottom-nav {
    display: none;
  }

  body .lot-detail-root {
    width: min(100%, 1120px);
    padding: 24px 28px 34px;
  }

  body .lot-detail-header {
    margin-bottom: 14px;
    border-bottom: 1px solid var(--max-line);
    background: color-mix(in srgb, var(--max-bg) 92%, transparent);
    backdrop-filter: blur(16px);
  }

  body .lot-detail-header-title {
    font-family: var(--max-serif);
    font-size: 24px;
    font-weight: 500;
  }

  body .lot-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 14px 20px;
    padding-bottom: 22px;
  }

  body .lot-detail-hero {
    grid-column: 1;
    grid-row: 1 / span 4;
    grid-template-columns: minmax(260px, 46%) minmax(0, 1fr);
    gap: 18px;
    margin: 0;
  }

  body .lot-detail-image-frame {
    min-height: 540px;
  }

  body .lot-detail-hero-name {
    font-size: clamp(35px, 3vw, 48px);
  }

  body .lot-detail-card-name {
    font-size: 22px;
  }

  body .lot-detail-price {
    font-size: 42px;
  }

  body .lot-detail-telegram,
  body .lot-detail-telegram-note {
    grid-column: 1;
  }

  body .lot-detail-body > .lot-detail-panel {
    grid-column: 2;
    margin: 0;
  }

  body .lot-detail-body > [data-lot-rewards-section],
  body .lot-detail-body > [data-lot-story-panel],
  body .lot-detail-body > .lot-detail-section:not([data-lot-rewards-section]):not([data-lot-story-panel]) {
    grid-column: 2;
    margin: 0;
  }

  body .lot-detail-row,
  body .lot-detail-condition-row {
    min-height: 54px;
  }

  body .lot-detail-bottom {
    display: none !important;
  }
}
