:root {
  --bg: #d9d9d9;
  --panel: #efefef;
  --panel2: #e9e9e9;
  --line: rgba(0, 0, 0, 0.12);
  --text: #171717;
  --muted: #595959;
  --white: #fff;
  --magenta: #d02aa0;
  --green: #57ea40;
  --orange: #ffb02e;
  --shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.08);
  --font: 'Space Mono', monospace;
  --handle-size: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  overflow: hidden;
  background-image: url("background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.is-resizing .hero-video {
  pointer-events: none !important;
}

button,
a {
  font: inherit;
}

.app {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 10px;
  gap: 16px;
}

.topbar .brand {
  color: white;
}

.topbar .menu {
  display: flex;
  gap: 15px;
}

.brand .a {
  font-size: 17px;
  letter-spacing: 0.5px;
}

.brand .b {
  font-size: 13px;
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.tab {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 0;
  padding: 12px 18px;
  min-width: 150px;
  cursor: pointer;
  font-size: 14px;
  color: #222;
  --tab-gradient: linear-gradient(90deg, #f6c7f0 0%, #d88be6 25%, #c88dff 50%, #8ef56f 100%);
}

.tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--tab-gradient);
  transform: translateX(-102%);
  transition: transform 0.45s ease;
  z-index: 0;
}

.tab[data-tab="specimens"] {
  --tab-gradient: linear-gradient(90deg, #ffffff, #b34ad1);
}

.tab[data-tab="protocole"] {
  --tab-gradient: linear-gradient(90deg, #ffffff, #ffab1c);
}

.tab[data-tab="archive"] {
  --tab-gradient: linear-gradient(90deg, #ffffff, #2de739);
}

.tab span {
  position: relative;
  z-index: 1;
}

.tab:hover::before,
.tab.active::before {
  transform: translateX(0);
}

.tab.active {
  color: #111;
}

.toe-file-mob{
  display: none;
}

.weather {
  justify-self: end;
  background-image: url('weather-frame.jpg');
  color: #fff;
  text-align: center;
  max-height: 45px;
  min-width: 300px;
}

.weather #ww_8a68a7543e1c4 .ww-box {
  font-family: var(--font);
  color: white;
  padding: 0;
}

.weather .ww_additional {
  display: none !important;
}

.weather #ww_8a68a7543e1c4 .ww_temp,
.weather #ww_8a68a7543e1c4 .ww_cond {
  font-size: 16px;
}

.weather #ww_8a68a7543e1c4 .ww_name {
  display: none !important;
}

#ww_8a68a7543e1c4 .ww_icon svg {
  height: 36px !important;
  width: 36px !important;
}

