/* ==========================================================================
   XingTu Web — Mobile-First Dark Studio Design System
   ========================================================================== */

:root {
  --bg-app: #09090b;
  --bg-stage: #0e0e12;
  --bg-surface: #151519;
  --bg-surface-elevated: #1e1e24;
  --bg-glass: rgba(21, 21, 26, 0.86);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(200, 255, 0, 0.45);

  --text-primary: #f7f7fa;
  --text-secondary: #9b9ba8;
  --text-muted: #676775;

  --accent: #c8ff00;
  --accent-dim: rgba(200, 255, 0, 0.14);
  --accent-pink: #ff5e99;
  --accent-cyan: #38e8ff;
  --danger: #ff4d6a;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --font-ui: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  user-select: none;
  -webkit-user-select: none;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   App Shell (Responsive Mobile-First + Sleek Centered Studio on Desktop)
   ========================================================================== */

.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  max-width: 100%;
  margin: 0 auto;
  background: var(--bg-app);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  body {
    background: radial-gradient(circle at 50% 0%, #1a1a24 0%, #070709 65%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app-shell {
    max-width: 560px;
    height: min(96dvh, 940px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.03);
  }
}

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

/* ==========================================================================
   Top Bar
   ========================================================================== */

.top-bar {
  flex: 0 0 auto;
  height: calc(52px + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(11, 11, 14, 0.96) 0%, rgba(11, 11, 14, 0.75) 100%);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 20;
}

.top-left, .top-center, .top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-pill-btn:active {
  transform: scale(0.95);
}

.icon-pill-btn:hover {
  background: #282830;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.12s ease;
}

.icon-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.icon-btn:active:not(:disabled) {
  transform: scale(0.9);
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #09090b;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 18px rgba(200, 255, 0, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.export-btn:hover {
  filter: brightness(1.06);
}

.export-btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Main Interactive Canvas Stage
   ========================================================================== */

.stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.025) 0%, transparent 70%),
    var(--bg-stage);
  overflow: hidden;
  touch-action: none;
}

.canvas-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  will-change: transform;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
  border-radius: 4px;
  overflow: visible;
}

/* Checkerboard behind canvas so transparent cutouts are immediately visible */
.canvas-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background-image:
    linear-gradient(45deg, #1d1d22 25%, transparent 25%),
    linear-gradient(-45deg, #1d1d22 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1d1d22 75%),
    linear-gradient(-45deg, transparent 75%, #1d1d22 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #131317;
  z-index: 0;
}

#gl-canvas, #overlay-canvas {
  display: block;
  position: relative;
  border-radius: 4px;
}

#gl-canvas {
  z-index: 1;
}

#overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Layer interactive bounding handles */
.layer-handles {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.layer-box {
  position: absolute;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  pointer-events: auto;
  cursor: move;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  touch-action: none;
}

.layer-handle-btn {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141418;
  border: 1.5px solid var(--accent);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  touch-action: none;
}

.layer-handle-btn.delete {
  top: -12px;
  left: -12px;
  border-color: var(--danger);
  color: var(--danger);
}

.layer-handle-btn.edit {
  top: -12px;
  right: -12px;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.layer-handle-btn.transform {
  bottom: -12px;
  right: -12px;
  background: var(--accent);
  color: #09090b;
  cursor: nwse-resize;
}

/* Crop Overlay */
.crop-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  touch-action: none;
}

.crop-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.crop-box {
  position: absolute;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.58);
  cursor: move;
  touch-action: none;
}

.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.28) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}

.crop-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  touch-action: none;
}

.crop-corner::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--accent);
  border-style: solid;
}

.crop-corner.nw { top: -4px; left: -4px; cursor: nwse-resize; }
.crop-corner.nw::after { top: 2px; left: 2px; border-width: 3px 0 0 3px; }
.crop-corner.ne { top: -4px; right: -4px; cursor: nesw-resize; }
.crop-corner.ne::after { top: 2px; right: 2px; border-width: 3px 3px 0 0; }
.crop-corner.sw { bottom: -4px; left: -4px; cursor: nesw-resize; }
.crop-corner.sw::after { bottom: 2px; left: 2px; border-width: 0 0 3px 3px; }
.crop-corner.se { bottom: -4px; right: -4px; cursor: nwse-resize; }
.crop-corner.se::after { bottom: 2px; right: 2px; border-width: 0 3px 3px 0; }

