body {
  background: #F5F1E8;
}

.doodle-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

/* New Studio Layout */
.studio-layout-new {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  min-height: calc(100vh - 200px);
  align-items: start;
}

/* Sidebar Panel */
.sidebar-panel {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

/* Intention Card */
.intention-card {
  background: linear-gradient(135deg, #7eb8c4 0%, #9b8bb8 50%, #c4a882 100%);
  border-radius: 12px 12px 0 0;
  padding: 1.5rem;
  text-align: center;
  color: #fff;
}

.intention-header {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.intention-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.intention-dropdown {
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.intention-dropdown option {
  background: #4a4a6a;
  color: #fff;
}

/* Sidebar Sections */
.sidebar-section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eee;
}

.section-title-simple {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8b7355;
  margin-bottom: 0.75rem;
}

/* Music Section */
.music-play-box {
  margin-top: 0.75rem;
}

.play-btn {
  background: linear-gradient(135deg, #C8963E, #d4a84a);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.play-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 150, 62, 0.3);
}

/* Mode Grid */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mode-grid .mode-btn {
  padding: 0.75rem 0.5rem;
  font-size: 0.8rem;
  text-align: center;
  justify-content: center;
  border-radius: 6px;
}

/* Canvas Main Area */
.canvas-main {
  background: #F5F1E8;
}

.canvas-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #5a4a3a;
  margin-bottom: 1rem;
}

.canvas-action-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.action-btn {
  background: #fff;
  border: 1px solid #d4cfc5;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: #5a4a3a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: #f8f6f2;
  border-color: #C8963E;
}

.print-doodle-btn {
  background: linear-gradient(135deg, #f56400 0%, #fa7d19 100%);
  color: white;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.print-doodle-btn:hover {
  background: linear-gradient(135deg, #e05800 0%, #f06a00 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(245, 100, 0, 0.25);
}

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #6a5a42;
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.help-icon:hover {
  background: #c9a227;
  transform: scale(1.1);
}

.print-help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.print-help-modal.show {
  opacity: 1;
  visibility: visible;
}

.print-help-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}

.print-help-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6a5a42;
}

.print-help-content h3 {
  margin: 0 0 1rem 0;
  color: #3a3a3a;
  font-size: 1.25rem;
}

.print-help-content ol {
  text-align: left;
  color: #6a5a42;
  line-height: 1.8;
  padding-left: 1.5rem;
  margin: 0;
}

.print-help-video {
  background: #f6f2ea;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
  color: #6a5a42;
  font-style: italic;
}

/* Canvas Frame */
.canvas-frame {
  background: #fff;
  border: 2px solid #d4c9a8;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.canvas-frame canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #fff;
}

/* Responsive Design */
@media (max-width: 900px) {
  .studio-layout-new {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .sidebar-panel {
    max-height: none;
    order: 2;
  }
  
  .canvas-main {
    order: 1;
  }
  
  .mode-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .mode-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .canvas-title {
    font-size: 1.4rem;
  }
  
  .canvas-action-bar {
    gap: 0.4rem;
  }
  
  .action-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Legacy support - keep existing styles below */
.doodle-hero {
  display: none;
}

.studio-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  min-height: 600px;
  background: linear-gradient(135deg, rgba(15, 15, 35, 0.96) 0%, rgba(25, 25, 55, 0.94) 100%);
  border-radius: 20px;
  padding: 1.5rem;
}

.control-panel {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.control-panel h3 {
  font-family: Georgia, 'Times New Roman', serif;
  color: #3d4449;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f5f1e8;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #3d4449;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.mode-btn:hover {
  background: #ebe7de;
}

.mode-btn.active {
  background: linear-gradient(135deg, #C8963E, #e0b050);
  border-color: #C8963E;
  color: #fff;
}

.mode-btn.hand-tool-btn {
  background: #e8f4f8;
  border-color: #a8d4e6;
}

.mode-btn.hand-tool-btn:hover {
  background: #d0e8f0;
}

.mode-btn.hand-tool-btn.active {
  background: linear-gradient(135deg, #5ba3c0, #7ec8e3);
  border-color: #5ba3c0;
  color: #fff;
}

.reset-view-btn {
  background: #e8f4f8 !important;
  border-color: #a8d4e6 !important;
  color: #5ba3c0 !important;
}

.reset-view-btn:hover {
  background: #d0e8f0 !important;
}

.mode-btn .icon {
  font-size: 1.1rem;
}

.control-group {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.control-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3d4449;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.colour-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#colorPicker {
  width: 50px;
  height: 40px;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
}

#colorLabel {
  font-size: 0.9rem;
  color: #666;
}

#brushSize {
  width: 100%;
  cursor: pointer;
}

select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #3d4449;
  font-size: 0.9rem;
  cursor: pointer;
}

.hint {
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
  margin: 0.5rem 0 0.75rem 0;
  line-height: 1.4;
}

#symmetryGroup,
#templateGroup {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
}

.brush-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.brush-btn {
  flex: 1 1 calc(50% - 3px);
  padding: 8px 10px;
  background: #f5f1e8;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #3d4449;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.brush-btn:hover {
  background: #ebe7de;
}

.brush-btn.active {
  background: linear-gradient(135deg, #C8963E, #e0b050);
  border-color: #C8963E;
  color: #fff;
}

.brush-btn.eraser-btn {
  background: #f0e8e8;
  border-color: #d4c4c4;
}

.brush-btn.eraser-btn:hover {
  background: #e8d8d8;
}

.brush-btn.eraser-btn.active {
  background: linear-gradient(135deg, #888, #aaa);
  border-color: #666;
  color: #fff;
}

.brush-btn.brush-locked {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: #f5f1e8;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3d4449;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: #ebe7de;
}

.btn.primary {
  background: linear-gradient(135deg, #C8963E, #e0b050);
  border-color: #C8963E;
  color: #fff;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #b8862e, #d0a040);
}

.btn.danger {
  color: #b22222;
  border-color: #ffccc7;
}

.btn.danger:hover {
  background: #fff5f5;
}

.btn svg {
  flex-shrink: 0;
}

.canvas-area {
  display: flex;
  flex-direction: column;
}

.canvas-wrapper {
  background: transparent;
  border-radius: 16px;
  padding: 0;
  box-shadow: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  touch-action: none;
}

#doodleCanvas {
  max-width: 100%;
  max-height: 100%;
  cursor: crosshair;
  border-radius: 8px;
  background: #fff;
}

.canvas-hint {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.75rem;
}

.sovereignty-reminder {
  text-align: center;
  margin-top: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(200, 150, 62, 0.1), rgba(234, 211, 255, 0.1));
  border-radius: 12px;
}

.sovereignty-reminder p {
  color: #5B2C6F;
  font-style: italic;
  margin: 0;
}

@media (max-width: 1024px) {
  .studio-layout {
    grid-template-columns: 240px 1fr;
    gap: 1rem;
  }
  
  .control-panel {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .doodle-container {
    padding: 0.75rem;
  }
  
  .doodle-hero {
    margin-bottom: 1rem;
  }
  
  .doodle-hero h1 {
    font-size: 1.5rem;
  }
  
  .doodle-subtitle {
    font-size: 0.9rem;
  }
  
  .studio-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
  }
  
  .control-panel {
    max-height: none;
    order: 2;
    padding: 1rem;
    border-radius: 12px;
  }
  
  .canvas-area {
    order: 1;
    min-height: 280px;
  }
  
  .canvas-wrapper {
    padding: 0.5rem;
    border-radius: 10px;
  }
  
  .canvas-hint {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }
  
  .mode-buttons {
    flex-direction: column;
    gap: 6px;
  }
  
  .mode-btn {
    padding: 10px;
    font-size: 0.85rem;
  }
  
  .mode-btn .mode-tooltip {
    display: none !important;
  }
  
  .section-header {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .brush-buttons {
    gap: 4px;
  }
  
  .brush-btn {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
  
  .action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }
  
  .btn {
    flex: 1 1 45%;
    min-width: 70px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  
  .sovereignty-reminder {
    margin-top: 1rem;
    padding: 0.75rem;
  }
  
  .sovereignty-reminder p {
    font-size: 0.85rem;
  }
  
  .education-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
  
  .music-controls-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .track-dropdown {
    width: 100%;
  }
}

/* Mobile Tools Toggle */
.mobile-tools-toggle {
  display: none;
}

@media (max-width: 600px) {
  .doodle-container {
    padding: 0.25rem;
    padding-bottom: 0;
  }
  
  .doodle-hero {
    display: none;
  }
  
  .studio-layout {
    display: block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    min-height: auto;
    height: auto;
  }
  
  .canvas-area {
    display: block;
    margin-bottom: 55px;
    height: calc(100vh - 90px);
    height: calc(100dvh - 90px);
  }
  
  .canvas-wrapper {
    height: 100%;
    width: 100%;
    padding: 0;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border: none;
  }
  
  #doodleCanvas {
    display: block;
    border-radius: 8px;
    background: #fff;
  }
  
  .canvas-hint {
    display: none;
  }
  
  .control-panel {
    order: 2;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 55vh;
    max-height: 55dvh;
    overflow-y: auto;
    padding: 0.75rem;
    padding-top: 0;
    background: #f8f6f2;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 100;
    transition: transform 0.3s ease;
    -webkit-overflow-scrolling: touch;
  }
  
  .control-panel.collapsed {
    transform: translateY(calc(100% - 50px));
  }
  
  .mobile-tools-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #C8963E 0%, #e0b050 100%);
    border: none;
    border-radius: 12px 12px 0 0;
    margin: 0 -0.75rem;
    width: calc(100% + 1.5rem);
    cursor: pointer;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .mobile-tools-toggle:active {
    background: linear-gradient(135deg, #b8862e 0%, #d0a040 100%);
  }
  
  .toggle-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
  }
  
  .control-panel.collapsed .toggle-arrow {
    transform: rotate(180deg);
  }
  
  .control-panel.collapsed .toggle-text {
    display: none;
  }
  
  .control-panel.collapsed .toggle-text-collapsed {
    display: inline;
  }
  
  .toggle-text-collapsed {
    display: none;
  }
  
  /* New sidebar panel mobile styles */
  .sidebar-panel {
    order: 2;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 55vh;
    max-height: 55dvh;
    overflow-y: auto;
    padding: 0.75rem;
    padding-top: 0;
    background: #f8f6f2;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 100;
    transition: transform 0.3s ease;
    -webkit-overflow-scrolling: touch;
  }
  
  .sidebar-panel.collapsed {
    transform: translateY(calc(100% - 50px));
  }
  
  .sidebar-panel.collapsed .toggle-arrow {
    transform: rotate(180deg);
  }
  
  .sidebar-panel.collapsed .toggle-text {
    display: none;
  }
  
  .sidebar-panel.collapsed .toggle-text-collapsed {
    display: inline;
  }
  
  .studio-layout-new {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 0;
  }
  
  .canvas-main {
    order: 1;
    margin-bottom: 60px;
    height: calc(100vh - 160px);
    height: calc(100dvh - 160px);
  }
  
  .canvas-action-bar {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .tools-content {
    overflow-y: auto;
    max-height: calc(55vh - 50px);
  }
  
  .collapsible-section {
    margin-bottom: 0.4rem;
  }
  
  .section-header {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .section-content {
    padding: 0.5rem 0;
  }
  
  .mode-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .mode-btn {
    flex: 1 1 30%;
    padding: 10px 8px;
    font-size: 0.8rem;
    text-align: center;
  }
  
  .mode-btn .mode-tooltip {
    display: none !important;
  }
  
  .brush-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .brush-btn {
    flex: 1 1 30%;
    padding: 8px 6px;
    font-size: 0.75rem;
  }
  
  .action-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  
  .btn {
    padding: 10px 6px;
    font-size: 0.75rem;
  }
  
  .sovereignty-reminder {
    display: none;
  }
  
  .music-controls-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .music-btn {
    width: 100%;
    justify-content: center;
  }
  
  .track-dropdown {
    width: 100%;
    display: block;
    min-height: 44px;
    font-size: 16px;
  }
  
  .volume-row {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .canvas-area {
    height: calc(100vh - 180px);
    height: calc(100dvh - 180px);
  }
  
  .control-panel {
    max-height: 55vh;
    max-height: 55dvh;
  }
  
  .mode-btn {
    flex: 1 1 45%;
    min-height: 44px;
  }
  
  .brush-btn {
    flex: 1 1 45%;
    min-height: 44px;
  }
  
  .action-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .btn {
    min-height: 44px;
  }
  
  select {
    min-height: 44px;
    font-size: 16px;
  }
  
  input[type="range"] {
    height: 32px;
  }
  
  input[type="color"] {
    min-width: 50px;
    min-height: 44px;
  }
}

/* Touch-specific optimizations */
@media (pointer: coarse) {
  .mode-btn,
  .brush-btn,
  .btn {
    min-height: 44px;
  }
  
  .section-header {
    min-height: 48px;
  }
  
  select {
    min-height: 44px;
  }
  
  #doodleCanvas {
    touch-action: none;
  }
}

.music-player-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.music-player-section h3 {
  font-family: Georgia, 'Times New Roman', serif;
  color: #3d4449;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-toggle {
  margin-bottom: 1rem;
}

.music-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1E1E3F 0%, #2a2a5a 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(30, 30, 63, 0.2);
}

.music-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 30, 63, 0.3);
}

.music-btn.playing {
  background: linear-gradient(135deg, #C8963E 0%, #d4a84d 100%);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(200, 150, 62, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(200, 150, 62, 0.5);
  }
}

.music-icon {
  font-size: 1.2rem;
}

.track-selector {
  margin-bottom: 1rem;
}

.track-selector label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 6px;
}

.track-selector select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  color: #3d4449;
  cursor: pointer;
}

.track-selector select:focus {
  outline: none;
  border-color: #C8963E;
}

.volume-control {
  margin-bottom: 0.75rem;
}

.volume-control label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 6px;
}

.volume-control input[type="range"] {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: #C8963E;
  border-radius: 50%;
  cursor: pointer;
}

.music-hint {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  font-style: italic;
  margin: 0;
}

/* Collapsible Sections */
.collapsible-section {
  margin-bottom: 0.5rem;
  border-radius: 10px;
  background: rgba(245, 241, 232, 0.5);
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f5f1e8, #ebe7de);
  border: none;
  cursor: pointer;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.95rem;
  color: #3d4449;
  transition: all 0.2s ease;
}

.section-header:hover {
  background: linear-gradient(135deg, #ebe7de, #e0dcd3);
}

.section-icon {
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

.section-title {
  flex: 1;
  text-align: left;
  font-weight: 600;
}

.chevron {
  font-size: 0.7rem;
  color: #888;
  transition: transform 0.3s ease;
}

.section-header[aria-expanded="false"] .chevron {
  transform: rotate(-90deg);
}

.section-content {
  padding: 0.75rem 0;
  transition: all 0.3s ease;
}

.section-content > * {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Mode Tooltips */
.mode-btn {
  position: relative;
}

.mode-tooltip {
  display: none;
  position: absolute;
  left: 105%;
  top: 50%;
  transform: translateY(-50%);
  background: #1F1F2E;
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  max-width: 220px;
  white-space: normal;
  line-height: 1.4;
}

.mode-tooltip::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent #1F1F2E transparent transparent;
}

.mode-btn:hover .mode-tooltip {
  display: block;
}

@media (max-width: 768px) {
  .mode-tooltip {
    left: 50%;
    top: 110%;
    transform: translateX(-50%);
  }
  
  .mode-tooltip::before {
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    border-color: transparent transparent #1F1F2E transparent;
  }
}

/* Education Link */
.education-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, rgba(200, 150, 62, 0.1), rgba(200, 150, 62, 0.05));
  border-radius: 6px;
  color: #C8963E;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.education-link:hover {
  background: linear-gradient(135deg, rgba(200, 150, 62, 0.2), rgba(200, 150, 62, 0.1));
  color: #a87a2e;
}

.info-icon {
  font-size: 0.9rem;
}

/* Improved Music Player */
.music-player-compact {
  padding: 0.25rem 0;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #C8963E, #e0b050);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  color: #fff;
  font-size: 0.85rem;
}

.playing-icon {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.track-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.music-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: #f5f1e8;
  border: 2px solid #C8963E;
  border-radius: 8px;
  color: #C8963E;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.music-btn:hover {
  background: #C8963E;
  color: #fff;
}

.music-btn.playing {
  background: #C8963E;
  color: #fff;
}

.track-dropdown {
  flex: 1;
  min-width: 120px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #fff;
  display: block !important;
  visibility: visible !important;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-icon {
  font-size: 1rem;
}

.volume-row input[type="range"] {
  flex: 1;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
}

.volume-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: #C8963E;
  border-radius: 50%;
  cursor: pointer;
}

.stamp-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.stamp-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3d4449;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stamp-toggles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #3d4449;
}

.toggle input {
  width: 18px;
  height: 18px;
}

#doodleCanvas {
  box-shadow:
    0 0 25px rgba(200,150,62,0.18),
    0 0 60px rgba(200,150,62,0.08);
  transition: box-shadow 3s ease-in-out;
}

