:root {
  --bg: #171922;
  --bg-panel: #1d202a;
  --bg-panel-soft: #222633;
  --text: #f4f6fb;
  --muted: #9aa2b5;
  --line: #303748;
  --accent: #ef9a61;
  --accent-soft: #2f2830;
  --ok: #2fa86e;
  --danger: #d45d5d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

.hidden {
  display: none !important;
}

.hidden-input {
  display: none;
}

.mobile-create-open-btn,
.mobile-sidebar-close-btn,
.mobile-sidebar-backdrop {
  display: none;
}

.auth-error {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 24px));
  z-index: 1000;
  padding: 12px 14px;
  border: 1px solid rgba(212, 93, 93, 0.7);
  background: rgba(80, 27, 27, 0.95);
  border-radius: 10px;
}

.desktop-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #1c2029 0%, #1a1d26 100%);
  display: flex;
  flex-direction: column;
  padding: 18px 16px 14px;
  gap: 14px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.brand-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  background: #2b2f3e;
}

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

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

.brand-title {
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.balance-badge {
  border: 1px solid #4a5166;
  background: #242936;
  color: #ffd8b9;
  border-radius: 12px;
  min-height: 40px;
  min-width: 92px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
}

.balance-badge:hover {
  border-color: var(--accent);
}

.balance-badge-plus {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #323a4c;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  margin-left: auto;
}

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

.section-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.mode-buttons,
.model-list {
  display: grid;
  gap: 8px;
}

.mode-buttons[data-ready="0"] {
  visibility: hidden;
}

.mode-btn,
.model-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-panel);
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
}

.mode-btn:hover,
.model-card:hover {
  border-color: #4b556e;
}

.mode-btn.active,
.model-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mode-btn:disabled,
.model-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.model-title {
  font-weight: 700;
  margin-bottom: 3px;
}

.model-sub {
  color: var(--muted);
  font-size: 12px;
}

.aspect-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.aspect-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel);
  color: var(--text);
  min-height: 50px;
  padding: 5px 4px;
  cursor: pointer;
  font-weight: 600;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
}

.aspect-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.aspect-glyph-wrap {
  height: 19px;
  display: grid;
  place-items: center;
}

.aspect-glyph {
  width: var(--glyph-w, 18px);
  height: var(--glyph-h, 18px);
  border-radius: 5px;
  border: 2px solid rgba(206, 214, 234, 0.7);
  background: rgba(255, 255, 255, 0.02);
}

.aspect-glyph--auto {
  width: 18px;
  height: 18px;
  border-color: rgba(206, 214, 234, 0.7);
  position: relative;
}

.aspect-glyph--auto::after {
  content: "A";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #cfd6ea;
}

.aspect-label {
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

.aspect-btn.active .aspect-glyph {
  border-color: rgba(239, 154, 97, 0.9);
  background: rgba(239, 154, 97, 0.45);
}

.aspect-btn.active .aspect-glyph--auto::after {
  color: #2f2830;
}

.style-selfie-section {
  display: grid;
  gap: 10px;
}

.style-selfie-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.style-selfie-plus {
  display: none;
  align-items: center;
  justify-content: center;
  color: #8aa8ff;
  font-size: 44px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  padding-top: 44px;
}

.style-selfie-section.combined {
  grid-template-columns: 118px 24px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 8px;
  align-items: stretch;
}

.style-selfie-section.combined::before {
  content: "СТИЛЬ И СЕЛФИ";
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.style-selfie-section.combined .style-selfie-plus {
  display: flex;
  align-self: stretch;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  font-size: 56px;
}

.style-selfie-section.combined #modeFormPreset,
.style-selfie-section.combined #selfieSection {
  margin: 0;
  padding: 0;
}

.style-selfie-section.combined #modeFormPreset > .section-label,
.style-selfie-section.combined #selfieSection .selfie-header {
  display: none;
}

.style-selfie-section.combined #modeFormPreset {
  gap: 6px;
}

.style-selfie-section.combined #selfieSection {
  gap: 6px;
}

.style-selfie-section.combined #selectedStyleCard {
  padding: 0;
  gap: 0;
  overflow: hidden;
  height: 240px;
  display: flex;
  flex-direction: column;
}

.style-selfie-section.combined #selectedStyleCard .selected-style-preview {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 0;
}

