/* Bounded RealFlow revision: glass media/cases only. Header and expert untouched. */

/* Convex highlights sit over sharp images, never intercept links. */
.vs__card {
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: rgba(255, 255, 255, .24);
  box-shadow: 0 2px 3px rgba(255,255,255,.6) inset, 0 -2px 4px rgba(62,33,64,.18) inset, 0 10px 24px rgba(66,38,63,.16);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}
.vs__card::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.32), transparent 27%, transparent 78%, rgba(255,255,255,.16));
  box-shadow: 0 1px 1px rgba(255,255,255,.92) inset, 1px 0 1px rgba(255,255,255,.65) inset, -1px -1px 1px rgba(255,255,255,.4) inset;
}
/* A deliberate opaque boundary, distinct from the warm case area. */
#about.s-explainer { background: #edf0f4; }
body[data-ugc-variant] .vs__motion-row { background: transparent; }

/* Three genuine folders; no filler fourth slot. Shape/hinge remain original. */
.s-projects .pr__track > li { flex: 0 0 calc((100% - 40px) / 3); min-width: 0; }
.s-projects .pr__track { overflow-y: clip; contain: paint; }
.gf-root { aspect-ratio: 340 / 380; --gf-lift: 0px; --gf-spread: 20px; --gf-stack: 10px; }
.gf-stage { transform: scale(var(--gf-scale)) translateY(94px); }
.gf-files { inset: -94px 0 10px; }
.gf-sheet {
  left: 114px; top: 160px; width: 112px; height: auto; aspect-ratio: 9 / 16;
  border: 3px solid rgba(255,255,255,.86); border-radius: 12px;
  background: #fffcfa; box-shadow: 0 8px 20px rgba(53,28,49,.19);
}
.gf-sheet-art { object-fit: contain; }
.gf-root.is-active { --gf-lift: -92px; --gf-spread: 68px; --gf-stack: 12px; --gf-fan: 5deg; }
.gf-back { background: linear-gradient(145deg, rgba(255,255,255,.6), rgba(249,168,212,.28)); }
.gf-art { opacity: .42; }
.gf-sheen { background: linear-gradient(145deg, rgba(255,255,255,.62), transparent 55%, rgba(255,255,255,.15)); }
.gf-front {
  background: rgba(255,252,250,.3);
  -webkit-backdrop-filter: blur(15px) saturate(1.3); backdrop-filter: blur(15px) saturate(1.3);
}
.gf-tint {
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,240,248,.37) 48%, rgba(241,206,227,.42));
  box-shadow: 0 2px 4px rgba(255,255,255,.85) inset, 0 -6px 12px rgba(101,61,89,.09) inset;
}
.gf-root.is-active .gf-tint { background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(249,168,212,.52) 55%, rgba(243,190,222,.57)); }
.gf-front-rim path { stroke: rgba(255,255,255,.92); stroke-width: 2; }
.gf-root.is-active .gf-front-rim path { stroke: rgba(255,255,255,.98); stroke-width: 2.5; }
.gf-title { font-size: 19px; }
.gf-root.is-active .gf-key { box-shadow: 0 2px 2px rgba(255,255,255,.3) inset, 0 5px 12px rgba(90,27,61,.18); }

/* Auto-height detail: long real copy and all 14 table rows stay visible. */
.c1__glass {
  position: relative; padding: 32px; border-radius: 28px; border: 1px solid rgba(255,255,255,.88);
  background: linear-gradient(145deg, rgba(255,255,255,.69), rgba(255,248,252,.32));
  box-shadow: 0 2px 3px rgba(255,255,255,.9) inset, 0 -2px 5px rgba(143,98,124,.05) inset, 0 16px 42px rgba(87,50,73,.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.15); backdrop-filter: blur(20px) saturate(1.15);
}
.c1__glass .c1__h { font-size: clamp(28px, 3.2vw, 46px); margin-bottom: 28px; overflow-wrap: anywhere; }
.c1__glass .c1__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-bottom: 0; }
.c1__glass .c1__left, .c1__glass .c1__right { min-width: 0; }
.c1__glass .c1__sub { font-size: 17px; margin-bottom: 18px; }
.c1__copy { display: grid; gap: 16px; color: var(--ink-2); font-size: 16px; line-height: 1.65; margin-bottom: 28px; }
.c1__glass .c1__h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; text-wrap: balance; }
.c1__gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.c1__screenshot {
  display: block; width: 100%; min-width: 0; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 14px;
  padding: 3px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.46);
  box-shadow: 0 1px 2px rgba(255,255,255,.8) inset, 0 6px 18px rgba(53,28,49,.1); cursor: zoom-in;
}
.c1__screenshot img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.c1__screenshot:hover { border-color: var(--accent-ink); }
.c1__glass .c1__tw { background: #fff9f8; border: 1px solid #ead5df; border-radius: 16px; overflow: hidden; }
.c1__glass .c1__table { table-layout: fixed; width: 100%; font-size: 15px; }
.c1__glass .c1__table caption { padding: 14px 16px; font-size: 13px; background: #fff9f8; }
.c1__glass .c1__table :is(th,td) { white-space: normal; padding: 12px 14px; line-height: 1.4; border-bottom: 1px solid #f2e4e9; }
.c1__glass .c1__table th:first-child { width: 60%; }
.c1__glass .c1__table thead th { background: #493840; color: #fff; font-weight: 700; }
.c1__glass .c1__table tbody th { font-weight: 500; overflow-wrap: anywhere; background: #fff9f8; }
.c1__glass .c1__table td { text-align: center; background: #f9dce9; color: #30202c; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c1__glass .c1__table tr:last-child > * { border-bottom: 0; }
.dlg--case-image { width: fit-content; max-width: calc(100vw - 24px); padding: 48px 12px 12px; background: #30242d; border-color: #614754; }
.dlg--case-image .dlg__x { color: #fff; }
.case-image-viewer img { width: auto; max-width: calc(100vw - 50px); max-height: calc(100dvh - 110px); height: auto; object-fit: contain; }

@media (hover: hover) and (pointer: fine) {
  .gf-root:not(.is-active):hover { --gf-lift: -42px; --gf-spread: 46px; --gf-stack: 10px; --gf-fan: 3deg; }
}
@media (max-width: 1100px) {
  .s-projects .pr__track > li { flex-basis: calc((100% - 20px) / 2); }
  .c1__glass .c1__cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .c1__gallery { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .s-projects .pr__track > li { flex-basis: min(300px, calc(100% - 8px)); }
  .c1__glass { padding: 20px 14px; border-radius: 22px; }
  .c1__glass .c1__sub { font-size: 16px; }
  .c1__copy { font-size: 15px; }
  .c1__gallery { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .c1__glass .c1__table :is(th,td) { padding: 11px 8px; font-size: 14px; }
  .c1__glass .c1__table caption { padding: 12px 10px; }
  .vs__card { border-radius: 20px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gf-front { background: #fbe9f2; }
  .c1__glass { background: #fff6f9; }
}
@media (prefers-reduced-transparency: reduce) {
  .gf-front, .c1__glass { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: #fff0f7; }
}