#doodleCanvas:hover {
  box-shadow:
    0 0 35px rgba(200,150,62,0.25),
    0 0 80px rgba(200,150,62,0.12);
}

/* Sacred Arrival Overlay */
.arrival-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(40, 40, 80, 0.95),
    rgba(10, 10, 25, 0.98)
  );
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayFadeOut 2.6s ease forwards;
}

.arrival-content {
  text-align: center;
  color: #e6d7a8;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  opacity: 0;
  animation: textFadeIn 1.2s ease forwards;
  animation-delay: 0.4s;
}

@keyframes textFadeIn {
  to { opacity: 1; }
}

@keyframes overlayFadeOut {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% {
    opacity: 0;
    pointer-events: none;
  }
}

/* Doodle Studio Icon Navigation */
.doodle-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: 0.75rem 1.5rem;
  background: rgba(61, 68, 73, 0.9);
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #e6d7a8;
  transition: all 0.3s ease;
}

.nav-icon-btn:hover {
  color: #C8963E;
  transform: translateY(-2px);
}

.nav-icon-btn svg {
  width: 32px;
  height: 32px;
}

@media (max-width: 768px) {
  .doodle-nav {
    padding: 0.5rem 1rem;
    gap: 1rem;
  }
  
  .nav-icon-btn svg {
    width: 28px;
    height: 28px;
  }
}

