/* =========================================================
  SUNNY DEV LOG
  Estilo: dev journal visual + carpeta + notas + notebook
  Paleta: rosa, crema, gris, negro y periwinkle
========================================================= */


/* =========================================================
  1. VARIABLES
  Aqui guardamos colores, sombras y medidas que se repiten.
========================================================= */

:root {
  --cream: #f7f1ec;
  --soft-cream: #fffaf6;
  --black: #121212;
  --dark-gray: #5f5d5c;
  --light-gray: #eeeeef;
  --rose: #dc89aa;
  --soft-rose: #f3c8d8;
  --blush: #f8e4eb;
  --pink-note: #e684a3;
  --periwinkle: #c9cbdb;
  --soft-periwinkle: #e4e5f0;
  --paper-hole: #f1ece8;
  --shadow-soft: rgba(18, 18, 18, 0.16);
  --shadow-medium: rgba(18, 18, 18, 0.22);
}


/* =========================================================
  2. RESET Y BASE
  Reglas generales para que la pagina empiece limpia.
========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--black);
  font-family: "Courier New", monospace;
  background:
    radial-gradient(circle at 10% 12%, rgba(220, 137, 170, 0.28), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(201, 203, 219, 0.45), transparent 28%),
    linear-gradient(135deg, var(--cream), #ffffff);
}

/* Capa de puntitos para dar textura de papel. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: radial-gradient(rgba(18, 18, 18, 0.22) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 84%, transparent);
}


/* =========================================================
  3. FONDO DECORATIVO
  Doodles flotantes que no afectan el contenido.
========================================================= */

.background-doodles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.doodle {
  position: absolute;
  font-family: Georgia, serif;
  font-weight: 700;
  opacity: 0.55;
}

.doodle-star {
  top: 8%;
  right: 9%;
  color: var(--black);
  font-size: 3rem;
  transform: rotate(12deg);
}

.doodle-sparkle {
  top: 27%;
  left: 7%;
  color: var(--periwinkle);
  font-size: 3.4rem;
}

.doodle-heart {
  top: 38%;
  right: 8%;
  color: var(--rose);
  font-size: 4rem;
  transform: rotate(-10deg);
}

.doodle-loop {
  bottom: 18%;
  left: 6%;
  color: var(--soft-rose);
  font-size: 4.8rem;
  transform: rotate(-18deg);
}

.doodle-plus {
  right: 15%;
  bottom: 12%;
  color: var(--periwinkle);
  font-size: 3.2rem;
}

.doodle-flower {
  top: 62%;
  right: 5%;
  color: var(--rose);
  font-size: 3.5rem;
}


/* =========================================================
  4. LAYOUT PRINCIPAL
  Contenedor que centra todo el contenido visible.
========================================================= */

.page-wrapper {
  position: relative;
  z-index: 1;
  width: min(1080px, 92%);
  max-width: 100%;
  margin: 0 auto;
  padding: 56px 0 72px;
}


/* =========================================================
  5. HERO
  Encabezado principal con titulo, etiqueta y descripcion.
========================================================= */

.site-hero {
  margin-bottom: 54px;
}

.hero-label,
.section-label,
.case-number {
  margin: 0;
  color: var(--dark-gray);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-title {
  position: relative;
  width: fit-content;
  margin: 8px 0 16px;
  font-family: Georgia, serif;
  font-size: clamp(4rem, 11vw, 8.5rem);
  line-height: 0.78;
  letter-spacing: -0.08em;
  text-transform: lowercase;
}

/* Cada palabra del titulo baja a su propia linea. */
.main-title span {
  display: block;
}

/* Etiqueta rosada pegada al titulo. */
.main-title::after {
  content: "sunny consuegra";
  position: absolute;
  top: 50%;
  right: -78px;
  padding: 7px 16px;
  border-radius: 999px;
  color: white;
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  letter-spacing: 0;
  background: var(--soft-rose);
  box-shadow: 4px 4px 0 var(--black);
  transform: translateY(-50%) rotate(-2deg);
}

.hero-description {
  max-width: 540px;
  margin: 0;
  color: var(--dark-gray);
  font-size: 1rem;
  line-height: 1.7;
}


/* =========================================================
  6. SISTEMA DE CARPETA
  Contiene las pestanas, el bloque de enfoque y el tablero.
========================================================= */

.folder-system {
  max-width: 100%;
  margin-top: 40px;
}

/* Pestanas superiores de la carpeta. */
.folder-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding-left: 0;
  gap: 6px;
}

