:root {
  --color-bg: #f6f7fb;
  --color-surface: #ffffff;
  --color-primary: #0b6cff;
  --color-text: #1f2933;
  --color-muted: #546778;
  --color-border: rgba(31, 41, 51, 0.12);
  --color-border-strong: rgba(31, 41, 51, 0.16);
  --radius: 16px;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-mark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand-mark:hover,
.brand-mark:focus-visible {
  color: var(--color-primary);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.user-name {
  font-weight: 600;
  color: var(--color-text);
}

.user-credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 108, 255, 0.12);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.google-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.user-avatar:hover,
.user-avatar:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(11, 108, 255, 0.6);
  box-shadow: 0 12px 24px rgba(11, 108, 255, 0.2);
}

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

.user-avatar-initials {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  z-index: 20;
}

.user-menu-dropdown[hidden] {
  display: none;
}

.user-menu-summary {
  display: grid;
  gap: 4px;
}

.user-menu-name {
  font-weight: 600;
  color: var(--color-text);
}

.user-menu-email {
  font-size: 0.85rem;
  color: var(--color-muted);
  word-break: break-word;
}

.user-menu-link {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: none;
}

.user-menu-link:hover,
.user-menu-link:focus-visible {
  color: #084ec0;
}

.user-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

.user-menu-login {
  display: grid;
  gap: 12px;
}

.user-menu-login-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.user-menu-login .google-signin {
  justify-content: flex-start;
}

.page {
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 12px 36px;
  display: grid;
  gap: 10px;
}

.profile-page {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 12px 40px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}

.profile-sidebar {
  position: sticky;
  top: 108px;
  align-self: flex-start;
}

.profile-nav {
  display: grid;
  gap: 8px;
}

.profile-nav-item {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-muted);
  text-align: left;
  cursor: pointer;
  transition: border 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.profile-nav-item:hover,
.profile-nav-item:focus-visible {
  border-color: rgba(11, 108, 255, 0.6);
  color: var(--color-primary);
}

.profile-nav-item.active {
  border-color: rgba(11, 108, 255, 0.8);
  color: var(--color-primary);
  background: rgba(11, 108, 255, 0.08);
}

.profile-content {
  display: grid;
  gap: 24px;
}

.profile-feedback {
  margin: 0;
}

.profile-section {
  display: grid;
  gap: 20px;
}

.profile-section[hidden] {
  display: none !important;
}

.profile-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
  padding: 24px;
  display: grid;
  gap: 24px;
}

.profile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-card-title h2 {
  margin: 0;
  font-size: 1.35rem;
}

.profile-muted {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-summary-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid rgba(11, 108, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(11, 108, 255, 0.06);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary);
}

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

.profile-summary-main h3 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.profile-summary-main p {
  margin: 0;
  color: var(--color-muted);
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.profile-detail {
  display: grid;
  gap: 4px;
}

.profile-detail dt {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.profile-detail dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

.profile-billing-placeholder {
  display: grid;
  gap: 16px;
  max-width: 520px;
  font-size: 0.98rem;
}

.profile-card-metric {
  display: grid;
  gap: 4px;
  text-align: right;
}

.profile-metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.profile-metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.profile-table th,
.profile-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.profile-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.profile-table tbody tr:hover {
  background: rgba(11, 108, 255, 0.04);
}

.table-cell-credits {
  font-weight: 600;
  color: var(--color-primary);
}

.usage-chart {
  display: grid;
  gap: 14px;
}

.usage-chart-item {
  display: grid;
  gap: 6px;
}

.usage-chart-label {
  font-weight: 600;
  color: var(--color-text);
}

.usage-chart-bar {
  background: rgba(11, 108, 255, 0.12);
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
}

.usage-chart-bar-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(11, 108, 255, 0.85),
    rgba(11, 108, 255, 1)
  );
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: inherit;
  transition: width 0.3s ease;
}

.usage-chart-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  padding-right: 12px;
}

.usage-chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.usage-details {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hero {
  text-align: center;
  display: grid;
  gap: 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 4.5vw, 3rem);
}

.lead {
  margin: 0 auto;
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--color-muted);
}

.ghost-button,
.secondary-button,
.primary {
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease;
}

.ghost-button {
  border: 1px solid transparent;
  background: rgba(11, 108, 255, 0.08);
  color: var(--color-primary);
  padding: 8px 16px;
}