/* Save to Journal Button */
.save-journal-btn {
  background: linear-gradient(135deg, #8b6914 0%, #c9a227 100%);
  color: #fff;
  border: none;
  font-weight: 600;
}

.save-journal-btn:hover {
  background: linear-gradient(135deg, #a07816 0%, #d4ad2c 100%);
  transform: translateY(-1px);
}

/* Journal Modal */
.journal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 25, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.journal-modal {
  background: linear-gradient(145deg, #f5f1e8 0%, #efe9db 100%);
  border-radius: 20px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(200, 150, 62, 0.3);
}

.journal-modal h2 {
  font-family: Georgia, 'Times New Roman', serif;
  color: #3d4449;
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.modal-date {
  color: #C8963E;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #3d4449;
}

.modal-form-group {
  margin-bottom: 1.5rem;
}

.modal-form-group label {
  display: block;
  font-weight: 600;
  color: #3d4449;
  margin-bottom: 0.5rem;
}

.modal-form-group textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  background: #fff;
}

.modal-form-group textarea:focus {
  outline: none;
  border-color: #C8963E;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-message {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.modal-message.success {
  color: #2e7d32;
}

.modal-message.error {
  color: #c62828;
}

/* Colouring Pages hint */
.colouring-hint {
  font-style: italic;
  color: #8b7355;
  text-align: center;
  margin-top: 0.75rem;
}

/* Colouring mode warm parchment background */
body.colouring-mode {
  background: linear-gradient(180deg, #F4EFE7 0%, #ECE6DC 100%);
}

body.colouring-mode .doodle-container {
  background: linear-gradient(180deg, #F4EFE7 0%, #ECE6DC 100%);
}

/* Chakra Palette Styles */
.chakra-palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.chakra-btn {
  flex: 1 1 30%;
  padding: 6px 8px;
  background: #f5f1e8;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  color: #3d4449;
  transition: all 0.2s ease;
}

.chakra-btn:hover {
  background: #ebe5d8;
}

.chakra-btn.active {
  background: linear-gradient(135deg, #C8963E, #e0b050);
  color: #fff;
  border-color: #C8963E;
}

.chakra-swatch-row {
  display: flex;
  gap: 6px;
  margin-top: 0.5rem;
}

.chakra-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.chakra-swatch:hover {
  transform: scale(1.1);
}