:root {
  --pine: #0f3d32;
  --pine-mid: #1a5c4a;
  --brand: #1f6f5b;
  --brand-dark: #134e40;
  --ink: #14241f;
  --muted: #5d7269;
  --mist: #e8f0ec;
  --surface: rgba(255, 252, 248, 0.88);
  --surface-solid: #fffcf8;
  --line: rgba(19, 78, 64, 0.14);
  --go: #1a7a5c;
  --stop: #c04545;
  --amber: #c48a2a;
  --shadow: 0 18px 40px rgba(15, 61, 50, 0.12);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-ui: "Outfit", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

html.booting,
html.booting body {
  overflow: hidden;
}

body {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: #d9e6df;
}

/* Soft forest morning atmosphere */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 12% -10%, rgba(90, 160, 130, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 10%, rgba(196, 138, 42, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(15, 61, 50, 0.22), transparent 55%),
    linear-gradient(165deg, #f4f8f5 0%, #dce9e2 42%, #c9dcd2 100%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ========== Curtain boot — phone-app launch ========== */
.app-curtain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  overflow: hidden;
}

.curtain-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(36, 110, 88, 0.55), transparent 70%),
    #071f19;
  transition: opacity 0.5s ease;
}

.curtain-panel {
  position: absolute;
  top: -2%;
  bottom: -2%;
  width: 54%;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.28), transparent 22%, transparent 78%, rgba(0,0,0,0.2)),
    linear-gradient(180deg, #1a6b56 0%, #0f3d32 38%, #082820 100%);
  box-shadow:
    inset 0 0 80px rgba(0,0,0,0.35),
    0 0 40px rgba(0,0,0,0.25);
  transition:
    transform 1.15s cubic-bezier(0.7, 0.02, 0.25, 1),
    filter 0.6s ease;
  will-change: transform;
  filter: saturate(1.05);
}

.curtain-left {
  left: -2%;
  border-right: 1px solid rgba(232, 208, 150, 0.18);
  transform-origin: left center;
  transform: translateX(0) scaleX(1);
}

.curtain-right {
  right: -2%;
  border-left: 1px solid rgba(232, 208, 150, 0.18);
  transform-origin: right center;
  transform: translateX(0) scaleX(1);
}

/* Fabric pleats + velvet grain */
.curtain-left::before,
.curtain-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 14px,
      rgba(255,255,255,0.045) 14px,
      rgba(255,255,255,0.045) 16px,
      transparent 16px,
      transparent 28px,
      rgba(0,0,0,0.1) 28px,
      rgba(0,0,0,0.1) 29px
    );
  opacity: 0.95;
}

.curtain-left::after,
.curtain-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  pointer-events: none;
}

.curtain-left::after {
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(232, 208, 150, 0.08));
}

.curtain-right::after {
  left: 0;
  background: linear-gradient(270deg, transparent, rgba(232, 208, 150, 0.08));
}

/* Center seam light — splits with the open */
.curtain-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  z-index: 3;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(232, 208, 150, 0.15) 18%,
    rgba(255, 236, 180, 0.55) 50%,
    rgba(232, 208, 150, 0.15) 82%,
    transparent 100%
  );
  box-shadow: 0 0 18px rgba(232, 208, 150, 0.35);
  opacity: 0.55;
  transition: opacity 0.35s ease, transform 1.15s cubic-bezier(0.7, 0.02, 0.25, 1), width 0.5s ease;
}

.curtain-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #f3faf6;
  text-align: center;
  z-index: 5;
  padding: 24px;
  opacity: 1;
  transform: none;
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.curtain-center::before {
  content: "";
  position: absolute;
  width: min(320px, 80vw);
  height: min(320px, 80vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 40, 32, 0.55), transparent 68%);
  z-index: -1;
  pointer-events: none;
}

html.booting:not(.curtain-skip) .curtain-center {
  animation: curtain-brand-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes curtain-brand-in {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

.curtain-mark {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.22);
  color: #e8f5ef;
  box-shadow:
    0 18px 40px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.2);
  animation: mark-breathe 2.4s ease-in-out infinite;
}