.style-selfie-section.combined #selectedStyleCard .selected-style-meta {
  padding: 7px 8px;
  min-height: 44px;
}

.style-selfie-section.combined #selectedStyleCard .selected-style-cat {
  font-size: 13px;
  line-height: 1.2;
}

.style-selfie-section.combined #selectedStyleCard.reference-mode.empty .selected-style-cat {
  font-size: 18px;
  line-height: 1.03;
  text-align: center;
  color: #e3ecff;
}

.style-selfie-section.combined #selfieSection .selfie-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 116px;
  gap: 8px;
  max-height: none;
  overflow: visible;
}

.style-selfie-section.combined #selfieGrid .selfie-card,
.style-selfie-section.combined #selfieGrid .selfie-add-card {
  height: 116px;
}

.style-selfie-section.combined #selfieGrid .selfie-card img {
  height: 100%;
}

.style-selfie-section.combined #selfieGrid .selfie-card-meta {
  display: none;
}

.style-selfie-section.combined #selfieGrid .selfie-card-title {
  display: none;
}

.style-selfie-section.combined #selfieGrid .selfie-card-sub {
  display: none;
}

.style-selfie-section.combined #selfieGrid .selfie-card-order {
  width: 16px;
  height: 16px;
  font-size: 10px;
  top: 4px;
  left: 4px;
}

.style-selfie-section.combined #selfieGrid .selfie-add-plus {
  font-size: 44px;
}

#selfieSection.prompt-compact .selfie-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: none;
  overflow: visible;
}

#selfieSection.prompt-compact #selfieGrid .selfie-card,
#selfieSection.prompt-compact #selfieGrid .selfie-add-card {
  height: 96px;
}

#selfieSection.prompt-compact #selfieGrid .selfie-card img {
  height: 100%;
}

#selfieSection.prompt-compact #selfieGrid .selfie-card-meta,
#selfieSection.prompt-compact #selfieGrid .selfie-card-title,
#selfieSection.prompt-compact #selfieGrid .selfie-card-sub {
  display: none;
}

#selfieSection.prompt-compact #selfieGrid .selfie-add-plus {
  font-size: 44px;
}

.selected-style-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 10px;
  justify-items: start;
  background: var(--bg-panel);
  position: relative;
}

.selected-style-card.clickable {
  cursor: pointer;
}

.selected-style-card.clickable:hover {
  border-color: #5f8dff;
}

.selected-style-card.style-picked-emphasis,
.mode-btn.style-picked-emphasis {
  border-color: #74a1ff;
  box-shadow: 0 0 0 2px rgba(107, 153, 255, 0.24), 0 0 18px rgba(82, 122, 221, 0.28);
}

.selected-style-card.style-picked-emphasis::after {
  content: "✓ Стиль выбран";
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid rgba(151, 192, 255, 0.7);
  background: rgba(22, 37, 76, 0.92);
  color: #d7e6ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  pointer-events: none;
}

.selected-style-card.empty {
  opacity: 0.85;
}

.selected-style-card.reference-mode.empty {
  border-style: dashed;
  border-color: #4a5a80;
  background: #1d2435;
  opacity: 1;
}

.selected-style-preview {
  width: 78px;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  background: #2b3140;
  display: grid;
  place-items: center;
}

.selected-style-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-upload-preview {
  background: #142958;
}

.reference-upload-icon {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: #223f79;
  display: grid;
  place-items: center;
  font-size: 30px;
}

.reference-upload-text {
  color: #e3ecff;
  text-align: center;
  font-weight: 700;
  line-height: 1.05;
}

.selected-style-name {
  display: none;
}

.selected-style-meta {
  width: 100%;
}

.selected-style-cat {
  color: var(--muted);
  font-size: 13px;
  margin-top: 0;
  font-weight: 600;
}

.secondary-btn,
.ghost-btn,
.logout-btn {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 600;
}

.secondary-btn:hover,
.ghost-btn:hover,
.logout-btn:hover {
  border-color: #59617a;
}

.reference-preview {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  max-height: 180px;
}

.reference-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.inline-hint {
  color: var(--muted);
  font-size: 12px;
}

.prompt-input {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel);
  color: var(--text);
  padding: 10px;
}

.prompt-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel);
  color: var(--text);
  min-height: 40px;
  cursor: pointer;
  font-weight: 600;
}

.toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.selfie-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
}

.selected-selfies-row {
  display: none;
}

.selected-chip {
  font-size: 12px;
  border: 1px solid #54617f;
  background: #27324a;
  border-radius: 999px;
  padding: 3px 8px;
}

.selfie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  align-items: start;
}

#selfieGrid {
  max-height: none;
  overflow: visible;
}

.selfie-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.selfie-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  background: #2d3444;
}

#selfieGrid .selfie-card {
  display: flex;
  flex-direction: column;
  height: 176px;
}

#selfieGrid .selfie-card img {
  height: 120px;
  aspect-ratio: auto;
  flex: 0 0 auto;
}

.selfie-card-meta {
  padding: 5px 6px;
}

#selfieGrid .selfie-card-meta {
  min-height: 56px;
}

.selfie-card-title {
  font-size: 11px;
  color: #dbe1ef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selfie-card-sub {
  font-size: 10px;
  color: var(--muted);
}

.selfie-card.active {
  border-color: var(--accent);
}

.selfie-card-order {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(239, 154, 97, 0.95);
  color: #1d1f27;
  font-weight: 700;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.selfie-add-card {
  border: 1px dashed #4a5a80;
  border-radius: 10px;
  background: #1d2435;
  min-height: 124px;
  cursor: pointer;
  color: #8aa8ff;
  display: grid;
  place-items: center;
  padding: 0;
}

#selfieGrid .selfie-add-card {
  height: 176px;
  min-height: 0;
}

.selfie-add-card:hover {
  border-color: #5f8dff;
  color: #a9c2ff;
}

.selfie-add-plus {
  font-size: 52px;
  line-height: 1;
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 0;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(27, 30, 38, 0) 0%, rgba(27, 30, 38, 0.95) 18%, rgba(27, 30, 38, 1) 40%);
  padding-top: 14px;
}

.generate-btn {
  min-height: 78px;
  border-radius: 12px;
  border: 1px solid #5889ff;
  background: linear-gradient(180deg, #3d76e9 0%, #2f66da 100%);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  padding: 8px 12px;
  cursor: pointer;
}

.generate-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.generate-btn-main {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
}

.generate-btn-sub {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  opacity: 0.95;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.workspace-top,
.result-section,
.styles-panel,
.history-section,
.coming-soon-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-panel);
  padding: 14px;
  min-width: 0;
  max-width: 100%;
}

.styles-panel {
  overflow-x: hidden;
}

.workspace-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

.top-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-panel-soft);
  padding: 4px;
  gap: 4px;
}

.top-tab {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
}

.top-tab.active {
  border-color: #4d5469;
  background: #2a2f3e;
  color: #fff;
}

.profile-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-top-name {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: #dfe5f5;
  font-weight: 600;
}

.profile-menu-btn {
  border: 1px solid #535f7d;
  background: #242a39;
  color: #fff;
  border-radius: 12px;
  min-height: 46px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #1e1e1f;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.profile-caret {
  font-size: 14px;
  color: var(--muted);
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 290px;
  border: 1px solid #3e4558;
  border-radius: 14px;
  background: #1f232e;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  padding: 10px;
  z-index: 50;
}

.profile-menu-user {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.profile-menu-name {
  font-weight: 700;
  font-size: 16px;
}

.profile-menu-email {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.profile-menu-item {
  width: 100%;
  border: 1px solid transparent;
  background: #272d3c;
  color: #fff;
  border-radius: 10px;
  min-height: 38px;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 6px;
}

.profile-menu-item:hover {
  border-color: #566181;
}

.profile-menu-item.danger {
  color: #ff9b9b;
  background: #32252a;
}

.tab-panel {
  min-height: 0;
  display: grid;
  gap: 12px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
}

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

.style-search {
  width: 260px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel-soft);
  color: var(--text);
  padding: 8px 10px;
}

.result-state {
  margin-top: 10px;
  color: #d3d9e8;
}

.result-state.ok {
  color: #a9f0c8;
}

.result-state.error {
  color: #ffb3b3;
}

.result-image-wrap {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  width: min(460px, 100%);
}

.result-image-wrap img {
  width: 100%;
  display: block;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #2b3346;
}

.latest-generated-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-panel-soft);
  padding: 10px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  align-items: start;
}

.latest-generated-image-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #2b3242;
}

