/* The opening is its own sheet of paper, with the same four folded plates
   and cyan ball stock that carry into the activities. */
#entry {
  --ink:#121112;--gold:#ffe539;--pink:#fc01ca;--cyan:#02d1d9;
  position:relative;isolation:isolate;container-type:inline-size;overflow:hidden;
  width:min(100%,960px);height:clamp(390px,min(71vw,88svh),680px);
  display:block;border:3px solid var(--ink);background:#fff;color:var(--ink);
  font-family:'Source Sans',system-ui,sans-serif;
}
#entry [hidden]{display:none!important}
#entry .menu-corner {
  position:absolute;z-index:1;width:23%;aspect-ratio:230/112;pointer-events:none;
  animation:paper-arrive 440ms cubic-bezier(.18,.75,.28,1) both;
}
#entry .menu-corner::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background:radial-gradient(circle,#211d20 0 1px,transparent 1.4px) 0 0/8px 8px;
}
#entry [data-corner="nw"]{top:-1px;left:-1px;--from-x:-9%;--from-y:-9%}
#entry[data-menu="practice"] [data-corner="nw"]{min-width:98px}
#entry [data-corner="menu"]{top:-1px;right:-1px;--from-x:9%;--from-y:-9%;animation-delay:55ms}
#entry [data-corner="sw"]{bottom:-1px;left:-1px;width:21%;--from-x:-9%;--from-y:9%;animation-delay:120ms}
#entry [data-corner="se"]{bottom:-1px;right:-1px;--from-x:9%;--from-y:9%;animation-delay:185ms}
#entry [data-corner="nw"]::before {clip-path:polygon(0 0,89% 0,49% 38%,0 96%)}
#entry [data-corner="menu"]::before {clip-path:polygon(0 0,100% 0,100% 94%,31% 55%)}
#entry [data-corner="sw"]::before {clip-path:polygon(0 26%,26% 11%,88% 100%,0 100%)}
#entry [data-corner="se"]::before {clip-path:polygon(100% 0,100% 100%,3% 100%,47% 46%,63% 50%)}
.menu-page {
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;
  padding:4% 4.5%;text-align:center;
}
#home-menu {gap:0}
.number-balls {--size:clamp(54px,9cqi,88px);display:flex;gap:calc(var(--size)*.12);align-items:flex-end;height:calc(var(--size)*1.42)}
.title-ball {position:relative;display:inline-grid;place-items:center;isolation:isolate;font-family:'Source Sans',system-ui,sans-serif}
.title-ball img {display:block;grid-area:1/1;width:100%;height:100%}
.title-ball b {grid-area:1/1;font-weight:900;line-height:1;color:#101012;letter-spacing:-.04em;transform:translate(-.01em,-.025em)}
.number-balls .title-ball {width:var(--size);height:var(--size);font-size:calc(var(--size)*.62)}
.number-balls .title-ball:nth-child(2){align-self:flex-start}
.number-balls .title-ball::before {
  content:"";position:absolute;z-index:-1;bottom:-2%;width:72%;height:10%;border-radius:50%;background:#18111612;
}
#entry-title,#practice-title {
  margin:0;color:#101012;font-weight:900;line-height:.99;letter-spacing:-.048em;outline:0;
}
#entry-title {margin:2% 0 4%;font-size:clamp(38px,7.7cqi,76px)}
#entry-title span {white-space:nowrap}
#entry .menu-actions {display:grid;width:min(63%,610px);gap:clamp(11px,2.25cqi,22px)}
#entry .paper-option {
  --corner:clamp(11px,2.4cqi,25px);--offset:clamp(4px,.8cqi,8px);
  --plate:polygon(var(--corner) 0,calc(100% - var(--corner)) 0,100% calc(var(--corner)*.82),100% calc(100% - var(--corner)*.6),calc(100% - var(--corner)*.6) 100%,0 100%,0 var(--corner));
  position:relative;isolation:isolate;display:grid;place-items:center;
  min-width:0;margin:0;padding:0 var(--offset) var(--offset) 0;border:0;
  box-shadow:none;border-radius:0;background:none;color:var(--ink);text-align:center;appearance:none;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
