/* Tactile DIY & Craftcore Soundboard Stylesheet */

:root {
  --bg-primary: #e6d8c4; /* Kraft paper color */
  --bg-glow: radial-gradient(circle at 50% 50%, #eee1cf 0%, #d5c4af 100%);
  --panel-bg: #fbf9f4; /* Spiral notebook lined paper sheet */
  --panel-border: #3e3126; /* Marker ink dark brown */
  --panel-border-hover: #2b5c8f; /* Blue ink */
  
  --text-primary: #2b1f15; /* Slate/dark ink */
  --text-secondary: #5e4f43; /* Pencil lead */
  --text-muted: #8c7e73; /* Faded lines */
  
  --paper: #f4f1ea;
  --ink: #1a1a1a;
  
  /* Constructive Paper Colors */
  --accent-purple: #9b82a6; /* Lilac cardstock */
  --accent-cyan: #6b8fa6;   /* Slate blue cardstock */
  --accent-pink: #c88694;   /* Dusty rose construction paper */
  --accent-green: #7c9e7b;  /* Sage green cardstock */
  --accent-amber: #e5b35a;  /* Mustard yellow felt */
  --accent-rose: #d95d55;   /* Terracotta red construction paper */
  
  --font-family: 'Patrick Hand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Special Elite', Courier, monospace;
  --transition-fast: 0.1s ease;
  --transition-normal: 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.25);
  --transition-slow: 0.4s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 28px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
  border-left: 3px solid var(--ink);
}
::-webkit-scrollbar-thumb {
  background-image: url('../images/Afro%20Lamb%20logo%20Profile%20Pic.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 3px solid var(--paper);
  background-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  background-image: var(--bg-glow);
  /* Craft cutting mat grid texture overlay */
  background-size: 20px 20px, 100px 100px;
  background-image:
    linear-gradient(to right, rgba(62, 49, 38, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(62, 49, 38, 0.03) 1px, transparent 1px),
    linear-gradient(to right, rgba(62, 49, 38, 0.06) 1.5px, transparent 1px),
    linear-gradient(to bottom, rgba(62, 49, 38, 0.06) 1.5px, transparent 1px);
  background-position: center;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow-x: hidden;
  padding: 1.5rem 1rem;
}

/* App Wrapper - Pinned cardboard board */
.app-container {
  width: 100%;
  max-width: 1100px;
  background: #ebdcc6; /* Thick chipboard cardboard background */
  background-image: radial-gradient(rgba(62, 49, 38, 0.08) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  border: 3.5px solid var(--panel-border);
  /* Hand-drawn cardboard edge border radius */
  border-radius: 20px 10px 24px 12px / 12px 24px 10px 20px;
  box-shadow: 
    0px 5px 15px rgba(62, 49, 38, 0.15),
    6px 10px 0px rgba(62, 49, 38, 0.08); /* solid tactile shadow */
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  z-index: 1;
  position: relative;
}

/* Header & Controls */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 2.5px dashed var(--panel-border);
  padding-bottom: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Title on a piece of masking tape */
.brand h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: normal;
  background: #fefcf3; /* Masking tape off-white */
  color: #3e3126;
  padding: 0.45rem 1.75rem;
  margin-top: 0.5rem;
  transform: rotate(-1.5deg);
  border-left: 3px dashed rgba(74, 55, 40, 0.2);
  border-right: 3px dashed rgba(74, 55, 40, 0.2);
  box-shadow: 
    0px 2px 4px rgba(0,0,0,0.05),
    1px 3px 0px rgba(62, 49, 38, 0.1);
  position: relative;
  letter-spacing: -0.5px;
}

.brand p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 0.15rem;
  transform: rotate(0.8deg);
  font-family: var(--font-family);
}

.master-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #faf7f0;
  border: 2px solid var(--panel-border);
  border-radius: 8px 6px 7px 5px / 5px 7px 6px 8px;
  padding: 0.4rem 0.8rem;
  box-shadow: 2px 2px 0px rgba(62, 49, 38, 0.15);
}

.control-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
}

/* Input Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 90px;
  height: 6px;
  background: rgba(62, 49, 38, 0.15);
  border-radius: 3px;
  border: 1px solid var(--panel-border);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d95d55; /* red pushpin clay color */
  border: 2px solid var(--panel-border);
  cursor: pointer;
  box-shadow: 1px 2px 0px rgba(62, 49, 38, 0.15);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--panel-border);
  border-radius: 50%;
  background: #d95d55;
  cursor: pointer;
  box-shadow: 1px 2px 0px rgba(62, 49, 38, 0.15);
  transition: transform var(--transition-fast);
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
}

