dialog.editorial-splash,
dialog.editorial-splash::backdrop,
.splash-card-pending,
.splash-card-reveal {
  --splash-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.splash-preparing::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: #FAF8F5;
  pointer-events: none;
}

.id-daily-mastmark {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-self: center;
}

.id-daily-mastmark > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.masthead .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.masthead .brand > span { margin-left: 0; }

.splash-byline {
  display: flex;
  align-items: center;
  gap: 10px;
}

dialog.editorial-splash {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  color: #22201E;
  overflow: auto;
  overscroll-behavior: contain;
  text-align: left;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

dialog.editorial-splash[open] {
  display: flex;
  flex-direction: column;
}

dialog.editorial-splash::backdrop {
  background: rgba(250, 248, 245, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: splash-veil-in 0.35s var(--splash-ease) both;
}

/* The full paper icon and the unplated masthead mark are cloned from the issue. */
.splash-brand-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #FAF8F5;
  animation: splash-brand-out .35s var(--splash-ease) .55s both;
}

.splash-brand-stage > svg {
  display: block;
  width: 72px;
  height: 72px;
}

.splash-brand-stage circle {
  animation: splash-dot-breathe .55s var(--splash-ease) 1 both;
}

.splash-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 860px;
  margin: auto;
  overflow: hidden;
  background: #FAF8F5;
  border: 1px solid rgba(28, 25, 23, 0.10);
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.08);
  animation: splash-card-in 0.6s var(--splash-ease) both;
}

.splash-visual {
  position: relative;
  overflow: hidden;
}

.splash-visual > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  animation: splash-cover-in 1.4s var(--splash-ease) both;
}

.splash-paper {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: clamp(380px, 56vh, 480px);
  padding: clamp(36px, 5vw, 64px) clamp(32px, 4.2vw, 54px);
  background: #FAF8F5;
}

.splash-paper p, .splash-paper h2 {
  margin: 0;
  text-align: left;
}

.splash-paper .splash-folio,
.splash-paper .splash-subtitle {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color: #6E6A63;
  font-size: 11px;
  line-height: 1.65;
  letter-spacing: 0.1em;
}

.splash-paper .splash-title {
  margin-top: 24px;
  color: #22201E;
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: 0.045em;
}

.splash-paper .splash-subtitle { margin-top: 8px; }

.splash-rule {
  width: 100%;
  height: 1px;
  margin: 26px 0;
  border: 0;
  background: rgba(28, 25, 23, 0.16);
  transform-origin: left center;
  animation: splash-rule-in 0.6s var(--splash-ease) both;
}

.has-brand-intro:not(.is-closing) .splash-card,
.has-brand-intro:not(.is-closing) .splash-visual > img,
.has-brand-intro:not(.is-closing) .splash-rule {
  animation-delay: .55s;
}

.splash-paper .splash-intro {
  font-size: 15px;
  line-height: 1.85;
  color: #48453F;
}

.splash-paper .splash-stats {
  margin-top: 12px;
  color: #6E6A63;
  font-size: 12px;
  line-height: 1.65;
}

.splash-open {
  margin-top: 30px;
  padding: 12px 23px;
  border: 0;
  border-radius: 999px;
  background: #22201E;
  color: #FAF8F5;
  font: 500 14px/1.45 "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  cursor: pointer;
}

.splash-replay {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #6E6A63;
  font: inherit;
  font-size: 12px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.splash-replay:hover { text-decoration: underline; }
.splash-title:focus { outline: none; }
.splash-open:focus-visible, .splash-replay:focus-visible {
  outline: 2px solid #6E6A63;
  outline-offset: 3px;
}

dialog.editorial-splash.is-closing .splash-card {
  animation: splash-card-out 0.45s var(--splash-ease) both;
}

dialog.editorial-splash.is-closing::backdrop {
  animation: splash-veil-out 0.45s var(--splash-ease) both;
}

.editorial-splash.is-closing .splash-brand-stage {
  animation: splash-brand-dismiss .45s var(--splash-ease) both;
  pointer-events: none;
}

/* Prepare the guide beneath the veil, before the background becomes clear. */
.splash-card-pending {
  opacity: 0;
  transition: opacity 0.16s var(--splash-ease);
}

.splash-card-reveal {
  animation: splash-guide-in 0.45s var(--splash-ease) var(--splash-delay, 0ms) both;
}

@keyframes splash-veil-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-dot-breathe {
  from { opacity: .70; }
  62% { opacity: 1; }
  to { opacity: .92; }
}
@keyframes splash-brand-out {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}
@keyframes splash-brand-dismiss {
  from { opacity: var(--splash-exit-brand, 0); }
  to { opacity: 0; visibility: hidden; }
}
@keyframes splash-veil-out {
  from { opacity: var(--splash-exit-veil, 1); }
  to { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
}
@keyframes splash-card-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splash-card-out {
  from { opacity: var(--splash-exit-opacity, 1); transform: var(--splash-exit-position, translateY(0)); }
  to { opacity: 0; transform: translateY(-20px); }
}
@keyframes splash-cover-in { from { transform: scale(1.05); } to { transform: scale(1); } }
@keyframes splash-rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splash-guide-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (width < 768px) {
  dialog.editorial-splash { padding: 16px; }
  .splash-card { grid-template-columns: 1fr; max-width: 520px; }
  .splash-visual { height: clamp(110px, 31vh, 270px); }
  .splash-paper { min-height: 0; padding: 28px clamp(24px, 7vw, 40px) 32px; }
  .splash-paper .splash-title { margin-top: 14px; }
  .splash-rule { margin: 18px 0; }
  .splash-open { margin-top: 20px; }
}

@media (max-height: 500px) {
  dialog.editorial-splash { padding: 10px; }
  .splash-paper { min-height: 0; padding-top: 16px; padding-bottom: 16px; }
  .splash-paper .splash-title { margin-top: 8px; }
  .splash-rule { margin: 12px 0; }
  .splash-open { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .splash-brand-stage { display: none; }
  dialog.editorial-splash::backdrop,
  dialog.editorial-splash .splash-card,
  .splash-visual > img,
  .splash-rule,
  .splash-card-reveal {
    animation-delay: 0s !important;
    animation-duration: 0.01ms !important;
  }
}
