@font-face {
  font-family: "Bayon";
  src: url("../assets/fonts/bayon-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Flex";
  src: url("../assets/fonts/google-sans-flex-latin.woff2") format("woff2-variations");
  font-weight: 1 1000;
  font-style: oblique 0deg 10deg;
  font-stretch: 25% 151%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Google Sans Flex";
  src: url("../assets/fonts/google-sans-flex-latin-ext.woff2") format("woff2-variations");
  font-weight: 1 1000;
  font-style: oblique 0deg 10deg;
  font-stretch: 25% 151%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Druk Wide Bold";
  src: url("../assets/fonts/druk-wide-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #0a84ff;
  --lime: #c0ec4e;
  --pb-ink: #4d5e1f;
  --yellow: #ffcb2d;
  --orange: #ff7e33;
  --black: #000000;
  --white: #ffffff;
  --icon: #192227;
  --phone: 360px;
  --shadow-btn: 5px 8px 16px rgba(27, 47, 86, 0.35);
  --shadow-chip: 0 2px 0 rgba(0, 0, 0, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: #0b1220;
  color: var(--black);
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "GRAD" 0, "ROND" 0, "wdth" 100;
}

body[data-page="onboarding"],
body[data-page="home"],
body[data-page="sta"],
body[data-page="template"] {
  height: 100dvh;
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  font: inherit;
  color: inherit;
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

.phone {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .phone {
    width: var(--phone);
    max-width: var(--phone);
  }
}

.phone.is-blue {
  background-color: var(--blue);
}

.phone.is-lime {
  background: var(--lime);
}

.display {
  font-family: "Bayon", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.82;
}

.stamp {
  font-family: "Druk Wide Bold", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Shared buttons */
.btn-chunky {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 67px;
  padding: 18px 20px;
  background: var(--white);
  border: 2px solid var(--black);
  border-bottom-width: 5px;
  border-radius: 18px;
  box-shadow: var(--shadow-btn);
  transition:
    transform 0.08s ease,
    border-bottom-width 0.08s ease,
    box-shadow 0.08s ease;
}

.btn-chunky:active:not(:disabled) {
  transform: translateY(3px);
  border-bottom-width: 2px;
  box-shadow: 2px 3px 8px rgba(27, 47, 86, 0.22);
}

.btn-chunky:disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
  border-bottom-width: 2px;
}

.btn-chunky.is-between {
  justify-content: space-between;
}

.btn-chunky .display {
  font-size: 28px;
  line-height: 0.82;
  white-space: nowrap;
}

.btn-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 60px;
  padding: 18px 20px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  color: var(--black);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}

.btn-go.is-between {
  justify-content: space-between;
}

.btn-go:active {
  transform: translateY(2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-go.is-dark {
  background: var(--black);
  color: var(--white);
  box-shadow: none;
}

.btn-go.is-danger {
  background: #ff3e3e;
  color: #911a1a;
  box-shadow: none;
}

.btn-go.is-outline {
  background: transparent;
  border: 2px solid #e1e1e1;
  box-shadow: none;
}

.btn-go.is-dark:active,
.btn-go.is-danger:active,
.btn-go.is-outline:active {
  box-shadow: none;
}

.btn-go.is-outline:active {
  transform: translateY(1px);
  background: rgba(0, 0, 0, 0.04);
}

.btn-go .icon {
  width: 24px;
  height: 24px;
}

.btn-go:disabled,
.btn-go[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.btn-chip {
  width: 40px;
  height: 40px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 30px;
  box-shadow: var(--shadow-chip);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}

.btn-chip:active,
.btn-chip.is-pressed {
  transform: translateY(3px);
  box-shadow: 2px 3px 8px rgba(27, 47, 86, 0.22);
}

.btn-chip img,
.icon {
  width: 24px;
  height: 24px;
}

.icon-20 {
  width: 20px;
  height: 20px;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  align-self: stretch;
  padding-bottom: 32px;
}

.topbar h1 {
  flex: 1;
  text-align: center;
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 500;
  font-size: 24px;
}

/* ===================== Onboarding ===================== */
.phone.is-blue.onboarding {
  background-color: #0a84ff;
  background-image: linear-gradient(
    180deg,
    #0a84ff 0%,
    #39a0ed 14.5%,
    #afdafa 33.4%,
    #ffffff 55.2%
  );
  padding-top: env(safe-area-inset-top);
}

.phone.is-blue.onboarding {
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.onboarding-logo {
  position: absolute;
  top: clamp(16px, 8.4dvh, 64px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.onboarding-tagline {
  position: absolute;
  top: clamp(72px, 19.6dvh, 149px);
  left: 50%;
  width: min(330px, calc(100% - 24px));
  margin: 0;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
  text-align: center;
  pointer-events: none;
}

.tagline-a,
.tagline-b {
  display: block;
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 700;
  font-style: oblique 10deg;
  font-variation-settings: "GRAD" 0, "ROND" 0, "wdth" 100, "slnt" -10;
  transform: rotate(-4.44deg);
}

.tagline-a {
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -2.16px;
}

.tagline-b {
  font-size: 45px;
  line-height: 45px;
  letter-spacing: -2.7px;
}

.onboarding-globe {
  position: absolute;
  left: 50%;
  top: calc(
    clamp(72px, 19.6dvh, 149px) + 112px + clamp(16px, 5dvh, 40px)
  );
  width: 176.11%;
  height: auto;
  max-width: none;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.onboarding-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0) 0%, #0a84ff 100%);
  z-index: 1;
  pointer-events: none;
}

.onboarding-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 100%;
  padding: 0 20px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
}

.onboarding-bottom .btn-go {
  width: 100%;
}

.doors {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}

.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: scaleX(0);
}

.door-left {
  left: 0;
  transform-origin: left center;
}

.door-right {
  right: 0;
  transform-origin: right center;
}

.phone.doors-close .door,
.phone.doors-shut .door,
html.doors-pending .door {
  transform: scaleX(1);
}

.phone.doors-close .door {
  transition: transform 480ms ease-in-out;
}

.phone.doors-open .door {
  transform: scaleX(0);
  transition: transform 480ms ease-in-out;
}

.phone.doors-shut .door,
html.doors-pending .door {
  box-shadow: none;
}

.phone.doors-close .doors,
.phone.doors-shut .doors,
html.doors-pending .doors {
  pointer-events: auto;
}

.credit {
  text-align: center;
  color: var(--white);
}

.credit p:first-child {
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 400;
  font-size: 12px;
  opacity: 1;
  margin-bottom: 8px;
}

.credit p:last-child {
  font-size: 14px;
}

/* ===================== Home ===================== */
.home {
  padding: env(safe-area-inset-top) 0 16px;
  align-items: center;
  gap: 0;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background-image: linear-gradient(
    180deg,
    #39a0ed 0%,
    #afdafa 40%,
    #afdafa 60%,
    #39a0ed 81.25%,
    #0a84ff 100%
  );
}

.el {
  position: absolute;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}

.el-fins {
  left: auto;
  right: -23.43%;
  top: -14.34%;
  width: 82.76%;
  height: auto;
  aspect-ratio: 1;
  animation: float-el-fins 6.2s ease-in-out infinite;
}

.el-mask {
  left: -21.39%;
  top: 13.5%;
  width: 53.05%;
  height: auto;
  aspect-ratio: 1;
  z-index: 3;
  animation: float-el-mask 4.8s ease-in-out infinite;
}

.el-snorkel {
  left: auto;
  right: -23.32%;
  top: 10.6%;
  width: 57.49%;
  height: auto;
  aspect-ratio: 1;
  animation: float-el-snorkel 5.5s ease-in-out -1.6s infinite;
}

@keyframes float-el-fins {
  0%,
  100% {
    transform: translateY(0) rotate(-48.38deg);
  }
  50% {
    transform: translateY(-14px) rotate(-48.38deg);
  }
}

@keyframes float-el-mask {
  0%,
  100% {
    transform: translateY(0) rotate(-48.06deg);
  }
  50% {
    transform: translateY(-10px) rotate(-48.06deg);
  }
}

@keyframes float-el-snorkel {
  0%,
  100% {
    transform: translateY(0) rotate(29.31deg);
  }
  50% {
    transform: translateY(-8px) rotate(29.31deg);
  }
}

.logo-wordmark {
  width: 64px;
  height: 46px;
}

.home > .logo-wordmark {
  margin-top: clamp(12px, 6.3dvh, 48px);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.home-title {
  width: 300px;
  margin-top: clamp(4px, 1.2dvh, 9px);
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 7.9dvh, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--white);
  text-align: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  overflow: visible;
}

.title-layer {
  display: block;
}

.title-solid {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 100%);
}

.title-blur {
  filter: blur(10px);
}

.home-intro .title-solid {
  animation: title-wipe 0.85s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.home-intro .title-blur {
  animation: title-blur-out 0.45s cubic-bezier(0.32, 0.72, 0, 1) 0.4s forwards;
}

@keyframes title-wipe {
  from {
    clip-path: inset(0 0 0 100%);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes title-blur-out {
  from {
    filter: blur(10px);
    opacity: 1;
  }
  to {
    filter: blur(0);
    opacity: 0;
  }
}

.tabs {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 4px;
  margin-top: clamp(8px, 1.6dvh, 12px);
  padding: 6px;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(6px);
  border-radius: 50px;
  flex-shrink: 0;
}

.tab-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 72px;
  height: calc(100% - 12px);
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tab {
  position: relative;
  z-index: 1;
  width: 72px;
  padding: 8px 12px;
  border-radius: 30px;
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
  text-align: center;
  transition: color 220ms ease;
}

.tab.is-active {
  color: var(--black);
}

.carousel {
  --card-s: 1;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 68px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  gap: calc(12px * var(--card-s));
  width: max-content;
  height: calc(396px * var(--card-s));
  align-items: stretch;
}

.disc-card-slot {
  width: calc(224px * var(--card-s));
  height: calc(396px * var(--card-s));
  flex-shrink: 0;
  scroll-snap-align: center;
}

.disc-card {
  width: 224px;
  height: 396px;
  transform: scale(var(--card-s));
  transform-origin: top left;
  perspective: 920px;
  transform-style: preserve-3d;
}

.disc-face {
  width: 100%;
  height: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  overflow: visible;
  perspective: 920px;
  transform-style: preserve-3d;
}

.disc-art-wrap {
  position: relative;
  width: 200px;
  height: 300px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 16px;
  transform-origin: center center;
  transform-style: preserve-3d;
}

.disc-art {
  width: 200px;
  height: 300px;
  object-fit: cover;
  display: block;
}

.disc-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.disc-shine::before {
  content: "";
  position: absolute;
  top: -12%;
  left: 0;
  width: 42%;
  height: 124%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  mix-blend-mode: overlay;
  transform: translateX(-160%) skewX(-18deg);
  opacity: 0;
}

.disc-card.is-center .disc-shine::before {
  animation: shine-sweep 4.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.4s infinite;
}

@keyframes shine-sweep {
  0% {
    transform: translateX(-160%) skewX(-18deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  38% {
    transform: translateX(280%) skewX(-18deg);
    opacity: 1;
  }
  46%,
  100% {
    transform: translateX(280%) skewX(-18deg);
    opacity: 0;
  }
}

.disc-card .btn-go {
  flex-shrink: 0;
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 8px;
}

.home .dots {
  gap: 8px;
  height: 6px;
  margin-top: clamp(10px, 3.2dvh, 24px);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.home .dots span {
  width: 6px;
  height: 6px;
}

.dots span.is-active {
  width: 48px;
  border-radius: 8px;
  background: var(--white);
}

.home .dots span.is-active {
  width: 6px;
  border-radius: 50%;
}

.phone.is-lime .dots span {
  background: rgba(0, 0, 0, 0.2);
}

.phone.is-lime .dots span.is-active {
  background: var(--black);
}

.toast {
  position: absolute;
  left: 20px;
  right: 20px;
  top: calc(12px + env(safe-area-inset-top));
  padding: 12px 16px;
  background: var(--black);
  color: var(--white);
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-28px);
  z-index: 30;
}

.sta .toast,
.template .toast,
.onboarding .toast {
  top: 12px;
}

/* ===================== STA form ===================== */
.phone.is-lime.sta,
.phone.is-lime.template {
  background-image: linear-gradient(180deg, #b6e149 0%, #00a2f3 100%);
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: env(safe-area-inset-top) 0 0;
}

.sta-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 77%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sta-pattern img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
}

.sta-topbar {
  position: relative;
  z-index: 2;
  padding: 20px 20px 0;
  gap: 16px;
}

.sta .btn-chip,
.template .btn-chip {
  border: 0;
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
  border-radius: 24px;
}

.sta-brand {
  flex: 1;
  text-align: center;
}

.sta-brand-title {
  font-family: "Druk Wide Bold", sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 36px;
  color: var(--white);
  text-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.sta-brand-sub {
  margin-top: 8px;
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  text-transform: uppercase;
  color: var(--black);
  opacity: 0.5;
}

.sta-tabs {
  z-index: 2;
  align-self: center;
  margin-top: 12px;
  flex-shrink: 0;
}

.sta-tabs .tab-pill {
  width: 100px;
}

.sta-tabs .tab {
  width: 100px;
}

.sta[data-sw="running"] .sta-tabs {
  opacity: 0.45;
}

.sta[data-sw="running"] .sta-tabs .tab {
  pointer-events: none;
}

.sta-clock {
  position: relative;
  z-index: 1;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  opacity: 1;
  transition:
    flex-grow 420ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease,
    padding 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sta[data-mode="manual"] .sta-clock {
  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.sta-clock-time {
  font-size: 74px;
  line-height: 0.82;
  width: 100%;
  opacity: 1;
  transition: opacity 180ms ease;
}

.sta-clock-time.is-empty {
  opacity: 0.4;
}

.sta-clock-label {
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
}

.sta-dock {
  position: relative;
  z-index: 3;
  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  min-height: min-content;
  overflow: visible;
  transition: flex-grow 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sta-caps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.sta[data-caps="off"] .sta-caps,
.sta[data-mode="manual"] .sta-caps {
  display: none;
}

.sta-cap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 8px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 8px 13px rgba(0, 0, 0, 0.16);
}

.sta-cap:not(:has(.cap-star)) {
  padding-left: 20px;
}

.sta-cap-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  font-weight: 600;
  font-size: 14px;
  line-height: 18px;
}

.sta-cap-ord,
.sta-cap-time {
  color: var(--black);
  opacity: 1;
  transition: opacity 180ms ease;
}

.sta-cap.is-empty .sta-cap-ord,
.sta-cap.is-empty .sta-cap-time {
  opacity: 0.4;
}

.sta-cap .cap-btn {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ececec;
}

.sta-cap .cap-btn img {
  width: 20px;
  height: 20px;
  opacity: 0.4;
}

.sta-cap .cap-star.is-best {
  background: #ffcb2d;
}

.sta-cap .cap-star.is-best img {
  opacity: 1;
  filter: brightness(0);
}

.sta-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  flex-grow: 1;
  min-height: min-content;
  background: var(--white);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -8px 13px rgba(0, 0, 0, 0.16);
  padding: 20px 20px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}

.sheet-copy {
  text-align: center;
}

.sheet-copy h2 {
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -0.04em;
}

.sheet-copy p {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.5;
}

.tpl-load {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 32px;
  text-align: center;
}

.sta[data-load="on"] {
  align-items: stretch;
}

.sta[data-load="on"] .sta-topbar {
  padding: 20px 20px 20px;
  flex-shrink: 0;
}

.sta[data-load="on"] .tpl-load {
  display: flex;
  min-height: 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.sta[data-load="on"] .sta-tabs,
.sta[data-load="on"] .sta-clock,
.sta[data-load="on"] .sta-dock {
  display: none;
}

.tpl-load-track {
  width: 250px;
  height: 16px;
  flex-shrink: 0;
  background: var(--black);
  border-radius: 999px;
  overflow: hidden;
}

.tpl-load-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lime);
  border-radius: 0;
}

.sheet-act {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-act .btn-go {
  gap: 8px;
}

.tip-carousel {
  --tip-card: 152px;
  width: calc(100% + 40px);
  max-width: none;
  min-width: 0;
  margin-inline: -20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 calc((100% + 40px - var(--tip-card)) / 2);
}

.tip-carousel::-webkit-scrollbar {
  display: none;
}

.tip-track {
  display: flex;
  gap: 8px;
  width: max-content;
}

.tip-card {
  width: var(--tip-card, 152px);
  flex-shrink: 0;
  scroll-snap-align: center;
  padding: 12px;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.3;
  background: var(--white);
}

.tip-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  height: 6px;
  margin-top: -20px;
}

.tip-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d0d0d0;
}

.tip-dots span.is-active {
  background: var(--black);
}

.sw-stack {
  display: none;
  flex-direction: column;
  overflow: visible;
}

.sta[data-mode="stopwatch"] .sw-stack {
  display: flex;
}

.sw-panel,
.man-panel {
  display: none;
  flex-direction: column;
  gap: 32px;
  overflow: visible;
}

.sta[data-mode="stopwatch"][data-sw="idle"] .sw-idle,
.sta[data-mode="stopwatch"][data-sw="running"] .sw-running,
.sta[data-mode="stopwatch"][data-sw="ending"] .sw-ending,
.sta[data-mode="manual"] .man-panel {
  display: flex;
}

.sw-stack.is-enter,
.man-panel.is-enter {
  animation: sheet-in 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sta[data-mode="manual"] .man-panel {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
}

.sta[data-mode="manual"] .sta-dock {
  flex-grow: 1;
  margin-top: 24px;
}

#attempt-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
}

.add-attempt[hidden] {
  display: none;
}

.attempt-block {
  text-align: center;
  padding: 16px 0;
}

.attempt {
  position: relative;
}

.attempt .time {
  width: 100%;
  font-size: 53px;
  line-height: 0.82;
  opacity: 1;
  transition: opacity 180ms ease;
}

.attempt .time.is-empty {
  opacity: 0.4;
}

.attempt .label {
  margin-top: 16px;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  opacity: 0.5;
}

.attempt .actions {
  position: absolute;
  left: 50%;
  right: auto;
  top: 4px;
  width: 240px;
  max-width: 100%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.attempt .actions .btn-chip {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 0;
  box-shadow: none;
  border-radius: 16px;
  background: #ececec;
}

.attempt .actions .btn-chip.is-hidden {
  visibility: hidden;
}

.attempt .actions .btn-chip.is-best {
  background: #ffcb2d;
}

.attempt .actions .btn-chip img {
  width: 20px;
  height: 20px;
  opacity: 0.4;
}

.attempt .actions .btn-chip.is-best img {
  opacity: 1;
  filter: brightness(0);
}

/* ===================== Time picker ===================== */
.picker {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: var(--white);
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 280ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.picker.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.picker-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: calc(32px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
}

.picker-title {
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--black);
}

.picker-wheel {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.wheel-cols {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  height: 100%;
  padding: 0 12px;
}

.wheel-col {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.wheel-pad {
  height: 160px;
  min-height: 160px;
}

.wheel-col::-webkit-scrollbar {
  display: none;
}

.wheel-item {
  height: 80px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bayon", sans-serif;
  font-size: 72px;
  line-height: 0.82;
  color: var(--black);
  opacity: 0.2;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.wheel-item.is-active {
  opacity: 1;
}

.wheel-colon {
  position: relative;
  z-index: 1;
  align-self: center;
  width: 18px;
  font-family: "Bayon", sans-serif;
  font-size: 72px;
  line-height: 0.82;
  text-align: center;
  color: var(--black);
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  pointer-events: none;
}

.wheel-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 65px;
  z-index: 2;
  pointer-events: none;
}

.wheel-fade-top {
  top: 0;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.wheel-fade-bot {
  bottom: 0;
  background: linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.picker-act {
  display: flex;
  gap: 8px;
  width: 100%;
}

.picker-act .btn-go {
  flex: 1;
}

/* ===================== Template ===================== */
.template {
  align-items: stretch;
}

.template .sta-topbar {
  padding: 20px 20px 20px;
  flex-shrink: 0;
}

.tpl-sheet {
  justify-content: space-between;
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.tpl-main {
  width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 0;
}

.tpl-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.tpl-stage {
  position: relative;
  width: 190px;
  height: 324px;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.tpl-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 0;
}

.tpl-bg-switch {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpl-bg-switch[hidden] {
  display: none;
}

.tpl-stage.is-black-bg {
  background: #000;
}

.tpl-stage.is-black-bg .tpl-bg {
  opacity: 0;
}

.tpl-carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.tpl-carousel::-webkit-scrollbar {
  display: none;
}

.tpl-track {
  display: flex;
  align-items: stretch;
  min-width: 100%;
  min-height: 100%;
  width: max-content;
  height: 100%;
}

.tpl-overlay {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex-shrink: 0;
  width: 190px;
  height: 324px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.tpl-fit {
  width: 179px;
  height: 106px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.ov-classic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 29px;
  padding: 0;
}

.tpl-overlay[data-tpl="cards"] {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.ov2 {
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.ov2-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 26px;
}

.ov2-kicker {
  margin: 0;
  color: var(--white);
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.ov2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  background: var(--white);
  border-radius: 8px;
  color: var(--black);
  box-sizing: border-box;
}

.ov2-row.is-hero:not(.is-pb) {
  padding: 16px 12px;
}

.ov2-row.is-pb {
  background: var(--lime);
  color: var(--pb-ink);
}

.ov2-label {
  margin: 0;
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
}

.ov2-time-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ov2-time {
  margin: 0;
  font-family: "Druk Wide Bold", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}

.ov2-rest {
  display: flex;
  gap: 4px;
  width: 100%;
}

.ov2-rest .ov2-row {
  flex: 1;
  min-width: 0;
}

.ov3 {
  position: relative;
  flex-shrink: 0;
  width: 324px;
  height: 72px;
  background: var(--white);
  border-radius: 66px;
  overflow: hidden;
}

.ov3-logo {
  position: absolute;
  left: 18px;
  top: 20px;
}

.ov3-time {
  position: absolute;
  left: calc(50% - 1px);
  top: 11px;
  transform: translateX(-50%);
  margin: 0;
  font-family: "Druk Wide Bold", sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: normal;
  color: var(--black);
  white-space: nowrap;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.ov3-label {
  position: absolute;
  left: calc(50% - 0.5px);
  top: 53px;
  transform: translateX(-50%);
  margin: 0;
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: normal;
  color: #979797;
  white-space: nowrap;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.ov3-badge {
  position: absolute;
  left: 267px;
  top: 15px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--yellow);
}

.ov3-medal-clip {
  position: absolute;
  left: 7px;
  top: 6px;
  width: 29px;
  height: 29px;
  overflow: hidden;
}

.ov3-medal-clip img {
  position: absolute;
  top: 6.25%;
  left: 18.33%;
}

.tpl-dots {
  margin: 0;
  gap: 8px;
  height: 6px;
}

.tpl-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tpl-dots span.is-active {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ov-logo {
  width: 64px;
  height: 46px;
}

.ov-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: var(--lime);
}

.ov-code {
  font-family: "Druk Wide Bold", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
}

.ov-name {
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 600;
  font-size: 16px;
}

.ov-times {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.ov-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: var(--white);
}

.ov-time-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 40px;
}

.ov-medal {
  width: 29px;
  height: 29px;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.ov-time {
  font-size: 40px;
  line-height: 29px;
  color: var(--white);
}

.ov-label {
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 400;
  font-size: 14px;
  white-space: nowrap;
}

.template-actions {
  margin-top: 0;
  width: 100%;
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.template-actions .btn-go.is-dark .icon {
  filter: brightness(0) invert(1);
}

.share-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.share-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.share-btn-face {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid #e1e1e1;
  border-radius: 18px;
}

.share-btn:active .share-btn-face {
  transform: translateY(1px);
  background: rgba(0, 0, 0, 0.04);
}

.share-btn > span:last-child {
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  width: 100%;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

@media (prefers-reduced-motion: reduce) {
  .el-fins,
  .el-mask,
  .el-snorkel {
    animation: none;
  }

  .el-fins {
    transform: rotate(-48.38deg);
  }

  .el-mask {
    transform: rotate(-48.06deg);
  }

  .el-snorkel {
    transform: rotate(29.31deg);
  }

  .title-blur {
    display: none;
  }

  .title-solid {
    position: static;
    clip-path: none;
    animation: none;
  }

  .disc-card.is-center .disc-shine::before {
    animation: none;
  }

  .phone.doors-close .door,
  .phone.doors-open .door {
    transition: none;
  }

  .tab-pill,
  .tab,
  .sta-clock,
  .sta-dock,
  .picker {
    transition: none;
  }

  .sw-stack.is-enter,
  .man-panel.is-enter {
    animation: none;
  }
}