.folder-tab {
  width: 100%;
  min-width: 0;
  padding: 12px 10px 14px;
  border: 2px solid var(--black);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  color: var(--black);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: var(--soft-rose);
  cursor: pointer;
  transform: translateY(2px);
  transition:
    filter 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.folder-tab:hover {
  filter: brightness(0.94);
  box-shadow: 0 -3px 0 rgba(18, 18, 18, 0.08) inset;
}

.folder-tab.active {
  z-index: 2;
  padding-top: 17px;
  color: white;
  background: var(--rose);
  filter: brightness(0.9);
  transform: translateY(2px);
}

.folder-tab:nth-child(2) {
  background: var(--blush);
}

.folder-tab:nth-child(3) {
  background: var(--periwinkle);
}

.folder-tab:nth-child(4) {
  background: var(--light-gray);
}

.folder-tab:nth-child(5) {
  background: var(--rose);
}

.folder-tab:nth-child(6) {
  background: var(--soft-periwinkle);
}

/* Caja grande que simula el cuerpo de una carpeta. */
.folder-body {
  position: relative;
  max-width: 100%;
  padding: 38px;
  border: 2px solid var(--black);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--soft-rose), var(--blush));
  box-shadow: 12px 12px 0 var(--shadow-medium);
}

/* Borde interior decorativo de la carpeta. */
.folder-body::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  pointer-events: none;
}

/* Sticker circular decorativo en la esquina. */
.folder-body::after {
  display: none;
}

/* Colores dinamicos de carpeta segun la pestana activa. */
.folder-system[data-active-category="all"] .folder-body {
  background: linear-gradient(180deg, var(--soft-rose), var(--blush));
}

.folder-system[data-active-category="wordpress"] .folder-body {
  background: linear-gradient(180deg, var(--blush), var(--soft-cream));
}

.folder-system[data-active-category="forms"] .folder-body {
  background: linear-gradient(180deg, var(--periwinkle), var(--soft-periwinkle));
}

.folder-system[data-active-category="javascript"] .folder-body {
  background: linear-gradient(180deg, var(--light-gray), var(--soft-cream));
}

.folder-system[data-active-category="css"] .folder-body {
  background: linear-gradient(180deg, var(--rose), var(--soft-rose));
}

.folder-system[data-active-category="qa"] .folder-body {
  background: linear-gradient(180deg, var(--soft-periwinkle), var(--light-gray));
}


/* =========================================================
  7. CURRENT FOCUS
  Nota destacada antes del listado de casos.
========================================================= */

.focus-note {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  align-items: center;
  gap: 28px;
  margin-bottom: 34px;
  padding: 26px;
  border: 2px solid var(--black);
  border-radius: 20px;
  background: rgba(255, 250, 246, 0.88);
  box-shadow: 7px 7px 0 rgba(18, 18, 18, 0.18);
}

.focus-note h2 {
  margin: 6px 0 0;
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.focus-copy {
  display: grid;
  gap: 14px;
}

.focus-copy p {
  margin: 0;
  color: var(--dark-gray);
  line-height: 1.7;
}

.notes-counter {
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(18, 18, 18, 0.16);
  border-radius: 999px;
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  background: rgba(255, 250, 246, 0.72);
}


/* =========================================================
  8. NOTES TOOLBAR
  Buscador de notas dentro de la carpeta.
========================================================= */

.notes-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 16px 18px;
  border: 2px solid var(--black);
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.72);
  box-shadow: 5px 5px 0 rgba(18, 18, 18, 0.12);
}

.search-label {
  color: var(--dark-gray);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.notes-search {
  width: min(360px, 100%);
  padding: 11px 14px;
  border: 2px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--soft-cream);
  outline: none;
}

.notes-search::placeholder {
  color: rgba(95, 93, 92, 0.7);
}

.notes-search:focus {
  box-shadow: 4px 4px 0 rgba(18, 18, 18, 0.16);
}


/* =========================================================
  9. TABLERO DE NOTAS
  Grid de tarjetas con problemas, fixes y lecciones.
========================================================= */

.notes-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.dev-note {
  position: relative;
  min-height: auto;
  padding: 20px;
  border: 2px solid var(--black);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--shadow-soft);
  overflow: visible;
}

/* Lineas suaves dentro de cada nota, como papel rayado. */
.dev-note::before {
  content: "";
  position: absolute;
  inset: 78px 22px 22px;
  pointer-events: none;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 29px,
    rgba(255, 255, 255, 0.35) 30px,
    rgba(255, 255, 255, 0.35) 32px
  );
}

.dev-note:nth-child(odd) {
  transform: rotate(-0.7deg);
}

.dev-note:nth-child(even) {
  transform: rotate(0.7deg);
}