.curtain-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 10vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: #f7fcf9;
  text-shadow: 0 2px 0 rgba(0,0,0,0.18), 0 12px 36px rgba(0,0,0,0.45);
}

.curtain-sub {
  font-size: 0.98rem;
  font-weight: 600;
  color: rgba(243, 250, 246, 0.88);
  max-width: 22ch;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

/* Hold: slight fabric tension */
.app-curtain.is-holding .curtain-left {
  transform: translateX(-1.5%) scaleX(1.01);
}

.app-curtain.is-holding .curtain-right {
  transform: translateX(1.5%) scaleX(1.01);
}

.app-curtain.is-holding .curtain-seam {
  opacity: 0.95;
  width: 3px;
  margin-left: -1.5px;
  box-shadow: 0 0 28px rgba(232, 208, 150, 0.55);
}

/* Open: panels part like a curtain */
.app-curtain.is-opening .curtain-left {
  transform: translateX(-104%) scaleX(1.04);
}

.app-curtain.is-opening .curtain-right {
  transform: translateX(104%) scaleX(1.04);
}

.app-curtain.is-opening .curtain-seam {
  opacity: 0;
  transform: scaleY(0.2);
}

.app-curtain.is-opening .curtain-center {
  opacity: 0;
  transform: scale(1.06) translateY(-12px);
  transition-duration: 0.4s;
}

.app-curtain.is-opening .curtain-backdrop {
  opacity: 0;
}

.app-curtain.is-gone {
  opacity: 0;
  transition: opacity 0.35s ease;
}

@keyframes mark-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.2); }
  50% { transform: scale(1.045); box-shadow: 0 22px 48px rgba(0,0,0,0.32), 0 0 32px rgba(232, 208, 150, 0.12), inset 0 1px 0 rgba(255,255,255,0.25); }
}

/* Content rise after curtain */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(10px + var(--safe-top)) 18px calc(96px + var(--safe-bottom));
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s,
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
}

html.app-ready .app-shell {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}

html.curtain-skip .app-shell {
  opacity: 1;
  transform: none;
  transition: none;
}

.app-shell-auth {
  padding-bottom: calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ========== Chrome ========== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 2px 14px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(31, 111, 91, 0.12);
  color: var(--brand);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 58%;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.75);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(15, 61, 50, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.profile-chip.active,
.profile-chip:active {
  background: rgba(31, 111, 91, 0.12);
  border-color: rgba(31, 111, 91, 0.28);
}

.profile-chip-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #24856d, var(--pine));
  color: #f3faf6;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.profile-chip-text {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.profile-chip-hi {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-chip-name {
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chip-chevron {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 2px;
}

.profile-hero {
  text-align: center;
  padding: 12px 8px 20px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #24856d, var(--pine));
  color: #f3faf6;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(15, 61, 50, 0.22);
}

.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  color: var(--pine);
}

