/* ─── Modern Midnight Studio Design Tokens ───────────────── */
:root {
  --bg:            #040406;
  --bg-panel:      #0c0c10;
  --surface:       #13131a;
  --surface-hover: #191924;
  --border:        #20202a;
  --border-hover:  #2d2d3c;
  --border-focus:  #6366f1;
  --border-glow:   rgba(99, 102, 241, 0.25);

  --text-1:        #f8fafc;
  --text-2:        #94a3b8;
  --text-3:        #64748b;

  --accent:        #6366f1;
  --accent-2:      #a855f7;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-glow:   rgba(99, 102, 241, 0.15);

  --warm:          #f59e0b;
  --warm-soft:     rgba(245, 158, 11, 0.08);
  --warm-border:   rgba(245, 158, 11, 0.2);

  --error:         #f43f5e;
  --error-bg:      rgba(244, 63, 94, 0.08);
  --error-border:  rgba(244, 63, 94, 0.25);

  --success:       #10b981;
  --success-bg:    rgba(16, 185, 129, 0.08);
  --success-border: rgba(16, 185, 129, 0.25);

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

  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:     0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:     0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow:   0 0 20px rgba(99, 102, 241, 0.15);

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --dur:           0.22s;

  --font-display:  'Outfit', system-ui, sans-serif;
  --font-body:     'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:     'IBM Plex Mono', ui-monospace, monospace;
}

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  background-color: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.5;
  overflow: hidden; /* Prevent page-level scrollbars on desktop */
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.05) 0%, transparent 40%),
    var(--bg);
}

button, textarea, input {
  font: inherit;
  color: inherit;
}

img, video {
  display: block;
  max-width: 100%;
}

/* ─── App Shell (iPhone / Android Mockup Frame on Desktop) ─── */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 410px; /* Golden standard mobile phone width */
  height: min(840px, calc(100vh - 40px)); /* Centered floating device box */
  background: var(--bg-panel);
  border: 10px solid #181822; /* Premium metallic phone bezel */
  border-radius: 46px; /* Smooth rounded device screen */
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

/* ─── Mobile Header ──────────────────────────────────── */
.mobile-app-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(12, 12, 16, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 5;
}

.header-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.logo svg {
  width: 16px;
  height: 16px;
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.header-titles h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  text-transform: uppercase;
  font-weight: 500;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.connection-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-2);
  text-transform: uppercase;
}

/* ─── Pages Scrollable Shell ─────────────────────────── */
.app-pages {
  flex: 1;
  position: relative;
  overflow: hidden; /* Hide overflow on the page wrapper */
}

/* Base Page Wrapper */
.app-page {
  position: absolute;
  inset: 0;
  display: none; /* Controlled by JS via .active class */
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  overflow-y: auto; /* Independent smooth scroll within each tab */
  overflow-x: hidden;
  padding-bottom: 30px; /* Safe scroll padding for the bottom bar */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.app-page.active {
  display: flex;
  animation: pageSlideIn 0.28s var(--ease) both;
}

@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scrollbar customizations */
.app-page::-webkit-scrollbar {
  width: 4px;
}

.app-page::-webkit-scrollbar-track {
  background: transparent;
}

.app-page::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
}

.app-page::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ─── Step Sections (Mobile Optimized Cards) ────────── */
.control-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.control-section:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-glow);
}

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

.step-indicator {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--warm-soft);
  border: 1px solid var(--warm-border);
  color: var(--warm);
  font-weight: 500;
}

.section-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
}

/* ─── Compact Native Upload Zone ────────────────────── */
.upload-zone {
  display: block;
  width: 100%;
  padding: 20px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1.5px dashed var(--border);
  color: inherit;
  cursor: pointer;
  text-align: center;
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.upload-zone:hover:not(:disabled),
.upload-zone:focus-visible {
  border-color: var(--accent);
  background: var(--surface-hover);
  border-style: solid;
  outline: none;
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--border-hover);
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.upload-zone:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* empty upload state */
.upload-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  transition: transform var(--dur) var(--ease);
}

.upload-zone:hover:not(:disabled) .upload-icon-wrap {
  transform: translateY(-2px);
  color: var(--accent-2);
}

.upload-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.upload-empty-content strong {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}

.upload-empty-content span {
  font-size: 0.74rem;
  color: var(--text-3);
  max-width: 30ch;
  line-height: 1.4;
}

/* uploaded preview card */
.upload-preview-content {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: default;
}

.upload-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-thumb img,
.upload-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.upload-meta strong {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

.upload-meta p {
  margin: 0;
  color: var(--text-3);
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

/* upload action buttons */
.step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Video Cropping UI ──────────────────────────────── */
.video-crop-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  animation: fadeScaleIn var(--dur) var(--ease) both;
}

.crop-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.crop-warning-icon {
  font-size: 1rem;
  line-height: 1.1;
}

.crop-info-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.crop-info-text strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warm);
}

.crop-info-text p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-2);
  line-height: 1.3;
}

.crop-control-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Styled slider */
#video-crop-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--border);
  outline: none;
  cursor: pointer;
}

#video-crop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  transition: transform var(--dur) var(--ease);
}

#video-crop-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

#video-crop-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  transition: transform var(--dur) var(--ease);
  cursor: pointer;
}

