/* A single, responsive bookcloth board with separately mounted paper elements. */
#stage[data-scene=cover] { background: #19251d; }
#stage[data-scene=cover] .set { background: radial-gradient(ellipse at 45% 40%,#3b4933,#142019); }
#stage[data-scene=cover] .wash { display: none; }
nav button, #start { font: 600 1rem/1.2 system-ui,sans-serif; }
nav button { background: #273a2cf0; border-color: #bda87677; color: #fff1cb; }
#home { font-size: 1.25rem; }
#count { font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
#play > header .date { font-size: .75rem; line-height: 1.35; letter-spacing: .1em; }
#play > header h1 { line-height: 1.08; }
#cover {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 5rem), 72rem);
  height: min(calc(100% - 5rem), 49rem);
  max-width: none;
  padding: clamp(2rem,4vw,4rem) clamp(2rem,4vw,4rem) clamp(1.5rem,3vw,3rem) clamp(3rem,6vw,6rem);
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(2rem,5vw,5rem);
  row-gap: 1rem;
  overflow: auto;
  color: #f6e8bc;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' opacity='.07' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg,#fbe9b008 0 1px,transparent 1px 3px),
    repeating-linear-gradient(90deg,#0b1f1820 0 1px,transparent 1px 4px),
    radial-gradient(ellipse at 30% 15%,#455837,#2a402b 70%);
  border: 1px solid #ad925b;
  border-radius: 4px 17px 17px 4px;
  box-shadow: inset 0 0 0 5px #b69a4a28,inset 0 0 0 8px #102b2166,0 3px #9b8d63,0 7px #655b41,0 22px 65px #09130ac9;
  isolation: isolate;
}
#cover::before {
  content: ''; position: absolute; z-index: -1; inset: 0 auto 0 0; width: 25px;
  background: repeating-linear-gradient(0deg,#e5bc5e00 0 18%,#c3a65c 18% 18.4%,#b88b3b 18.4% 18.8%,transparent 18.8% 39%),
    repeating-linear-gradient(90deg,#ffdca10c 0 1px,transparent 1px 3px),
    linear-gradient(90deg,#4e241d,#8e3a26 55%,#54291c);
  border-right: 3px double #be985255;
  box-shadow: 5px 0 12px #081b1655;
}
.cover-heading { grid-column: 1; grid-row: 1 / 3; align-self: start; text-align: center; }
#cover .date { color: #dfcf9a; font: 500 .68rem/1.5 system-ui,sans-serif; letter-spacing: .14em; text-transform: uppercase; }
#cover .cover-title { margin: 1.25rem 0 .5rem; line-height: 0; }
.cover-title img { width: 100%; max-height: 20rem; object-fit: contain; display: block; }
#cover .cover-subtitle { margin: .8rem auto 0; transform: rotate(-2deg); }
.cover-subtitle span {
  display: inline-block; padding: .3rem 1.2rem .4rem;
  color: #59402a; background: #e8d3a0;
  font: italic 400 1.05rem/1.3 Georgia,serif;
  clip-path: polygon(1% 5%,27% 0,48% 4%,75% 0,100% 5%,98% 46%,100% 91%,71% 100%,49% 96%,25% 100%,0 94%,2% 52%);
}
.cover-landscape { grid-column: 1; grid-row: 3; align-self: end; margin: -1rem -1rem 0; pointer-events: none; }
.cover-landscape img { width: 100%; max-height: 17rem; object-fit: contain; display: block; }
.cover-invitation { grid-column: 2; grid-row: 1 / 3; align-self: center; padding-top: 2rem; }
#cover p.invitation { font: italic 400 clamp(1.6rem,2.6vw,2.3rem)/1.28 Baskerville,Georgia,serif; color:#fff0c8; }
#cover p.cover-question { margin-top: 1rem; max-width: 23ch; font: 400 1rem/1.5 system-ui,sans-serif; color:#decfa7; }
#cover #start {
  margin-top: 1.8rem; padding: .85rem 1.15rem; min-height: 48px;
  color: #34432a; background: #f4e5b5; border: 1px solid #d6bd80; border-radius: 2px 5px 3px 2px;
  box-shadow: 2px 3px #101d174d; transition: transform .15s,background .15s;
}
#cover #start:hover { background: #fff1c5; transform: translateY(-2px); }
#cover #start span { padding-left: .6rem; }
.cover-bookmark { grid-column: 2; grid-row: 3; align-self: end; border-top: 1px solid #d6c49166; padding-top: 1rem; }
#cover-progress { display: block; color: #e6d5a9; font: 500 .75rem/1.4 system-ui,sans-serif; }
#stamp-progress { display: block; width: 100%; height: 3px; margin: .5rem 0 .85rem; border: 0; appearance: none; background: #132c21; color: #e3bd6f; }
#stamp-progress::-webkit-progress-bar { background: #132c21; }
#stamp-progress::-webkit-progress-value { background: #e3bd6f; }
#stamp-progress::-moz-progress-bar { background: #e3bd6f; }
#cover #release-status { color: #f6e9bf; font: 500 .85rem/1.5 system-ui,sans-serif; max-width: 32ch; }
#cover #next-visit { margin-top: .6rem; color: #d4c69f; font: 400 .78rem/1.5 system-ui,sans-serif; max-width: 34ch; }
@media (max-width: 699px), (orientation: portrait) {
  #cover {
    width: min(100%, 38rem); height: 100%; border-radius: 0;
    padding: 4.25rem clamp(1.4rem,7vw,3rem) 1.5rem clamp(2.3rem,9vw,4rem);
    grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto auto;
    gap: 1rem; align-content: safe center;
  }
  #cover::before { width: 16px; }
  .cover-heading { grid-column: 1; grid-row: 1; }
  #cover .date { font-size: .59rem; letter-spacing: .09em; }
  #cover .cover-title { margin-top: .7rem; }
  .cover-title img { max-height: min(23dvh,14rem); }
  #cover .cover-subtitle { margin-top: .5rem; }
  .cover-subtitle span { font-size: .9rem; }
  .cover-landscape { grid-column: 1; grid-row: 2; margin: -.3rem -.4rem; }
  .cover-landscape img { max-height: min(20dvh,12rem); }
  .cover-invitation { grid-column: 1; grid-row: 3; text-align: center; padding: 0; }
  #cover p.invitation { font-size: clamp(1.3rem,5.8vw,1.8rem); }
  #cover p.cover-question { margin: .5rem auto 0; max-width: none; font-size: .85rem; }
  #cover #start { margin-top: .85rem; }
  .cover-bookmark { grid-column: 1; grid-row: 4; margin-top: .25rem; padding-top: .75rem; }
  #cover #release-status, #cover #next-visit { max-width: none; }
  #cover #next-visit { font-size: .72rem; }
}
@media (orientation: landscape) and (max-height: 600px) {
  #cover { width: calc(100% - 2rem); height: calc(100% - 1.5rem); padding: 2.5rem 2rem 1.2rem 3rem; column-gap: 2rem; }
  #cover .date { font-size: .55rem; }
  #cover .cover-title { margin-top: .4rem; }
  .cover-title img { max-height: 28dvh; }
  .cover-subtitle span { font-size: .8rem; }
  .cover-landscape img { max-height: 27dvh; }
  .cover-invitation { padding-top: 0; }
  #cover p.invitation { font-size: 1.4rem; }
  #cover p.cover-question { font-size: .8rem; margin-top: .5rem; }
  #cover #start { margin-top: .75rem; }
  .cover-bookmark { padding-top: .5rem; }
  #cover #release-status, #cover #next-visit { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) { #cover #start { transition: none; } }