.profile-handle {
  margin: 4px 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.profile-meta {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.profile-readonly {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.profile-menu {
  display: grid;
  margin: 4px 0 0;
}

.profile-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 2px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.profile-menu-item:first-child {
  border-top: none;
  padding-top: 4px;
}

.pmi-chevron {
  color: var(--muted);
  font-size: 1.25rem;
}

.topbar-user {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.main { padding-top: 2px; }

.flash {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  animation: flash-in 0.4s ease;
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.flash-success {
  background: rgba(26, 122, 92, 0.14);
  color: #0f4a3a;
  border: 1px solid rgba(26, 122, 92, 0.2);
}

.flash-error {
  background: rgba(192, 69, 69, 0.12);
  color: #8a2424;
  border: 1px solid rgba(192, 69, 69, 0.2);
}

.page-head h1,
.card h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lede, .hint, .muted { color: var(--muted); }
.lede { margin: 0 0 18px; font-weight: 500; }
.hint { font-size: 0.9rem; margin: 0; font-weight: 500; }

/* Surfaces — less “boxed SaaS”, more soft panels */
.card,
.auth-card,
.hero-status,
.welcome-stage {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}

.card.quiet {
  background: rgba(255, 252, 248, 0.62);
  box-shadow: 0 8px 24px rgba(15, 61, 50, 0.06);
}

.card.highlight {
  border-color: rgba(31, 111, 91, 0.28);
  background: linear-gradient(165deg, rgba(255,252,248,0.95), rgba(232,245,239,0.9));
}

/* Welcome — brand-first stage */
.welcome-stage {
  text-align: center;
  padding: 36px 24px 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(31, 111, 91, 0.12), transparent 55%),
    var(--surface);
}

.welcome-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.welcome-brand,
.auth-brand {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 11vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--pine);
  line-height: 0.95;
}

.auth-brand {
  font-size: clamp(2rem, 8vw, 2.5rem);
  text-align: center;
}

.auth-card .welcome-kicker,
.auth-card .lede { text-align: center; }

.auth-card { margin-top: 12px; }

.welcome-tagline {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand);
}

.welcome-copy {
  margin: 0 auto;
  max-width: 28ch;
  color: var(--muted);
  font-weight: 500;
}

.welcome-actions { margin: 26px 0 6px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  background: var(--surface-solid);
  color: #3c4043;
  border: 1.5px solid var(--line);
  text-decoration: none;
  cursor: pointer;
}

a.btn-google:hover,
a.btn-google:active {
  border-color: #4285f4;
  color: #202124;
}

button.btn-google:disabled,
button.btn-google[aria-disabled="true"] {
  opacity: 0.9;
  cursor: not-allowed;
}

.google-g {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: #fff;
  color: #4285f4;
  border: 1px solid #dadce0;
  font-size: 0.85rem;
}

.soon-pill {
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--mist);
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 8px;
}

.google-hint { text-align: center; margin-top: 10px; }

.auth-switch {
  text-align: center;
  margin: 20px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.auth-switch a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

/* Clock hero */
.hero-status {
  text-align: center;
  padding: 30px 22px 24px;
  position: relative;
  overflow: hidden;
}

.hero-status::before {
  content: "";
  position: absolute;
  inset: auto 0 -40% 0;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(31,111,91,0.1), transparent 70%);
  pointer-events: none;
}

.status-off {
  background:
    linear-gradient(180deg, rgba(255,252,248,0.95), rgba(240,246,243,0.9));
}

.status-on {
  border-color: rgba(31, 111, 91, 0.35);
  background: linear-gradient(180deg, rgba(220, 242, 232, 0.95), rgba(255,252,248,0.92));
}

.status-break {
  border-color: rgba(196, 138, 42, 0.4);
  background: linear-gradient(180deg, rgba(255, 244, 224, 0.95), rgba(255,252,248,0.92));
}

.status-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.status-on .status-label::before,
.status-break .status-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--go);
  box-shadow: 0 0 0 0 rgba(26, 122, 92, 0.45);
  animation: live-pulse 1.8s ease-out infinite;
}

.status-break .status-label::before {
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(196, 138, 42, 0.45);
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 122, 92, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(26, 122, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 122, 92, 0); }
}

.status-time {
  margin: 12px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.status-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 600;
}

.stack { display: grid; gap: 14px; }

.two-col {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  font: inherit;
  font-weight: 600;
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="time"] {
  min-height: 52px;
}

.hint-tight {
  margin-top: 0;
}

.rate-banner {
  border-color: rgba(201, 162, 74, 0.45);
  background: var(--gold-soft, rgba(201, 162, 74, 0.18));
}

.tag-open {
  background: rgba(201, 162, 74, 0.22);
  color: #6a5218;
}

.break-chips {
  margin-top: 4px;
}

#tz-phone-hint:not([hidden]) {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(26, 122, 98, 0.1);
  border: 1px solid rgba(26, 122, 98, 0.18);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 111, 91, 0.14);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 16px;
  padding: 15px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, #24856d, var(--brand-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 61, 50, 0.22);
}

.btn-primary:active { filter: brightness(0.95); }

.btn-secondary {
  background: rgba(31, 111, 91, 0.1);
  color: var(--brand-dark);
}