.latest-generated-image-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.latest-generated-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.latest-action-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #5a8fff;
  background: #2f66da;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.latest-action-btn.secondary {
  border-color: #58627a;
  background: #2b3140;
}

.latest-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.category-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.category-chips::-webkit-scrollbar {
  height: 6px;
}

.category-chips::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.style-category-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.style-category-back-btn {
  border: 1px solid #4f5770;
  background: #232a3a;
  color: #fff;
  border-radius: 10px;
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

.style-category-back-btn:hover {
  border-color: #66708e;
}

.style-category-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}

.cat-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-panel-soft);
  color: var(--text);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.cat-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.style-grid,
.history-grid,
.purchase-packages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
}

.style-grid.styles-by-category {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-width: 0;
}

.style-section + .style-section {
  margin-top: 0;
}

.style-section {
  min-width: 0;
  max-width: 100%;
}

.style-section-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 30px;
  position: relative;
  padding-right: 52px;
}

.style-section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-section-all {
  border: none;
  background: transparent;
  color: #c7d5ff;
  font-size: 16px;
  font-weight: 700;
  padding: 0 0 0 8px;
  border-radius: 0;
  cursor: pointer;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.style-section-all:hover {
  color: #e6eeff;
}

.style-row {
  --style-row-gap: 10px;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--style-row-gap);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.style-row::-webkit-scrollbar {
  height: 6px;
}

.style-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.style-row .style-card {
  flex: 0 0 clamp(170px, 19vw, 220px);
  width: clamp(170px, 19vw, 220px);
  scroll-snap-align: start;
}

.style-card,
.history-card,
.package-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-panel-soft);
  cursor: pointer;
  position: relative;
}

.style-card img,
.history-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #1b2233;
}

.style-meta,
.history-meta {
  padding: 8px;
}

.style-name,
.history-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.style-sub,
.history-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.style-card.active,
.package-card.active {
  border-color: var(--accent);
}

.style-card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(17, 24, 37, 0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

.style-card-fav.active {
  background: rgba(47, 102, 218, 0.78);
  border-color: rgba(143, 185, 255, 0.95);
}

.package-card {
  padding: 10px;
}

.package-title {
  font-weight: 700;
}

.package-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.package-price {
  margin-top: 7px;
  font-size: 14px;
  color: #ffd9bd;
}

.history-empty,
.style-empty,
.selfie-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 2px;
}

.selfie-grid .selfie-empty {
  grid-column: 1 / -1;
}

.coming-soon-card {
  display: grid;
  place-items: center;
  min-height: 240px;
}

.coming-soon-title {
  font-weight: 700;
  font-size: 22px;
}

.coming-soon-sub {
  color: var(--muted);
  margin-top: 6px;
}

.selfie-picker-card {
  width: min(1220px, calc(100vw - 24px));
}

.selfie-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
}

.selfie-picker-grid .selfie-card img {
  aspect-ratio: 1 / 1;
}

.selfie-picker-grid .selfie-card-meta {
  min-height: 40px;
  padding: 4px 6px;
}

.selfie-picker-grid .selfie-card-title {
  font-size: 12px;
}

.selfie-picker-grid .selfie-card-sub {
  font-size: 11px;
}

.selfie-picker-grid .selfie-card {
  position: relative;
}

.selfie-card-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(24, 28, 39, 0.62);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
}

.selfie-card-delete-btn:hover {
  border-color: #ffb3b3;
  background: rgba(78, 29, 41, 0.74);
}

.selfie-card-delete-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.selfie-uploading-card {
  position: relative;
  border: 1px dashed #5d73a8;
  border-radius: 10px;
  background: #1a2133;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.selfie-uploading-body {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px 8px 12px;
}

.selfie-uploading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(156, 183, 238, 0.28);
  border-top-color: #8fb5ff;
  animation: selfie-upload-spin 0.85s linear infinite;
}

.selfie-uploading-label {
  color: #b8c8ee;
  font-size: 14px;
  font-weight: 600;
}

@keyframes selfie-upload-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.selfie-picker-grid .selfie-empty {
  grid-column: 1 / -1;
}