/* Master buttons - cardboard stamps */
.btn {
  background: #fdfdfa;
  border: 2.2px solid var(--panel-border);
  color: var(--text-primary);
  padding: 0.55rem 1.1rem;
  border-radius: 8px 4px 7px 5px / 5px 7px 4px 8px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: normal;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 2px 3px 0px rgba(62, 49, 38, 0.15);
  transition: all 0.1s ease;
}

.btn:hover {
  background: #faf8f3;
  border-color: var(--panel-border-hover);
  transform: translateY(-1px);
  box-shadow: 3px 4.5px 0px rgba(62, 49, 38, 0.2);
}

.btn:active {
  transform: translateY(2px) translateX(1px);
  box-shadow: 0px 1px 0px rgba(62, 49, 38, 0.1);
}

.btn-primary {
  background: #fef08a; /* Highlighter yellow */
  border-color: var(--panel-border);
  color: #3e3126;
}

.btn-primary:hover {
  background: #fef3c7; /* lighter yellow */
  border-color: #2b5c8f;
  box-shadow: 3px 4.5px 0px rgba(43, 92, 143, 0.25);
}

.btn-danger {
  background: #fecaca; /* red construction paper */
  border-color: var(--panel-border);
  color: #7f1d1d;
}

.btn-danger:hover {
  background: #fee2e2;
  border-color: #b91c1c;
  box-shadow: 3px 4.5px 0px rgba(185, 28, 28, 0.25);
}

/* Sound Grid Area */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  min-height: 250px;
  position: relative;
}

/* Empty State - stitched paper folder */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 4rem 2rem;
  background: #faf8f4;
  border: 3px dashed var(--text-muted);
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(62, 49, 38, 0.02), 2px 4px 0px rgba(62, 49, 38, 0.1);
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-weight: normal;
  font-size: 1.3rem;
}

.empty-state p {
  font-size: 1.05rem;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
}

/* Sound Pad Styling - Construction paper scraps */
.sound-pad {
  background-color: var(--pad-color, var(--accent-cyan));
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.05) 100%);
  border: 2.5px solid var(--panel-border);
  border-radius: 12px 5px 10px 6px / 6px 10px 5px 12px; /* Hand-torn shape */
  padding: 1.3rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 155px;
  cursor: pointer;
  position: relative;
  overflow: visible; /* to allow tape to hang off edge */
  box-shadow: 3px 4px 0px rgba(62, 49, 38, 0.18);
  transition: all var(--transition-normal);
  user-select: none;
}

/* Washi/masking tape on top of pads */
.sound-pad::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(1deg);
  width: 60px;
  height: 18px;
  background: rgba(246, 240, 222, 0.85); /* semi-translucent tape */
  border-left: 2px dashed rgba(62, 49, 38, 0.15); /* wobbly tear */
  border-right: 2px dashed rgba(62, 49, 38, 0.15);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  z-index: 5;
  pointer-events: none;
  transition: all var(--transition-fast);
}

/* Alternate rotation angles of pads to look casual */
.sound-pad:nth-child(3n) {
  transform: rotate(-1.2deg);
}
.sound-pad:nth-child(3n+1) {
  transform: rotate(0.8deg);
}
.sound-pad:nth-child(3n+2) {
  transform: rotate(-0.5deg);
}

.sound-pad:hover {
  transform: rotate(0deg) scale(1.05) translateY(-5px);
  box-shadow: 6px 10px 15px rgba(62, 49, 38, 0.25);
  z-index: 6;
}

.sound-pad:hover::before {
  transform: translateX(-50%) rotate(-1.5deg) scale(1.05);
  background: rgba(246, 240, 222, 0.95);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Playing state - wobbly shaking tactile feedback */
.sound-pad.playing {
  animation: shake-wobbly 0.12s infinite alternate;
  border-color: #d95d55; /* Highlight in red ink when playing! */
  box-shadow: 4px 6px 12px rgba(217, 93, 85, 0.35);
}

@keyframes shake-wobbly {
  0% { transform: rotate(-1.5deg) scale(1.03); }
  50% { transform: rotate(1.8deg) scale(1.03); }
  100% { transform: rotate(-0.8deg) scale(1.03); }
}

.sound-pad:active, .sound-pad.keyboard-trigger {
  transform: scale(0.96) translateY(0);
  box-shadow: 1px 2px 0px rgba(62, 49, 38, 0.15);
}

/* Pad details */
.pad-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.key-badge {
  background: #fdfdfc;
  border: 1.8px solid var(--panel-border);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.15rem 0.4rem;
  border-radius: 4px; /* Sticker label shape */
  box-shadow: 1px 1px 0px rgba(62, 49, 38, 0.15);
  min-width: 18px;
  text-align: center;
  text-transform: uppercase;
}

.sound-pad.playing .key-badge {
  background: #fef08a; /* Yellow sticker highlight when playing */
  border-color: #d95d55;
  color: #7f1d1d;
}

.pad-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  opacity: 0.7;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.pad-menu-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.pad-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 2;
  /* Make text look like ink writing */
  color: #2b1f15;
}