.grid {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 0 18px 16px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.left,
.center,
.right {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel {
  background: var(--panel);
  box-shadow: var(--shadow);
  min-height: 0;
  min-width: 0;
}

.hero {
  position: relative;
  height: 382px;
  overflow: hidden;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact {
  background: var(--panel2);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.text {
  font-size: 12px;
  line-height: 1.55;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  padding: 12px;
}

.center-top-pane {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.center-shell {
  background: var(--panel2);
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
  container-type: inline-size;
}

.heading {
  padding: 10px 12px;
  font-size: 13px;
  flex: 0 0 auto;
}

.section {
  display: none;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.section.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.collection-grid,
.upload-grid {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  padding: 32px 28px 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}

.thumb {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.label {
  padding: 10px 12px 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.media {
  height: auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.add .media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d2d2d2;
  font-size: 44px;
}

#protocole.section.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.protocol-grid {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.protocol-video-wrap {
  position: relative;
}

.protocol-video-wrap .video-sound-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 22px;
  cursor: pointer;
}

.protocol-video-wrap:hover .video-sound-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.video-controls-overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-gallery-video-wrap:hover .video-controls-overlay,
.protocol-video-wrap:hover .video-controls-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.video-control-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.btn {
  color: #1a1a1a;
  border: 1px solid #1a1a1a;
  padding: 5px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  background-color: #2de739;
  transition: transform 0.45s ease;
}

.upload-card {
  width: 100%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: grid;
 
  min-width: 0;
  overflow: hidden;
}

.upload-card .media {
  width: 100%;
  aspect-ratio: 1080 / 1650;
  height: auto;
  overflow: hidden;
  background: #d2d2d2;
}

.upload-card .media img,
.upload-card .media video {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.upload-card.add .media {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.upload-card .label {
  padding: 10px 12px 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.upload-card .label-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100px;
}

.about .text {
  font-size: 12px;
  line-height: 1.45;
}

.pack {
  background: var(--panel);
  box-shadow: var(--shadow);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
}

.packimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pack ul {
  margin: 0;
  padding-bottom:12px;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
}
.pack-info{
  padding: 10px 0;
}
.viewbtn {
  margin-top: auto;
  align-self: flex-start;
}

.right .protocol {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.right .protocol .desc {
  font-size: 12px;
  line-height: 1.55;
}

.right .protocol .toeimg {
  width: 60%;
  display: block;
  flex: 0 0 150px;
  background: #fff;
}
.img-button {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.btnrow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

.btnrow .btn {
  width: max-content;
}
@media (max-width: 936px) {
  .img-button {
    flex-direction: column;
  }

  .toeimg {
    width: 100%;
    flex-basis: auto;
  }

  .btnrow {
    width: 100%;
    order: 1;
  }

  .btnrow .btn {
    width: 100%;
  }
}
.insta {
  min-height: 0;
  overflow: auto;
}

@container (max-width: 980px) {
  .collection-grid,
  .upload-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  }

  .label,
  .upload-card .label {
    font-size: 11px;
  }
}

@container (max-width: 680px) {
  .collection-grid,
  .upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px 16px 18px;
    gap: 10px;
  }

  .label,
  .upload-card .label {
    font-size: 10px;
  }
}

@container (max-width: 420px) {
  .collection-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

/* RESIZE DESKTOP */
@media (min-width: 937px) {
  .grid[data-main-split] {
    grid-template-columns: 216px var(--handle-size) minmax(420px, 1fr) var(--handle-size) 300px;
    gap: 0;
    align-items: stretch;
  }

  .main-resize-handle {
    width: var(--handle-size);
    cursor: col-resize;
    background: linear-gradient(
      180deg,
      rgba(255,255,255,0.45),
      rgba(0,0,0,0.08),
      rgba(255,255,255,0.45)
    );
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 4;
  }

  .main-resize-handle:hover {
    background: linear-gradient(
      180deg,
      rgba(255,255,255,0.65),
      rgba(87,234,64,0.22),
      rgba(255,255,255,0.65)
    );
  }

  .left[data-resize-stack],
  .center[data-resize-stack],
  .right[data-resize-stack] {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }

  .left[data-resize-stack] > [data-resize-vertical-pane],
  .center[data-resize-stack] > [data-resize-vertical-pane],
  .right[data-resize-stack] > [data-resize-vertical-pane] {
    min-height: 120px;
    min-width: 0;
    overflow: hidden;
  }

  .left[data-resize-stack] > .hero {
    flex: 0 0 382px;
  }

  .left[data-resize-stack] > .contact {
    flex: 1 1 0;
    min-height: 120px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .contact .text {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .center[data-resize-stack] > .center-top-pane {
    flex: 2.3 1 0;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .center[data-resize-stack] > .about-pack {
    flex: 1 1 0;
    min-height: 190px;
    max-height: none;
    overflow: hidden;
  }

  .about-pack.resizable-pair {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) var(--handle-size) minmax(220px, 1fr);
    grid-template-rows: minmax(190px, 1fr);
    gap: 0;
    min-height: 190px;
    height: 100%;
    max-height: none;
    overflow: hidden;
  }

  .about-pack > .about,
  .about-pack > .pack-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .about .text {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .pack-panel .pack {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .right[data-resize-stack] > [data-resize-vertical-pane]:first-child {
    flex: 1 1 0;
    min-height: 120px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .right .protocol {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .right[data-resize-stack] > .insta {
    flex: 1 1 0;
    min-height: 120px;
    overflow: auto;
  }

  .resize-handle {
    position: relative;
    z-index: 3;
  }

  .resize-handle-y {
    flex: 0 0 var(--handle-size);
    cursor: row-resize;
    background: linear-gradient(
      90deg,
      rgba(255,255,255,0.45),
      rgba(0,0,0,0.08),
      rgba(255,255,255,0.45)
    );
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .resize-handle-x {
    width: var(--handle-size);
    cursor: col-resize;
    background: linear-gradient(
      180deg,
      rgba(255,255,255,0.45),
      rgba(0,0,0,0.08),
      rgba(255,255,255,0.45)
    );
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }

  .resize-handle-y:hover {
    background: linear-gradient(
      90deg,
      rgba(255,255,255,0.65),
      rgba(87,234,64,0.22),
      rgba(255,255,255,0.65)
    );
  }

  .resize-handle-x:hover {
    background: linear-gradient(
      180deg,
      rgba(255,255,255,0.65),
      rgba(176,74,209,0.22),
      rgba(255,255,255,0.65)
    );
  }
}

/* MODALS */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
}

.modal-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1320px, 94vw);
  height: min(92vh, 860px);
  background: #efefef;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  touch-action: none;
}

.modal-top {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  background: #f7f7f7;
}

.modal-title {
  padding: 0 12px;
  font-size: 13px;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px 6px 0;
}

.modal-gallery {
  position: relative;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  background: #dcdcdc;
  scrollbar-width: none;
}

.modal-gallery::-webkit-scrollbar {
  display: none;
}

.modal-gallery-label {
  display: none;
  position: absolute;
  left: 12px;
  top: 6px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 6px;
  z-index: 2;
}

.modal-gallery img,
.modal-gallery video {
  height: 350px;
  width: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.modal-gallery-video-wrap {
  position: relative;
  height: 100%;
  width: 33.333%;
  min-width: 33.333%;
  overflow: hidden;
  background: #ddd;
  border-right: 1px solid rgba(0, 0, 0, 0.55);
}

.modal-gallery-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-gallery-video:fullscreen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: black;
}

.modal-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#articleModal .desc {
  padding: 28px 0 28px 76px;
  max-width: 1060px;
}

#articleModal .desc h2 {
  font-size: 23px;
  font-weight: 400;
  margin: 0 0 16px;
  letter-spacing: 0.2px;
}

#articleModal .desc p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 1000px;
}

.article-embed-video {
  margin: 30px 0;
  width: fit-content;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
}

.article-embed-video video {
  display: block;
  width: 100%;
  max-height: 600px;
}

.article-video-mobile-wrap {
  display: none;
}

.article-video-desktop-wrap {
  display: block;
}
.modal-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn {
  display: inline-block;
  padding: 6px 10px;
  background: #57ea40;
  color: #0f240b;
  text-decoration: none;
  white-space: nowrap;
}

.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}

.video-modal.open {
  display: block;
}

.video-modal .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.video-modal .window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* width: min(92vw, 440px);
  aspect-ratio: 9 / 16; */
  height: auto;
  background: #dcdcdc;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-rows: 34px 1fr;
  overflow: hidden;
  touch-action: none;
}

.video-modal .head {
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
}

.video-modal .head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
}

.video-modal .title {
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-modal .download {
  border: 0;
  background: #57ea40;
  color: #0f240b;
  font: inherit;
  font-size: 12px;
  padding: 7px 10px;
  cursor: pointer;
}

.video-modal .download:hover {
  background: #7cf06a;
}

.video-modal .close {
  border: 0;
  background: transparent;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px 6px 0;
}

.video-modal .body {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #dcdcdc;
}

.video-modal .body video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: block;
  background: #000;
  object-fit: cover;
}

.video-card{
  cursor: pointer;
}

.readme-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10020;
}

.readme-modal.open {
  display: block;
}

.readme-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.24);
}

.readme-modal-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, 92vw);
  max-height: min(760px, 86vh);
  background: #efefef;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-rows: 34px 1fr;
  overflow: hidden;
}

.readme-modal-head {
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  background: #f7f7f7;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
}

.readme-modal-title {
  padding: 0 12px;
  font-size: 13px;
}

.readme-modal-close {
  border: 0;
  background: transparent;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px 6px 0;
}

.readme-modal-body {
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.readme-modal-text {
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-line;
}

.readme-modal-toe {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: #fff;
  display: block;
}


/* MOBILE */
@media (max-width: 936px) {
  html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body {
    background-image: none;
    background-color: var(--bg);
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
  }

  .app {
    height: auto;
    min-height: 100dvh;
  }
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 14px 10px;
  }

  .topbar .menu {
    display: flex;
    gap: 15px;
    flex-direction: column;
  }

  .tabs {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    display: none;
  }

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

  .tab {
    min-width: max-content;
    padding: 10px 14px;
  }

  .weather {
    display: none;
    /* justify-self: stretch;
    min-width: 0; */
  }
  .toe-file-mob{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0px 10px;
    background: white;
    color: #111;
  }
  .grid,
  .grid[data-main-split] {
    grid-template-columns: 1fr !important;
    height: auto;
    min-height: 0;
    padding: 0 14px 14px;
    gap: 12px;
    overflow: visible;
    margin-top: 65px
  }

  .center {
    order: 1;
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .left {
    order: 2;
  }

  .right {
    order: 3;
  }

  .left,
  .center,
  .right {
    gap: 12px;
    overflow: visible;
  }

  .resize-handle-y,
  .resize-handle-x,
  .main-resize-handle {
    display: none;
  }

  .hero {
    display: none;
  }

  .contact {
    height: auto;
    overflow: visible;
  }

  .heading {
    font-size: 12px;
  }

  .section {
    min-height: 0;
  }

  .section.active {
    display: block;
  }

  .collection-grid,
  .upload-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 16px 14px 16px;
    gap: 10px;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .media {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .protocol-grid {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .upload-grid {
    order: 2;
  }

  .upload-card {
    width: 100%;
    min-width: 0;
    display: grid;
    align-self: start;
  }

  .upload-card .media {
    width: 100%;
    aspect-ratio: 1080 / 1020;
    overflow: hidden;
    background: #d2d2d2;
    flex: none;
  }

  .upload-card .media img,
  .upload-card .media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .upload-card .label {
    align-items: flex-start;
    min-width: 0;
  }

  .upload-card .label-text {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .right .protocol .toeimg {
    width: 100%;
    height: auto;
    order: 2;
  }

  .insta {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .about-pack,
  .about-pack.resizable-pair {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    margin-top: 16px;
    gap: 16px;
  }

  .about,
  .pack,
  .pack-panel {
    overflow: visible;
  }

  .pack {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pack-info{
    display: flex;
    gap:20px;
  }

  .pack ul{
    padding: 0 30px;
  }

  .packimg {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .video-control-btn {
    width: 30px;
    height: 30px;
  }
  .video-controls-overlay{
    gap: 4px;
  }
  #articleModal .desc h2 {
    font-size: 20px;
  }

  #articleModal .desc p {
    font-size: 13px;
    line-height: 1.65;
  }

  .article-video-mobile-wrap {
    display: block;
  }

  .article-video-desktop-wrap {
    display: none;
  }

  .modal-gallery {
    height: 180px;
  }

  .modal-gallery img,
  .modal-gallery video {
    width: 100%;
    min-width: 100%;
  }

  .modal-gallery-label {
    font-size: 12px;
  }

  .video-modal .window {
    width: min(94vw, 420px);
  }
  
  .archive-grid.archive-desktop {
    padding: 14px;
    overflow-x: auto;
    overflow-y: auto;
  }

  .archive-stage {
    min-width: 820px;
    min-height: 980px;
  }

  .archive-window {
    width: 220px;
  }

  .archive-window img {
    height: 160px;
  }

  .archive-window.w1 { width: 250px; }
  .archive-window.w3 { width: 255px; }
  .archive-window.w5 { width: 260px; }
  .archive-window.w7 { width: 250px; }
  .archive-window.w7 { width: 150px; }

  #articleModal {
    overflow: hidden;
  }

  #articleModal .modal-window {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    transform: none;
    left: 0;
    top: 0;
    box-sizing: border-box;
  }

  #articleModal .modal-top {
    min-height: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #articleModal .modal-scroll {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  #articleModal .desc {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-width: none;
    overflow: visible;
    padding: 18px 18px 28px;
  }

  #articleModal .article-embed-video {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }

  #articleModal .modal-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #articleModal .modal-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #articleModal .modal-actions {
    flex: 0 0 auto;
  }
}

@media (max-width: 540px) {
  .collection-grid,
  .upload-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .collection-grid,
  .upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ARCHIVE */

.archive-grid.archive-desktop {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  background: #dfe8d4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    url("background.png");
  background-size: cover;
  background-position: center;
  cursor: grab;
  user-select: none;
}

.archive-grid.archive-desktop.is-dragging {
  cursor: grabbing;
}

.archive-stage {
  position: relative;
  min-width: 980px;
}

.archive-window {
  position: absolute;
  overflow: hidden;
  width: 260px;
  background: #efefef;
  cursor: grab;
  user-select: none;
  touch-action: none;
  pointer-events: auto;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.archive-window.is-dragging {
  cursor: grabbing;
}

.archive-window-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  color: #111;
}

.archive-window-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 12px;
}

.archive-open-btn {
  padding: 6px 12px;
  min-height: 18px;
  border: 0px solid #2b7d22;
  background: #57ea40;
  color: #0f240b;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.archive-open-btn:hover {
  background: #7cf06a;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.45);
}

.archive-open-btn:active {
  transform: translate(1px, 1px);
  background: #46cf31;
}

.archive-window:hover::after,
.archive-window:focus-within::after {
  opacity: 1;
}

.archive-window img {
  display: block;
  width: 100%;
  height: 190px;
  background: #fff;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.archive-window.w1 { top: 30px; left: 20px; width: 290px; z-index: 3; }
.archive-window.w8 { top: 280px; left: 100px; width: 270px; z-index: 8; }
.archive-window.w2 { top: 78px; left: 250px; width: 250px; z-index: 6; }
.archive-window.w3 { top: 36px; left: 520px; width: 300px; z-index: 2; }
.archive-window.w4 { top: 250px; left: 680px; width: 270px; z-index: 5; }
.archive-window.w5 { top: 560px; left: 110px; width: 320px; z-index: 4; }
.archive-window.w6 { top: 430px; left: 410px; width: 285px; z-index: 7; }
.archive-window.w7 { top: 590px; left: 640px; width: 310px; z-index: 1; }

.archive-window.w1 img { height: 200px; }
.archive-window.w3 img { height: 180px; }
.archive-window.w5 img { height: 150px; }
.archive-window.w7 img { height: 210px; }
.archive-window.w8 img { height: 200px; }


@media (max-width: 540px) {
  .archive-stage {
    min-width: 760px;
  }

  .archive-window-bar {
    font-size: 10px;
  }
}