.btn-go {
  background: linear-gradient(180deg, #2a9a78, #15664f);
  color: #fff;
  font-size: 1.28rem;
  letter-spacing: 0.06em;
  padding: 22px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(15, 61, 50, 0.28);
}

.btn-stop {
  background: linear-gradient(180deg, #d45555, #a83838);
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(168, 56, 56, 0.25);
}

.btn-huge { margin-top: 10px; }

.btn-text {
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
  box-shadow: none;
}

.action-grid {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
}

.break-banner {
  background: rgba(255, 244, 224, 0.9);
  border: 1px solid rgba(196, 138, 42, 0.28);
  border-radius: 16px;
  padding: 14px;
  margin: 8px 0 12px;
}

.break-banner p {
  margin: 0 0 12px;
  font-weight: 700;
}

.clock-out-panel { margin-top: 8px; }
.clock-out-panel > summary { list-style: none; }
.clock-out-panel > summary::-webkit-details-marker { display: none; }

.clock-out-form {
  margin-top: 14px;
  text-align: left;
  padding-top: 4px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  grid-template-columns: none;
}

.check-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--brand);
}

.extra-fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
}

.extra-fieldset legend {
  padding: 0 6px;
  font-weight: 650;
  font-size: 0.95rem;
}

.tz-search {
  margin-bottom: 8px;
}

.tz-select {
  width: 100%;
  min-height: 11rem;
  border-radius: 14px;
  padding: 8px;
  font-size: 0.95rem;
}

button.tz-use-phone {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.hidden { display: none !important; }

.stat-row, .pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.pay-total {
  grid-column: 1 / -1;
  background: rgba(31, 111, 91, 0.1);
  border-radius: 16px;
  padding: 16px;
}

.tax-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(196, 138, 42, 0.12);
  border: 1px solid rgba(196, 138, 42, 0.28);
  color: #6b4e16;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}

.tax-note a {
  color: inherit;
  font-weight: 800;
}

.legal-links {
  text-align: center;
  margin: 22px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--brand);
}

.site-credit {
  text-align: center;
  margin: 28px 0 12px;
  padding: 0 16px calc(8px + var(--safe-bottom));
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.9;
}

.site-credit-block {
  margin: 0;
  padding: 0;
  text-align: left;
  opacity: 1;
}

.site-credit-block p {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--ink, inherit);
  opacity: 1;
}

.site-credit-block p:last-child {
  margin-bottom: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.agree-row {
  align-items: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.agree-row a {
  color: var(--brand);
}

.agree-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

.legal-doc h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 22px 0 8px;
}

.legal-doc p,
.legal-doc li {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

.legal-doc ul {
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
}

.shift-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shift-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.shift-list li:first-child { border-top: none; }
.shift-list .muted { display: block; font-size: 0.88rem; }

.shift-list-links li {
  display: block;
  padding: 0;
}

.shift-row-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  margin: 0 -4px;
  transition: background 0.15s ease;
}

.shift-list-links li:first-child .shift-row-link {
  border-top: none;
}

.shift-row-link:active,
.shift-row-link:hover {
  background: rgba(31, 111, 91, 0.08);
}

.shift-open-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand);
}

.back-row {
  margin: 0 0 8px;
}

.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.detail-list li:first-child { border-top: none; }

.detail-list span {
  color: var(--muted);
}

.tiny {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 2px;
}

