/* The signed school shirt: used on the app's welcome page and the website.
   On sign-out day, matrics sign each other's white school shirts. The signatures "write" themselves once, on load. */
.shirt {
  --fabric: #FBFBF8;
  position: relative; overflow: hidden; isolation: isolate;
  background-color: var(--fabric);
  background-image:
    repeating-linear-gradient(0deg, rgba(23, 24, 28, 0.028) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(23, 24, 28, 0.022) 0 1px, transparent 1px 3px);
  color: var(--ink);
}
.shirt .collar { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); width: min(340px, 78%); height: auto; z-index: 0; pointer-events: none; }
.shirt .placket { position: absolute; top: 0; bottom: 0; left: 50%; width: 46px; transform: translateX(-50%); border-left: 1.5px solid rgba(23, 24, 28, 0.08); border-right: 1.5px solid rgba(23, 24, 28, 0.08); z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at 50% 50%, #FFFFFF 0 7px, rgba(23, 24, 28, 0.16) 7px 8.5px, transparent 9px); background-size: 46px 110px; background-position: 0 70px; background-repeat: repeat-y; }

.sig {
  position: absolute; z-index: 1; white-space: nowrap; pointer-events: none;
  color: var(--c, #2346A8); transform: rotate(var(--r, -6deg));
  font-family: 'Permanent Marker', 'Comic Sans MS', cursive; font-size: var(--s, 26px); line-height: 1;
  clip-path: inset(-30% 0 -30% 0);
  animation: sig-write var(--t, 0.9s) cubic-bezier(.45, .05, .55, .95) var(--d, 0s) both;
}
.sig.hand { font-family: 'Caveat', 'Segoe Print', cursive; font-weight: 700; font-size: var(--s, 34px); }
.sig.pen { font-family: 'Gochi Hand', 'Segoe Print', cursive; font-size: var(--s, 28px); }
.sig .heart { display: inline-block; transform: translateY(2px); }
@keyframes sig-write { from { clip-path: inset(-30% 100% -30% 0); } to { clip-path: inset(-30% 0 -30% 0); } }
@media (prefers-reduced-motion: reduce) { .sig { animation: none; } }

/* App welcome page */
.welcome { padding: 0; gap: 0; min-height: 100vh; min-height: 100dvh; background: var(--teal); }
.welcome-shirt { flex: 1 1 auto; min-height: 330px; padding-top: env(safe-area-inset-top, 0px); }
.welcome-brand { position: absolute; z-index: 2; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px 6px 6px; box-shadow: 0 6px 22px rgba(23, 24, 28, 0.12); font-family: var(--font-display); font-weight: 700; font-size: 16px; white-space: nowrap; }
.welcome-brand img { width: 34px; height: 34px; border-radius: 10px; }
.welcome-panel { background: var(--teal); color: #FFFFFF; padding: 26px max(20px, env(safe-area-inset-left, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; border-radius: 28px 28px 0 0; margin-top: -24px; position: relative; z-index: 3; }
.welcome-panel h1 { font-size: 31px; line-height: 1.05; letter-spacing: -0.01em; }
.welcome-panel p { color: #DDF0EE; font-size: 15.5px; }
.btn.gold { background: var(--marigold); color: var(--ink); }
.btn.gold:hover { background: #E3A22B; }
.btn.ghost { background: transparent; color: #FFFFFF; border: 1.5px solid rgba(255, 255, 255, 0.55); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.08); }
.welcome-links { display: flex; justify-content: center; gap: 4px 18px; flex-wrap: wrap; font-size: 13.5px; }
.welcome-links a { color: #DDF0EE; padding: 6px 0; }

/* First-time intro and daily welcome (overlays) */
.overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 30, 29, 0.55); }
.intro { width: 100%; max-width: 460px; background: var(--card); border-radius: 28px 28px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; animation: rise 0.35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.intro-art { height: 150px; border-radius: 20px; display: grid; place-items: center; }
.intro-art svg { width: 96px; height: 96px; }
.intro h2 { font-size: 24px; line-height: 1.1; }
.intro-dots { display: flex; gap: 6px; justify-content: center; }
.intro-dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line-2); transition: width .25s, background .25s; }
.intro-dots span.on { width: 22px; background: var(--teal); }
.intro .row > * { flex: 1 1 120px; }

.hello { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; cursor: pointer; transition: opacity .45s ease; }
.hello.out { opacity: 0; }
.hello-mark { width: 92px; height: 92px; filter: drop-shadow(0 8px 18px rgba(23, 24, 28, 0.15)); animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.hello h1 { font-size: 30px; position: relative; z-index: 2; }
.hello p { color: var(--muted); position: relative; z-index: 2; font-size: 16px; }
.hello .skip { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--muted); z-index: 2; }
@media (prefers-reduced-motion: reduce) { .intro, .hello-mark { animation: none; } }
