:root {
  --bg-top: #eff2f8;
  --bg-bottom: #e9edf6;
  --panel: #eef0f7;
  --panel-strong: #dfe2ef;
  --ink: #2a2f3d;
  --muted: #6e7383;
  --accent: #5c7bbd;
  --accent-2: #3b864e;
  --accent-3: #d27b49;
  --card: #f5f6fb;
  --shadow: 0 12px 28px rgba(40, 45, 70, 0.18);
  --inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --action-blue-top: #a7b1c7;
  --action-blue-bottom: #7e8aa5;
  --action-blue-border: #6f7a94;
  --card-button-height: 38px;
  --header-button-height: 30px;
  --radius: 18px;
  --header-height: 68px;
  --avatar-size: 76px;
  --avatar-ring: 4px;
  --avatar-ring-base: #3f4a61;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Gill Sans", "Verdana", sans-serif;
  background-color: var(--bg-top);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(0, 0, 0, 0.03));
  color: var(--ink);
  overflow: hidden;
}

  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: linear-gradient(180deg, #4b566d, #3f4a61);
    color: #f3f5fb;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--header-height);
}

.header-clock {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 700;
  color: #f3f5fb;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.brand-avatar {
  display: flex;
  align-items: center;
  position: relative;
}

.avatar-link {
  width: calc(var(--avatar-size) + (var(--avatar-ring) * 2));
  height: calc(var(--avatar-size) + (var(--avatar-ring) * 2));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--avatar-ring-base);
  box-shadow: none;
  border: var(--avatar-ring) solid var(--ring-color, var(--accent));
  text-decoration: none;
  transform: translateY(16px);
  position: relative;
}

.avatar-link img,
.avatar-placeholder {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  border: none;
  position: relative;
  z-index: 2;
}

.avatar-link::after {
  content: none;
}

.avatar-link.ring-anim-animated-gradient,
.avatar-link.ring-anim-neon-green,
.avatar-link.ring-fx-infinity-sparkles {
  border: none;
}