/* Variantes de color para reutilizar en notas nuevas. */
.note-rose {
  background: var(--pink-note);
}

.note-blush {
  background: var(--blush);
}

.note-periwinkle {
  background: var(--soft-periwinkle);
}

.note-cream {
  background: var(--soft-cream);
}

/* Cinta superior que parece pegar la nota al tablero. */
.note-pin {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: 4;
  width: 78px;
  height: 34px;
  border: 1px solid rgba(18, 18, 18, 0.12);
  background: rgba(255, 250, 246, 0.96);
  box-shadow: 3px 3px 0 rgba(18, 18, 18, 0.1);
  transform: translateX(-50%) rotate(1deg);
}

.note-pin::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.7;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.05)
  );
}

/* Mantiene el texto encima de las lineas decorativas. */
.note-header,
.note-footer,
.note-lines,
.dev-note h3 {
  position: relative;
  z-index: 1;
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.note-category {
  padding: 5px 10px;
  border-radius: 3px;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(18, 18, 18, 0.9);
}

.dev-note h3 {
  margin: 16px 0 24px;
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.note-lines {
  display: grid;
  gap: 14px;
}

.note-lines p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.note-lines strong {
  font-weight: 900;
}

.note-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.note-footer span {
  padding: 5px 9px;
  border: 1px solid rgba(18, 18, 18, 0.2);
  font-size: 0.72rem;
  background: rgba(255, 250, 246, 0.65);
}


/* =========================================================
  10. EMPTY STATE
  Nota que aparece cuando una categoria aun no tiene contenido.
========================================================= */

.empty-note {
  grid-column: 1 / -1;
  position: relative;
  min-height: 260px;
  padding: 34px;
  border: 2px dashed var(--black);
  border-radius: 22px;
  background: rgba(255, 250, 246, 0.72);
  box-shadow: 7px 7px 0 rgba(18, 18, 18, 0.12);
  display: grid;
  place-content: center;
  text-align: center;
}

.empty-note::before {
  content: none !important;
  display: none !important;
}

.empty-note h3 {
  max-width: 520px;
  margin: 10px auto 14px;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.empty-note p:last-child {
  max-width: 520px;
  margin: 0 auto;
  color: var(--dark-gray);
  line-height: 1.7;
}

.empty-note code {
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--black);
  background: var(--soft-periwinkle);
}


/* =========================================================
  11. PAGINACION DE NOTAS
  Controles para navegar las notas de 4 en 4.
========================================================= */

.notes-pagination {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  margin-top: 34px;
  padding: 10px 0 2px;
  flex-wrap: wrap;
}

.pagination-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 18px;
  border: 2px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  background: var(--soft-cream);
  box-shadow: 4px 4px 0 rgba(18, 18, 18, 0.18);
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  filter: brightness(0.96);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 rgba(18, 18, 18, 0.2);
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.pagination-info {
  color: var(--dark-gray);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}


/* =========================================================
  12. SNIPPET NOTEBOOK
  Libreta inferior para guardar fragmentos de codigo.
========================================================= */

.snippet-notebook {
  position: relative;
  max-width: 100%;
  margin-top: 70px;
  padding-left: 0;
  overflow: visible;
}

.notebook-page {
  position: relative;
  z-index: 2;
  max-width: 100%;
  padding: 42px 42px 42px 86px;
  border: 2px solid var(--black);
  border-radius: 18px;
  background-color: var(--soft-cream);
  box-shadow: 10px 10px 0 rgba(18, 18, 18, 0.18);
  overflow: hidden;
}

/* Cuadricula suave del papel de libreta. */
.notebook-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(201, 203, 219, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 203, 219, 0.28) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* Linea vertical rosada del margen de la libreta. */
.notebook-page::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 58px;
  width: 2px;
  background: rgba(220, 137, 170, 0.55);
}

/* Agujeros de la libreta. */
.notebook-holes {
  position: absolute;
  top: 42px;
  bottom: 42px;
  left: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
}

.notebook-holes span {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 50%;
  background: var(--paper-hole);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.06);
}

/* El contenido real queda encima de la cuadricula decorativa. */
.snippet-notebook .section-label,
.snippet-header,
.snippets-list,
.snippet-paper,
.snippets-pagination {
  position: relative;
  z-index: 1;
}

.snippet-header {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: end;
  gap: 28px;
  margin-bottom: 28px;
}

.snippet-header h2 {
  margin: 8px 0 0;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.snippet-copy {
  display: grid;
  gap: 18px;
}

.snippet-copy p {
  margin: 0;
  color: var(--dark-gray);
  font-size: 0.96rem;
  line-height: 1.7;
}

.snippet-search-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--soft-cream);
  box-shadow: 4px 4px 0 rgba(18, 18, 18, 0.14);
  overflow: hidden;
  transition: width 0.25s ease;
}