.shift-meta {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.tag {
  display: block;
  color: var(--brand);
  font-size: 0.82rem;
}

.text-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.subhead {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.help-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 10px;
}

.danger-zone {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.add-past-wrap {
  margin: 14px 0 0;
}

.empty-past {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

.btn-danger {
  background: #8b2e2e;
  color: #fff;
  border: none;
  box-shadow: 0 10px 22px rgba(139, 46, 46, 0.22);
}

.btn-danger:active {
  transform: translateY(1px);
}

body.confirm-open {
  overflow: hidden;
}

.confirm-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.confirm-root[hidden] {
  display: none !important;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 32, 28, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.confirm-sheet {
  position: relative;
  width: min(440px, 100%);
  background: linear-gradient(180deg, #fffdf9 0%, #f7f1e8 100%);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px calc(20px + var(--safe-bottom));
  box-shadow: 0 -18px 40px rgba(11, 50, 41, 0.18);
  transform: translateY(110%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.confirm-root.is-open .confirm-backdrop {
  opacity: 1;
}

.confirm-root.is-open .confirm-sheet {
  transform: translateY(0);
}

.confirm-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 61, 50, 0.18);
  margin: 4px auto 14px;
}

.confirm-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 8px;
  color: var(--ink, #1a2e28);
}

.confirm-body {
  margin: 0 0 18px;
  color: var(--muted, #5a6b64);
  line-height: 1.45;
  font-size: 0.98rem;
}

.confirm-actions {
  display: grid;
  gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .confirm-backdrop,
  .confirm-sheet {
    transition: none;
  }
}

/* Bottom nav — app chrome */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(440px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(255, 252, 248, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(8px + var(--safe-bottom));
  z-index: 20;
}

.bottom-nav-3 {
  grid-template-columns: repeat(3, 1fr);
}

.break-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  text-align: center;
}

.btn-ghost {
  background: rgba(31, 111, 91, 0.08);
  color: var(--brand-dark);
  font-size: 0.95rem;
  padding: 12px 10px;
  box-shadow: none;
  flex-direction: column;
  gap: 2px;
  min-height: 52px;
}

.btn-ghost .btn-caption {
  display: block;
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.btn-caption {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.period-switch {
  margin-bottom: 12px;
}

.compact-label {
  font-size: 0.9rem;
}

.add-dates-details > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--brand-dark);
  list-style: none;
}

.add-dates-details > summary::-webkit-details-marker { display: none; }

.add-dates-summary {
  padding: 4px 0 10px;
}

.pulse-cta {
  animation: pulse-cta 0.9s ease;
}

@keyframes pulse-cta {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 26px rgba(15, 61, 50, 0.28); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(31, 111, 91, 0.2); }
}

.shift-open-hint { display: none; }

.btn-text {
  min-height: 44px;
  padding: 10px 8px;
}

.profile-chip {
  min-height: 44px;
}

.chip {
  min-height: 44px;
}

.bottom-nav a {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.btn:focus-visible,
.bottom-nav a:focus-visible,
.profile-chip:focus-visible,
.chip:focus-visible,
.shift-row-link:focus-visible,
.add-dates-summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 111, 91, 0.18);
}

#premium-error {
  color: #8a2424;
  font-weight: 700;
}

.clock-out-step {
  text-align: center;
}

.gate-title {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--pine);
}

.under-clock-link {
  text-align: center;
  margin: 8px 0 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.chip {
  appearance: none;
  border: 1.5px solid var(--line);
  background: rgba(255,255,255,0.75);
  color: var(--brand-dark);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.chip.active {
  border-color: var(--brand);
  background: rgba(31, 111, 91, 0.12);
}

.rate-gate .gate-title {
  margin-bottom: 4px;
}

.bottom-nav a {
  text-decoration: none;
  color: var(--muted);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px 4px 6px;
  border-radius: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.bottom-nav a.active {
  color: var(--pine);
  background: rgba(31, 111, 91, 0.12);
}

.nav-icon {
  display: grid;
  place-items: center;
  margin: 0 auto 3px;
  width: 22px;
  height: 22px;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

@media (max-width: 380px) {
  .two-col { grid-template-columns: 1fr; }
  .status-time { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .app-curtain,
  .curtain-panel,
  .curtain-center,
  .curtain-seam,
  .curtain-backdrop,
  .app-shell,
  .curtain-mark,
  .status-on .status-label::before,
  .status-break .status-label::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ========== PWA install banner ========== */
.pwa-install {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  padding: 12px 14px calc(12px + var(--safe-bottom));
  pointer-events: none;
}

.pwa-install-inner {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.pwa-install-copy {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pwa-install-copy strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--pine);
}

.pwa-install-copy span {
  font-size: 0.9rem;
  color: var(--muted);
}

.pwa-install-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.pwa-install-actions .btn {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.help-sub {
  margin: 18px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pine);
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-inner { transition: none; }
}