/* Liquify Cursor Ring */
.liquify-cursor {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: rgba(200, 255, 0, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(200, 255, 0, 0.14);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 6;
}

.liquify-cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

/* Stage Floating HUD */
.stage-hud-bottom {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.hud-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: rgba(16, 16, 20, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.ai-pill {
  max-width: 62%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.ai-pill.loading .ai-dot {
  background: var(--accent-cyan);
  animation: pulseDot 1s infinite ease-in-out;
}

.ai-pill.ready .ai-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.ai-pill.warn .ai-dot {
  background: #ffb020;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

.hud-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.hud-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 16, 20, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.compare-btn.active {
  background: var(--accent);
  color: #09090b;
  border-color: var(--accent);
}

/* Drop Overlay & Toast */
.drop-overlay {
  position: absolute;
  inset: 12px;
  z-index: 30;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--accent);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-card {
  text-align: center;
  color: var(--accent);
  font-weight: 600;
}

.toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(24, 24, 30, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 40;
  white-space: nowrap;
  animation: fadeSlideDown 0.2s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Bottom 2-Tier Sliding Dock (Signature Xingtu UI)
   ========================================================================== */

.bottom-dock {
  flex: 0 0 auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: var(--safe-bottom);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.tool-panel {
  padding: 10px 14px 8px;
  min-height: 124px;
  max-height: 225px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

/* Precision Slider Row */
.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
}

.slider-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 68px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slider-track-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 28px;
}

.slider-center-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 8px;
  background: rgba(255, 255, 255, 0.32);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 2px;
}

input[type="range"].xt-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  margin: 0;
  touch-action: none;
}

input[type="range"].xt-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.12s ease;
}

input[type="range"].xt-slider:active::-webkit-slider-thumb {
  transform: scale(1.18);
  background: var(--accent);
}

input[type="range"].xt-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.slider-val {
  min-width: 34px;
  text-align: right;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.mini-reset-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.mini-reset-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.14);
}

/* Horizontal Scroll Carousels */
.h-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}

.h-scroll::-webkit-scrollbar {
  display: none;
}

/* Sub-tab Pills */
.subtabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.subtabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subtabs::-webkit-scrollbar {
  display: none;
}

.subtab-pill {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.subtab-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* Preset / Filter Cards */
.preset-card {
  flex: 0 0 auto;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.preset-thumb {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.preset-card.active .preset-thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(200, 255, 0, 0.18);
}

.preset-card:active .preset-thumb {
  transform: scale(0.94);
}

.preset-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--accent);
  letter-spacing: 0.03em;
}

.preset-name {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

.preset-card.active .preset-name {
  color: var(--accent);
  font-weight: 700;
}

/* Tool Icon Chips (Beauty, Adjust, Liquify, Crop, Effects) */
.tool-chip {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 7px 8px;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  position: relative;
  transition: all 0.15s ease;
}

.tool-chip.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--text-primary);
}

.tool-chip.modified::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.tool-chip-label {
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Color Swatches (HSL, Makeup, Background, Text Colors) */
.swatch-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.swatch-btn.active {
  border-color: var(--accent);
  transform: scale(1.14);
  box-shadow: 0 0 0 2px rgba(200, 255, 0, 0.28);
}

.swatch-btn.none-swatch {
  background: linear-gradient(135deg, #25252d 44%, #ff4d6a 46%, #ff4d6a 54%, #25252d 56%);
}

/* Sticker & Font Tiles */
.sticker-tile {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.sticker-tile:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.sticker-tile:active {
  transform: scale(0.92);
}

.sticker-tile img, .sticker-tile svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.action-pill {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.action-pill.primary {
  background: var(--accent);
  color: #09090b;
  border-color: var(--accent);
}

.action-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.action-pill.danger {
  color: var(--danger);
  border-color: rgba(255, 77, 106, 0.35);
}

/* Primary Bottom Nav Bar (Tier 2) */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-bar::-webkit-scrollbar {
  display: none;
}

.nav-item {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 5px 6px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-item.active {
  color: var(--accent);
  background: rgba(200, 255, 0, 0.08);
}

.nav-item span.nav-label {
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   Bottom Sheet Modals (Export, Source/Camera, Text Edit, Save Recipe)
   ========================================================================== */

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  width: 100%;
  max-height: 86%;
  overflow-y: auto;
  background: #17171d;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 18px calc(22px + var(--safe-bottom));
  animation: slideUp 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { transform: translateY(36px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

.modal-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

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

.modal-option-card {
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 12.5px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.modal-option-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.modal-option-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.modal-option-card small {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 11px;
}

.modal-field {
  margin-bottom: 12px;
}

.modal-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.modal-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0e0e13;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
}

.modal-input:focus {
  border-color: var(--accent);
}

.modal-primary-btn {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #09090b;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.camera-preview {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
  aspect-ratio: 3 / 4;
  max-height: 360px;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Segmented pills inside modals */
.seg-group {
  display: flex;
  gap: 6px;
  background: #0e0e13;
  padding: 4px;
  border-radius: 12px;
}

.seg-btn {
  flex: 1;
  height: 32px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.seg-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--accent);
}

/* SVG icon sizing */
svg.xt-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.nav-item svg.xt-icon {
  width: 20px;
  height: 20px;
}