.pad-title {
  font-family: var(--font-heading); /* Typewriter sound label */
  font-size: 1.05rem;
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1.5px dotted rgba(62, 49, 38, 0.2); /* notebook guideline */
  padding-bottom: 2px;
}

.pad-duration {
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(62, 49, 38, 0.75);
}

/* Bottom Bar - Upload & Visualizer */
.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 2.5px dashed var(--panel-border);
  padding-top: 2rem;
}

@media (max-width: 768px) {
  .footer-row {
    grid-template-columns: 1fr;
  }
}

/* Drag & Drop Upload Zone - stitched cardboard folder */
.upload-zone {
  background: #fcfbfa;
  border: 3px dashed var(--text-muted);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  box-shadow: 
    inset 0 0 15px rgba(62, 49, 38, 0.02),
    2px 3px 0px rgba(62, 49, 38, 0.12);
  transition: all var(--transition-normal);
  text-align: center;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: #2b5c8f;
  background: #f5f8fa;
  box-shadow: 
    inset 0 0 15px rgba(43, 92, 143, 0.05),
    3px 5px 0px rgba(43, 92, 143, 0.18);
  transform: translateY(-2px);
}

.upload-zone svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-secondary);
  transition: transform var(--transition-normal);
}

.upload-zone:hover svg {
  transform: translateY(-3px) scale(1.05);
  stroke: #2b5c8f;
}

.upload-zone h3 {
  font-family: var(--font-heading);
  font-weight: normal;
  font-size: 1.1rem;
}

.upload-zone p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.upload-zone .file-formats {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

#file-input {
  display: none;
}

/* Audio Visualizer Container - Notebook paper block */
.visualizer-container {
  background: #fdfdf9;
  border: 2.2px solid var(--panel-border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 
    2px 3px 0px rgba(62, 49, 38, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-height: 120px;
  justify-content: space-between;
}

.visualizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px dotted rgba(62, 49, 38, 0.2);
  padding-bottom: 2px;
}

.visualizer-header span {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--text-secondary);
}