.modal-card.selfie-delete-confirm-card {
  width: min(320px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
}

.result-delete-confirm-overlay {
  z-index: 170;
}

.selfie-delete-confirm-text {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.selfie-delete-confirm-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.selfie-delete-confirm-btn {
  min-height: 40px;
  min-width: 110px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #58668b;
  background: #252e43;
  color: #f4f7ff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.selfie-delete-confirm-btn.danger {
  border-color: #c96a6a;
  background: #6a2b2b;
}

.selfie-delete-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.selfie-picker-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.selfie-picker-action-btn {
  min-height: 50px;
  border: 1px solid #4d5a78;
  background: #1f2740;
  color: #fff;
  border-radius: 14px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

.selfie-picker-action-btn.secondary {
  background: #202839;
  border-color: #44506a;
}

.selfie-picker-action-btn.primary {
  background: #202839;
  border-color: #44506a;
}

.selfie-picker-action-btn.primary.is-ready {
  background: #2f66da;
  border-color: #6b9bff;
}

.selfie-picker-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.selfie-picker-action-btn:hover {
  border-color: #6b7da4;
}

@media (max-width: 1400px) {
  .selfie-picker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 22, 0.7);
  backdrop-filter: blur(2px);
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-card {
  width: min(760px, calc(100vw - 20px));
  border: 1px solid #464f67;
  border-radius: 16px;
  background: #1f232f;
  padding: 14px;
}

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

.modal-title {
  font-weight: 700;
  font-size: 18px;
}

.modal-close {
  border: 1px solid #566181;
  border-radius: 10px;
  background: #2a2f3d;
  color: #fff;
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.purchase-gift-hint {
  margin-bottom: 10px;
  border: 1px solid #586898;
  border-radius: 12px;
  background: #222d45;
  color: #d9e6ff;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}

.purchase-gift-result {
  margin-top: 10px;
  border: 1px solid #4b628f;
  border-radius: 12px;
  background: #1f2c46;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.purchase-gift-result-text {
  color: #e3ecff;
  font-size: 14px;
  line-height: 1.4;
}

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

.profile-modal-card {
  width: min(900px, calc(100vw - 20px));
}

.profile-modal-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-panel-soft);
  padding: 12px;
  margin-top: 10px;
}

.profile-modal-section:first-of-type {
  margin-top: 0;
}

.profile-modal-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

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

.profile-balance-item,
.profile-referral-item {
  border: 1px solid #45516a;
  border-radius: 12px;
  background: #242b3a;
  padding: 10px;
}

.profile-balance-label,
.profile-referral-label {
  color: #9ba7c0;
  font-size: 12px;
  line-height: 1.2;
}

.profile-balance-value,
.profile-referral-value {
  margin-top: 6px;
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
}

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

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

.profile-referral-hint {
  margin-top: 10px;
  color: #b9c5de;
  font-size: 13px;
  line-height: 1.3;
}

.profile-referral-link-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.profile-referral-link {
  min-height: 40px;
  border: 1px solid #4d5871;
  border-radius: 10px;
  background: #202838;
  color: #d9e5ff;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-status {
  margin-top: 10px;
  color: var(--muted);
  min-height: 20px;
}

.purchase-status.error {
  color: #ffb0b0;
}

.purchase-status.ok {
  color: #a5f3c8;
}

.purchase-pay-btn {
  margin-top: 10px;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #5a8fff;
  background: #2f66da;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.purchase-pay-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.purchase-complete-view {
  margin-top: 10px;
  border: 1px solid #48629b;
  border-radius: 8px;
  background: #1f2d4a;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.purchase-complete-text {
  color: #d5e8ff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.purchase-complete-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #5a8fff;
  background: #2f66da;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.purchase-complete-btn:hover {
  border-color: #8db6ff;
}

.purchase-card.purchase-card-complete {
  width: min(560px, calc(100vw - 24px));
}

.progress-card {
  width: min(460px, calc(100vw - 20px));
  display: grid;
  gap: 10px;
}

.progress-stage {
  color: var(--muted);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #2b3140;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #f2a26d, #5fa3ff);
  transition: width 0.25s ease;
}

.progress-percent {
  font-weight: 700;
  color: #ffd8bf;
}

.style-preview-overlay {
  z-index: 120;
}

.style-preview-card {
  width: min(820px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 22px;
  background: #0f1524;
}

.style-preview-image-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #151d2f;
  min-height: min(74vh, 980px);
  display: grid;
  place-items: center;
}

.style-preview-image {
  display: block;
  width: 100%;
  height: min(74vh, 980px);
  object-fit: contain;
  object-position: center center;
  background: #11192a;
}

.style-preview-icon-btn {
  position: absolute;
  top: 10px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(22, 26, 35, 0.6);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.style-preview-icon-btn:hover {
  border-color: rgba(255, 255, 255, 0.68);
}

.style-preview-fav {
  left: 10px;
}

.style-preview-fav.active {
  background: rgba(47, 102, 218, 0.65);
  border-color: rgba(143, 185, 255, 0.95);
}

.style-preview-close {
  right: 10px;
  font-size: 40px;
}

.style-preview-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 124px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(23, 29, 40, 0.58);
  color: #fff;
  font-size: 52px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.style-preview-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.style-preview-prev {
  left: 10px;
}

.style-preview-next {
  right: 10px;
}

.style-preview-apply-btn {
  margin-top: 12px;
  width: 100%;
  min-height: 92px;
  border-radius: 22px;
  border: 1px solid #5e93ff;
  background: #2f66da;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px 12px;
}

.style-preview-apply-title {
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

.style-preview-apply-sub {
  font-size: 14px;
  color: #d6e4ff;
  line-height: 1.2;
}

.result-preview-card {
  width: min(860px, calc(100vw - 24px));
}

.result-preview-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #3f4a66;
  border-radius: 18px;
  background: rgba(18, 24, 39, 0.95);
  padding: 8px;
}

.result-action-btn {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid #4d5d82;
  background: #1f2740;
  color: #eef3ff;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.result-action-btn.primary {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 18px;
  border-color: #5a8fff;
  background: #2f66da;
  color: #fff;
}

.result-action-btn.icon {
  flex: 0 0 52px;
  width: 52px;
  padding: 0;
  font-size: 22px;
}

.result-action-btn.icon.danger {
  border-color: #874857;
  background: #2c1d26;
  color: #ff8d9a;
}

.result-action-btn:hover {
  border-color: #6f85bc;
}

.result-action-btn.primary:hover {
  border-color: #78a6ff;
  background: #3a72eb;
}

.result-action-btn.icon.danger:hover {
  border-color: #b25b6f;
}

.result-action-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.result-preview-edit {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.result-preview-edit-input {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1d2332;
  color: var(--text);
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.4;
  font-family: inherit;
}

.result-preview-edit-input::placeholder {
  color: #939cb1;
}

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

@media (max-width: 980px) {
  .style-preview-icon-btn {
    width: 56px;
    height: 56px;
    font-size: 34px;
  }

  .style-preview-close {
    font-size: 38px;
  }

  .style-preview-nav-btn {
    width: 64px;
    height: 122px;
    font-size: 56px;
  }

  .style-preview-apply-title {
    font-size: 21px;
  }

  .style-preview-apply-sub {
    font-size: 14px;
  }

  .result-preview-edit-actions {
    grid-template-columns: 1fr;
  }

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

  .selfie-picker-actions {
    grid-template-columns: 1fr;
  }

  .purchase-gift-result-actions {
    grid-template-columns: 1fr;
  }

  .profile-balance-grid,
  .profile-referral-stats,
  .profile-modal-actions {
    grid-template-columns: 1fr;
  }

  .profile-referral-link-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .selfie-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desktop-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    grid-template-rows: auto auto;
  }

  .top-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-top-name {
    display: none;
  }

  .latest-generated-wrap {
    grid-template-columns: 1fr;
  }

  .latest-generated-image-wrap {
    max-width: 320px;
  }

  .style-row .style-card {
    flex: 0 0 min(230px, 56vw);
    width: min(230px, 56vw);
  }
}

@media (max-width: 980px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .desktop-shell,
  .workspace,
  .workspace-top,
  .tab-panel,
  .history-section,
  .styles-panel,
  .history-grid,
  #personalTabPanel,
  #ideasTabPanel,
  #trendsTabPanel {
    min-width: 0;
    max-width: 100%;
  }

  body.mobile-sidebar-open {
    overflow: hidden;
  }

  .desktop-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(92vw, 380px);
    max-width: 380px;
    height: 100dvh;
    z-index: 68;
    border-right: 1px solid var(--line);
    border-bottom: none;
    box-shadow: 18px 0 38px rgba(0, 0, 0, 0.45);
    transform: translateX(calc(-100% - 28px));
    transition: transform 0.22s ease;
    will-change: transform;
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  }

  body.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .workspace {
    grid-template-rows: auto minmax(0, 1fr);
    padding: 12px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .workspace-top {
    position: sticky;
    top: 6px;
    z-index: 24;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .top-tabs {
    width: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .top-tab {
    padding: 9px 10px;
  }

  .profile-wrap {
    justify-self: end;
  }

  .profile-menu {
    width: min(88vw, 290px);
  }

  .panel-head {
    align-items: flex-start;
  }

  .style-search {
    width: min(54vw, 240px);
  }

  .styles-panel {
    padding: 12px;
  }

  .style-grid {
    --ideas-card-width-mobile: min(160px, 38vw);
  }

  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .style-row {
    --style-row-gap: 8px;
  }

  .style-row .style-card {
    flex: 0 0 var(--ideas-card-width-mobile);
    width: var(--ideas-card-width-mobile);
  }

  .style-grid:not(.styles-by-category) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .style-grid:not(.styles-by-category) .style-card {
    width: auto;
  }

  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(10, 14, 24, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  body.mobile-sidebar-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-create-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    min-height: 52px;
    border-radius: 14px;
    border: 1px solid #5a8fff;
    background: linear-gradient(180deg, #3d76e9 0%, #2f66da 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(14, 33, 79, 0.5);
    cursor: pointer;
    z-index: 66;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .mobile-create-open-icon {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-create-open-text {
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
  }

  body.mobile-sidebar-open .mobile-create-open-btn {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
  }

  .mobile-sidebar-close-btn {
    display: none;
    position: fixed;
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
    border-radius: 12px;
    border: 1px solid #6a7693;
    background: rgba(18, 24, 39, 0.96);
    color: #97a4c1;
    font-size: 46px;
    line-height: 1;
    padding: 0;
    place-items: center;
    cursor: pointer;
    z-index: 69;
  }

  body.mobile-sidebar-open .mobile-sidebar-close-btn {
    display: grid;
  }

  #stylePreviewModal.modal-overlay,
  #resultPreviewModal.modal-overlay {
    padding: 8px;
    align-items: stretch;
  }

  #stylePreviewModal .style-preview-card,
  #resultPreviewModal .style-preview-card {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 16px);
    padding: 8px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
  }

  #stylePreviewModal .style-preview-image-wrap,
  #resultPreviewModal .style-preview-image-wrap {
    flex: 1;
    min-height: 0;
    border-radius: 16px;
  }

  #stylePreviewModal .style-preview-image,
  #resultPreviewModal .style-preview-image {
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  #stylePreviewModal .style-preview-icon-btn,
  #resultPreviewModal .style-preview-icon-btn {
    top: 12px;
    width: 46px;
    height: 46px;
    font-size: 30px;
  }

  #stylePreviewModal .style-preview-fav {
    left: 12px;
  }

  #stylePreviewModal .style-preview-close,
  #resultPreviewModal .style-preview-close {
    right: 12px;
    font-size: 30px;
  }

  #stylePreviewModal .style-preview-nav-btn,
  #resultPreviewModal .style-preview-nav-btn {
    width: 42px;
    height: 72px;
    border-radius: 12px;
    font-size: 34px;
  }

  #stylePreviewModal .style-preview-prev,
  #resultPreviewModal .style-preview-prev {
    left: 8px;
  }

  #stylePreviewModal .style-preview-next,
  #resultPreviewModal .style-preview-next {
    right: 8px;
  }

  #stylePreviewModal .style-preview-apply-btn {
    margin-top: 0;
    min-height: 74px;
    border-radius: 20px;
    gap: 3px;
    padding: 10px 14px;
  }

  #stylePreviewModal .style-preview-apply-title {
    font-size: 22px;
    line-height: 1.05;
  }

  #stylePreviewModal .style-preview-apply-sub {
    font-size: 12px;
    line-height: 1.2;
  }

  .result-preview-actions {
    gap: 8px;
    padding: 7px;
  }

  .result-action-btn {
    min-height: 46px;
  }

  .result-action-btn.icon {
    flex-basis: 46px;
    width: 46px;
    font-size: 20px;
  }

  .result-action-btn.primary {
    padding: 0 12px;
    font-size: 15px;
  }
}
