#cases {
  --case-card-width: min(62vw, 90svh, 1040px);
  --case-tallest-ratio: 1.735;
  --case-orbit-space: 22px;
  --case-ink: #fcfff9;
  color: var(--case-ink);
  padding: clamp(75px, 11svh, 118px) max(8vw, 26px) clamp(52px, 7svh, 90px);
}
#cases .case-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100%;
  gap: clamp(5px, 1svh, 12px);
  width: min(100%, 1550px);
  min-width: 0;
  margin: auto;
  text-align: center;
}
#cases .case-layout > :not(.case-orbit) { flex: none; }
#cases #case-heading:focus { outline: none; }
#cases h2 {
  margin: 0;
  font: 500 clamp(34px, 3.45vw, 61px)/1.2 'Songti SC', 'Noto Serif CJK SC', STSong, serif;
  letter-spacing: .035em;
  text-shadow: 0 2px 24px #10252b8c;
}
#cases .case-orbit {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: calc(var(--case-card-width) / var(--case-tallest-ratio) + var(--case-orbit-space));
  min-height: 0;
  container-type: size;
  overflow: clip;
  pointer-events: auto;
  touch-action: pan-y pinch-zoom;
}
#cases .case-orbit::before {
  content: '';
  position: absolute;
  inset: 68% 5% 3px;
  border-bottom: 1px solid #cde6e64d;
  border-radius: 50%;
  pointer-events: none;
}
#cases .case-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(var(--case-card-width), calc((100cqh - var(--case-orbit-space)) * var(--case-tallest-ratio)));
  min-width: 0;
  aspect-ratio: var(--case-photo-ratio);
  padding: 0;
  display: block;
  border: 1px solid #d8edee94;
  border-radius: 5px;
  color: white;
  background: #103340;
  overflow: hidden;
  box-shadow: 0 9px 24px #04182047;
  transform-origin: 50% 50%;
  transform: translate(-50%, -50%) translateX(var(--case-x)) translateY(var(--case-y)) perspective(850px) rotateY(var(--case-face)) rotateZ(var(--case-tilt)) scale(var(--case-scale));
  user-select: none;
  cursor: pointer;
}
#cases .case-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
#cases .case-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(5 28 40 / var(--case-shade));
  pointer-events: none;
}
#cases .case-slide [hidden] { display: none; }
#cases .case-place, #cases .case-side-select {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  text-decoration: none;
  cursor: pointer;
}
#cases .case-visit-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid #d3e9e37d;
  border-radius: 18px;
  background: #0d2935ed;
  color: #f4fff8;
  font-weight: 500;
  line-height: 1.2;
  font-size: 13px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .16s, transform .16s;
}
#cases .case-visit-hint::after { content: '↗'; }
#cases .case-place:focus-visible .case-visit-hint { opacity: 1; transform: none; }
@media (hover: hover) {
  #cases .case-place:hover .case-visit-hint { opacity: 1; transform: none; }
}
@media (hover: none) {
  #cases .case-visit-hint { opacity: 1; transform: none; }
}
#cases .case-slide-label {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  border: 1px solid #c1dcdf68;
  background: #122e39de;
  pointer-events: none;
  right: 14px;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 17px;
  font-weight: 600;
}
#cases .case-slide[data-side="right"] .case-slide-label { left: 14px; right: auto; }
#cases .case-open { border-color: #ddf9edce; }
#cases .case-open .case-slide-label { display: none; }
#cases .case-step svg { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
#cases .case-readout { width: min(100%, 820px); text-shadow: 0 1px 11px #081d23ad; }
#cases .case-head {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 44px;
  align-items: center;
  gap: 10px;
  width: min(100%, 416px);
  margin: 0 auto;
}
#cases .case-step {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #d3f0ec98;
  border-radius: 50%;
  background: #112f3bbd;
  color: #fbfff8;
  cursor: pointer;
  pointer-events: auto;
}
#cases .case-title { display: flex; align-items: baseline; justify-content: center; gap: 10px; white-space: nowrap; }
#cases .case-title h3 {
  margin: 0;
  font: 500 clamp(25px, 2.55vw, 41px)/1.23 Georgia, 'Songti SC', 'Noto Serif CJK SC', STSong, serif;
  letter-spacing: -.025em;
}
#cases .case-sector { color: #deeee9; font-size: 13px; letter-spacing: .025em; }
#cases .case-intro {
  margin: clamp(14px, 2.3svh, 28px) auto 0;
  min-height: 1.55em;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.55;
  color: #f5faf3;
}
#cases .case-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: clamp(200px, 24vw, 360px);
  max-width: 85%;
  gap: clamp(5px, .55vw, 9px);
  margin-top: clamp(2px, .7svh, 10px);
}
#cases .case-picker button {
  display: grid;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
#cases .case-picker button::before {
  content: '';
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: #e1f0ed83;
  transition: background .18s;
}
#cases .case-picker button[aria-pressed="true"]::before { background: #bdffed; box-shadow: 0 0 4px #9affd95a; }
@media (hover: hover) {
  #cases .case-step:hover { background: #174c56; border-color: #c5fff1; }
  #cases .case-picker button:hover::before { background: #f3fff9; }
}
#cases :is(button, a):focus-visible { outline: 2px solid #e0fff8; outline-offset: 3px; }
#cases .case-place:focus-visible { outline-offset: -4px; }
@media (max-width: 760px) and (min-height: 501px) {
  #cases { --case-card-width: min(81vw, 82svh); padding: 76px 9px 52px; }
  #cases .case-layout { gap: clamp(10px, 1.9svh, 18px); }
  #cases h2 { font-size: clamp(32px, 7vw, 45px); }
  #cases .case-readout { padding-inline: 14px; }
  #cases .case-head { width: min(100%, 374px); }
  #cases .case-title { flex-direction: column; align-items: center; gap: 3px; }
  #cases .case-title h3 { font-size: clamp(26px, 6vw, 34px); }
  #cases .case-intro { max-width: 33em; min-height: 3.1em; margin-top: 15px; text-wrap: pretty; }
  #cases .case-slide-label { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #cases { --case-card-width: min(61vw, 80svh); --case-orbit-space: 12px; padding: 54px 8vw 28px; }
  #cases .case-layout { gap: 2px; }
  #cases h2 { font-size: 24px; }
  #cases .case-head { grid-template-columns: 34px minmax(0,1fr) 34px; width: min(100%, 335px); }
  #cases .case-step { width: 34px; height: 32px; }
  #cases .case-title h3 { font-size: 22px; }
  #cases .case-sector, #cases .case-intro { font-size: 12px; }
  #cases .case-intro { margin-top: 7px; }
  #cases .case-picker button { height: 23px; }
  #cases .case-slide-label { display: none; }
}