#visualizer-canvas {
  width: 100%;
  height: 80px;
  background: transparent;
  border-radius: 4px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(62, 49, 38, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  z-index: 100;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Spiral Lined Notebook Sheet Modal */
.modal-content {
  background: #fdfcf9;
  border: 3px solid var(--panel-border);
  box-shadow: 
    8px 12px 0px rgba(62, 49, 38, 0.15), 
    0px 20px 40px rgba(0, 0, 0, 0.15);
  border-radius: 5px 6px 5px 8px / 6px 5px 8px 5px;
  width: 90%;
  max-width: 460px;
  padding: 2.2rem 2rem;
  transform: scale(0.92) translateY(10px);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

/* Spiral binder hole ring overlay simulation */
.modal-content::before {
  content: '••••••••••••••••••••';
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  color: #dfcfb7;
  position: absolute;
  top: -12px;
  left: 12px;
  right: 12px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  height: 25px;
  pointer-events: none;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed rgba(62, 49, 38, 0.2);
  padding-bottom: 0.5rem;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-weight: normal;
  font-size: 1.35rem;
  color: var(--text-primary);
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.close-modal-btn:hover {
  color: #d95d55;
  transform: scale(1.1);
}

/* Spiral notebook paper layout in modal body */
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 1.75rem;
  /* Horizontal lined paper lines */
  background-image: linear-gradient(rgba(62, 49, 38, 0.05) 1px, transparent 1px);
  background-size: 100% 28px;
  line-height: 28px;
}

/* Vertical red margin line */
.modal-body::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.9rem;
  width: 1.5px;
  background: rgba(217, 93, 85, 0.4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-input {
  background: #fdfdfd;
  border: 2px solid var(--panel-border);
  color: var(--text-primary);
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 1.05rem;
  outline: none;
  box-shadow: inset 1px 1.5px 3px rgba(0,0,0,0.05);
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: #2b5c8f;
  background: #fcfcfc;
}

/* Keyboard trigger setup */
.key-recorder {
  background: #fcfcf9;
  border: 2px dashed var(--panel-border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.key-recorder:hover {
  border-color: #2b5c8f;
  background: #f5f8fa;
}

.key-recorder.recording {
  border-color: #d95d55;
  animation: key-record-pulse 1s infinite alternate;
}

.key-recorder-label {
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.key-recorder-value {
  font-family: var(--font-heading);
  font-weight: bold;
  text-transform: uppercase;
  color: #2b5c8f;
  font-size: 1rem;
}

.key-recorder.recording .key-recorder-value {
  color: #d95d55;
}

/* Palette selector - wobbly paper squares */
.color-palette {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 4px; /* square scraps */
  border: 2.2px solid var(--panel-border);
  cursor: pointer;
  transform: rotate(2deg);
  box-shadow: 1px 1.5px 0px rgba(62, 49, 38, 0.15);
  transition: all var(--transition-fast);
}

.color-option.selected {
  transform: scale(1.18) rotate(-4deg);
  box-shadow: 2px 3px 0px rgba(62, 49, 38, 0.25);
  border-color: #2b5c8f;
}

.color-option:hover {
  transform: scale(1.1) rotate(-1deg);
}

/* Control adjustments inside modal */
.pad-adjustments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.adjust-card {
  background: #fdfdfa;
  border: 1.8px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.adjust-card label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.adjust-val {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-primary);
  align-self: flex-end;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-label input {
  display: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--panel-border);
  border-radius: 3px;
  background: #fdfdfd;
  display: inline-block;
  position: relative;
  transition: all var(--transition-fast);
}

.checkbox-label input:checked + .custom-checkbox {
  background: #fef08a; /* Highlighter yellow */
  border-color: var(--panel-border);
}

.checkbox-label input:checked + .custom-checkbox::after {
  content: '✓';
  position: absolute;
  left: 2px;
  top: -4px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #2b5c8f;
}

/* Modal Actions */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  border-top: 2px dashed rgba(62, 49, 38, 0.15);
  padding-top: 1rem;
}

.modal-footer .btn {
  flex: 1;
  justify-content: center;
}

/* Footer Credit */
footer {
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  z-index: 1;
}

footer a {
  color: #2b5c8f;
  text-decoration: underline;
}

footer a:hover {
  color: #1e3f66;
}

/* Animations for Dynamic Pad Spawning */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(3deg);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sound-pad {
  animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) both;
}

/* DIY Live Stream Guide & Instructions */
.guide-note {
  background: #fefdf0; /* Yellow legal pad paper */
  background-image: linear-gradient(rgba(62, 49, 38, 0.04) 1px, transparent 1px);
  background-size: 100% 24px;
  border: 2.2px solid var(--panel-border);
  border-radius: 6px 12px 5px 10px / 10px 5px 12px 6px;
  padding: 1.5rem;
  box-shadow: 2px 3px 0px rgba(62, 49, 38, 0.15);
  font-family: var(--font-family);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 1100px;
  position: relative;
  overflow: visible;
}

/* Notebook margins */
.guide-note::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.5rem;
  width: 1.5px;
  background: rgba(217, 93, 85, 0.3); /* Red margin line */
  pointer-events: none;
}

/* Washi tape holding it */
.guide-note::before {
  content: '';
  position: absolute;
  top: -11px;
  right: 25px;
  width: 55px;
  height: 18px;
  background: rgba(246, 240, 222, 0.8);
  border-left: 2px dashed rgba(62, 49, 38, 0.15);
  border-right: 2px dashed rgba(62, 49, 38, 0.15);
  transform: rotate(4deg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  z-index: 5;
}

@media (max-width: 768px) {
  .guide-note {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-left: 2.2rem;
  }
  .guide-note::after {
    left: 1.2rem;
  }
}

.guide-section, .guide-instructions {
  position: relative;
  z-index: 2;
  /* Shift text to the right of red margin line if overlapping */
  padding-left: 1.2rem;
}

.guide-section h3, .guide-instructions h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: normal;
  margin-bottom: 0.4rem;
  color: #2b5c8f; /* Blue ink */
  border-bottom: 1.5px dotted rgba(62, 49, 38, 0.2);
  padding-bottom: 1px;
  display: inline-block;
}

.guide-section p {
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.guide-list {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-list li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 1.05rem;
  line-height: 1.4;
}

.guide-list li::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 1px;
  color: #e5b35a; /* Mustard star */
}

.guide-instructions ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-instructions li {
  font-size: 1.05rem;
  line-height: 1.4;
}

