#shiji-opening[hidden] { display: none; }
body:has(> #shiji-opening:not([hidden])) > :is(.desktop-header, .layout) { display: none; }
#shiji-opening {
  --shiji-type: var(--reading-sans);
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  color: #31443b;
  background: #f5f2eb;
}
.shiji-hero {
  width: min(100%, 920px);
  flex: 1;
  margin-inline: auto;
  padding: clamp(52px, 7svh, 68px) 22px clamp(14px, 3svh, 28px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  gap: clamp(14px, 2.6svh, 25px);
}
.shiji-open.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 48px; padding: 10px 24px; text-decoration: none; line-height: 1.4;
  max-width: 100%; font-size: var(--reading-body); font-weight: 600; text-align: center;
}
.shiji-footer {
  width: min(calc(100% - 44px), 1044px);
  margin-inline: auto;
  border-top: 1px solid #deded6;
  border-color: color-mix(in srgb, currentColor 20%, transparent);
  padding: 4px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.shiji-footer nav { display: flex; flex-wrap: wrap; justify-content: center; column-gap: clamp(8px, 4vw, 42px); }
.shiji-footer a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 4px; color: inherit; text-decoration: none; }
.shiji-footer nav a { font-size: var(--reading-label); }
.shiji-footer .icp-record { font-size: .75rem; overflow-wrap: anywhere; }
.shiji-footer a:hover, .shiji-footer a:focus-visible { text-decoration: underline; text-underline-offset: .22em; }
.visual-system :is(.shiji-reading, .shiji-service-page) section { margin-block: 0; padding-block: 18px; border-top: 1px solid var(--line); }
.visual-system :is(.shiji-reading, .shiji-service-page) :is(p, ul) { margin-block: 6px 0; color: var(--sub); }
.visual-system .shiji-reading :is(.shiji-reading-lead, .shiji-reading-meta) { margin-block: 0 20px; }
.visual-system .shiji-reading .shiji-reading-lead { color: var(--ink); }
.visual-system .shiji-reading .shiji-reading-meta { font-size: .875rem; }
.visual-system .shiji-reading ul { padding-inline-start: 1.25em; }
.visual-system .shiji-reading .primary { width: fit-content; max-width: 100%; margin-top: 12px; }
@media (min-width: 721px) {
  body.visual-system:is([data-visual-page="about"], [data-visual-page="terms"], [data-visual-page="privacy"], [data-visual-page="membership"]) .layout {
    display: block; max-width: 50rem; padding-inline: 24px;
  }
  .visual-system .layout:has(.shiji-reading, .shiji-service-page) .editorial { display: none; }
  .visual-system .layout:has(.shiji-reading, .shiji-service-page) #app { min-height: 0; }
}
.shiji-skip {
  position: absolute; inset: 6px 16px auto auto; z-index: 2;
  min-width: 44px; min-height: 44px; padding: 6px 10px;
  color: inherit; background: transparent; border: 0; border-radius: 2px;
  font-size: var(--reading-label); line-height: 1.4;
}
.shiji-skip span { margin-inline-start: .25em; }
.shiji-skip:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.shiji-art { width: min(100%, 740px, 120svh); min-width: 0; }
.shiji-stage {
  --gutter: clamp(6px, 1.5cqw, 12px);
  --side: 29%;
  position: relative; aspect-ratio: 1.72;
  container-type: inline-size; isolation: isolate;
}
.shiji-cover, .shiji-scenes, .shiji-scene { position: absolute; inset: 0; }
.shiji-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
}
.shiji-cover > :first-child { grid-row: span 2; }
.shiji-cover > :nth-child(2) { background-color: #d9d2c3; }
.shiji-cover > :nth-child(3) { background-color: #e5ded0; }

.shiji-photo {
  position: relative; display: block; min-width: 0; min-height: 0;
  background: #ddd4c3; overflow: hidden; container-type: size;
}
.shiji-photo::before {
  content: ''; position: absolute; left: 50%; top: var(--photo-y, 50%);
  width: max(100cqw, 100cqh); aspect-ratio: 1;
  transform: translate(-50%, calc(-1 * var(--photo-y, 50%)));
  background: url('assets/shiji-moments.webp') var(--photo-position) / 300% 200% no-repeat;
}
.shiji-photo-1 { --photo-position: 0 0; --photo-y: 20%; }
.shiji-photo-2 { --photo-position: 50% 0; }
.shiji-photo-3 { --photo-position: 100% 0; }
.shiji-photo-4 { --photo-position: 0 100%; --photo-y: 20%; }
.shiji-photo-5 { --photo-position: 50% 100%; }
.shiji-photo-6 { --photo-position: 100% 100%; }

.shiji-scenes { z-index: 1; pointer-events: none; }
.shiji-scene { opacity: 0; }
.shiji-frame {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: calc(100% - var(--side) - var(--gutter)); margin: 0;
}
.shiji-frame:nth-child(2) {
  top: 50%; bottom: auto; left: auto; right: 0; width: var(--side); height: 29cqw;
  transform: translateY(-50%);
}
.shiji-frame .shiji-photo { position: absolute; inset: 0; }
.shiji-caption {
  position: absolute; inset: auto 0 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .65em;
  padding: clamp(6px, 1.7cqw, 14px); overflow-wrap: anywhere;
  color: #fffaf0; background: #17201ce8;
  font: 600 clamp(.875rem, 2.3cqw, 1.125rem)/1.4 var(--shiji-type);
}
.shiji-caption time { color: #efd9a7; font-size: .875em; font-variant-numeric: tabular-nums; }

.shiji-inscription {
  display: grid; justify-items: center; gap: 5px;
  margin: clamp(14px, 3svh, 24px) 0 0; padding-top: clamp(12px, 2svh, 18px);
  border-top: 1px solid #cec6b7; text-align: center;
  color: #253d33; font-family: var(--shiji-type);
}
.shiji-inscription span { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; line-height: 1.12; letter-spacing: .09em; }
.shiji-inscription small { color: inherit; font-size: var(--reading-body); font-weight: 500; line-height: 1.4; letter-spacing: .06em; }

@media (max-width: 540px) {
  .shiji-stage { aspect-ratio: 1.62; }
  .shiji-caption { column-gap: .4em; }
  .shiji-frame:nth-child(2) .shiji-caption {
    top: 100%; bottom: auto; padding: 6px 0 0; background: transparent;
  }
}
@media (prefers-reduced-motion: no-preference) {
  #shiji-opening.shiji-sequence { background: #171d1a; color: #f4ede0; }
  .shiji-sequence :is(.shiji-cover > .shiji-photo, .shiji-inscription, .shiji-open) { opacity: 0; }
  .shiji-sequence .shiji-open { visibility: hidden; }
  .shiji-sequence .shiji-scenes { transform: translateY(clamp(36px, 9svh, 70px)); }
  #shiji-opening.shiji-enter { animation: shiji-lighten .62s ease-in-out 3.48s forwards; }
  .shiji-enter .shiji-scenes { animation: shiji-seat .56s cubic-bezier(.25,.65,.25,1) 3.38s both; }
  .shiji-enter .shiji-scene:nth-child(1) { animation: shiji-project 1.21s ease both; }
  .shiji-enter .shiji-scene:nth-child(2) { animation: shiji-project 1.24s ease 1.06s both; }
  .shiji-enter .shiji-scene:nth-child(3) { animation: shiji-hold 1.96s ease 2.17s both; }
  .shiji-enter .shiji-scene:nth-child(3) .shiji-frame:nth-child(2) { animation: shiji-align .56s cubic-bezier(.25,.65,.25,1) 3.38s both; }
  .shiji-enter .shiji-scene:nth-child(3) .shiji-caption { animation: shiji-fade-caption .28s ease 3.4s forwards; }
  .shiji-enter .shiji-cover > .shiji-photo { animation: shiji-appear .34s ease 3.75s both; }
  .shiji-enter .shiji-cover > :last-child { animation: shiji-file-last .42s cubic-bezier(.2,.64,.3,1) 3.61s both; }
  .shiji-enter .shiji-inscription { animation: shiji-appear .34s ease 3.96s both; }
  .shiji-enter .shiji-open { animation: shiji-show-entry .32s ease-out 4.32s forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .shiji-skip { display: none; }
}
@keyframes shiji-lighten { to { background: #f5f2eb; color: #31443b; } }
@keyframes shiji-seat { to { transform: translateY(0); } }
@keyframes shiji-project {
  0% { opacity: 0; transform: translateX(12px); }
  20%, 82% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-10px); }
}
@keyframes shiji-hold {
  0% { opacity: 0; transform: translateX(12px); }
  15%, 93% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0); }
}
@keyframes shiji-align { to { top: 0; height: calc((100% - var(--gutter)) / 2); transform: none; } }
@keyframes shiji-fade-caption { to { opacity: 0; } }
@keyframes shiji-file-last {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shiji-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes shiji-show-entry {
  from { visibility: visible; opacity: 0; }
  to { visibility: visible; opacity: 1; }
}
.shiji-record-options { display: grid; gap: 12px; margin: 20px 0; }
.shiji-record-card {
  display: grid; grid-template-columns: clamp(44px, 17vw, 84px) minmax(0, 1fr) auto;
  align-items: center; gap: 12px; padding: 11px;
  text-decoration: none; border: 1px solid #ded9cc; border-radius: 8px; color: #173e34;
}
.shiji-record-card img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.shiji-record-card strong, .shiji-record-card small { display: block; }
.shiji-record-card strong { font-size: 1.0625rem; }
.shiji-record-card small { margin-top: 4px; color: #586258; line-height: 1.5; }
.shiji-record-card:hover, .shiji-record-card:focus-visible { background: #f6f2e9; }
.shiji-collection-note { margin: 6px 0 12px; }