.crop-time-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-3);
}

#crop-start-label {
  color: var(--warm);
  font-weight: 500;
}

#crop-end-label {
  color: var(--text-2);
}

/* ─── Textarea Input ─────────────────────────────────── */
#prompt-textbox {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-1);
  line-height: 1.5;
  font-size: 0.85rem;
  resize: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

#prompt-textbox::placeholder {
  color: var(--text-3);
}

#prompt-textbox:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-glow);
}

.hint-text {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.35;
}

/* ─── Generation block ───────────────────────────────── */
.generate-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.generate-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-3);
  text-align: center;
}

/* ─── Bottom Tab Bar (iOS style) ───────────────────────── */
.mobile-tab-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(12, 12, 16, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 8px); /* Safe padding for iPhone notch */
  flex-shrink: 0;
  z-index: 5;
}

.tab-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-3);
  cursor: pointer;
  padding: 6px 12px;
  width: 80px;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.tab-item:hover {
  color: var(--text-2);
}

.tab-item.active {
  color: var(--accent);
}

.tab-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--dur) var(--ease);
}

.tab-item.active .tab-icon {
  transform: translateY(-1px) scale(1.05);
}

.tab-label {
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.tab-icon-badge-wrap {
  position: relative;
  display: inline-block;
}

.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-2);
  border: 1.5px solid var(--bg-panel);
  animation: pulseGlow 1.4s infinite alternate;
}

@keyframes pulseGlow {
  from { box-shadow: 0 0 2px var(--accent-2); transform: scale(1); }
  to { box-shadow: 0 0 8px var(--accent-2); transform: scale(1.15); }
}

/* ─── Buttons ─────────────────────────────────────────── */
.btn-generate,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  transition:
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn-generate {
  width: 100%;
  padding: 12px 20px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-generate svg {
  width: 14px;
  height: 14px;
}

.btn-generate:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: var(--bg-panel);
  color: var(--text-1);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-panel);
  color: var(--text-1);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--border-glow);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ─── Canvas Page Placeholder ─── */
.canvas-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  color: var(--text-2);
}

.placeholder-visual {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  position: relative;
}

.placeholder-visual svg {
  width: 24px;
  height: 24px;
  color: var(--text-3);
  position: relative;
  z-index: 2;
}

.visual-glow {
  position: absolute;
  inset: 10px;
  background: var(--accent);
  filter: blur(15px);
  opacity: 0.15;
  border-radius: 50%;
  z-index: 1;
}

.canvas-placeholder h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-1);
}

.canvas-placeholder p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-2);
  max-width: 32ch;
  line-height: 1.4;
}

/* Hide Canvas placeholder when result active */
#page-canvas:has(#step-result:not(.hidden)) #canvas-placeholder {
  display: none !important;
}

/* ─── Result Step Content ────────────────────────────── */
.result-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeScaleIn 0.3s var(--ease) both;
}

@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

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

.result-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  font-weight: 500;
}

.live-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-tag::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 6px var(--success);
}

/* Media output slot */
.result-media {
  width: 100%;
  aspect-ratio: 1; /* Make it a beautiful square canvas or media-fitted wrapper */
  background: #000000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
}

.result-media img,
.result-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Result Meta and actions footer */
.result-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.result-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

.result-prompt-text {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.btn-download {
  flex: 1;
  background: var(--text-1);
  color: var(--bg);
  border: none;
}

.btn-download:hover:not(:disabled) {
  background: #ffffff;
}

/* ─── Inline error styling ───────────────────────────── */
.inline-error {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--error-border);
  background: var(--error-bg);
  color: var(--error);
  font-size: 0.74rem;
  line-height: 1.35;
  margin-top: 4px;
}

/* ─── Loading Overlay (Perfect App lockdown overlay) ─── */
.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 6, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  animation: fadeIn 0.22s var(--ease) both;
}

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

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-lg);
  max-width: 300px;
  width: 85%;
  animation: scaleIn 0.3s var(--ease) both;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Sleek Glowing Loading Spinner */
.loading-spinner-container {
  width: 48px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-orb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0%, var(--accent-2) 65%, transparent 100%);
  animation: spin 1s linear infinite;
}

.loading-orb-inner {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
}

.loading-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loading-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-1);
}

.loading-copy p {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-2);
  line-height: 1.4;
}

/* Explicit Warning Banner inside Loading card */
.leave-warning-banner {
  margin-top: 12px;
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid var(--warm-border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}

.warning-icon {
  font-size: 0.85rem;
  line-height: 1.1;
  flex-shrink: 0;
}

.leave-warning-banner p {
  margin: 0;
  font-size: 0.65rem;
  color: var(--warm);
  line-height: 1.35;
}

.leave-warning-banner p strong {
  font-weight: 700;
  color: #fbbf24;
}

/* Button Spinner */
.spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.8px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Utilities ───────────────────────────────────────── */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Fullscreen Actual Mobile App View (Mobile Screens) ─── */
@media (max-width: 480px) {
  html, body {
    background-color: var(--bg-panel);
  }

  .app-shell {
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  
  .mobile-tab-bar {
    padding-bottom: env(safe-area-inset-bottom, 12px);
    height: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}