/* Ajustes visuales de la Galería de superficie */
.tkg-system[data-theme="surface"] .tkg-card{aspect-ratio:4/5}

/* Inicio conserva su bloque vigente. */
.tkg-home-section{
  margin-top:24px;
  padding:20px;
  border:1px solid rgba(255,255,255,.78);
  border-radius:24px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
  box-shadow:0 18px 50px rgba(39,76,105,.15);
  overflow:hidden;
}
.tkg-home-ribbon{padding:0;border:0;border-radius:0;background:transparent;backdrop-filter:none;box-shadow:none}
.tkg-home-ribbon .row-head{margin-bottom:12px}
.tkg-home-ribbon .tkg-home-main-title{margin:0}
.tkg-home-ribbon + .tkg-grid{margin-top:8px}
.tkg-home-section>h4{margin-left:0;margin-right:0}

/* Galería general: composición compartida con Deep Sea.
   El vidrio de la cabecera vive exclusivamente en tc-glass-panel.css. */
#galleryPanel{overflow:visible;background:transparent;border:0;box-shadow:none;padding:0}
#galleryPanel .gallery-head{
  width:min(690px,100%);
  margin:0 0 12px;
}
#galleryPanel .gallery-head h1{margin:0;font-size:46px;line-height:1.04;letter-spacing:-.035em}
#galleryPanel .gallery-head p{margin:13px 0 24px;font-size:14px;line-height:1.55}
#galleryPanel .gallery-head{position:relative}
#galleryPanel .tkg-memory-key{position:absolute;right:10px;bottom:9px;display:inline-flex;align-items:center;gap:5px;width:auto;height:26px;padding:3px 7px;border:1px solid rgba(73,125,164,.16);border-radius:7px;color:#a38bcc;background:rgba(247,253,255,.18);font-size:11px;font-weight:600;line-height:1;white-space:nowrap;text-decoration:none;opacity:.78;transition:opacity .18s ease,background .18s ease}
#galleryPanel .tkg-memory-key:hover,#galleryPanel .tkg-memory-key:focus-visible{opacity:1;background:rgba(247,253,255,.48);outline:none}
#galleryPanel #galleryGrid{width:100%;max-width:none;margin-left:0;margin-right:0}

/* Los controles de Superficie conservan su tema claro y la información extra. */
#galleryPanel .tkg-category{
  background:rgba(247,253,255,.38);
  border-color:rgba(109,165,199,.38);
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
  box-shadow:0 6px 18px rgba(33,73,101,.09),inset 0 0 15px rgba(255,255,255,.14);
}
#galleryPanel .tkg-category.active{
  background:linear-gradient(110deg,rgba(99,214,246,.43),rgba(171,150,240,.40),rgba(242,145,202,.43));
  border-color:rgba(255,255,255,.58);
  box-shadow:0 0 0 1px rgba(105,201,238,.08) inset,0 7px 22px rgba(45,102,139,.12);
}
#galleryPanel .tkg-chip,#galleryPanel .tkg-all{
  background:rgba(247,253,255,.40);
  border-color:rgba(106,161,194,.36);
  backdrop-filter:blur(12px) saturate(140%);
  -webkit-backdrop-filter:blur(12px) saturate(140%);
  box-shadow:0 5px 16px rgba(33,73,101,.08),inset 0 0 12px rgba(255,255,255,.14);
}
#galleryPanel .tkg-chip.active,#galleryPanel .tkg-all.active{
  background:linear-gradient(110deg,rgba(99,214,246,.46),rgba(171,150,240,.42),rgba(242,145,202,.45));
}

