/* =============================================================
   MOBILE-ONLY STYLES - Loaded after main CSS
   Completely overrides desktop styles for screens < 700px
   ============================================================= */

@media screen and (max-width: 700px) {
  /* ========== RESET EVERYTHING ========== */
  .sidebar {
    display: none !important;
    position: fixed !important;
    left: -100% !important;
    width: 240px !important;
    height: 100% !important;
    z-index: 1000 !important;
    transition: left 0.3s ease !important;
  }
  
  .sidebar.open {
    display: flex !important;
    left: 0 !important;
  }
  
  /* ========== MAIN LAYOUT ========== */
  .app-container {
    display: block !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  
  .main-content {
    display: block !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  
  /* ========== 3D MODEL ========== */
  .character-container {
    display: block !important;
    width: 100% !important;
    height: 200px !important;
    min-width: 0 !important;
    position: relative !important;
  }
  
  /* ========== PANELS ========== */
  .panel-section {
    display: none !important;
    position: absolute !important;
    top: 200px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    border-left: none !important;
    overflow: hidden !important;
  }
  
  .panel-section.active {
    display: flex !important;
    flex-direction: column !important;
  }
  
  /* ========== CHAT PANEL ========== */
  .chat-window {
    width: 100% !important;
    min-width: 0 !important;
  }
  
  .chat-window .chat-header,
  .journal-panel .chat-header,
  .tech-panel .chat-header {
    flex: 0 0 50px !important;
    height: 50px !important;
    min-height: 50px !important;
  }
  
  .chat-window .messages-container {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px !important;
  }
  
  .chat-window .input-container {
    flex: 0 0 72px !important;
    height: 72px !important;
    min-height: 72px !important;
    padding: 12px !important;
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
  }
  
  #chatForm {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    height: 100% !important;
    width: 100% !important;
  }
  
  #messageInput {
    flex: 1 1 auto !important;
    width: auto !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    font-size: 16px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 8px !important;
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
  }
  
  #sendBtn {
    flex: 0 0 48px !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: var(--cyan-primary) !important;
    border: none !important;
    cursor: pointer !important;
  }
  
  /* ========== JOURNAL PANEL ========== */
  .journal-panel {
    width: 100% !important;
    min-width: 0 !important;
  }
  
  .journal-panel .journal-intro {
    flex: 0 0 auto !important;
    max-height: 100px !important;
    overflow: hidden !important;
    padding: 10px 15px !important;
  }
  
  .journal-panel .journal-entries {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px !important;
  }
  
  .journal-pagination {
    display: none !important;
  }
  
  /* ========== TECH PANEL ========== */
  .tech-panel {
    width: 100% !important;
    min-width: 0 !important;
  }
  
  .tech-panel .tech-content {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 15px !important;
  }
  
  /* ========== HAMBURGER BUTTON ========== */
  .hamburger-btn {
    display: flex !important;
    position: fixed !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 1001 !important;
  }
  
  /* ========== MOBILE OVERLAY ========== */
  .mobile-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 999 !important;
  }
  
  .mobile-overlay.active {
    display: block !important;
  }
  
  /* ========== FONT SIZES ========== */
  .tech-title {
    font-size: 0.75rem !important;
  }
  
  .tech-section p {
    font-size: 0.8rem !important;
    line-height: 1.6 !important;
  }
  
  .tech-tag {
    padding: 6px 10px !important;
    font-size: 0.6rem !important;
  }
  
  .journal-entry {
    padding: 12px !important;
    margin-bottom: 12px !important;
  }
  
  .character-name-tag {
    bottom: 10px !important;
    padding: 6px 12px !important;
  }
  
  .character-name-tag .name {
    font-size: 0.85rem !important;
  }
  
  .character-name-tag .status {
    font-size: 0.65rem !important;
  }
}