.ghost-button:hover {
  background: rgba(11, 108, 255, 0.12);
  transform: translateY(-1px);
}

.ghost-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
}

.secondary-button:hover {
  border-color: rgba(11, 108, 255, 0.25);
  color: var(--color-primary);
}

.primary {
  background: var(--color-primary);
  color: #fff;
  padding: 14px 24px;
  font-size: 1.02rem;
  border: none;
  box-shadow: 0 14px 28px rgba(11, 108, 255, 0.2);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(11, 108, 255, 0.24);
}

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

.field label,
.size-group legend {
  font-weight: 600;
}

.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: #fdfdff;
  font-size: 1rem;
  resize: vertical;
  min-height: 110px;
  line-height: 1.45;
}

.field small {
  color: var(--color-muted);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
  transform: none;
}

.enhance {
  display: grid;
  gap: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.references-panel,
.preview-panel {
  background: var(--color-surface);
  border-radius: 0;
  padding: 8px;
  box-shadow: none;
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--color-border);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.panel-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.panel-subtitle {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
}

.panel-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.reference-drop {
  border: 2px dashed rgba(11, 108, 255, 0.18);
  border-radius: 0;
  padding: 10px;
  display: grid;
  gap: 6px;
  min-height: 120px;
  transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  background: rgba(11, 108, 255, 0.03);
  align-content: start;
  cursor: pointer;
  min-width: 0;
}

.reference-drop.empty {
  justify-items: center;
}

.reference-drop:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 108, 255, 0.25);
}

.reference-drop.dragover {
  border-color: var(--color-primary);
  background: rgba(11, 108, 255, 0.12);
}

.reference-drop-guidance {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.93rem;
  pointer-events: none;
}

.reference-drop-guidance strong {
  color: var(--color-text);
  font-size: 0.98rem;
}

.reference-drop:not(.empty) .reference-drop-guidance {
  display: none;
}

.reference-drop .reference-list {
  width: 100%;
  min-width: 0;
}

.reference-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.reference-card {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: #fdfdff;
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.reference-card.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(11, 108, 255, 0.14);
}

.reference-thumb {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.reference-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #eef2ff;
}

.reference-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.reference-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
}

.reference-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.reference-remove {
  border: none;
  background: rgba(200, 29, 37, 0.08);
  color: #c81d25;
  cursor: pointer;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.reference-remove:hover {
  background: rgba(200, 29, 37, 0.16);
}

.reference-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reference-status {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 2px;
  line-height: 1.2;
}

.reference-status.ready {
  color: #0f8456;
  font-weight: 600;
}

.reference-status.processing {
  color: var(--color-primary);
  font-weight: 600;
}

.empty-state {
  border: 1px dashed var(--color-border);
  border-radius: 0;
  padding: 12px;
  text-align: center;
  color: var(--color-muted);
  background: rgba(11, 108, 255, 0.04);
  font-size: 0.85rem;
}

.prompt-field {
  display: grid;
  gap: 4px;
}

.prompt-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-muted);
}

.prompt-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: 0;
  background: #fdfdff;
  font-size: 0.88rem;
  resize: vertical;
  min-height: 64px;
  line-height: 1.35;
}

.prompt-field textarea.at-limit {
  border-color: #c81d25;
}

.prompt-field textarea::placeholder {
  color: rgba(84, 103, 120, 0.7);
}

.prompt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.prompt-hint {
  opacity: 0.75;
}

.prompt-counter {
  font-weight: 600;
  color: var(--color-muted);
}

.prompt-counter.limit {
  color: #c81d25;
}

.preview-panel {
  position: relative;
  grid-template-rows: auto 1fr auto;
  min-height: 280px;
}

.preview-stage {
  border-radius: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 108, 255, 0.06),
    rgba(15, 23, 42, 0.04)
  );
  border: 1px solid rgba(11, 108, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  position: relative;
  height: clamp(240px, 32vw, 360px);
  overflow: hidden;
}

.preview-stage::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(11, 108, 255, 0.12);
  border-radius: 0;
  pointer-events: none;
}

.preview-stage img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}

.preview-placeholder {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 0 20px;
}

.preview-placeholder p {
  margin: 0;
  max-width: 320px;
}

.spinner {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
}

.spinner svg {
  width: 100%;
  height: 100%;
  display: block;
}

.preview-actions .ghost-button[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.size-group {
  border: none;
  padding: 0;
  display: grid;
  gap: 4px;
}

.size-group legend {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-muted);
}

