/* ===========================================
   StoryBoard Creator V2 - Design Mobile-First
   =========================================== */

/* Reset & Variables */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-elevated: #252540;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --text: #ffffff;
  --text-muted: #9ca3af;
  --border: #374151;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  /* Spacing */
  --header-h: 50px;
  --nav-h: 70px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  
  /* Radius */
  --radius: 12px;
  --radius-sm: 8px;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

/* ===========================================
   App Layout
   =========================================== */

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  padding-top: var(--safe-top);
}

/* ===========================================
   Header
   =========================================== */

.header {
  height: var(--header-h);
  min-height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.page-indicator {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.icon-btn:active {
  background: var(--bg-elevated);
}

/* ===========================================
   Main Content Area
   =========================================== */

.main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  background: var(--bg-dark);
}

/* ===========================================
   Canvas Container
   =========================================== */

.canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 10px;
}

.canvas-wrapper {
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  overflow: hidden;
}

.canvas-wrapper canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Zoom Controls */
.zoom-controls {
  position: absolute;
  bottom: 80px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
}

.zoom-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-card);
  color: var(--text);
  font-size: 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.zoom-btn:active {
  background: var(--bg-elevated);
}

/* Filter Toolbar */
.filter-toolbar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius);
  display: none;
  gap: 4px;
  z-index: 60;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.filter-toolbar.visible {
  display: flex;
}

.filter-toolbar button {
  padding: 8px 12px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.filter-toolbar button:active {
  background: var(--accent);
}

/* Selected Indicator */
.selected-indicator {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  display: none;
  z-index: 55;
}

.selected-indicator.visible {
  display: block;
}

/* ===========================================
   Pages Sidebar (Desktop & Mobile Overlay)
   =========================================== */

.pages-sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: right 0.3s ease;
  padding-top: var(--safe-top);
}