@media(max-width:760px){
  .tkg-home-section{width:calc(100vw - 4px);max-width:none;margin-left:calc(50% - 50vw + 2px);margin-right:calc(50% - 50vw + 2px);padding:2px;border-radius:20px}
  .tkg-home-ribbon{padding:14px 12px 10px}
  .tkg-home-section>h4{padding:0 12px;margin-top:18px}
  .tkg-home-more{padding:0 12px 14px}
  .tkg-home-section .tkg-grid,#galleryGrid{width:100%;max-width:none;margin-left:0;margin-right:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}

  #galleryPanel{width:calc(100vw - 4px);max-width:none;margin-left:calc(50% - 50vw + 2px);margin-right:calc(50% - 50vw + 2px)}
  #galleryPanel .gallery-head{width:calc(100% - 16px);margin:0 8px 8px}
  #galleryPanel .gallery-head h1{font-size:34px}
  #galleryPanel .gallery-head p{margin-top:8px;margin-bottom:24px;font-size:12px;line-height:1.35;padding-right:0}
  #galleryPanel .tkg-memory-key{right:7px;bottom:6px;width:auto;height:26px;padding:3px 6px;font-size:10px;opacity:1}

  /* Pestañas compactas: conservan la información aprobada de Superficie. */
  #galleryPanel .tkg-category-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0 8px 5px;border-bottom:1px solid rgba(73,125,164,.15)}
  #galleryPanel .tkg-category{position:relative;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 2px 6px;border:0;border-radius:0;background:rgba(247,253,255,.16);box-shadow:none;overflow:visible;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
  #galleryPanel .tkg-category-media{display:none}
  #galleryPanel .tkg-category::before{display:block;color:#496b84;font-size:18px;line-height:1;font-weight:700}
  #galleryPanel .tkg-category:nth-child(1)::before{content:"▦"}
  #galleryPanel .tkg-category:nth-child(2)::before{content:"▧"}
  #galleryPanel .tkg-category:nth-child(3)::before{content:"✎"}
  #galleryPanel .tkg-category:nth-child(4)::before{content:"◇"}
  #galleryPanel .tkg-category-label{position:static;color:#496b84;font-size:9.5px;line-height:1.05;font-weight:800;text-shadow:none;white-space:nowrap;overflow:visible}
  #galleryPanel .tkg-category.active{outline:0;border:0;box-shadow:none;background:rgba(247,253,255,.28)}
  #galleryPanel .tkg-category.active::before,#galleryPanel .tkg-category.active .tkg-category-label{color:#173853}
  #galleryPanel .tkg-category.active::after{content:"";position:absolute;left:9px;right:9px;bottom:-1px;height:3px;border-radius:999px 999px 0 0;background:linear-gradient(90deg,#73d6f4,#baabef 52%,#ed91bf)}

  #galleryPanel .tkg-filterbar{display:block;margin:0 0 7px;padding:0 8px;overflow:hidden}
  #galleryPanel .tkg-projects{width:100%;display:flex;flex-wrap:nowrap;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:2px 0 4px}
  #galleryPanel .tkg-projects::-webkit-scrollbar{display:none}
  #galleryPanel .tkg-chip{flex:0 0 auto;min-height:30px;padding:5px 9px;font-size:10px;white-space:nowrap}
  #galleryPanel .tkg-all{display:none}
  #galleryPanel .tkg-empty{padding-left:10px;padding-right:10px}
}


/* Visor de Superficie · publicación vertical tipo Instagram.
   La ilustración conserva el viewport completo; el texto continúa debajo. */
@media(min-width:761px){
  .tkg-viewer[data-theme="surface"].tkg-surface-base-zoom .tkg-viewport{
    overflow-x:hidden;
  }
  .tkg-viewer[data-theme="surface"] .tkg-view-content.tkg-surface-publication:not(.tkg-vertical){
    width:100%;
    min-width:100%;
    min-height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    overflow:visible;
  }
  .tkg-viewer[data-theme="surface"] .tkg-single-stage{
    position:relative;
    flex:0 0 auto;
    width:100%;
    min-width:100%;
    min-height:100dvh;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }
  .tkg-viewer[data-theme="surface"] .tkg-deep-caption-teaser,
  .tkg-viewer[data-theme="surface"] .tkg-deep-publication-text{
    display:none!important;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-peek{
    position:absolute;
    z-index:7;
    left:50%;
    bottom:10px;
    transform:translateX(-50%);
    height:34px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:0 15px;
    border:0;
    border-top:1px solid rgba(143,198,230,.16);
    color:rgba(247,251,255,.94);
    background:linear-gradient(180deg,rgba(5,14,27,.08),rgba(5,14,27,.78));
    box-shadow:0 7px 18px rgba(0,0,0,.16);
    font-size:11px;
    cursor:pointer;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-peek span:first-child{
    font-weight:900;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-peek span:last-child{
    color:#9de8ff;
    font-weight:850;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption{
    position:relative;
    z-index:2;
    flex:0 0 auto;
    width:auto;
    min-height:0;
    margin:0 auto 72px;
    padding:18px 18px 24px;
    border:0;
    border-top:1px solid rgba(143,198,230,.24);
    color:#f7fbff;
    background:linear-gradient(180deg,rgba(7,18,33,.94),rgba(5,14,27,.99));
    user-select:text;
    -webkit-user-select:text;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-body{
    width:100%;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:start;
    gap:10px;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-author{
    font-size:13px;
    line-height:1.55;
    font-weight:900;
    white-space:nowrap;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-copy{
    min-width:0;
    display:block;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    font-size:13px;
    line-height:1.6;
    color:#f2f8fc;
  }
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-copy a{
    color:#9de8ff;
    text-decoration:underline;
    text-underline-offset:2px;
  }
  .tkg-viewer[data-theme="surface"].tkg-has-text .tkg-viewer-page-dots{
    bottom:42px!important;
  }
}
@media(max-width:760px){
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption,
  .tkg-viewer[data-theme="surface"] .tkg-surface-caption-peek{display:none!important}
}

#galleryPanel .tkg-memory-key svg{width:18px;height:18px}
#galleryPanel .tkg-memory-key[hidden]{display:none}