.size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  border: 1px solid rgba(11, 108, 255, 0.2);
  background: rgba(11, 108, 255, 0.08);
}

.size-option {
  position: relative;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  background: transparent;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.size-option:not(:first-child) .size-option-content {
  border-left: 1px solid rgba(11, 108, 255, 0.18);
}

.size-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.size-option-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 4px;
  font-weight: 600;
  color: var(--color-muted);
  font-size: 0.76rem;
  width: 100%;
  min-height: 32px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.size-option:hover {
  background: rgba(11, 108, 255, 0.1);
}

.size-option input:checked + .size-option-content {
  color: var(--color-primary);
  background: rgba(11, 108, 255, 0.18);
}

.size-option input:focus-visible + .size-option-content {
  box-shadow: inset 0 0 0 2px rgba(11, 108, 255, 0.3);
}

.size-option input:checked + .size-option-content .size-icon::before {
  border-color: var(--color-primary);
  background: rgba(11, 108, 255, 0.16);
}

.size-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.size-icon::before {
  content: "";
  display: block;
  border: 2px solid var(--color-border-strong);
  border-radius: 6px;
  background: rgba(84, 103, 120, 0.12);
  transition: border 0.2s ease, background 0.2s ease;
}

.size-icon-square::before {
  width: 16px;
  height: 16px;
}

.size-icon-landscape::before {
  width: 20px;
  height: 12px;
  border-radius: 6px;
}

.size-icon-portrait::before {
  width: 12px;
  height: 20px;
  border-radius: 6px;
}

.size-label {
  font-size: 0.92rem;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.preview-size-group {
  flex: 1 1 50px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(11, 108, 255, 0.2);
  border-radius: 0;
  padding: 4px;
}

.preview-size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  border: 1px solid rgba(11, 108, 255, 0.2);
  background: rgba(11, 108, 255, 0.08);
  overflow: hidden;
}

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

.feedback,
.feedback.error,
.feedback.success {
  display: none !important;
}

@media (max-width: 1024px) {
  .profile-page {
    grid-template-columns: 220px 1fr;
    gap: 14px;
    padding: 16px 12px 36px;
  }

  .profile-card {
    padding: 12px;
  }
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
    gap: 8px;
  }

  .references-panel,
  .preview-panel {
    padding: 8px;
  }

  .preview-stage {
    height: clamp(210px, 40vw, 300px);
  }
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .references-panel,
  .preview-panel {
    padding: 8px;
  }

  .preview-panel {
    min-height: 240px;
  }

  .preview-stage {
    height: clamp(190px, 54vw, 280px);
  }
}

@media (max-width: 820px) {
  .profile-page {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }

  .profile-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .profile-nav-item {
    flex: 1 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .top-bar {
    padding: 12px 16px;
  }
  .user-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .user-status {
    gap: 8px;
    font-size: 0.85rem;
  }
  .user-credits-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .page {
    padding: 16px 12px 36px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .reference-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .reference-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: 160px;
    border-radius: 0;
  }

  .reference-thumb img {
    object-fit: cover;
  }

  .reference-top {
    align-items: flex-start;
  }

  .reference-remove {
    margin-top: -4px;
  }

  .preview-panel {
    min-height: 240px;
  }

  .preview-stage {
    height: 220px;
  }

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

  .panel-head h2 {
    font-size: 1.05rem;
  }

  .preview-actions {
    justify-content: stretch;
  }

  .preview-actions .primary {
    width: 100%;
    text-align: center;
  }

  .preview-actions .ghost-button {
    width: 100%;
    text-align: center;
  }

  .preview-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-size-group {
    width: 100%;
  }

  .preview-size-options {
    justify-content: space-between;
  }

  .preview-size-group {
    padding: 3px;
  }

  .preview-size-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .size-option-content {
    min-height: 26px;
    padding: 4px 2px;
    font-size: 0.7rem;
  }

  .size-icon {
    width: 18px;
    height: 18px;
  }

  .size-icon-square::before {
    width: 12px;
    height: 12px;
  }

  .size-icon-landscape::before {
    width: 15px;
    height: 9px;
    border-radius: 4px;
  }

  .size-icon-portrait::before {
    width: 9px;
    height: 15px;
    border-radius: 4px;
  }

  .preview-buttons {
    width: 100%;
    justify-content: stretch;
  }

  .preview-buttons .primary,
  .preview-buttons .ghost-button {
    width: 100%;
  }
}
