/* Sistema compartido de galerías Tackychan — Superficie + Deep Sea */
.tkg-system{--tkg-ink:#173853;--tkg-muted:#668095;--tkg-panel:rgba(255,255,255,.92);--tkg-line:rgba(73,125,164,.20);--tkg-chip:rgba(248,252,255,.86);--tkg-chip-active:linear-gradient(90deg,rgba(130,217,255,.96),rgba(239,140,188,.90));--tkg-modal:#fff;--tkg-modal-ink:#173853;--tkg-viewer:#06111f;--tkg-shadow:0 18px 55px rgba(30,69,98,.18);color:var(--tkg-ink)}
.tkg-system[data-theme="deep"]{--tkg-ink:#edf9ff;--tkg-muted:#a9c6d9;--tkg-panel:rgba(7,20,47,.86);--tkg-line:rgba(135,220,255,.23);--tkg-chip:rgba(255,255,255,.07);--tkg-chip-active:linear-gradient(90deg,rgba(72,199,242,.30),rgba(230,96,177,.28));--tkg-modal:#08162d;--tkg-modal-ink:#edf9ff;--tkg-viewer:#030a18;--tkg-shadow:0 20px 60px rgba(0,0,0,.42)}
.tkg-system *{box-sizing:border-box}.tkg-system button{font:inherit}.tkg-system img{display:block;max-width:100%}
.tkg-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:4px 0 12px}.tkg-category{position:relative;min-height:116px;border:1px solid var(--tkg-line);border-radius:17px;overflow:hidden;padding:0;background:var(--tkg-chip);cursor:pointer;text-align:left;box-shadow:0 8px 24px rgba(33,73,101,.08)}.tkg-category-media{position:absolute;inset:0;background:linear-gradient(135deg,rgba(115,214,247,.42),rgba(238,147,196,.36))}.tkg-category:nth-child(1) .tkg-category-media{background:linear-gradient(135deg,#7edcf7,#dba4f4 52%,#f4a8c9)}.tkg-category:nth-child(2) .tkg-category-media{background:linear-gradient(145deg,#8ce4e5,#8fc8fa 48%,#e6b0ef)}.tkg-category:nth-child(3) .tkg-category-media{background:linear-gradient(135deg,#b6a5ef,#efb0cf 48%,#95d9f4)}.tkg-category:nth-child(4) .tkg-category-media{background:linear-gradient(145deg,#79cfe8,#a5e6da 44%,#ef9cc5)}.tkg-category-media img{width:100%;height:100%;object-fit:cover;filter:saturate(.92)}.tkg-category-media::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,17,30,.06),rgba(4,17,30,.62))}.tkg-category-label{position:absolute;left:12px;right:12px;bottom:10px;color:#fff;font-size:15px;font-weight:900;text-shadow:0 2px 10px rgba(0,0,0,.45)}.tkg-category.active{outline:2px solid rgba(101,205,244,.88);outline-offset:2px}.tkg-system[data-theme="deep"] .tkg-category.active{box-shadow:0 0 24px rgba(91,218,255,.18),0 0 30px rgba(239,111,190,.12)}
.tkg-filterbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:8px 0 15px}.tkg-projects{display:flex;gap:7px;flex-wrap:wrap}.tkg-chip,.tkg-all{border:1px solid var(--tkg-line);background:var(--tkg-chip);color:var(--tkg-ink);padding:7px 11px;border-radius:999px;font-size:11px;font-weight:850;cursor:pointer}.tkg-chip.active,.tkg-all.active{background:var(--tkg-chip-active);color:var(--tkg-ink)}.tkg-all{margin-left:auto}.tkg-system[data-theme="deep"] .tkg-chip.active,.tkg-system[data-theme="deep"] .tkg-all.active{color:#effbff;box-shadow:0 0 16px rgba(103,220,255,.13)}
.tkg-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.tkg-card{position:relative;aspect-ratio:1/1;border:0;padding:0;overflow:hidden;background:rgba(120,183,219,.18);cursor:pointer}.tkg-card img{width:100%;height:100%;object-fit:cover;transition:transform .2s ease,filter .2s ease}.tkg-card:hover img{transform:scale(1.025)}.tkg-placeholder{pointer-events:none;cursor:default;isolation:isolate}.tkg-placeholder::before,.tkg-placeholder::after{content:"";position:absolute;inset:0}.tkg-placeholder::before{background:radial-gradient(circle at 28% 24%,rgba(255,255,255,.48),transparent 22%),radial-gradient(circle at 74% 78%,rgba(255,255,255,.18),transparent 26%)}.tkg-placeholder::after{background:linear-gradient(135deg,rgba(255,255,255,.16),transparent 45%,rgba(255,255,255,.12));mix-blend-mode:screen}.tkg-ph-1{background:linear-gradient(135deg,#76d8f3,#a4c9fa 48%,#ef9fc8)}.tkg-ph-2{background:linear-gradient(145deg,#9ee7df,#7dcce8 46%,#d9aff2)}.tkg-ph-3{background:linear-gradient(135deg,#b5a4ef,#f0acc8 48%,#8edbf5)}.tkg-ph-4{background:linear-gradient(145deg,#74cde9,#9de6d8 44%,#f09bc4)}.tkg-ph-5{background:linear-gradient(135deg,#8cbdf5,#c4a9ef 50%,#f2b1cf)}.tkg-ph-6{background:linear-gradient(145deg,#8ee1f4,#a8d9f0 42%,#e5a9e8)}.tkg-multi{position:absolute;right:8px;top:8px;width:18px;height:18px;filter:drop-shadow(0 1px 4px rgba(0,0,0,.55))}.tkg-multi::before,.tkg-multi::after{content:"";position:absolute;width:11px;height:11px;border:1.5px solid #fff;border-radius:2px}.tkg-multi::before{right:0;top:0}.tkg-multi::after{left:1px;bottom:1px;background:rgba(0,0,0,.12)}.tkg-empty{margin:26px 0;text-align:center;color:var(--tkg-muted);font-size:13px}.tkg-empty[hidden]{display:none!important}
.tkg-overlay{position:fixed;inset:0;z-index:190;display:grid;place-items:center;padding:18px;background:rgba(3,9,18,.76);backdrop-filter:blur(10px)}.tkg-overlay[hidden]{display:none!important}.tkg-post{position:relative;width:min(620px,100%);max-height:92dvh;display:flex;flex-direction:column;border:1px solid var(--tkg-line);border-radius:18px;overflow:auto;background:var(--tkg-modal);color:var(--tkg-modal-ink);box-shadow:0 28px 90px rgba(0,0,0,.45);overscroll-behavior:contain}.tkg-post-head{position:sticky;top:0;z-index:5;min-height:52px;display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--tkg-line);background:var(--tkg-modal)}.tkg-post-avatar{width:30px;height:30px;border-radius:50%;object-fit:cover;background:#fff}.tkg-post-user{font-size:13px;font-weight:900}.tkg-close{margin-left:auto;width:34px;height:34px;border:0;border-radius:50%;background:transparent;color:inherit;font-size:24px;line-height:1;cursor:pointer}.tkg-post-media{position:relative;flex:0 0 auto;display:grid;place-items:center;min-height:220px;max-height:72dvh;background:#02060c;touch-action:pan-y;overflow:hidden;cursor:zoom-in}.tkg-post-media img{max-width:100%;max-height:72dvh;width:auto;height:auto;object-fit:contain;user-select:none;-webkit-user-drag:none}.tkg-counter{position:absolute;right:10px;top:10px;z-index:3;padding:5px 8px;border-radius:999px;background:rgba(4,12,22,.70);color:#fff;font-size:10px;font-weight:900}.tkg-dots{position:absolute;left:50%;bottom:10px;z-index:3;transform:translateX(-50%);display:flex;gap:5px}.tkg-dot{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.50);box-shadow:0 1px 4px rgba(0,0,0,.35)}.tkg-dot.active{background:#fff}.tkg-viewer-page-dots{position:fixed;left:50%;bottom:14px;z-index:8;transform:translateX(-50%);display:flex;gap:5px}.tkg-caption{padding:12px 15px 15px;font-size:13px;line-height:1.45;white-space:pre-wrap}.tkg-caption strong{font-weight:900;margin-right:5px}.tkg-caption.is-empty{padding-top:10px}.tkg-caption.is-empty span{display:none}
.tkg-viewer{position:fixed;inset:0;z-index:210;background:var(--tkg-viewer);color:#fff}.tkg-viewer[hidden]{display:none!important}.tkg-viewer-top{position:fixed;left:0;right:0;top:0;z-index:6;height:48px;display:flex;align-items:center;gap:10px;padding:0 10px;background:linear-gradient(180deg,rgba(2,8,18,.80),rgba(2,8,18,0));pointer-events:none}.tkg-viewer-top>*{pointer-events:auto}.tkg-viewer-close{width:38px;height:38px;border:0;border-radius:50%;background:rgba(2,8,18,.62);color:#fff;font-size:24px;cursor:pointer}.tkg-viewer-meta{font-size:11px;font-weight:800;text-shadow:0 2px 8px #000}.tkg-viewer-counter{margin-left:auto;padding:5px 8px;border-radius:999px;background:rgba(2,8,18,.62);font-size:10px;font-weight:900}.tkg-zoom-tools{display:flex;gap:4px}.tkg-zoom-tools button{width:32px;height:32px;border:1px solid rgba(255,255,255,.16);border-radius:9px;background:rgba(2,8,18,.62);color:#fff;font-weight:900;cursor:pointer}.tkg-viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;background:var(--tkg-viewer)}.tkg-view-content{min-width:100%;min-height:100%;display:flex;align-items:center;justify-content:center}.tkg-single-stage{min-width:100%;min-height:100dvh;display:flex;align-items:center;justify-content:center}.tkg-single-stage img{max-width:none;user-select:none;-webkit-user-drag:none}.tkg-vertical{width:100%;min-height:100%;display:flex;flex-direction:column;align-items:center;padding:0}.tkg-vertical img{display:block;width:min(900px,100%);max-width:none;height:auto;margin:0;user-select:none;-webkit-user-drag:none}.tkg-step{position:fixed;top:50%;z-index:5;transform:translateY(-50%);width:64px;height:54%;border:0;background:transparent;color:rgba(255,255,255,.72);font-size:42px;cursor:pointer;opacity:.35;transition:opacity .2s}.tkg-step:hover{opacity:.82}.tkg-step.prev{left:0}.tkg-step.next{right:0}.tkg-read-hint{position:fixed;left:50%;bottom:18px;z-index:7;transform:translateX(-50%);padding:7px 12px;border-radius:999px;background:rgba(2,9,19,.67);backdrop-filter:blur(8px);font-size:11px;font-weight:850;animation:tkgHint 1.3s ease-in-out infinite;transition:opacity .25s}.tkg-read-hint.hide{opacity:0;pointer-events:none}@keyframes tkgHint{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,5px)}}
.tkg-home-section .tkg-grid{margin-top:8px}
.tkg-home-section .tkg-home-compact-row{width:100%;max-width:none}
.tkg-home-section .tkg-home-compact-row .tkg-grid{width:100%;max-width:none;margin-left:0;margin-right:0;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}
.tkg-home-section .tkg-home-compact-row h4{margin-top:14px}
@media(max-width:760px){.tkg-home-section .tkg-home-compact-row{width:100%;max-width:none}.tkg-home-section .tkg-home-compact-row .tkg-grid{width:100%;max-width:none;margin-left:0;margin-right:0;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px}}.tkg-home-section h4{margin:18px 0 7px;font-size:14px}.tkg-home-section .tkg-home-main-title{margin-top:0}.tkg-home-more{display:flex;justify-content:center;margin-top:18px}.tkg-home-more a{display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;border:1px solid var(--tkg-line);border-radius:999px;background:rgba(255,255,255,.82);color:#31546d;font-size:12px;font-weight:900;text-decoration:none}
body.tkg-overlay-open{overflow:hidden}
@media(max-width:760px){.tkg-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.tkg-category{min-height:100px;border-radius:14px}.tkg-category-label{font-size:14px}.tkg-filterbar{gap:8px}.tkg-projects{gap:5px}.tkg-chip,.tkg-all{padding:7px 9px;font-size:10px}.tkg-grid{gap:3px}.tkg-overlay{padding:0;place-items:center}.tkg-post{width:100%;max-height:100dvh;border-radius:0;border-left:0;border-right:0}.tkg-post-media{max-height:74dvh}.tkg-post-media img{max-height:74dvh}.tkg-step{width:44px;height:46%;font-size:30px}.tkg-zoom-tools{display:none}.tkg-viewer-top{height:46px}.tkg-read-hint{bottom:12px}.tkg-caption{padding-bottom:max(15px,env(safe-area-inset-bottom))}}
@media(pointer:coarse){.tkg-card:hover img{transform:none}.tkg-step{opacity:0;pointer-events:none}}

/* Ajuste visual de Superficie — prueba aprobada en página real, 2026-09-07 */
.tkg-system[data-theme="surface"],#galleryPanel{font-family:Arial,Helvetica,sans-serif}
.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);box-shadow:0 18px 50px rgba(39,76,105,.15)}
.tkg-home-section::before{display:none}
.tkg-home-section .row-head{margin-bottom:12px}.tkg-home-section .row-head h3{font-size:25px}.tkg-home-section h4{color:#173853}.tkg-home-more a{min-height:40px;padding:10px 18px;border-color:rgba(88,151,192,.22);background:linear-gradient(90deg,rgba(130,217,255,.42),rgba(239,140,188,.34));box-shadow:0 7px 18px rgba(52,103,138,.08)}
.tkg-system[data-theme="surface"] .tkg-category-grid{gap:9px;margin:4px 0 14px}
.tkg-system[data-theme="surface"] .tkg-category{min-height:58px;display:flex;align-items:center;gap:9px;padding:7px 12px 7px 8px;border-radius:999px;background:rgba(248,252,255,.90);box-shadow:0 6px 18px rgba(33,73,101,.07);overflow:hidden}
.tkg-system[data-theme="surface"] .tkg-category-media{position:relative;inset:auto;width:40px;height:40px;flex:0 0 40px;border-radius:12px;overflow:hidden}
.tkg-system[data-theme="surface"] .tkg-category-media::after{background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(18,51,77,.12))}
.tkg-system[data-theme="surface"] .tkg-category-label{position:static;color:#173853;font-size:13px;font-weight:900;text-shadow:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tkg-system[data-theme="surface"] .tkg-category.active{outline:0;border-color:rgba(93,205,242,.72);box-shadow:inset 0 0 0 1px rgba(238,143,188,.28),0 0 0 2px rgba(119,217,255,.22),0 7px 20px rgba(49,96,130,.10)}
#galleryApp .tkg-grid{gap:3px}
@media(max-width:760px){
  .tkg-home-section{margin-top:18px;padding:12px;border-radius:20px}
  .tkg-home-section .row-head h3{font-size:23px}
  .tkg-system[data-theme="surface"] .tkg-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .tkg-system[data-theme="surface"] .tkg-category{min-height:58px;padding:7px 10px 7px 7px}
  .tkg-system[data-theme="surface"] .tkg-category-media{width:40px;height:40px;flex-basis:40px}
  .tkg-system[data-theme="surface"] .tkg-category-label{font-size:12px}
  .tkg-home-section .tkg-grid,#galleryGrid{width:100vw;max-width:none;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}
}