.pages-sidebar.visible {
  right: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.sidebar-close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pages-thumbnails {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-thumb {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  position: relative;
}

.page-thumb.active {
  border-color: var(--accent);
}

.page-thumb canvas {
  width: 100%;
  border-radius: 4px;
}

.page-thumb-number {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--bg-dark);
  color: var(--text);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.page-thumb-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: var(--danger);
  color: white;
  font-size: 14px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.page-thumb:hover .page-thumb-delete {
  opacity: 1;
}

.add-page-btn {
  margin: 12px;
  padding: 14px;
  border: 2px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.add-page-btn:active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Pages Toggle Button (Mobile) */
.pages-toggle-btn {
  position: fixed;
  top: calc(var(--header-h) + var(--safe-top) + 12px);
  right: 12px;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: none;
  border-radius: 50%;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  z-index: 90;
}

.pages-toggle-btn span {
  font-size: 10px;
  font-weight: 600;
}

.pages-toggle-btn.hidden {
  display: none;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 190;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ===========================================
   Bottom Navigation
   =========================================== */

.bottom-nav {
  height: var(--nav-h);
  min-height: var(--nav-h);
  padding-bottom: var(--safe-bottom);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 100;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  flex: 0 0 auto;
  min-width: 60px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:active,
.nav-btn.active {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.nav-icon {
  font-size: 22px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

/* ===========================================
   Tool Submenus (Brush & Eraser)
   =========================================== */

.tool-submenu {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 16px;
  z-index: 150;
  display: none;
}

.tool-submenu.visible {
  display: block;
}

.submenu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.submenu-title {
  font-size: 16px;
  font-weight: 600;
}

.submenu-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 16px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submenu-section {
  margin-bottom: 16px;
}

.submenu-section:last-child {
  margin-bottom: 0;
}

.submenu-section label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.submenu-section input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.submenu-section input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.brush-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brush-color-btn {
  width: 36px;
  height: 36px;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.brush-color-btn.active {
  border-color: var(--accent);
  transform: scale(1.15);
}

/* ===========================================
   Panel Overlays (Modals)
   =========================================== */

.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.panel-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.panel {
  width: 100%;
  max-height: 85vh;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.panel-overlay.visible .panel {
  transform: translateY(0);
}

.panel-large {
  max-height: 90vh;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

/* ===========================================
   Panel Content Styles
   =========================================== */

/* Templates Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.template-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.template-btn:active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.2);
}

.template-icon {
  font-size: 32px;
}

.template-name {
  font-size: 12px;
  font-weight: 500;
}

/* Items Grid (Panels, Bubbles, Shapes) */
.items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.item-btn:active {
  background: var(--accent);
}

.item-preview {
  font-size: 28px;
  line-height: 1;
}

.item-btn span:last-child {
  font-size: 11px;
  color: var(--text-muted);
}

/* Section Titles */
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 20px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title:first-child {
  margin-top: 0;
}

/* Onomatopoeia Grid */
.onomatopoeia-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ono-btn {
  padding: 16px 8px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s;
}

.ono-btn:active {
  transform: scale(0.95);
}

/* Emoji Grid */
.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emoji-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.2s;
}

.emoji-btn:active {
  transform: scale(0.9);
  background: var(--accent);
}

/* Color Palette */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-btn {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-btn:active {
  transform: scale(1.15);
}

/* Edit Actions */
.edit-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.edit-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.edit-btn:active {
  background: var(--accent);
}

.edit-btn.danger:active {
  background: var(--danger);
}

/* Export Actions */
.export-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.export-btn:active {
  background: var(--accent);
}

.export-icon {
  font-size: 32px;
}

.export-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.export-text strong {
  font-size: 15px;
}

.export-text small {
  font-size: 12px;
  color: var(--text-muted);
}

/* Settings */
.settings-section {
  margin-bottom: 24px;
}

.settings-section h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.settings-btn:active {
  background: var(--accent);
}

.settings-btn.danger:active {
  background: var(--danger);
}

.about-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.about-text strong {
  color: var(--text);
}

/* ===========================================
   AI Panel Styles
   =========================================== */

.ai-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.genre-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.genre-btn {
  padding: 12px 8px;
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.genre-btn.active,
.genre-btn:active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.2);
}

.ai-results {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.ai-placeholder {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.ai-dialogue-item {
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.ai-dialogue-item:last-child {
  margin-bottom: 0;
}

.ai-dialogue-item:active {
  background: var(--accent);
}

.ai-dialogue-item p {
  font-size: 13px;
  line-height: 1.4;
}

.regenerate-btn {
  width: 100%;
  padding: 14px;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.regenerate-btn:active {
  background: var(--accent);
}

.bg-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.bg-gen-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.bg-gen-btn:active {
  background: var(--accent);
}

.bg-preview {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* ===========================================
   Presentation Mode
   =========================================== */

.presentation-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 500;
  display: none;
  flex-direction: column;
}

.presentation-overlay.visible {
  display: flex;
}

.presentation-header {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(0,0,0,0.8);
}

.presentation-header span {
  color: white;
  font-size: 14px;
}

.presentation-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
}

.presentation-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.presentation-content canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.presentation-nav {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 16px;
  padding-bottom: var(--safe-bottom);
  background: rgba(0,0,0,0.8);
}

.presentation-nav-btn {
  padding: 12px 24px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.presentation-nav-btn:active {
  background: var(--accent);
}

/* ===========================================
   Loading Overlay
   =========================================== */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  text-align: center;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-elevated);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===========================================
   Toast Notifications
   =========================================== */

.toast-container {
  position: fixed;
  top: calc(var(--header-h) + var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================================
   Desktop / Tablet Adjustments
   =========================================== */

@media (min-width: 768px) {
  :root {
    --nav-h: 80px;
  }
  
  .logo {
    font-size: 18px;
  }
  
  .nav-btn {
    min-width: 80px;
    padding: 10px 16px;
  }
  
  .nav-icon {
    font-size: 26px;
  }
  
  .nav-label {
    font-size: 12px;
  }
  
  .panel {
    max-width: 500px;
    margin: 0 auto;
    border-radius: var(--radius);
    max-height: 80vh;
  }
  
  .panel-overlay {
    align-items: center;
    justify-content: center;
  }
  
  .templates-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .items-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .genre-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .pages-sidebar {
    position: relative;
    right: 0;
    width: 220px;
    flex-shrink: 0;
    transform: none;
  }
  
  .sidebar-close-btn {
    display: none;
  }
  
  .pages-toggle-btn {
    display: none;
  }
  
  .tool-submenu {
    position: fixed;
    bottom: auto;
    left: 50%;
    right: auto;
    top: calc(var(--header-h) + 20px);
    transform: translateX(-50%) translateY(-20px);
    width: 320px;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  }
  
  .tool-submenu.visible {
    transform: translateX(-50%) translateY(0);
  }
}

@media (min-width: 1024px) {
  .pages-sidebar {
    width: 260px;
  }
  
  .panel {
    max-width: 600px;
  }
}

/* ===========================================
   PWA Specific Styles
   =========================================== */

@supports (padding: max(0px)) {
  .app {
    padding-top: max(var(--safe-top), 0px);
  }
  
  .bottom-nav {
    padding-bottom: max(var(--safe-bottom), 8px);
  }
}

/* Hidden */
.hidden {
  display: none !important;
}
