/* 開服倒數頁: on top of the 維護頁's stage and plaque (/maintenance/style.css), the launch
   date and four jade-edged plates counting down, like the official site's first screen. */

.when {
  margin-top: 0;
}

/* Two even lines on a narrow phone, never one word left alone. */
.lead {
  text-wrap: balance;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 14px;
}

.countdown[hidden] {
  display: none;
}

.cd-cell {
  display: grid;
  justify-items: center;
  align-content: center;
  width: 64px;
  height: 70px;
  border: 1px solid rgb(226 196 130 / 0.55);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgb(127 214 200 / 0.16), transparent 46%),
    linear-gradient(180deg, rgb(16 43 57 / 0.92), rgb(5 12 18 / 0.92));
  box-shadow:
    inset 0 0 0 3px rgb(5 12 18 / 0.6),
    inset 0 0 0 4px rgb(226 196 130 / 0.18),
    0 4px 12px rgb(0 0 0 / 0.35);
}

.cd-cell b {
  font: 700 30px/1.05 var(--title);
  font-variant-numeric: tabular-nums;
  color: var(--gold-text);
  text-shadow: 0 2px 3px rgb(0 0 0 / 0.7);
}

.cd-cell small {
  font: 700 12px/1.2 var(--title);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: var(--mist);
}

/* The warnings 遊戲軟體分級管理辦法 §13 asks for wherever the game starts. */
.warn {
  margin: 12px 0 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--mist);
  text-wrap: balance;
}

/* The plaque's second link sits under the jade button as a quiet text link. */
a.retry {
  display: inline-flex;
  align-items: center;
}

/* The moment it opens (watched to zero): the line rises in once before the game loads. */
.lead[data-opening] {
  color: var(--gold-text);
  animation: launch-open 600ms var(--ease-out) both;
}

@keyframes launch-open {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* Phone landscape: one screen tall. The plaque sheds the lead line (the status line still
   says when it opens) and tightens its rows; the mark and the warnings stay. */
@media (orientation: landscape) and (max-height: 540px) {
  .lead {
    display: none;
  }

  h1 {
    margin-bottom: 6px;
    padding-bottom: 6px;
    font-size: 28px;
  }

  .countdown {
    margin: 6px 0;
  }

  .warn {
    margin-top: 6px;
  }

  .cd-cell {
    width: 54px;
    height: 56px;
  }

  .cd-cell b {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead[data-opening] {
    animation-name: launch-fade;
  }

  @keyframes launch-fade {
    from {
      opacity: 0;
    }
  }
}