.snippet-search-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  color: var(--black);
  font-size: 1rem;
  background: transparent;
  cursor: pointer;
}

.snippet-search {
  width: 0;
  padding: 0;
  border: 0;
  color: var(--black);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  background: transparent;
  outline: none;
  opacity: 0;
  transition:
    width 0.25s ease,
    padding 0.25s ease,
    opacity 0.2s ease;
}

.snippet-search-wrapper.open .snippet-search,
.snippet-search-wrapper:focus-within .snippet-search {
  width: 230px;
  padding: 0 14px 0 0;
  opacity: 1;
}

.snippet-search::placeholder {
  color: rgba(95, 93, 92, 0.68);
}

.snippets-list {
  display: grid;
  max-width: 100%;
  gap: 22px;
}

.snippets-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.snippet-pagination-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 18px;
  border: 2px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  background: var(--soft-cream);
  box-shadow: 4px 4px 0 rgba(18, 18, 18, 0.18);
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.snippet-pagination-info {
  color: var(--dark-gray);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.snippet-pagination-btn:hover:not(:disabled) {
  filter: brightness(0.96);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 rgba(18, 18, 18, 0.2);
}

.snippet-pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.snippet-paper {
  min-width: 0;
  max-width: 100%;
  padding: 24px;
  border: 2px solid var(--black);
  border-radius: 14px;
  background: rgba(255, 250, 246, 0.7);
  box-shadow: 6px 6px 0 rgba(18, 18, 18, 0.12);
  overflow: hidden;
}

.snippet-paper-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  margin-bottom: 18px;
}

.snippet-paper-top > div {
  min-width: 0;
}

