.apps-collection {
  padding-block: clamp(44px, 5.8vw, 90px);
  background: #edf1f4;
  color: var(--ink);
}
.apps-head { display: grid; grid-template-columns: 1.3fr .7fr; align-items: end; gap: clamp(24px,5vw,70px); margin-bottom: clamp(24px,3vw,45px); }
.apps-head p { max-width: 44ch; color: var(--muted); font-size: clamp(1.05rem,1.36vw,1.24rem); }
.apps-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(30px,4vw,64px) clamp(20px,3.3vw,52px); }
.app-case { min-width: 0; display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 17px; align-content: start; scroll-margin: 20px; }
.app-case .case-copy { border-top: 1px solid #b8c2cc; padding-top: 15px; }
.app-case .kind { color: #4a5667; font: 600 16px/1.25 var(--body); margin-bottom: 4px; }
.app-case h3 { font: 510 clamp(1.85rem,2.8vw,3rem)/1.08 var(--display); letter-spacing: -.054em; }
.app-case .description { margin-top: 7px; max-width: 55ch; color: #35414e; }
.screens-panel { align-self: start; min-width: 0; background: var(--panel,#e0e5da); border-radius: 5px; }
.kin .screens-panel { --panel: #e3dce1; }
.tamshy .screens-panel { --panel: #ead1b6; }
.soyle .screens-panel { --panel: #d5dbee; }
.screen-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(9px,1.1vw,18px); padding: clamp(13px,1.6vw,23px); }
.screen-strip figure { min-width: 0; }
.screen-link { display:block; border-radius:7% / 3.4%; overflow:hidden; border:1px solid #27344732; background:#f6f4ec; box-shadow:0 4px 10px #15223520; cursor:zoom-in; }
.screen-link img { width:100%; height:auto; aspect-ratio:390 / 844; object-fit:cover; }
.screen-link:hover { border-color:#5f718a; }
.screen-strip figcaption { font:560 clamp(.9rem,1.03vw,1.04rem)/1.23 var(--body); color:#283443; margin-top:9px; }
#discuss-app { margin-top:clamp(25px,3.5vw,52px); }
@media (max-width:840px) {
  .apps-head { grid-template-columns:1fr; gap:12px; }
  .apps-grid { grid-template-columns:1fr; gap:30px; }
  .app-case { display:block; }
  .screens-panel { margin-top:14px; }
  .screen-strip { padding:15px; gap:12px; }
}
@media (max-width:480px) {
  .screen-strip { display:flex; gap:12px; overflow-x:auto; padding:14px; scroll-snap-type:x proximity; scroll-padding-inline:14px; scrollbar-width:thin; scrollbar-color:#73818b transparent; }
  .screen-strip figure { flex:0 0 min(62%,210px); scroll-snap-align:start; }
  .screen-strip figure:last-child { scroll-snap-align:end; }
}
#viewer { color: #f4f6fa; background: #192235; border: 1px solid #718096; border-radius: 9px; width: min(600px,calc(100% - 20px)); max-width: none; max-height: calc(100dvh - 16px); padding: 12px 14px; }
#viewer[open] { display: grid; grid-template-rows: auto minmax(100px,1fr) auto; gap: 9px; }
#viewer::backdrop { background: #101829d9; }
.viewer-top, .viewer-controls { display: flex; align-items:center; justify-content:space-between; gap: 12px; }
.viewer-top h2 { font: 540 clamp(1rem,2.6vw,1.24rem)/1.25 var(--body); letter-spacing: 0; }
#viewer button { border: 1px solid #8290a6; line-height: 1.22; padding: 6px 12px; background: transparent; color: inherit; border-radius: 3px; font-size: 16px; }
#viewer button:hover { background: #32435c; }
.viewer-stage { display: grid; place-items: center; min-height: 0; }
#viewer-image { border-radius: 5px; width: auto; height: auto; max-height: min(79dvh,850px); max-width: 100%; object-fit: contain; touch-action: pan-y; }
.viewer-controls { justify-content: center; }
#viewer-count { font-variant-numeric: tabular-nums; font-size: 16px; }
body:has(dialog[open]) { overflow: hidden; }

@media(max-height:580px) { #viewer-image { max-height:62dvh; } }
