@font-face { font-family: 'Spirax'; src: url(../fonts/spirax.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Butterfly Kids'; src: url(../fonts/butterflykids.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Princess Sofia'; src: url(../fonts/princesssofia.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Emilys Candy'; src: url(../fonts/emilyscandy.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 500; src: url(../fonts/cormorant-it.woff2) format('woff2'); font-display: swap; }

/* Chinese faces are served from the same site as the café. */
@font-face {
  font-family: 'Cafe WenKai';
  src: url('../fonts/cafe-wenkai.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Cafe Sans';
  src: url('../fonts/cafe-sans.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --aqua: #78e6ee;
  --aqua-deep: #3fcbd8;
  --aqua-core: #e2feff;
  --ink: #4b6763;
  --ink-soft: #7d9894;
  --glass: rgba(196, 248, 251, .5);
  --title-font: 'Emilys Candy';
  --writing: 'Cafe WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
  --cn: 'Cafe Sans', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.stage { overflow: hidden; background: #cfe4dd; font-family: var(--cn); color: var(--ink); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }

.glow-title {
  font-family: var(--title-font), 'Princess Sofia', cursive;
  color: var(--g-fill, #a6f5f9);
  -webkit-text-stroke: .5px rgba(255, 255, 255, .85);
  text-shadow: 0 0 1px #fff, 0 0 5px var(--g-a, #8cf0f6), 0 0 12px var(--g-b, #4fd6e2), 0 0 26px var(--g-c, rgba(63, 203, 216, .65)), 0 0 48px var(--g-d, rgba(63, 203, 216, .35));
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}

/* frosted aqua label, like the little glass tags on the cord */
.tag {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%);
  padding: 4px 11px 5px; min-width: 54px; text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, rgba(214, 252, 253, .82), rgba(150, 232, 238, .62));
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 8px rgba(120, 235, 242, .95), 0 0 20px rgba(120, 235, 242, .45), inset 0 0 6px rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  font: italic 500 17px/1 'Cormorant', Georgia, serif;
  color: #87a3a5; letter-spacing: .08em;
  text-shadow: 0 0 2px #fff, 1px 1px 2px rgba(110, 140, 140, .35);
  cursor: pointer; opacity: 0;
  transition: opacity .6s, box-shadow .3s, filter .3s;
  z-index: 6;
}
.tag.show { opacity: 1; }
.tag small { display: block; margin-top: 3px; font: 500 11px/1.25 var(--cn); font-style: normal; letter-spacing: .04em; color: #466662; }
.tag:hover, .tag:focus-visible { box-shadow: 0 0 10px #a9f7fb, 0 0 30px rgba(120, 235, 242, .9), inset 0 0 8px #fff; outline: none; }
.tag.done { color: #3fb7c4; }
.tag.done::after { content: '✦'; position: absolute; right: -9px; top: -9px; font-size: 13px; color: #fff; text-shadow: 0 0 6px var(--aqua), 0 0 12px var(--aqua); font-style: normal; }
.tag.locked { filter: saturate(.3) brightness(.95); cursor: default; }
.tag.next { animation: tagPulse 1.8s ease-in-out infinite; }
@keyframes tagPulse { 50% { box-shadow: 0 0 14px #b8fafd, 0 0 40px rgba(120, 235, 242, 1), inset 0 0 8px #fff; } }

.grain { position: fixed; inset: -50%; pointer-events: none; z-index: 40; opacity: .5; mix-blend-mode: overlay; animation: grain 1s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.haze { position: fixed; inset: 0; pointer-events: none; z-index: 39;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.22), rgba(255,255,255,0) 60%), linear-gradient(180deg, rgba(240,252,250,.12), rgba(200,230,222,.10)); }

.hint { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  font-size: 12px; letter-spacing: .14em; color: rgba(70, 105, 100, .85); background: rgba(240, 252, 250, .55);
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.8); white-space: nowrap;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.demo-badge { position: fixed; top: 10px; right: 10px; z-index: 45; font: 600 11px/1 var(--cn); letter-spacing: .1em;
  color: #fff; background: rgba(63, 203, 216, .85); padding: 6px 9px; border-radius: 6px; box-shadow: 0 0 12px rgba(63,203,216,.6); }
.demo-badge a { color: #fff; text-decoration: none; }
