
:root{
  --bg:#07111f;--panel:#0d1b2e;--panel2:#11243a;--text:#f4f8fc;--muted:#9cb0c8;
  --line:rgba(255,255,255,.1);--accent:#30c7b5;--accent2:#61ddce;--shadow:0 22px 60px rgba(0,0,0,.28);
}
*{box-sizing:border-box} html{scroll-behavior:smooth}
body{margin:0;background:linear-gradient(180deg,#07111f 0,#081521 45%,#06101c 100%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh}
button,input,a{font:inherit}.hidden{display:none!important}
.topbar{height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 max(22px,calc((100vw - 1320px)/2));border-bottom:1px solid var(--line);background:rgba(7,17,31,.86);backdrop-filter:blur(16px);position:sticky;top:0;z-index:20}
.brand{display:flex;align-items:center;gap:12px}.brand .mark{width:40px;height:40px;border:1px solid rgba(97,221,206,.45);border-radius:13px;display:grid;place-items:center;font-size:22px;font-weight:800;color:var(--accent2);background:rgba(48,199,181,.08)}
.brand strong,.brand span{display:block}.brand strong{font-size:14px;letter-spacing:.03em}.brand span{font-size:11px;color:var(--muted);margin-top:2px}
.drive-link,.secondary,.primary,.load-more{border:1px solid var(--line);border-radius:12px;padding:10px 15px;text-decoration:none;color:var(--text);background:rgba(255,255,255,.04);cursor:pointer;transition:.2s}
.drive-link:hover,.secondary:hover{background:rgba(255,255,255,.08)}
main{max-width:1320px;margin:auto;padding:0 22px}
.hero{padding:68px 0 42px;display:grid;grid-template-columns:1.2fr .8fr;gap:52px;align-items:end}
.eyebrow{display:inline-flex;padding:7px 10px;border-radius:999px;background:rgba(48,199,181,.1);border:1px solid rgba(48,199,181,.22);color:var(--accent2);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
h1{font-size:clamp(40px,5vw,74px);line-height:.96;letter-spacing:-.055em;margin:18px 0 20px;max-width:760px}
.hero-copy p{max-width:740px;color:var(--muted);font-size:17px;line-height:1.7;margin:0}
.finder{padding:18px;border:1px solid var(--line);background:linear-gradient(180deg,rgba(17,36,58,.9),rgba(11,27,46,.85));border-radius:22px;box-shadow:var(--shadow)}
.tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.day-btn{border:1px solid var(--line);background:rgba(255,255,255,.03);color:var(--muted);padding:12px;border-radius:12px;font-weight:700;cursor:pointer}.day-btn.active{background:var(--accent);color:#041410;border-color:transparent}
.searchbox{height:52px;border:1px solid var(--line);border-radius:14px;background:rgba(0,0,0,.16);display:flex;align-items:center;gap:10px;padding:0 14px}.searchbox span{font-size:25px;color:var(--muted)}.searchbox input{width:100%;border:0;outline:0;background:transparent;color:#fff;font-size:15px}.searchbox input::placeholder{color:#70859f}.privacy-note{font-size:11px;color:#71869f;margin:12px 2px 0}
.gallery-wrap{padding:22px 0 70px}.gallery-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}.gallery-head h2{font-size:25px;margin:0 0 5px}.gallery-head p{color:var(--muted);margin:0;font-size:13px}
.gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.card{position:relative;aspect-ratio:4/3;border-radius:16px;overflow:hidden;background:#0d1b2e;border:1px solid var(--line);cursor:pointer}.card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease,filter .35s ease}.card:hover img{transform:scale(1.035)}.card:after{content:"";position:absolute;inset:auto 0 0;height:42%;background:linear-gradient(transparent,rgba(0,0,0,.72));pointer-events:none}.card-label{position:absolute;z-index:2;left:11px;bottom:10px;right:11px;display:flex;align-items:end;justify-content:space-between;gap:10px}.card-name{font-size:12px;font-weight:700;text-shadow:0 1px 8px #000;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-open{font-size:10px;color:#dffaf7;background:rgba(7,17,31,.6);border:1px solid rgba(255,255,255,.18);padding:5px 7px;border-radius:7px}
.skeleton{aspect-ratio:4/3;border-radius:16px;background:linear-gradient(100deg,#0d1b2e 25%,#14283e 40%,#0d1b2e 60%);background-size:220% 100%;animation:shimmer 1.3s infinite}@keyframes shimmer{to{background-position:-220% 0}}
.load-more-wrap{text-align:center;padding-top:26px}.load-more{padding:13px 24px;background:var(--accent);color:#041410;border-color:transparent;font-weight:800}
.empty,.setup-error{border:1px dashed var(--line);border-radius:18px;padding:35px;text-align:center;color:var(--muted);background:rgba(255,255,255,.025)}
.setup-error{border-color:rgba(255,172,72,.25);color:#ffd39e;text-align:left;line-height:1.6}
.lightbox{position:fixed;z-index:100;inset:0;background:rgba(2,7,13,.94);backdrop-filter:blur(14px);display:grid;place-items:center;padding:26px}.lightbox-inner{width:min(1160px,calc(100vw - 110px));height:min(88vh,900px);display:flex;flex-direction:column}.image-stage{min-height:0;flex:1;display:grid;place-items:center}.image-stage img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 30px 100px rgba(0,0,0,.35)}.lightbox-info{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 2px 0}.lightbox-info strong,.lightbox-info span{display:block}.lightbox-info span{font-size:12px;color:var(--muted);margin-top:3px}.lightbox-actions{display:flex;gap:8px}.primary{background:var(--accent);color:#041410;border-color:transparent;font-weight:800}.close{position:absolute;right:22px;top:18px;background:transparent;border:0;color:#fff;font-size:38px;cursor:pointer}.nav{position:absolute;top:50%;transform:translateY(-50%);border:1px solid var(--line);background:rgba(255,255,255,.05);color:#fff;width:46px;height:58px;border-radius:13px;font-size:35px;cursor:pointer}.prev{left:18px}.next{right:18px}
footer{max-width:1320px;margin:auto;padding:25px 22px 38px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:#6f849e;font-size:11px}
@media(max-width:980px){.hero{grid-template-columns:1fr;gap:26px;padding-top:45px}.gallery{grid-template-columns:repeat(3,1fr)}}
@media(max-width:680px){.topbar{height:68px;padding:0 14px}.drive-link{display:none}main{padding:0 12px}.hero{padding:32px 0 28px}.hero-copy p{font-size:14px}.gallery{grid-template-columns:repeat(2,1fr);gap:7px}.card{border-radius:11px}.card-open{display:none}.gallery-head{align-items:center}.lightbox{padding:14px}.lightbox-inner{width:100%;height:86vh}.nav{width:38px;height:48px;z-index:2;background:rgba(0,0,0,.45)}.prev{left:6px}.next{right:6px}.lightbox-info{align-items:flex-start;flex-direction:column}.lightbox-actions{width:100%}.lightbox-actions a{flex:1;text-align:center}.close{right:12px;top:8px}footer{padding-inline:14px;flex-direction:column;gap:6px}}


/* PATCH 01 — full scan button replacing search bar */
.scan-main-btn{
  width:100%;
  min-height:72px;
  border:1px solid rgba(48,199,181,.38);
  border-radius:15px;
  background:
    radial-gradient(circle at 16% 20%,rgba(97,221,206,.14),transparent 34%),
    linear-gradient(135deg,rgba(48,199,181,.10),rgba(0,0,0,.16));
  color:var(--text);
  display:flex;
  align-items:center;
  gap:14px;
  padding:13px 15px;
  cursor:pointer;
  text-align:left;
  transition:.22s ease;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.scan-main-btn:hover{
  border-color:rgba(97,221,206,.78);
  transform:translateY(-1px);
  background:
    radial-gradient(circle at 16% 20%,rgba(97,221,206,.19),transparent 34%),
    linear-gradient(135deg,rgba(48,199,181,.14),rgba(0,0,0,.15));
}
.scan-main-icon{
  position:relative;
  width:50px;height:50px;flex:0 0 50px;
  display:grid;place-items:center;
  border-radius:13px;
  background:rgba(48,199,181,.09);
  color:var(--accent2);
  font-size:21px;
}
.scan-corner{position:absolute;width:12px;height:12px;border-color:var(--accent2);opacity:.9}
.scan-corner.tl{left:7px;top:7px;border-left:2px solid;border-top:2px solid;border-radius:3px 0 0 0}
.scan-corner.tr{right:7px;top:7px;border-right:2px solid;border-top:2px solid;border-radius:0 3px 0 0}
.scan-corner.bl{left:7px;bottom:7px;border-left:2px solid;border-bottom:2px solid;border-radius:0 0 0 3px}
.scan-corner.br{right:7px;bottom:7px;border-right:2px solid;border-bottom:2px solid;border-radius:0 0 3px 0}
.scan-main-copy{min-width:0;flex:1}
.scan-main-copy strong,.scan-main-copy small{display:block}
.scan-main-copy strong{font-size:15px;font-weight:800;letter-spacing:.01em}
.scan-main-copy small{font-size:11px;color:var(--muted);margin-top:4px}
.scan-main-arrow{font-size:28px;line-height:1;color:var(--accent2);padding-right:2px}
.scanner-mini{
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(0,0,0,.13);
  padding:8px;
  display:flex;
  align-items:center;
  gap:10px;
}
.scanner-mini img{
  width:46px;height:46px;object-fit:cover;border-radius:10px;border:1px solid var(--line)
}
.scanner-mini div{min-width:0;flex:1}
.scanner-mini strong,.scanner-mini small{display:block}
.scanner-mini strong{font-size:12px}
.scanner-mini small{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.scanner-mini button{
  width:30px;height:30px;border:0;border-radius:9px;background:rgba(255,255,255,.06);
  color:#fff;font-size:20px;cursor:pointer
}


/* PATCH 02 — visual matching workflow */
.scanner-mini-copy{min-width:0;flex:1}
.scanner-progress{color:var(--accent2)!important;margin-top:4px!important}
.find-similar-btn{
  width:100%; margin-top:10px; min-height:48px; border:0; border-radius:13px;
  background:var(--accent); color:#041410; font-weight:900; cursor:pointer;
  letter-spacing:.01em;
}
.find-similar-btn:disabled{opacity:.55;cursor:wait}
.match-banner{
  margin:0 0 16px;
  border:1px solid rgba(48,199,181,.25);
  border-radius:14px;
  background:rgba(48,199,181,.07);
  padding:12px 14px;
  display:flex; align-items:center; justify-content:space-between; gap:16px
}
.match-banner strong,.match-banner span{display:block}
.match-banner strong{font-size:13px}
.match-banner span{font-size:11px;color:var(--muted);margin-top:3px}
.match-banner button{
  border:1px solid var(--line);border-radius:10px;padding:8px 11px;background:rgba(255,255,255,.05);
  color:#fff;cursor:pointer;white-space:nowrap
}
.match-score{
  position:absolute;z-index:3;right:9px;top:9px;
  padding:5px 7px;border-radius:8px;
  background:rgba(7,17,31,.78);border:1px solid rgba(255,255,255,.16);
  font-size:10px;font-weight:800;color:var(--accent2)
}
@media(max-width:680px){
  .match-banner{align-items:flex-start;flex-direction:column}
  .match-banner button{width:100%}
}


/* PATCH 03 — transparent SICPC header logo */
.brand-logo-link{
  display:flex;
  align-items:center;
  text-decoration:none;
  min-width:0;
}
.header-event-logo{
  display:block;
  width:auto;
  height:54px;
  max-width:min(310px,52vw);
  object-fit:contain;
  object-position:left center;
}
@media(max-width:680px){
  .header-event-logo{
    height:44px;
    max-width:67vw;
  }
}


/* PATCH 04 — final smart non-biometric person/outfit finder */
.smart-match-hint{
  margin:9px 2px 0;
  font-size:10px;
  line-height:1.45;
  color:#7990aa;
}
.smart-match-hint strong{color:var(--accent2)}
.find-similar-btn{
  position:relative;
  overflow:hidden;
}
.find-similar-btn.is-working:after{
  content:"";
  position:absolute;
  left:-45%; top:0; bottom:0; width:35%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);
  animation:smartSweep 1.1s linear infinite;
}
@keyframes smartSweep{to{left:120%}}


/* PATCH 05 — remove scan/upload UI and smart matcher interface */
.scan-main-btn,
.scanner-mini,
.find-similar-btn,
.smart-match-hint,
.searchbox,
.privacy-note,
.match-banner,
.match-score {
  display: none !important;
}

.finder{
  padding:18px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,rgba(17,36,58,.9),rgba(11,27,46,.85));
  border-radius:22px;
  box-shadow:var(--shadow);
}
.tabs{margin-bottom:0}


/* PATCH 06 — remove leftover Show all photos button */
#showAllBtn,
.match-banner button,
button[data-action="show-all"]{
  display:none !important;
}


/* PATCH 07 — fully responsive gallery images, no cropping */
.gallery{
  align-items:stretch;
}

.card{
  aspect-ratio:4 / 3;
  background:#07111f;
  display:flex;
  align-items:center;
  justify-content:center;
}

.card img{
  width:100%;
  height:100%;
  object-fit:contain !important;
  object-position:center center;
  background:#07111f;
  transform:none !important;
}

/* Keep hover clean without zoom/cropping */
.card:hover img{
  transform:none !important;
}

/* Preserve full photo in preview/lightbox */
.image-stage{
  background:#050d17;
  border-radius:10px;
}

.image-stage img{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain !important;
  object-position:center center;
}

/* Responsive card proportions */
@media(max-width:980px){
  .card{
    aspect-ratio:4 / 3;
  }
}

@media(max-width:680px){
  .gallery{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .card{
    aspect-ratio:3 / 4;
    min-height:0;
  }

  .card img{
    object-fit:contain !important;
  }
}

/* Very small phones */
@media(max-width:390px){
  .gallery{
    grid-template-columns:1fr 1fr;
    gap:6px;
  }
}


/* PATCH 08 — fully responsive image preview / lightbox */
.lightbox{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  overflow:hidden;
}

.lightbox-inner{
  width:min(1180px, calc(100vw - 120px));
  max-width:100%;
  height:min(90vh, 920px);
  max-height:calc(100vh - 40px);
  display:flex;
  flex-direction:column;
  min-height:0;
}

.image-stage{
  flex:1 1 auto;
  min-height:0;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding:8px;
}

.image-stage img{
  display:block;
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  border-radius:8px;
}

.lightbox-info{
  flex:0 0 auto;
  width:100%;
  padding:14px 2px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.lightbox-info > div:first-child{
  min-width:0;
  flex:1;
}

.lightbox-info strong{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

.lightbox-actions{
  flex:0 0 auto;
  display:flex;
  gap:8px;
}

.close{
  z-index:105;
}

.nav{
  z-index:104;
}

/* Tablet */
@media(max-width:900px){
  .lightbox{
    padding:14px;
  }

  .lightbox-inner{
    width:calc(100vw - 76px);
    height:calc(100vh - 28px);
    max-height:none;
  }

  .nav{
    width:42px;
    height:52px;
  }

  .prev{left:8px}
  .next{right:8px}
}

/* Mobile */
@media(max-width:680px){
  .lightbox{
    padding:8px;
    align-items:stretch;
  }

  .lightbox-inner{
    width:100%;
    height:100%;
    max-height:none;
    padding-top:34px;
  }

  .image-stage{
    flex:1 1 auto;
    padding:4px 0;
  }

  .image-stage img{
    max-width:100% !important;
    max-height:100% !important;
    border-radius:6px;
  }

  .lightbox-info{
    padding:10px 0 2px;
    gap:8px;
    flex-direction:column;
    align-items:stretch;
  }

  .lightbox-info > div:first-child{
    width:100%;
  }

  .lightbox-info strong{
    font-size:13px;
  }

  .lightbox-info span{
    font-size:10px;
  }

  .lightbox-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
  }

  .lightbox-actions a{
    width:100%;
    text-align:center;
    padding:10px 8px;
  }

  .close{
    position:absolute;
    top:5px;
    right:8px;
    font-size:34px;
  }

  .nav{
    width:38px;
    height:48px;
    top:46%;
    background:rgba(0,0,0,.48);
    backdrop-filter:blur(5px);
  }

  .prev{left:4px}
  .next{right:4px}
}

/* Very small screens / landscape phones */
@media(max-width:420px){
  .lightbox{
    padding:4px;
  }

  .lightbox-inner{
    padding-top:30px;
  }

  .lightbox-actions a{
    font-size:12px;
    padding:9px 6px;
  }

  .nav{
    width:34px;
    height:44px;
    font-size:30px;
  }
}

@media(max-height:520px) and (orientation:landscape){
  .lightbox-inner{
    height:100%;
    padding-top:24px;
  }

  .lightbox-info{
    flex-direction:row;
    align-items:center;
    padding-top:6px;
  }

  .lightbox-actions{
    width:auto;
    display:flex;
  }

  .lightbox-actions a{
    width:auto;
  }
}