#entry .paper-face,#entry .paper-shadow{
  position:absolute;display:block;clip-path:var(--plate);z-index:-1;background:var(--ink);pointer-events:none;
}
#entry .paper-face{inset:0 var(--offset) var(--offset) 0}
#entry .paper-shadow{inset:var(--offset) 0 0 var(--offset)}
#entry :is(.paper-face,.paper-shadow)::before {
  content:"";position:absolute;inset:clamp(2px,.32cqi,3px);
  --corner:clamp(9px,2.15cqi,22px);clip-path:var(--plate);
}
#entry .paper-face::before {background:var(--face)}
#entry .paper-shadow::before {background:var(--under)}
#entry .paper-option:focus-visible{outline:3px solid var(--ink);outline-offset:4px}
@media(hover:hover){
  #entry .paper-option:hover .paper-face::before {filter:brightness(1.045)}
  #entry .paper-option:hover .paper-face,#entry .paper-option:hover .option-contents {translate:-1px -1px}
}
#entry .paper-option:active {transform:none;box-shadow:none}
#entry .paper-option:active :is(.paper-face,.option-contents,.tile-caption,.group-preview){translate:2px 2px}
#entry-start{--face:var(--gold);--under:var(--pink)}
#entry-practice{--face:var(--cyan);--under:var(--pink)}
#entry .option-contents {
  display:flex;align-items:center;justify-content:center;gap:.34em;line-height:1.05;
  padding:.26em .65em .32em;font-size:clamp(30px,6.3cqi,63px);letter-spacing:-.035em;font-weight:900;
}
#entry .action-mark {width:1.18em;height:1.02em;flex:none;fill:var(--ink)}
#practice-menu {gap:clamp(18px,5cqi,46px)}
#practice-title {font-size:clamp(43px,10.5cqi,94px)}
#practice-back{
  position:absolute;z-index:2;top:-1px;left:-1px;width:23%;min-width:98px;aspect-ratio:230/112;
  padding:0;border:0;background:none;cursor:pointer;
  clip-path:polygon(0 0,100% 0,80% 35%,70% 54%,54% 54%,40% 72%,20% 100%,0 100%);
}
#practice-back svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#practice-back:focus-visible{outline:none}
#practice-back:focus-visible .menu-back-arrow{stroke:#fff;stroke-width:5;paint-order:stroke fill}
#practice-activities{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2.5%}
#entry .practice-tile {
  --face:white;--under:var(--gold);grid-template-rows:1fr auto;align-content:center;
  min-height:clamp(190px,34cqi,310px);padding:clamp(14px,3.2cqi,30px) var(--offset) clamp(19px,4cqi,39px) 0;
}
#entry .practice-tile:nth-child(even){--under:var(--cyan)}
.tile-caption,.group-preview {position:relative;display:grid;justify-items:center}
.tile-caption {gap:.16em}
.tile-name {font-size:clamp(25px,5.05cqi,48px);font-weight:900;line-height:1;letter-spacing:-.035em}
.tile-label {font-size:clamp(19px,3.8cqi,35px);line-height:1.15;letter-spacing:-.025em}
.group-preview {grid-template-columns:repeat(2,minmax(0,1fr));width:90%;gap:8%;align-items:center}
.preview-group {
  --ball-size:clamp(22px,4.9cqi,47px);position:relative;isolation:isolate;display:grid;
  width:100%;justify-content:center;align-content:center;align-items:center;
  grid-template-columns:repeat(2,var(--ball-size));min-height:calc(var(--ball-size)*2.35);gap:0;
}
.preview-group[data-count="1"]{grid-template-columns:var(--ball-size)}
.preview-group img {display:block;width:var(--ball-size);height:var(--ball-size);object-fit:contain}
.preview-group[data-count="3"] img:first-child{grid-column:1 / -1;justify-self:center;margin-bottom:calc(var(--ball-size)*-.12)}
.preview-group[data-swatch]::before {
  content:"";position:absolute;z-index:-1;inset:-4% -5%;
  background:radial-gradient(ellipse 50% 50%,rgb(var(--wash) / .85),rgb(var(--wash) / .6) 46%,rgb(var(--wash) / .16) 81%,transparent);
}
.preview-group[data-swatch="pink"]{--wash:255 187 227}
.preview-group[data-swatch="yellow"]{--wash:255 234 132}
.opening-balls .title-ball{width:clamp(29px,5.4cqi,46px);aspect-ratio:1;font-size:clamp(18px,3.2cqi,28px)}
#next-title{max-width:90%;text-align:center;text-wrap:balance}
#entry .title-ball,#entry .menu-page h1,#entry .menu-page h2,#entry .paper-option {
  animation:paper-arrive 340ms cubic-bezier(.2,.75,.25,1) both;
}
@keyframes paper-arrive {
  from{opacity:0;transform:translate(var(--from-x,0),var(--from-y,7px))}
  to{opacity:1;transform:translate(0,0)}
}
#entry .number-balls :nth-child(1){animation-delay:120ms}
#entry .number-balls :nth-child(2){animation-delay:185ms}
#entry .number-balls :nth-child(3){animation-delay:245ms}
#entry .menu-page h1{animation-delay:240ms}
#entry #entry-start{animation-delay:310ms}
#entry #entry-practice{animation-delay:400ms}
#entry .practice-tile:first-child{animation-delay:95ms}
#entry .practice-tile:nth-child(2){animation-delay:200ms}
@media (max-aspect-ratio:1/1) {
  #entry{height:clamp(390px,min(145vw,87svh),710px)}
}
@container (max-width:530px){
  #entry-title{font-size:clamp(39px,9.7cqi,51px);margin:5% 0 8%;max-width:96%}
  #entry .menu-actions{width:83%;gap:clamp(12px,4cqi,20px)}
  #entry .option-contents{font-size:clamp(35px,8.8cqi,44px)}
  .menu-page{padding:9% 5%}
  #practice-menu{gap:clamp(20px,6cqi,32px)}
  #practice-title{font-size:clamp(43px,11cqi,57px)}
  #practice-activities{grid-template-columns:1fr;gap:clamp(12px,3.5cqi,18px)}
  #entry .practice-tile{min-height:clamp(87px,25.8cqi,131px);padding:8px calc(var(--offset) + 7px) calc(var(--offset) + 8px) 6px;
    grid-template-rows:1fr;grid-template-columns:41% 59%}
  .group-preview{width:94%;gap:9%;padding-left:3%}
  .preview-group{--ball-size:clamp(16px,4.8cqi,24px)}
  .tile-name{font-size:clamp(20px,5.7cqi,31px)}
  .tile-label{font-size:clamp(16px,4.5cqi,22px)}
}
@media (min-aspect-ratio:1/1) and (max-height:440px){
  #entry{height:calc(100svh - 12px);max-width:calc(174svh - 20px)}
  #entry .number-balls{--size:clamp(36px,12svh,52px)}
  #entry-title{font-size:clamp(30px,10.2svh,43px);margin:1.1% 0 2.1%}
  #entry .menu-actions{width:55%;gap:2svh}
  #entry .option-contents{font-size:clamp(24px,7.8svh,32px)}
  #practice-title{font-size:clamp(34px,12svh,49px)}
  #practice-menu{gap:3.5svh}
  #entry .practice-tile{min-height:49svh;padding-top:3svh;padding-bottom:5svh}
}
@media(prefers-reduced-motion:reduce){
  #entry .menu-corner,#entry .title-ball,#entry .menu-page h1,#entry .menu-page h2,#entry .paper-option{animation:none}
}
@media(forced-colors:active){
  #entry .paper-option{border:2px solid ButtonText;background:Canvas}
  #entry .option-contents,#entry .tile-caption,#entry .title-ball b{color:ButtonText}
  #practice-back{background:Canvas}
  #practice-back .menu-back-arrow{fill:ButtonText}
}