.avatar-link.ring-anim-animated-gradient::before,
.avatar-link.ring-anim-neon-green::before,
.avatar-link.ring-fx-infinity-sparkles::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 1;
  -webkit-mask: radial-gradient(circle, transparent calc(50% - var(--avatar-ring)), #000 calc(50% - var(--avatar-ring) + 1px));
  mask: radial-gradient(circle, transparent calc(50% - var(--avatar-ring)), #000 calc(50% - var(--avatar-ring) + 1px));
}

.avatar-link.ring-anim-animated-gradient::before {
  background: conic-gradient(from 0deg, #5ad1ff, #7f74ff, #ff7ce5, #5ad1ff);
  animation: ring-spin 4s linear infinite;
}

.avatar-link.ring-anim-neon-green::before {
  background: #22ff7b;
  box-shadow: 0 0 10px rgba(34, 255, 123, 0.9), 0 0 18px rgba(34, 255, 123, 0.6);
}

.avatar-link.ring-fx-infinity-sparkles::before {
  background: conic-gradient(from 0deg, #8dd8ff, #a6f0ff, #ffd480, #a6f0ff, #8dd8ff);
  animation: ring-spin 6s linear infinite;
}

.avatar-link.ring-fx-infinity-sparkles {
  box-shadow: 0 0 10px rgba(140, 220, 255, 0.6), 0 0 18px rgba(255, 220, 140, 0.4);
}

@keyframes ring-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ring-sparkle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ffe2a8 55%, rgba(255, 255, 255, 0) 75%);
  box-shadow: 0 0 12px rgba(255, 245, 200, 0.95);
  pointer-events: none;
  z-index: 3;
  animation: ring-sparkle-fly 900ms ease-out forwards;
}

.ring-sparkle::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.nav a,
  .nav .nav-link {
    margin-left: 0;
    text-decoration: none;
    color: #f4f6ff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

.nav .nav-link.is-active {
  background: linear-gradient(180deg, #7f8ca5, #66728a);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.nav-link-button {
  margin-left: 10px;
  text-decoration: none;
  color: #f4f6ff;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  height: 30px;
  display: inline-flex;
  align-items: center;
}

.nav-link-button-strong {
  background: linear-gradient(180deg, #6a748a, #55607a);
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 6px 12px rgba(35, 45, 65, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.nav .nav-link-button-strong {
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.nav-link-button {
  font-size: 12px;
}

.nav-toggle {
  display: none;
  background: linear-gradient(180deg, #6a748a, #55607a);
  color: #f3f5fb;
  border: 1px solid rgba(0, 0, 0, 0.25);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 12px rgba(35, 45, 65, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 60vh;
  background: linear-gradient(180deg, #f3f5fb, #e3e6f1);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 34px;
  margin: 0 0 12px;
}

.hero p {
  font-size: 16px;
  color: var(--muted);
}

.cta {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  background: linear-gradient(180deg, #7fa0d9, #5c7bbd);
  color: #f9fbff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  position: relative;
  overflow: hidden;
}

.btn.qr-login::before {
  content: "";
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-right: 8px;
  background: url("/static/icons/qr-icon.svg") no-repeat center / contain;
}

.btn.logout {
  background: linear-gradient(180deg, #cf6a73, #b14f58);
  color: #fff;
  border: 1px solid rgba(120, 25, 35, 0.35);
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(50, 20, 25, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  text-transform: none;
  letter-spacing: 0.2px;
  padding: 10px 18px 10px 16px;
  gap: 10px;
}

.btn.logout::before {
  content: none;
}

.btn.logout:hover {
  filter: brightness(1.05);
}

.btn.logout:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(50, 20, 25, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn.subtle {
  background: linear-gradient(180deg, #f1f3fa, #dfe4f1);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: var(--inner-shadow);
}

.btn.success {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 85%, #ffffff), var(--accent-2));
  border: 1px solid rgba(40, 80, 40, 0.35);
  color: #f7fff7;
}

.cta-dashboard {
  order: 3;
  flex: 0 0 100%;
  justify-content: flex-start;
  text-align: left;
}

.btn.subtle.danger {
  background: linear-gradient(180deg, #f6d8d8, #e7b9b9);
  color: #7a1e1e;
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

.btn.image-select {
background: linear-gradient(180deg, var(--action-blue-top), var(--action-blue-bottom));
  color: #fff;
  border: 1px solid var(--action-blue-border);
  border-radius: 10px;
  text-transform: none;
  letter-spacing: 0.2px;
  padding: 9px 18px 9px 14px;
  box-shadow: 0 5px 12px rgba(60, 70, 90, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  gap: 10px;
}

.btn.image-select::before {
  content: "";
  width: 3em;
  height: 3em;
  background-image: url("/static/icons/kamera-icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  padding: -10px;
  flex: 0 0 auto;
}

.btn.image-select:hover {
  filter: brightness(1.03);
}

.btn.image-select:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(70, 80, 100, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn.ghost {
  background: linear-gradient(180deg, #f6f7fc, #e0e4f0);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hold-btn.holding::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.65));
  animation: hold-fill var(--hold-duration, 2000ms) linear forwards;
}

@keyframes hold-fill {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0%); }
}

.card {
  background: linear-gradient(180deg, #f7f8fd, #e8ebf4);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 6px 16px rgba(40, 45, 70, 0.14);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card.blur-fade {
  position: relative;
  border-radius: 18px;
  padding: 18px;
  background: rgba(20, 22, 34, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.card.blur-fade::before {
  content: "";
  position: absolute;
  inset: -28px;
  border-radius: 28px;
  background: rgba(90, 140, 255, 0.35);
  filter: blur(26px);
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 75%);
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 75%);
  z-index: -1;
}

.card .card-head {
  background: linear-gradient(180deg, var(--action-blue-top), var(--action-blue-bottom));
  border: 1px solid var(--action-blue-border);
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -18px -18px 12px;
  padding: 10px 16px;
  box-shadow: 0 3px 8px rgba(60, 70, 90, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #fff;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card .card-head h2,
.card .card-head h3 {
  margin: 0;
  color: inherit;
  text-shadow: 0 1px 2px rgba(40, 50, 70, 0.35);
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.form-card {
  max-width: 520px;
  margin: 0 auto;
}

.section-block {
  max-width: 520px;
  margin: 0 auto 12px;
  width: 100%;
}

.section-block h2 {
  margin: 0;
}

.card-head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.card-head-actions .btn {
  margin: 0;
}

.settings-actions {
  max-width: 520px;
  margin: 14px auto 24px;
  width: 100%;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.settings-footer-actions {
  max-width: 520px;
  margin: 14px auto 24px;
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.settings-footer-actions > * {
  flex: 1 1 0;
}

.settings-footer-actions .logout-form {
  margin: 0;
  width: 100%;
}

.settings-footer-actions .btn {
  width: 100%;
}

.settings-footer-actions .hold-btn {
  width: 100%;
  max-width: none;
  margin: 0;
}

.settings-footer-actions .btn.logout {
  text-transform: none;
  letter-spacing: 0.2px;
}

@media (max-width: 720px) {
  .settings-footer-actions {
    flex-direction: column;
  }
}

.invite-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.invite-item {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.invite-link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.invite-link-row .btn {
  height: 38px;
  white-space: nowrap;
}

.invite-qr {
  display: block;
  width: 200px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--inner-shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin: 10px auto 0;
}

.invite-qr:not([src]) {
  display: none;
}

.invite-expires {
  text-align: center;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.form-header h2 {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.dashboard-grid {
  margin-top: 10px;
}

.public-dashboard .row.space-between {
  align-items: flex-end;
  margin-top: -20px;
  margin-bottom: -20px;
}

.public-dashboard-view .app-header .brand-avatar {
  display: none;
}

.child-columns {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.child-column {
  display: grid;
  grid-template-rows: auto 1fr 1fr;
  gap: 14px;
  height: 100%;
}

.child-card,
.child-section-card {
  padding: 14px;
}

.child-section-card {
  height: 100%;
}

.child-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.child-head .coin-count {
  margin-left: auto;
  font-size: 24px;
}

.child-head .coin {
  width: 32px;
  height: 32px;
}

.child-avatar {
  transform: none;
  width: 64px;
  height: 64px;
  border-width: 4px;
  flex-shrink: 0;
}

.child-avatar .avatar-placeholder,
.child-avatar img {
  width: 56px;
  height: 56px;
}

.child-name {
  font-size: 18px;
  font-weight: 700;
}

.child-section h4 {
  margin: 0 0 8px;
}

.child-task-list li {
  padding: 8px 10px;
}

.child-task {
  align-items: center;
}

.child-task-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.child-task-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.child-task-time {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.child-task-complete .child-task-main,
.child-task-complete .coin-count {
  filter: grayscale(1);
  opacity: 0.7;
}

.child-task-status {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.child-task-status-button {
  background: none;
  padding: 0;
  cursor: pointer;
}

.child-task-check {
  width: 9px;
  height: 14px;
  border-right: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transform: rotate(45deg);
}

.child-task-status.is-done {
  border-color: #2ea84a;
}

.child-task-status.is-done .child-task-check {
  border-right-color: #2ea84a;
  border-bottom-color: #2ea84a;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title {
  margin: 8px 0 4px;
  font-size: 18px;
}

.filter-tabs {
  display: inline-flex;
  gap: 0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.5);
}

.filter-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.filter-tab + .filter-tab {
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-tab.is-active {
  background: linear-gradient(180deg, #6a748a, #55607a);
  color: #f9fbff;
}

.reward-group.is-hidden {
  display: none;
}

.day-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

  .day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  font-weight: 700;
  font-size: 18px;
  padding: 8px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--action-blue-top), var(--action-blue-bottom));
  border: 1px solid var(--action-blue-border);
  color: #fff;
    box-shadow: 0 3px 8px rgba(60, 70, 90, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 2px rgba(40, 50, 70, 0.35);
  }

  .day-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .day-date-badge {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
  }

  .day-header .coin-count {
    color: inherit;
    height: 30px;
    font-size: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  .day-meal-bar {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(227, 245, 235, 0.95), rgba(212, 238, 222, 0.95));
    border: 1px solid rgba(59, 134, 78, 0.25);
    color: #2f5841;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(40, 60, 50, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  .day-meal-bar .meal-desc {
    font-weight: 600;
    color: #2f5841;
    text-align: right;
  }

  @media (max-width: 620px) {
    .day-meal-bar .meal-label {
      display: none;
    }
  }

.mini-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  contain: layout;
  overflow: visible;
  padding-bottom: 8px;
}

@media (min-width: 620px) {
  .mini-grid {
    grid-template-columns: repeat(2, minmax(310px, 1fr));
  }
}

  @media (min-width: 1050px) {
    .mini-grid {
      grid-template-columns: repeat(3, minmax(280px, 1fr));
    }
    .reward-group .grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (min-width: 1400px) {
    .mini-grid {
      grid-template-columns: repeat(4, minmax(260px, 1fr));
    }
  }

  @media (min-width: 1750px) {
    .mini-grid {
      grid-template-columns: repeat(5, minmax(240px, 1fr));
    }
  }

.mini-card {
  background: linear-gradient(180deg, #f7f8fd, #e8ebf4);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(40, 45, 70, 0.12);
  min-height: 71px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  contain: content;
}

.mini-card.completed-week {
  background: linear-gradient(180deg, #f1f2f8, #e4e7f0);
}

.mini-card-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.mini-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-card-status {
  width: 28px;
  display: flex;
  justify-content: flex-end;
}

.mini-check {
  margin-left: auto;
}

.mini-title {
  font-weight: 700;
}

.mini-card.completed-week .mini-title,
.mini-card.completed-week .mini-meta,
.mini-card.completed-week .coin-count {
  color: #8a90a1;
}

.mini-card.completed-week .coin {
  filter: grayscale(1);
  opacity: 0.85;
}

.mini-card-form {
  margin: 0;
}

.hold-card {
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: linear-gradient(180deg, #f7f8fd, #e8ebf4);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(40, 45, 70, 0.12);
  position: relative;
  overflow: hidden;
}

.hold-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(40, 50, 70, 0.08);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 120ms ease-out;
  pointer-events: none;
}

.hold-card.holding::before {
  animation: hold-card-fill var(--hold-duration, 2000ms) linear forwards;
}

@keyframes hold-card-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hold-card:focus-visible {
  outline: 2px solid rgba(90, 140, 255, 0.6);
  outline-offset: 2px;
}

.mini-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
}

.coin-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--muted);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.child-row {
  flex-direction: column;
  align-items: stretch;
}

.child-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
}

.child-row-top .coin-count {
  justify-content: flex-end;
  text-align: right;
}

.child-row-top strong {
  margin-right: auto;
}

.child-row-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 721px) {
  .child-row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .child-row-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

.child-row-actions form,
.child-row-actions button {
  width: 100%;
}

.child-row-actions .btn {
  width: 100%;
  justify-content: center;
}

label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #c8cddb;
  font-size: 14px;
  background: #fafbff;
  box-shadow: var(--inner-shadow);
}

input[type="color"] {
  padding: 4px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  appearance: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

fieldset {
  border: 1px dashed #c5c9d8;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
  font-weight: 500;
}

.checkbox input[type="checkbox"] {
  width: 24px;
  height: 24px;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 50%;
  border: 2px solid #c7cddd;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ffffff, #e9edf7);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.85), 0 2px 5px rgba(40, 45, 70, 0.18);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.checkbox input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 14px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  transform-origin: center;
  left: 50%;
  top: 46%;
}

.checkbox input[type="checkbox"]:checked {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #ffffff), var(--accent));
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.6), 0 3px 6px rgba(40, 45, 70, 0.2);
  border-color: var(--accent);
}

.checkbox input[type="checkbox"]:checked::after {
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

.checkbox input[type="checkbox"]:active {
  transform: scale(0.95);
}

.flash {
  background: #f6f1d6;
  border: 1px solid #e3d2a8;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: var(--inner-shadow);
}

.muted {
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row.space-between {
  justify-content: space-between;
}

.row.center {
  justify-content: center;
}

.pill {
  background: linear-gradient(180deg, #f6f7fd, #e2e6f2);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--inner-shadow);
}

.link {
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

.link.danger {
  color: #a33a3a;
}

.complete-burst {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

.complete-burst.active {
  opacity: 1;
}

.burst-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 5px solid rgba(255, 210, 120, 0.95);
  box-shadow: 0 0 60px rgba(255, 210, 120, 0.95);
  animation: burst-ring 1s ease-out forwards;
}

.burst-sparkles {
  position: absolute;
  inset: 0;
}

.burst-sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #fff9e1 0%, #ffd56b 55%, #f0a81c 100%);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 210, 110, 1);
  animation: burst-sparkle 1s ease-out forwards;
}

.burst-sparkle:nth-child(1) { --sx: 0px; --sy: -80px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(2) { --sx: 90px; --sy: -70px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(3) { --sx: 120px; --sy: 0px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(4) { --sx: 90px; --sy: 70px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(5) { --sx: 0px; --sy: 120px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(6) { --sx: -90px; --sy: 70px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(7) { --sx: -120px; --sy: 0px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(8) { --sx: -90px; --sy: -70px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(9) { --sx: 60px; --sy: -130px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(10) { --sx: -60px; --sy: 130px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(11) { --sx: 130px; --sy: -20px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(12) { --sx: -130px; --sy: 20px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(13) { --sx: 30px; --sy: -140px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(14) { --sx: -30px; --sy: 140px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(15) { --sx: 110px; --sy: 90px; top: 50%; left: 50%; }
.burst-sparkle:nth-child(16) { --sx: -110px; --sy: -90px; top: 50%; left: 50%; }

@keyframes burst-ring {
  0% { transform: scale(0.35); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes burst-sparkle {
  0% { transform: translate(0, 0) scale(0.8); opacity: 1; }
  100% { transform: translate(var(--sx), var(--sy)) scale(1.8); opacity: 0; }
}

.task-card-flat.complete-pop {
  animation: card-pop 0.45s ease-out;
}

@keyframes card-pop {
  0% { transform: scale(1); }
  35% { transform: scale(0.95); }
  75% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

.task-card {
  display: none;
  grid-template-columns: 1fr;
  gap: 16px;
  background: linear-gradient(180deg, #f7f8fd, #e8ebf4);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.task-card-flat {
  display: grid;
  gap: 12px;
  box-shadow: 0 6px 16px rgba(40, 45, 70, 0.14);
  padding: 18px;
  border-radius: var(--radius);
  width: 100%;
  contain: content;
  position: relative;
}

.task-list {
  display: grid;
  gap: 18px;
  width: 100%;
  justify-content: stretch;
  justify-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1050px) {
  .task-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.task-completed {
  opacity: 0.55;
}

.task-card.active {
  display: grid;
}

.task-media img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  max-height: 220px;
  box-shadow: var(--inner-shadow);
}

.reward-media img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  max-height: 110px;
  box-shadow: var(--inner-shadow);
}

.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-card .task-head,
.task-card-flat .task-head {
  background: linear-gradient(180deg, var(--action-blue-top), var(--action-blue-bottom));
  border: 1px solid var(--action-blue-border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 10px 16px;
  box-shadow: 0 3px 8px rgba(60, 70, 90, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #fff;
}

.task-card-flat .task-head,
.task-card .task-head {
  margin: -18px -18px 12px;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.task-card .task-head h3,
.task-card-flat .task-head h3 {
  color: inherit;
  text-shadow: 0 1px 2px rgba(40, 50, 70, 0.35);
}

.task-card .task-head .coin-count,
.task-card-flat .task-head .coin-count {
  color: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.task-head h3 {
  margin: 0;
}

.task-body h3 {
  margin-top: 0;
}

.meta {
  display: flex;
  gap: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.coins {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

.coins.small .coin {
  font-size: 12px;
}

.coin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: transparent;
  background-image: url("/static/icons/Coin.svg");
  background-size: 140%;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(40, 45, 70, 0.18);
  font-size: 10px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  filter: grayscale(1) brightness(1.05);
  opacity: 0.45;
}

.coin.filled {
  border-color: rgba(140, 95, 20, 0.6);
  box-shadow: 0 2px 6px rgba(176, 135, 46, 0.35);
  filter: none;
  opacity: 1;
}

.coin::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  top: 12%;
  left: 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  opacity: 0.7;
}

.coin.sparkle::after {
  animation: coin-glint 0.6s ease-out;
}

.coin.sparkle {
  animation: coin-pop 0.4s ease-out;
}

.coin-sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #fff9d9, #f6cf67 55%, #d6a43a 100%);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkle-fly 900ms ease-out forwards;
  box-shadow: 0 0 10px rgba(242, 193, 79, 1);
}

.coin-sparkle::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  opacity: 0.7;
}

@keyframes coin-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes coin-glint {
  0% { opacity: 0; transform: translateX(-10%) scale(0.6); }
  50% { opacity: 0.9; transform: translateX(10%) scale(1); }
  100% { opacity: 0; transform: translateX(30%) scale(0.6); }
}

@keyframes sparkle-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--sparkle-x), var(--sparkle-y)) scale(0.3); opacity: 0; }
}

@keyframes ring-sparkle-fly {
  0% { transform: translate(var(--sparkle-x), var(--sparkle-y)) scale(1.15); opacity: 0.95; }
  100% { transform: translate(0, 0) scale(0.35); opacity: 0.2; }
}

.coin-picker .label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 8px;
}

.coin-picker .coin {
  width: 24px;
  height: 24px;
}

.coin-picker .coins {
  gap: 6px;
  width: 100%;
  justify-content: space-between;
}

.coin-fieldset,
fieldset {
  text-align: center;
}

.coin-picker .label-row,
fieldset .checkbox {
  justify-content: center;
}

.coin-picker .label-row {
  gap: 8px;
}

.file-control.bottom-upload {
  align-items: flex-end;
  width: 100%;
}

.task-image-preview {
  display: flex;
  justify-content: center;
  width: 100%;
  align-self: stretch;
}

.task-image-preview img {
  margin: 0 auto;
}

.image-picker {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.image-option {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.6);
  padding: 8px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.image-option img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

.image-option .image-placeholder {
  font-weight: 600;
  color: var(--muted);
}

.image-option.selected,
.image-option:focus-visible {
  outline: 2px solid #8aa1d6;
  border-radius: 10px;
}

.image-choice {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-preview {
  min-height: 60px;
  display: flex;
  align-items: center;
}

.image-preview img {
  max-height: 80px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(40, 45, 70, 0.18);
}

.image-modal {
  width: min(720px, 94vw);
}

.score {
  font-size: 42px;
  font-weight: 700;
  color: #2f3951;
}

.score .coin {
  width: 56px;
  height: 56px;
}

.file input {
  margin-top: 8px;
}

.hold-btn {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: flex;
}

.file-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.file-control.inline {
  margin-bottom: 0;
}

.task-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

.task-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  height: var(--card-button-height);
}

.task-actions .hold-btn {
  margin: 0;
}

.file-control.bottom-upload {
  flex-direction: column;
  align-items: flex-start;
}

.file-control input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-label {
  cursor: pointer;
}

.file-control input[disabled] + .file-label {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.profile-actions .btn {
  min-width: 140px;
  height: var(--card-button-height);
}

.ring-preview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.ring-preview .avatar-link {
  transform: none;
  width: 54px;
  height: 54px;
  border-width: 3px;
}

.ring-preview .avatar-placeholder {
  width: 46px;
  height: 46px;
}

.reward-effect {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reward-effect-inline {
  margin: 0 auto;
}

.reward-meta .row {
  justify-content: space-between;
}

.reward-ring-preview.avatar-link {
  transform: none;
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.reward-ring-preview .avatar-placeholder {
  width: 32px;
  height: 32px;
}

.reward-ring-muted {
  --ring-color: #c8cfde;
  filter: grayscale(1);
}

.reward-claimed {
  opacity: 0.55;
}

.reward-card {
  padding: 12px;
}

.task-meta-row {
  align-items: center;
  width: 100%;
  gap: 12px;
}

.task-meta-row .row {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.reward-card .card-head {
  margin: -12px -12px 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reward-head .coin-count {
  color: #eef2ff;
  font-weight: 700;
}

.task-form-actions {
  justify-content: flex-end;
  gap: 10px;
}

.task-form-actions .btn {
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.reward-card p {
  margin: 6px 0 8px;
}

.reward-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.reward-meta .row {
  flex: 1 1 auto;
  gap: 8px;
}

.reward-bottom {
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.reward-claim {
  margin-left: auto;
}

.reward-claim .hold-btn {
  width: auto;
  max-width: none;
  height: var(--card-button-height);
  margin: 0;
}

.edit-btn {
  min-width: 110px;
}
.avatar-preview img {
  width: 120px;
  height: 120px;
  margin-top: 15px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
}

.task-image-preview img {
  width: 100%;
  max-width: 320px;
  border-radius: 14px;
  box-shadow: var(--inner-shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 32, 45, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: linear-gradient(180deg, #f7f8fd, #e6e9f3);
  border-radius: var(--radius);
  padding: 20px;
  width: min(420px, 90vw);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.quick-login-modal {
  width: min(360px, 92vw);
}

.quick-login-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.quick-login-qr {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--inner-shadow);
}

.qr-scan-modal {
  width: min(420px, 92vw);
}

.qr-scan-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qr-scan-video {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #0d111b;
  box-shadow: var(--inner-shadow);
}

@media (max-width: 720px) {
  body {
    overflow: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hero h1 {
    font-size: 34px;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    min-width: 150px;
    font-size: 14px;
    text-transform: uppercase;
    text-align: right;
  }
  .nav-toggle::after {
    content: "";
    font-size: 12px;
    letter-spacing: 1px;
  }
  .app-header .nav {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + 8px);
    right: 20px;
    left: auto;
    transform: none;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    margin-left: 0;
    overflow: visible;
    z-index: 11;
    padding: 3px 3px 15px 15px;
    background: transparent;
    border-radius: 22px;
  }
  .app-header .nav::before {
    content: "";
    position: absolute;
    inset: -15px;
    border-radius: 20px;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(4px);
    filter: blur(1px);
    z-index: -1;
    pointer-events: none;
  }
  .app-header .nav a {
    margin-left: 0;
    padding: 10px 18px;
    font-size: 14px;
    flex: 0 0 auto;
    background: linear-gradient(180deg, #6a748a, #55607a);
    border: 1px solid rgba(0, 0, 0, 0.25);
    min-width: 150px;
    text-align: right;
    text-transform: uppercase;
    box-shadow: 0 6px 12px rgba(35, 45, 65, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  .app-header .nav .nav-link-button {
    min-width: 150px;
    padding: 10px 18px;
    font-size: 14px;
    text-transform: uppercase;
    justify-content: flex-end;
    background: linear-gradient(180deg, #6a748a, #55607a);
    border: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 12px rgba(35, 45, 65, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    height: 38px;
  }

.qr-scan-button {
  color: #f4f6ff;
  gap: 8px;
  justify-content: center;
}

  .qr-scan-button::before {
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    background: url("/static/icons/qr-icon.svg") no-repeat center / contain;
    filter: brightness(0) invert(1);
  }

  .app-header .nav .qr-scan-button {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    padding: 6px 12px;
    height: auto;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }

  .sticky-qr-button {
    display: none !important;
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 9;
    min-width: 220px;
    max-width: min(360px, 90vw);
    width: 80vw;
    height: var(--card-button-height);
    border-radius: 999px;
    justify-content: center;
    gap: 8px;
  }

  .sticky-qr-button::before {
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    background: url("/static/icons/qr-icon.svg") no-repeat center / contain;
    filter: brightness(0) invert(1);
  }

  .dashboard-grid .card,
  .dashboard-grid .link-card {
    display: flex;
    flex-direction: column;
  }

  .dashboard-grid .card-action {
    margin-top: auto;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .app-header .nav a:active {
    transform: translateY(1px) scale(0.98);
  }
  .app-header.is-mobile-nav-open .nav {
    display: flex;
  }
    .app-header.is-mobile-nav-open .nav > * {
    animation: nav-roll-in 220ms ease-out both, nav-pop 300ms ease-out both;
    }
    .app-header.is-mobile-nav-open .nav > *:nth-child(1) { animation-delay: 0ms; }
    .app-header.is-mobile-nav-open .nav > *:nth-child(2) { animation-delay: 40ms; }
    .app-header.is-mobile-nav-open .nav > *:nth-child(3) { animation-delay: 80ms; }
    .app-header.is-mobile-nav-open .nav > *:nth-child(4) { animation-delay: 120ms; }
    .app-header.is-mobile-nav-open .nav > *:nth-child(5) { animation-delay: 160ms; }
    .app-header.is-mobile-nav-open .nav > *:nth-child(6) { animation-delay: 200ms; }
  .app-header.is-mobile-nav-closing .nav {
    display: flex;
  }
    .app-header.is-mobile-nav-closing .nav > * {
    animation: nav-roll-out 180ms ease-in both, nav-pop-out 220ms ease-in both;
    }
    .app-header.is-mobile-nav-closing .nav > *:nth-child(1) { animation-delay: 0ms; }
    .app-header.is-mobile-nav-closing .nav > *:nth-child(2) { animation-delay: 30ms; }
    .app-header.is-mobile-nav-closing .nav > *:nth-child(3) { animation-delay: 60ms; }
    .app-header.is-mobile-nav-closing .nav > *:nth-child(4) { animation-delay: 90ms; }
    .app-header.is-mobile-nav-closing .nav > *:nth-child(5) { animation-delay: 120ms; }
    .app-header.is-mobile-nav-closing .nav > *:nth-child(6) { animation-delay: 150ms; }

    .sticky-qr-button {
      display: inline-flex !important;
    }
  .container {
    padding-bottom: calc(24px + env(safe-area-inset-bottom) + 72px);
    background: transparent;
    height: auto;
    overflow: visible;
  }
}

@keyframes nav-roll-in {
  0% {
    opacity: 0;
    transform: translateY(-10px) rotateX(25deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes nav-roll-out {
  0% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) rotateX(20deg);
  }
}

@keyframes nav-pop {
  0% { transform: scale(0.94); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes nav-pop-out {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(0.92); }
}

.sticky-qr-button {
  display: none !important;
}

@media (max-width: 720px) {
  .sticky-qr-button {
    display: inline-flex !important;
  }
}