.snippet-paper-top p {
  max-width: 100%;
  margin: 0;
  color: var(--black);
  font-size: 1.15rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.snippet-paper-top small {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  color: var(--dark-gray);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.snippet-paper-top span {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid rgba(18, 18, 18, 0.18);
  color: white;
  font-size: 0.72rem;
  background: var(--rose);
}

.snippet-paper pre {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 18px;
  border-radius: 10px;
  color: var(--soft-cream);
  background: #111111;
  overflow-x: auto;
}

.snippet-paper code {
  display: block;
  width: max-content;
  min-width: 100%;
  font-family: "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.7;
}


/* =========================================================
  13. RESPONSIVE
  Ajustes para pantallas pequenas y celulares.
========================================================= */

@media (max-width: 820px) {
  .page-wrapper {
    width: min(88%, 1080px);
    padding: 32px 0 48px;
  }

  .site-hero {
    margin-bottom: 46px;
  }

  .hero-label {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
  }

  .main-title {
    max-width: 100%;
    font-size: clamp(3.1rem, 18vw, 4.6rem);
    line-height: 0.78;
    letter-spacing: -0.07em;
  }

  .main-title::after {
    top: auto;
    right: auto;
    bottom: -28px;
    left: 48%;
    padding: 5px 12px;
    font-size: 0.62rem;
    white-space: nowrap;
    box-shadow: 2px 2px 0 var(--black);
    transform: translateX(-50%) rotate(-2deg);
  }

  .hero-description {
    max-width: 85%;
    margin-top: 38px;
    font-size: 0.82rem;
    line-height: 1.65;
  }

  .folder-system {
    margin-top: 28px;
  }

  .folder-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: flex-end;
    width: min(86%, 520px);
    max-width: 520px;
    margin: 0 auto;
    padding: 0;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: hidden;
    overscroll-behavior: none;
    scrollbar-width: none;
    touch-action: none;
  }

  .folder-tabs::-webkit-scrollbar {
    display: none;
  }

  .folder-tab {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 5px 3px 6px;
    border-radius: 9px 9px 0 0;
    font-size: 0.46rem;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    touch-action: manipulation;
  }

  .folder-tab.active {
    padding-top: 6px;
  }

  .folder-body {
    padding: 18px;
    border-radius: 22px;
    box-shadow: 6px 6px 0 rgba(18, 18, 18, 0.2);
  }

  .folder-body::before {
    inset: 8px;
    border-radius: 16px;
  }

  .focus-note {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 5px 5px 0 var(--shadow-soft);
  }

  .focus-note .section-label {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }

  .focus-note h2 {
    font-size: clamp(2rem, 10vw, 2.85rem);
    line-height: 0.88;
  }

  .focus-copy p {
    font-size: 0.78rem;
    line-height: 1.65;
  }

  .notes-counter {
    font-size: 0.62rem;
  }

  .notes-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
  }

  .search-label {
    font-size: 0.62rem;
  }

  .notes-search {
    width: 100%;
    font-size: 0.72rem;
  }

  .notes-board {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .dev-note {
    padding: 20px;
    border-radius: 16px;
    box-shadow: 5px 5px 0 var(--shadow-soft);
  }

  .dev-note h3 {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
    line-height: 0.92;
  }

  .note-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .note-lines p {
    font-size: 0.78rem;
    line-height: 1.55;
  }

  .note-category,
  .note-footer span {
    font-size: 0.62rem;
  }

  .notes-pagination {
    gap: 10px;
    margin-top: 26px;
    padding-bottom: 0;
  }

  .pagination-btn {
    padding: 9px 13px;
    font-size: 0.68rem;
  }

  .pagination-info {
    font-size: 0.66rem;
  }

  .snippet-notebook {
    margin-top: 48px;
    padding-left: 0;
  }

  .notebook-page {
    padding: 26px 16px 26px 52px;
  }

  .notebook-page::after {
    left: 40px;
  }

  .notebook-holes {
    top: 42px;
    bottom: 42px;
    left: 10px;
  }

  .notebook-holes span {
    border-color: rgba(18, 18, 18, 0.1);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.05);
  }

  .snippet-header {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }

  .snippet-header h2 {
    font-size: clamp(1.8rem, 10vw, 2.7rem);
  }

  .snippet-copy {
    gap: 14px;
  }

  .snippet-copy p {
    font-size: 0.8rem;
    line-height: 1.65;
  }

  .snippet-search-wrapper {
    max-width: 100%;
  }

  .snippet-search-wrapper.open .snippet-search,
  .snippet-search-wrapper:focus-within .snippet-search {
    width: min(190px, calc(100vw - 170px));
  }

  .snippets-pagination {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    margin-top: 22px;
  }

  .snippet-pagination-btn {
    width: auto;
    min-width: 132px;
    padding: 9px 13px;
    font-size: 0.68rem;
  }

  #prevSnippetPage,
  #nextSnippetPage,
  .snippet-pagination-info {
    justify-self: center;
  }

  .snippet-pagination-info {
    white-space: nowrap;
    font-size: 0.66rem;
  }

  .snippet-paper {
    max-width: 100%;
    padding: 18px;
    overflow: hidden;
  }

  .snippet-paper-top {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .snippet-paper-top p {
    max-width: 100%;
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .snippet-paper-top small {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .snippet-paper pre {
    max-width: 100%;
    padding: 16px;
    overflow-x: auto;
  }

  .snippet-paper code {
    font-size: 0.74rem;
  }

  .doodle-star {
    top: 18%;
    right: 8%;
    font-size: 2.2rem;
  }

  .doodle-sparkle {
    top: 43%;
    left: 2%;
    font-size: 2.2rem;
  }

  .doodle-heart {
    top: 31%;
    right: -4%;
    display: block;
    font-size: 2.4rem;
  }

  .doodle-loop {
    bottom: 28%;
    left: -6%;
    font-size: 3rem;
  }

  .doodle-plus {
    right: 7%;
    bottom: 15%;
    font-size: 2rem;
  }

  .doodle-flower {
    top: 68%;
    right: -3%;
    display: block;
    font-size: 2.1rem;
  }
}

@media (max-width: 560px) {
  .page-wrapper {
    width: min(94%, 1080px);
    padding: 36px 0 56px;
  }

  .main-title {
    font-size: clamp(3.4rem, 22vw, 5.2rem);
  }

  .folder-tabs {
    width: min(88%, 340px);
    max-width: 340px;
    padding: 0;
    gap: 3px;
  }

  .folder-tab {
    padding: 4px 2px 5px;
    border-radius: 8px 8px 0 0;
    font-size: 0.42rem;
  }

  .folder-body {
    padding: 16px;
    border-radius: 22px;
  }

  .focus-note,
  .dev-note {
    padding: 22px;
  }

  .notebook-page {
    padding: 24px 14px 24px 50px;
  }

  .snippet-header h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .snippet-search-wrapper.open .snippet-search,
  .snippet-search-wrapper:focus-within .snippet-search {
    width: min(170px, calc(100vw - 155px));
  }

  .doodle-heart,
  .doodle-flower {
    display: none;
  }
}

/* =========================================================
  MOBILE TABS TOUCH FIX
  Evita que las pestañas se puedan seleccionar o arrastrar.
  Solo permite deslizar horizontalmente el contenedor.
========================================================= */

.folder-tabs {
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-drag: none;
}

.folder-tab {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
