:root {
  --bg: #0b0c0e;
  --bg-2: #111317;
  --card: #17191e;
  --card-2: #1d2026;
  --ink: #f4f0e6;
  --muted: #8d8880;
  --stroke: rgba(244, 240, 230, 0.08);
  --accent: #d6ff4a;
  --accent-ink: #11130c;
  --danger: #ff7a6e;
  --pad-x: 1.2rem;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-right: env(safe-area-inset-right, 0px);
  --app-safe-left: env(safe-area-inset-left, 0px);
  --r: 1.25rem;
  --ui: -apple-system, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

html,
body {
  min-height: 100%;
  min-height: 100svh;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(90rem 36rem at 50% -18%, rgba(214, 255, 74, 0.09), transparent 58%),
    radial-gradient(40rem 24rem at 100% 100%, rgba(214, 255, 74, 0.04), transparent 48%);
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding-top: max(2rem, env(safe-area-inset-top));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  color: var(--ink);
}

.brand-logo img {
  width: 2.7rem;
  height: 2.7rem;
}

.brand-logo span {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0 0 1.8rem;
  font-size: clamp(2.1rem, 8vw, 3rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.auth {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.auth label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1.08rem;
  text-transform: none;
  letter-spacing: 0;
  -webkit-appearance: none;
  appearance: none;
}

.auth input:focus {
  outline: 2px solid rgba(214, 255, 74, 0.7);
  outline-offset: 0;
  border-color: transparent;
}

.auth-hint,
.auth-msg {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.auth-hint {
  color: var(--muted);
}

.auth-msg {
  color: var(--danger);
}

.auth-switch {
  margin-top: 1.1rem;
}

.user-card,
.btn,
.pick,
.count-card,
.tab,
.slot-move button,
.burger,
.client-card,
.invite-box,
.account-action,
.text-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.user-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.95rem;
  width: 100%;
  min-height: 4.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  background: var(--card);
  color: inherit;
  text-decoration: none;
}

.user-card.is-off {
  opacity: 0.42;
}

.avatar {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1.05rem;
}

.user-card.is-off .avatar {
  background: var(--card-2);
  color: var(--muted);
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-meta strong {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.user-meta small {
  color: var(--muted);
  font-size: 0.82rem;
}

.chev {
  color: var(--muted);
  font-size: 1.1rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.15rem;
  padding: 0.9rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  text-decoration: none;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.985);
}

.btn--disabled {
  background: var(--card);
  color: var(--muted);
  cursor: not-allowed;
}

body.menu-open {
  overflow: hidden;
}

main.log {
  justify-content: flex-start;
  padding-top: 0;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 calc(-1 * max(var(--pad-x), var(--app-safe-right))) 1.1rem calc(-1 * max(var(--pad-x), var(--app-safe-left)));
  padding: calc(var(--app-safe-top) + 0.7rem) max(var(--pad-x), var(--app-safe-right)) 0.75rem max(var(--pad-x), var(--app-safe-left));
  background: rgba(11, 12, 14, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar h1 {
  flex: 1;
  margin: 0;
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.topbar-logo {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.52rem;
}

.notification-bell {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.notification-bell svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell.has-unread {
  border-color: rgba(214, 255, 74, 0.45);
}

.notification-bell i {
  position: absolute;
  top: -0.18rem;
  right: -0.18rem;
  display: grid;
  place-items: center;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.2rem;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
}

.notification-bell i[hidden] {
  display: none;
}

.burger {
  flex: none;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 0.95rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

body.menu-open .burger {
  background: var(--accent);
}

body.menu-open .burger span {
  background: var(--accent-ink);
}

body.menu-open .burger span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

body.menu-open .burger span:nth-child(2) {
  opacity: 0;
}

body.menu-open .burger span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.15rem;
  background: #08090b;
  padding-top: max(5.5rem, env(safe-area-inset-top));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
  padding-bottom: max(2.2rem, env(safe-area-inset-bottom));
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}

.drawer-brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.drawer-brand span {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.drawer-label {
  margin: 0 auto 1.4rem 0;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-link {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  width: 100%;
  padding: 0.72rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: clamp(1.7rem, 7vw, 2.15rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 1.15;
  cursor: pointer;
}

#shell {
  position: relative;
  z-index: 1;
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 40vh;
}

#gate[hidden],
#shell[hidden] {
  display: none !important;
}

.drawer-link[hidden] {
  display: none;
}

.drawer-link.has-unread::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.45rem;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 0 3px #08090b;
  align-self: center;
  flex: none;
}

.drawer-link span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  min-width: 1.4rem;
}

.drawer-close {
  margin-top: 1.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.lede {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.empty {
  padding: 1.2rem 0 0.4rem;
}

.empty-kicker {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.empty h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.status {
  position: fixed;
  left: 50%;
  bottom: max(1.15rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  margin: 0;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status[hidden] {
  display: none !important;
}

.notifications-wrap {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(4.5rem, env(safe-area-inset-top)) max(var(--pad-x), env(safe-area-inset-right)) 1.5rem;
  background: rgba(5, 6, 7, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.notifications-wrap[hidden] {
  display: none !important;
}

.notifications-panel {
  width: 100%;
  max-width: 40rem;
  max-height: calc(100dvh - 6rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1.35rem;
  background: var(--bg-2);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.45);
}

.notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.notifications-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.notifications-head button {
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  cursor: pointer;
}

.notification-item {
  margin-bottom: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
}

.notification-item.is-unread {
  border-color: rgba(214, 255, 74, 0.35);
}

.notification-item p {
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.notification-item time {
  color: var(--muted);
  font-size: 0.72rem;
}

.picks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pick,
.count-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.95rem;
  width: 100%;
  min-height: 5.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--stroke);
  border-radius: 1.35rem;
  background: var(--card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pick:active,
.count-card:active {
  transform: scale(0.985);
}

.pick-num {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 2.1rem;
}

.pick-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pick-title {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.pick-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.pick .chev {
  color: var(--ink);
  opacity: 0.45;
}

.pick--done {
  background: #23281a;
  border-color: rgba(214, 255, 74, 0.28);
}

.pick--live .pick-meta {
  color: var(--accent);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.btn-finish {
  margin-top: 0.35rem;
  position: sticky;
  bottom: max(0.8rem, env(safe-area-inset-bottom));
}

.btn-cancel-workout {
  display: block;
  width: 100%;
  margin: 0.7rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 122, 110, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}

.workout-start {
  padding: 1.25rem;
  border: 1px solid var(--stroke);
  border-radius: 1.35rem;
  background: var(--card);
}

.workout-start h2 {
  margin: 0 0 0.7rem;
  font-size: 1.45rem;
  line-height: 1.15;
}

.workout-start .btn {
  margin-top: 0.35rem;
}

.workout-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(214, 255, 74, 0.24);
  border-radius: 1rem;
  background: #20251a;
  color: var(--accent);
  font-size: 0.82rem;
}

.workout-clock b {
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.workout-mode-head,
.workout-final-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.2rem;
  margin-bottom: 0.65rem;
}

.workout-mode-head .text-btn,
.workout-final-actions .text-btn {
  margin: 0;
}

.workout-mode-head > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.workout-step-progress {
  position: relative;
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.8rem;
  padding: 0.75rem 0.9rem 0.9rem;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
}

.workout-step-progress span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workout-step-progress b {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-step-progress i {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--accent);
}

.workout-overview {
  display: grid;
  gap: 0.38rem;
}

.workout-overview-row {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--stroke);
  border-radius: 0.85rem;
  background: var(--card);
}

.workout-overview-row > i {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 750;
}

.workout-overview-row > div {
  display: grid;
  gap: 0.18rem;
}

.workout-overview-row span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.workout-overview-row b {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-overview-row small {
  flex: none;
  color: var(--muted);
  font-size: 0.66rem;
}

.workout-overview-row.is-current {
  border-color: rgba(214, 255, 74, 0.32);
}

.workout-overview-row.is-done > i {
  background: var(--accent);
  color: var(--accent-ink);
}

.workout-step-complete {
  padding: 1.15rem;
  border: 1px solid var(--stroke);
  border-radius: 1.35rem;
  background: var(--card);
}

.workout-step-complete h2 {
  margin: 0 0 0.65rem;
  font-size: 1.4rem;
}

.feel {
  margin: 0 0 1.15rem;
  padding: 1rem;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--stroke);
}

.diffs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.diff {
  display: flex;
  cursor: pointer;
}

.diff input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feel--ex {
  margin: 0.9rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.diff span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  min-height: 2.7rem;
  padding: 0.4rem 0.2rem;
  border-radius: 1rem;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.diff span i {
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1;
}

.diff input:checked + span {
  background: var(--accent);
  color: var(--accent-ink);
}

.ex,
.stat,
.editor-day,
.cat,
.superset {
  margin: 0 0 0.85rem;
  padding: 1.05rem 1.05rem 1.1rem;
  border-radius: 1.35rem;
  background: var(--card);
  border: 1px solid var(--stroke);
}

.ex h3,
.stat h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.ex-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.35rem;
}

.sets {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.ex--skip {
  opacity: 0.5;
}

.weight-hero {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0.55rem 0 0.35rem;
}

.weight-hero b {
  font-size: 2.55rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.weight-hero span {
  color: var(--muted);
  font-size: 0.95rem;
}

.recommendation-label {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.suggest {
  margin: 0;
  display: none;
}

.kg-work {
  margin: 0.7rem 0 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.kg input,
.slot-nums input,
.day-title-input,
.note-label input,
.cat input,
.cat select,
.slot select,
.set-row input {
  border: 1px solid var(--stroke);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  border-radius: 0.85rem;
  -webkit-appearance: none;
  appearance: none;
}

.kg input {
  width: 5.4rem;
  height: 2.85rem;
  padding: 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 650;
  text-align: center;
}

.kg input:focus,
.set-row input:focus,
.day-title-input:focus,
.cat input:not([type="checkbox"]):focus,
.cat select:focus,
.slot select:focus,
.slot-nums input:focus,
.note-label input:focus {
  outline: 2px solid rgba(214, 255, 74, 0.7);
  outline-offset: 0;
  border-color: transparent;
}

.block-label {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.84rem;
  line-height: 1.4;
}

.history,
.warmup,
.today-box {
  margin: 0.7rem 0 0;
}

.history ul,
.warmup ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history li,
.warmup li {
  margin: 0;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 0.8rem;
  color: var(--ink);
}

.set-row {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.45rem 0.5rem;
  align-items: start;
  margin: 0 0 0.85rem;
}

.set-n {
  color: var(--muted);
  padding-top: 1.55rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.set-body {
  display: grid;
  gap: 0.4rem;
}

.set-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.set-row label {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.set-row input {
  width: 100%;
  max-width: none;
  height: 2.7rem;
  padding: 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 650;
  text-align: center;
}

.set-row.is-filled input {
  background: #22280f;
  border-color: rgba(214, 255, 74, 0.35);
  color: var(--ink);
}

.rir-q {
  margin: 0.15rem 0 0;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rir-picks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.28rem;
}

.rir-picks .diff span {
  min-height: 2.5rem;
  font-size: 0.92rem;
}

.superset {
  padding-top: 0.9rem;
}

.superset-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.superset .ex {
  margin: 0.75rem 0 0;
  background: var(--bg-2);
}

.day-note {
  margin: 0.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat {
  display: grid;
  gap: 0.25rem;
}

.stat-weight {
  margin: 0.15rem 0 0.1rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.stat-weight span {
  margin-left: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  height: 2.4rem;
  margin-top: 0.55rem;
}

.bars i {
  display: block;
  flex: 1;
  min-height: 18%;
  border-radius: 999px 999px 4px 4px;
  background: var(--accent);
  font-style: normal;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--stroke);
}

.tab {
  min-height: 2.45rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
}

.tab.is-on {
  background: var(--accent);
  color: var(--accent-ink);
}

.calendar {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1.35rem;
  background: var(--card);
}

.calendar-head {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.calendar-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  text-align: center;
  text-transform: capitalize;
}

.calendar-nav {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.32rem;
}

.calendar-weekdays {
  margin-bottom: 0.42rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  text-align: center;
}

.calendar-day,
.calendar-empty {
  aspect-ratio: 1;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.calendar-day.is-live {
  background: #c9a83a;
  color: #17140a;
}

.calendar-day.is-done {
  background: var(--accent);
  color: var(--accent-ink);
}

.calendar-day.is-missed {
  background: var(--danger);
  color: #1a0d0c;
}

.calendar-day.is-planned {
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.calendar-day.is-planned.is-selected {
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 2px var(--card), 0 0 0 4px var(--ink);
}

.calendar-day.is-today {
  border-color: rgba(244, 240, 230, 0.5);
}

.calendar-day.is-selected {
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.calendar-legend i {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
}

.calendar-legend i.done {
  background: var(--accent);
}

.calendar-legend i.live {
  background: #c9a83a;
}

.calendar-legend i.missed {
  background: var(--danger);
}

.calendar-legend i.planned {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.history-day > h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 650;
  text-transform: capitalize;
}

.history-card {
  margin-bottom: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  background: var(--card);
}

.history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.history-card h3 {
  margin: 0;
  font-size: 1rem;
}

.history-card-head span {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
}

.history-card-head span.done {
  color: var(--accent);
}

.history-card-head span.live {
  color: #e5c34f;
}

.history-card-head span.missed {
  color: var(--danger);
}

.history-duration {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.history-card ul {
  display: grid;
  gap: 0.65rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.history-card li {
  display: grid;
  gap: 0.15rem;
}

.history-card li b {
  font-size: 0.9rem;
}

.history-card li span {
  color: var(--muted);
  font-size: 0.78rem;
}

.editor-day {
  padding-bottom: 1rem;
}

.day-title-input,
.note-label input,
.cat input,
.cat select,
.slot select,
.slot-nums input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0 0.7rem;
}

.day-title-input {
  font-size: 1.05rem;
  font-weight: 650;
}

.note-label {
  display: block;
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.note-label input {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
}

.slot,
.editor-ss {
  margin: 0 0 0.7rem;
  padding: 0.8rem 0.8rem 0.75rem;
  border-radius: 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--stroke);
}

.slot-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.slot-head select,
.slot-head .day-title-input {
  flex: 1;
}

.exercise-picker {
  position: relative;
  flex: 1;
  min-width: 0;
}

.exercise-picker.is-open {
  z-index: 35;
}

.exercise-picker-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.7rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--stroke);
  border-radius: 0.85rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.exercise-picker-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exercise-picker-trigger i {
  color: var(--muted);
  font-size: 1.1rem;
  font-style: normal;
  transition: transform 0.16s ease;
}

.exercise-picker.is-open .exercise-picker-trigger {
  border-color: rgba(214, 255, 74, 0.42);
}

.exercise-picker.is-open .exercise-picker-trigger i {
  transform: rotate(180deg);
}

.exercise-picker-panel {
  position: absolute;
  top: calc(100% + 0.42rem);
  left: 0;
  width: min(28rem, calc(100vw - 3.2rem));
  padding: 0.55rem;
  border: 1px solid rgba(214, 255, 74, 0.22);
  border-radius: 1rem;
  background: #15181c;
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.5);
}

.exercise-picker-panel[hidden] {
  display: none !important;
}

.exercise-search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0 0.7rem;
  border: 1px solid var(--stroke);
  border-radius: 0.8rem;
  background: var(--bg);
  color: var(--muted);
}

.exercise-search input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.exercise-options {
  display: grid;
  gap: 0.32rem;
  max-height: 17rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.exercise-option {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.72rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.78rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.exercise-option:hover,
.exercise-option:focus-visible {
  background: var(--card);
  outline: none;
}

.exercise-option.is-selected {
  border-color: rgba(214, 255, 74, 0.28);
  background: #20251a;
}

.exercise-option span {
  font-size: 0.9rem;
  font-weight: 650;
}

.exercise-option small {
  color: var(--muted);
  font-size: 0.7rem;
}

.exercise-empty {
  margin: 0;
  padding: 1rem 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.exercise-empty[hidden],
.exercise-option[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .exercise-picker-panel {
    position: fixed;
    top: auto;
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: 0.75rem;
    width: auto;
    max-height: calc(100vh - 5rem);
    max-height: calc(100dvh - 5rem);
    padding: 0.7rem;
    border-radius: 1.15rem;
  }

  .exercise-options {
    max-height: calc(100vh - 10rem);
    max-height: calc(100dvh - 10rem);
  }
}

.slot-move {
  display: flex;
  gap: 0.28rem;
}

.slot-move button {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.slot-nums {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.slot-nums label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.editor-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  margin: 0.5rem 0 0.15rem;
}

.editor-add .text-btn {
  margin: 0;
  color: var(--accent);
}

.cat {
  display: grid;
  gap: 0.45rem;
}

.catalog-section {
  margin: 1.3rem 0 2rem;
}

.catalog-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.catalog-section-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.catalog-section-head > span,
.cat-fixed-head > span {
  display: inline-grid;
  place-items: center;
  min-width: 1.8rem;
  min-height: 1.35rem;
  padding: 0 0.42rem;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.fixed-catalog-list {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.75rem;
}

.cat-fixed {
  gap: 0.2rem;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.9rem;
}

.cat-fixed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.cat-fixed-head strong {
  min-width: 0;
  font-size: 0.84rem;
}

.cat-fixed-head > span::before {
  content: "🔒";
  margin-right: 0.25rem;
  font-size: 0.58rem;
}

.cat-fixed p,
.catalog-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.catalog-empty {
  margin: 0.8rem 0;
  padding: 1rem;
  border: 1px dashed var(--stroke);
  border-radius: 1rem;
  text-align: center;
}

.account {
  max-width: 38rem;
  margin: 0 auto;
}

.account h2,
.profile-choice h2,
.profile-pending h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  letter-spacing: -0.05em;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0 1rem;
}

.account-facts > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
}

.account-facts small {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-facts strong {
  font-size: 0.92rem;
}

.account-facts > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.account-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.2rem;
}

.account-action {
  width: 100%;
  min-height: 3.1rem;
  padding: 0 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
}

.account-action:focus-visible {
  outline: 2px solid rgba(214, 255, 74, 0.7);
  outline-offset: 0;
}

.account-actions .profile-cards {
  margin-top: 0;
}

.account-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.account-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-form input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 0.9rem;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  appearance: none;
}

.account-form input:focus {
  outline: 2px solid rgba(214, 255, 74, 0.7);
  outline-offset: 0;
  border-color: transparent;
}

.account-form .btn {
  margin-top: 0.2rem;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0 1.1rem;
}

.admin-summary > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.7rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
}

.admin-summary strong {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.admin-summary span {
  color: var(--muted);
  font-size: 0.72rem;
}

.admin-search {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-search input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 0.9rem;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
}

.admin-search input:focus {
  outline: 2px solid rgba(214, 255, 74, 0.7);
  outline-offset: 0;
  border-color: transparent;
}

.admin-list {
  display: grid;
  gap: 0.75rem;
}

.admin-user {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  background: var(--card);
}

.admin-user-head h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(214, 255, 74, 0.16);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.admin-user-stats > div {
  display: grid;
  gap: 0.12rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--stroke);
  border-radius: 0.95rem;
  background: var(--bg-2);
}

.admin-user-stats small {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user-stats strong {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.admin-user-stats span {
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.admin-user-actions .danger,
.admin-user-actions .muted {
  grid-column: 1 / -1;
}

.admin-user-actions .danger {
  margin: 0;
  border-color: rgba(255, 122, 110, 0.35);
}

.admin-pass-form {
  margin-top: 0.15rem;
}

.profile-choice {
  max-width: 38rem;
  margin: 0 auto;
}

.profile-cards {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.profile-card {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  background: var(--card);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.profile-card.is-open {
  border-color: rgba(214, 255, 74, 0.42);
}

.profile-card.is-selected {
  background: #171b12;
}

.profile-card-toggle {
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 4.45rem;
  padding: 0.65rem 0.8rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-card-mark,
.profile-pending-mark {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.profile-card-mark {
  width: 2.55rem;
  height: 2.55rem;
  font-size: 1rem;
}

.profile-card-copy {
  display: grid;
  gap: 0.17rem;
  min-width: 0;
}

.profile-card-copy strong {
  font-size: 0.98rem;
}

.profile-card-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  color: var(--muted);
  font-size: 1.15rem;
  transition: transform 0.16s ease;
}

.profile-card.is-open .profile-chevron {
  transform: rotate(180deg);
}

.profile-current {
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-card-details {
  padding: 0 0.9rem 0.9rem 4.1rem;
}

.profile-card-details[hidden] {
  display: none !important;
}

.profile-card-details p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.profile-card-details .btn {
  min-height: 2.8rem;
  font-size: 0.88rem;
}

.profile-card-details .btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.profile-back {
  margin-top: 0;
}

.setup-back {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  margin: 0 0 0.85rem;
  padding: 0 0.15rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.account .btn + .setup-back,
.beginner-setup > .setup-back:last-child,
.beginner-options + .setup-back {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.profile-pending {
  display: grid;
  justify-items: center;
  max-width: 32rem;
  margin: 8vh auto 0;
  text-align: center;
}

.profile-pending-mark {
  width: 4.6rem;
  height: 4.6rem;
  margin-bottom: 1.2rem;
  font-size: 1.7rem;
}

.profile-pending .lede {
  max-width: 28rem;
}

.profile-pending-note {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-pending .btn {
  width: min(100%, 22rem);
}

.profile-logout {
  margin-top: 1rem;
}

.beginner-setup,
.beginner-home {
  max-width: 36rem;
  margin: 0 auto;
}

.beginner-setup h2,
.beginner-home h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  letter-spacing: -0.05em;
}

.beginner-progress {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  margin: 0 0 1.4rem;
}

.beginner-progress i {
  height: 3px;
  border-radius: 999px;
  background: var(--card-2);
}

.beginner-progress i.is-on {
  background: var(--accent);
}

.beginner-progress--long {
  grid-template-columns: repeat(11, minmax(0, 1fr));
}

.survey-field {
  display: grid;
  gap: 0.45rem;
  margin: 1.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.survey-field input {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 650;
}

.survey-hint {
  margin: -0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.survey-actions {
  margin-top: 1.4rem;
}

.beginner-options + .survey-actions {
  margin-top: 1.6rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--stroke);
}

.survey-actions .btn {
  width: 100%;
}

.beginner-option.is-locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.survey-sub {
  margin: 1.6rem 0 0.7rem;
  font-size: 1rem;
}

.beginner-days--seven {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.beginner-days--seven .beginner-day,
.beginner-days--seven .beginner-day:nth-child(n + 4) {
  grid-column: auto;
}

.beginner-back {
  margin-top: 0;
}

.beginner-options {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.beginner-option {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 0.8rem;
  width: 100%;
  min-height: 5rem;
  padding: 0.8rem;
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.beginner-option > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1rem;
  font-weight: 800;
}

.beginner-option strong {
  align-self: end;
  font-size: 1rem;
}

.beginner-option small {
  align-self: start;
  color: var(--muted);
  font-size: 0.72rem;
}

.beginner-option i {
  grid-column: 3;
  grid-row: 1 / 3;
  color: var(--muted);
  font-size: 1.1rem;
  font-style: normal;
}

.beginner-option.is-recommended {
  border-style: dashed;
  border-color: rgba(214, 255, 74, 0.55);
  background: var(--card);
  box-shadow: none;
}

.beginner-option.is-selected {
  border-style: solid;
  border-color: rgba(214, 255, 74, 0.42);
  background: #171b12;
}

.survey-rec {
  display: inline;
  margin-right: 0.25rem;
  color: var(--accent);
  font-weight: 700;
}

.survey-goal-note {
  margin: 0.2rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.survey-goal-note.is-blue {
  color: #8ec8ff;
}

.survey-goal-note.is-green {
  color: #9dff9a;
}

.survey-goal-note.is-brown {
  color: #d4a574;
}

.survey-goal-note.is-orange {
  color: #ffb86a;
}

.survey-goal-note.is-pink {
  color: #ff9ec8;
}

.survey-goal-note.is-muted {
  color: var(--muted);
}

.survey-goal-note.is-mismatch {
  color: #e8c4a8;
}

.beginner-days {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.beginner-day {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  grid-column: span 2;
  gap: 0.1rem;
  min-width: 0;
  min-height: 5.6rem;
  padding: 0.7rem 0.4rem 0.65rem;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.beginner-day:nth-child(n + 4) {
  grid-column: span 3;
}

.beginner-day strong {
  font-size: 1.5rem;
  line-height: 1;
}

.beginner-day span {
  color: var(--muted);
  font-size: 0.72rem;
}

.beginner-day small {
  max-width: 100%;
  margin-top: 0.22rem;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.beginner-day.is-recommended,
.beginner-day.is-selected {
  border-color: rgba(214, 255, 74, 0.48);
  background: #171b12;
}

.beginner-home {
  display: grid;
  justify-items: center;
  margin-top: 6vh;
  text-align: center;
}

.beginner-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  width: 100%;
  margin: 0.7rem 0 1.1rem;
}

.beginner-summary > div:last-child {
  grid-column: 1 / -1;
}

.beginner-summary > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
  text-align: left;
}

.beginner-summary small {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.beginner-summary strong {
  font-size: 0.85rem;
}

.beginner-home .btn {
  width: min(100%, 22rem);
}

.beginner-home .admin-list {
  margin: 1rem 0 0.4rem;
}

.beginner-profile-link {
  margin-top: 1rem;
}

.chk-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.chk-box {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid var(--stroke);
  border-radius: 0.4rem;
  background: var(--bg-2);
}

.chk-btn.is-on .chk-box {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--card);
}

.danger {
  color: var(--danger);
  margin: 0.2rem 0 0;
}

.danger:disabled {
  color: var(--muted);
}

@media (min-width: 390px) {
  :root {
    --pad-x: 1.4rem;
  }
}

@media (min-width: 430px) {
  :root {
    --pad-x: 1.6rem;
  }
}

@media (min-width: 768px) {
  :root {
    --pad-x: 2rem;
  }

  main {
    max-width: 44rem;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  main.log {
    padding-top: 1.5rem;
  }

  .topbar h1 {
    font-size: 1.45rem;
  }

  .fixed-catalog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .beginner-days {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .beginner-days--seven {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .beginner-day,
  .beginner-day:nth-child(n + 4) {
    grid-column: auto;
  }

  .set-row {
    grid-template-columns: 1.5rem 1fr;
  }
}

@media (hover: hover) and (pointer: fine) {
  .user-card:hover,
  .pick:hover,
  .count-card:hover,
  .client-card:hover,
  .account-action:hover {
    border-color: rgba(214, 255, 74, 0.35);
  }

  .btn:hover,
  .btn:focus-visible {
    filter: brightness(1.04);
    outline: none;
  }

  .drawer-link:hover {
    color: var(--accent);
  }
}

.client-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.client-card {
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 4.45rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-when {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
}

.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(214, 255, 74, 0.12);
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.add-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0 0 0.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0c0e;
  font: inherit;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.add-btn.is-open {
  transform: rotate(45deg);
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.invite-panel {
  display: grid;
  gap: 0;
  animation: invite-panel-in 0.18s ease;
}

@keyframes invite-panel-in {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
}

.invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.invite-incoming {
  border-color: rgba(214, 255, 74, 0.35);
}

.invite-incoming .empty-kicker {
  margin: 0;
}

.client-card.is-pending {
  cursor: default;
  border-style: dashed;
}

.invite-cancel {
  margin: 0;
  color: var(--muted);
}

.library-tabs {
  margin-top: 0.2rem;
}

.tab-count {
  display: inline-block;
  min-width: 1.4rem;
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
}

.tab.is-on .tab-count {
  background: rgba(0, 0, 0, 0.14);
}

.lib-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.75rem;
}

.lib-tab-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.add-btn-sm {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.65rem;
}

.lib-list {
  display: grid;
  gap: 0.65rem;
}

.lib-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lib-card-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.lib-card-copy strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.lib-card-copy small {
  color: var(--muted);
  font-size: 0.8rem;
}

.lib-card-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lib-card.is-editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  border-color: rgba(214, 255, 74, 0.35);
  cursor: default;
}

.lib-field {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lib-field input,
.lib-field select,
.lib-field textarea,
.lib-select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0 0.85rem;
  border: 1px solid var(--stroke);
  border-radius: 0.85rem;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  -webkit-appearance: none;
  appearance: none;
}

.lib-field textarea {
  padding: 0.7rem 0.85rem;
  line-height: 1.4;
  resize: vertical;
}

.lib-field select,
.lib-select {
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a0a4ad' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

.lib-field input:focus,
.lib-field select:focus,
.lib-field textarea:focus,
.lib-select:focus {
  outline: 2px solid rgba(214, 255, 74, 0.7);
  outline-offset: 0;
  border-color: transparent;
}

.lib-title-input {
  font-size: 1.15rem !important;
  font-weight: 650;
}

.library .lib-field + .lib-field {
  margin-top: 0.8rem;
}

.lib-card .lib-field + .lib-field {
  margin-top: 0;
}

.lib-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  gap: 0.6rem;
}



.lib-delete {
  justify-self: start;
  margin: 0.2rem 0 0;
}

.library .lib-delete {
  margin-top: 1rem;
}

.lib-slots .slot {
  background: var(--card);
}

.lib-slot .slot-head {
  margin-bottom: 0.2rem;
}

.lib-slot .lib-select {
  flex: 1;
  min-width: 0;
}

.inline-link {
  display: inline;
  margin: 0;
  color: var(--accent);
  font-size: inherit;
}














.clients-empty {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 1.6rem 1rem;
}

.clients-empty strong {
  color: var(--ink);
  font-size: 1rem;
}

.pf {
  max-width: 38rem;
  margin: 0 auto;
  padding-bottom: 1.5rem;
}

.pf-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0.9rem;
  padding: 2rem 1.2rem 1.4rem;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 1.75rem;
  background:
    radial-gradient(120% 85% at 50% -10%, rgba(214, 255, 74, 0.2), transparent 62%),
    linear-gradient(180deg, var(--card-2), var(--card));
  text-align: center;
}

.pf-hero::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 255, 74, 0.08), transparent 70%);
  pointer-events: none;
}

.pf-avatar {
  display: grid;
  place-items: center;
  width: 5.6rem;
  height: 5.6rem;
  margin-bottom: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(140deg, #e6ff8a 0%, var(--accent) 45%, #9fd63a 100%);
  box-shadow:
    0 0 0 6px rgba(214, 255, 74, 0.1),
    0 18px 40px -12px rgba(214, 255, 74, 0.45);
  color: var(--accent-ink);
  font-family: var(--ui);
  font-size: 2.4rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

button.pf-avatar {
  position: relative;
  padding: 0;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

button.pf-avatar:active {
  transform: scale(0.96);
}

.pf-avatar img,
.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.pf-avatar.has-photo {
  background: var(--card-2);
}

.pf-avatar-badge {
  position: absolute;
  right: -0.1rem;
  bottom: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--bg);
  color: #111;
}

.pf-avatar-badge .pf-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.pf-avatar.is-busy img,
.pf-avatar.is-busy > span:first-child {
  opacity: 0.4;
}

.pf-avatar-spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.9rem;
  height: 1.9rem;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pf-spin 0.8s linear infinite;
}

@keyframes pf-spin {
  to {
    transform: rotate(360deg);
  }
}

.profile-card-mark.has-photo,
.pf-trainer-mark.has-photo {
  overflow: hidden;
  background: var(--card-2);
}

.pf-name {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: -0.035em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.pf-role {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pf-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0 0.85rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: default;
}

button.pf-chip {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pf-chip .pf-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--muted);
}

.pf-chip.is-accent {
  border-color: rgba(214, 255, 74, 0.35);
  color: var(--accent);
}

.pf-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pf-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.9rem;
  padding: 1rem 0.4rem;
  border: 1px solid var(--stroke);
  border-radius: 1.4rem;
  background: var(--card);
}

.pf-metric {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  text-align: center;
}

.pf-metric + .pf-metric {
  border-left: 1px solid var(--stroke);
}

.pf-metric strong {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.pf-metric small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
}

.pf-metric span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-goal {
  display: grid;
  gap: 0.45rem;
  padding: 1.1rem 1.15rem 1.15rem;
  border: 1px solid rgba(214, 255, 74, 0.22);
  border-radius: 1.4rem;
  background: linear-gradient(135deg, rgba(214, 255, 74, 0.1), rgba(214, 255, 74, 0.02) 60%), var(--card);
}

.pf-label {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pf-goal strong {
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.pf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.pf-pills span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(214, 255, 74, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.pf-section {
  margin: 1.5rem 0.3rem 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pf-card {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 1.4rem;
  background: var(--card);
}

.pf-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
}

.pf-info + .pf-info,
.pf-row + .pf-row {
  border-top: 1px solid var(--stroke);
}

.pf-info span {
  flex: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.pf-info strong {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
}

.pf-info.is-stacked {
  display: grid;
  gap: 0.3rem;
}

.pf-info.is-stacked strong {
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.pf-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 3.6rem;
  padding: 0 1.1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}

.pf-row:active {
  background: rgba(255, 255, 255, 0.04);
}

.pf-row-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.75rem;
  background: rgba(214, 255, 74, 0.1);
  color: var(--accent);
}

.pf-row-chev {
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

.pf-row.is-danger {
  color: var(--danger);
}

.pf-row.is-danger .pf-row-icon {
  background: rgba(255, 122, 110, 0.1);
  color: var(--danger);
}

.pf-trainer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1.4rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pf-trainer-mark {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px rgba(214, 255, 74, 0.35);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
}

.pf-trainer-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.pf-trainer-copy strong {
  overflow: hidden;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-trainer-copy small {
  color: var(--muted);
  font-size: 0.82rem;
}

.pf-trainer-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 650;
}

.pf-trainer-action .pf-icon {
  width: 1rem;
  height: 1rem;
}

.pf-empty {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding: 1.2rem;
  border: 1px dashed rgba(214, 255, 74, 0.35);
  border-radius: 1.4rem;
  background: rgba(214, 255, 74, 0.04);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pf-empty strong {
  font-size: 1.05rem;
}

.pf-empty span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.pf-empty em {
  margin-top: 0.3rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 650;
}

.pf-empty.is-static {
  cursor: default;
}

.pf-hub-chips {
  justify-content: center;
  margin: -0.2rem 0 0.2rem;
}

.clients-empty span {
  font-size: 0.86rem;
  line-height: 1.45;
}

.invite-box {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0 0.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(214, 255, 74, 0.28);
  border-radius: 1.2rem;
  background: #171b12;
  cursor: pointer;
}

.invite-box small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-box strong {
  font-size: 1.85rem;
  letter-spacing: 0.18em;
}

.connect-option {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.2rem;
  background: var(--card);
}

.connect-option h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.connect-option .account-form {
  margin: 0;
}

.connect-option .invite-box {
  margin: 0.2rem 0 0;
}

.connect-wait {
  margin: 0;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(214, 255, 74, 0.45);
}

.chat {
  display: grid;
  gap: 0.7rem;
  min-height: 0;
}

.chat h2 {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  letter-spacing: -0.05em;
}

.chat-log {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 14rem;
  max-height: min(52vh, 28rem);
  overflow: auto;
  padding: 0.15rem 0.1rem 0.4rem;
}

.chat-bubble {
  justify-self: start;
  max-width: 86%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem 1rem 1rem 0.35rem;
  background: var(--card);
}

.chat-bubble.is-own {
  justify-self: end;
  border-color: rgba(214, 255, 74, 0.28);
  border-radius: 1rem 1rem 0.35rem 1rem;
  background: #171b12;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.chat-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.chat-form input,
#trainer-code {
  min-height: 3.1rem;
  padding: 0 0.95rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

#trainer-code {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.chat-form .btn {
  min-height: 3.1rem;
  padding: 0 1rem;
}

.chat-tabs {
  margin-bottom: 0.85rem;
}

.chat-attach {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.chat-attach .pf-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.chat-pending {
  position: relative;
  justify-self: start;
  width: 5.5rem;
}

.chat-pending img,
.chat-pending video,
.chat-photo img,
.chat-video {
  display: block;
  width: 100%;
  border-radius: 0.8rem;
  background: #000;
}

.chat-video {
  max-height: 16rem;
}

.chat-pending video {
  height: 5.5rem;
  object-fit: cover;
}

.chat-photos.is-many {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
}

.chat-photos.is-many .chat-photo {
  width: 100%;
  margin: 0;
}

.chat-photos.is-many .chat-photo img {
  height: 7.2rem;
  object-fit: cover;
}

.chat-pending button {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.chat-photo {
  display: block;
  width: min(16rem, 100%);
  margin: 0 0 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chat-zoom {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  border: 0;
  background: rgba(5, 6, 7, 0.88);
  cursor: zoom-out;
}

.chat-zoom img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.8rem;
}

/* ---------- food diary ---------- */

.nut {
  display: grid;
  gap: 0.9rem;
  max-width: 38rem;
  margin: 0 auto;
}

.nut-date {
  display: grid;
  grid-template-columns: 2.6rem 1fr 2.6rem;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.nut-date strong,
.nut-date-label {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nut-date-label {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nut-date-label.is-open {
  color: var(--accent);
}

.nut-cal {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem 0.75rem 0.9rem;
  border-radius: 1.25rem;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.nut-cal-nav {
  display: grid;
  grid-template-columns: 2.4rem 1fr 2.4rem;
  align-items: center;
  text-align: center;
}

.nut-cal-nav strong {
  font-size: 0.98rem;
}

.nut-cal-week,
.nut-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.28rem;
  text-align: center;
}

.nut-cal-week span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.nut-cal-day {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.nut-cal-day.is-empty {
  background: rgba(244, 240, 230, 0.06);
  color: #8d8880;
}

.nut-cal-day.is-bad {
  background: rgba(255, 122, 110, 0.28);
  color: #ffd0cb;
}

.nut-cal-day.is-ok {
  border-color: var(--accent);
  color: var(--accent);
}

.nut-cal-day.is-future {
  background: transparent;
  color: rgba(244, 240, 230, 0.28);
  cursor: default;
}

.nut-cal-day.is-today {
  font-weight: 800;
}

.nut-cal-day.is-selected {
  box-shadow: 0 0 0 1px var(--ink);
}

.nut-daypop {
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.75rem 0.5rem 0.35rem;
  border-top: 1px solid var(--stroke);
  text-align: center;
}

.nut-daypop p,
.nut-daypop small {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.nut-daypop b {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.nut-daypop b span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
}

.nut-daypop.is-bad b {
  color: var(--danger);
}

.nut-daypop.is-ok b {
  color: var(--accent);
}

.nut-date-btn {
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.nut-date-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.nut-chart {
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem 1rem 1.1rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(255, 179, 71, 0.1), transparent 60%),
    linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.nut-gauge {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  overflow: visible;
}

.nut-slice path {
  stroke: #15171b;
  stroke-width: 5;
  stroke-linejoin: round;
}

.nut-slice-track {
  fill-opacity: 0.34;
}

.nut-slice-fill {
  transition: d 0.4s ease;
}

.nut-slice-letter {
  font-family: var(--ui);
  font-size: 17px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.nut-slice.is-over .nut-slice-letter {
  fill: var(--danger);
}

.nut-kcal-hub {
  fill: #15171b;
}

.nut-kcal-track,
.nut-kcal-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}

.nut-kcal-track {
  stroke: rgba(244, 240, 230, 0.1);
}

.nut-kcal-fill {
  stroke: var(--ink);
}

.nut-kcal-fill.is-over {
  stroke: var(--danger);
}

.nut-kcal-value {
  fill: var(--ink);
  font-family: var(--ui);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-anchor: middle;
}

.nut-kcal-unit {
  fill: var(--muted);
  font-family: var(--ui);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-anchor: middle;
}

.nut-kcal-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.nut-kcal-line strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.nut-kcal-line.is-over strong {
  color: var(--danger);
}

.nut-macros {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.nut-macro {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.95rem;
  background: rgba(244, 240, 230, 0.035);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.nut-macro-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.nut-macro-label i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--macro);
}

.nut-macro strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nut-macro strong small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
}

.nut-macro.is-over strong {
  color: var(--danger);
}

.nut-note {
  padding: 0.75rem 0.9rem;
  border: 1px dashed rgba(214, 255, 74, 0.35);
  border-radius: 1rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.nut-note em {
  color: var(--accent);
  font-style: normal;
}

.nut-note.is-static {
  display: block;
  width: 100%;
  margin: 0 0 0.8rem;
  cursor: default;
}

.nut-clock.is-static {
  width: auto;
  min-width: 2.8rem;
  font-variant-numeric: tabular-nums;
}

.nut-meal-name {
  font-size: 1rem;
}

.nut-item.is-static {
  cursor: default;
}

.nut-photos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
  padding-top: 0.7rem;
}

.nut-photo,
.nut-photo-add {
  position: relative;
  flex: none;
  width: 4.7rem;
  height: 4.7rem;
}

.nut-photo-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0.85rem;
  background: var(--bg);
  cursor: pointer;
}

.nut-photo-add {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.1rem;
  padding: 0;
  border: 1px dashed rgba(214, 255, 74, 0.45);
  border-radius: 0.85rem;
  background: transparent;
  color: var(--accent);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.nut-photo-add span {
  font-size: 1.35rem;
  line-height: 1;
}

.nut-photo-add small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.nut-photo-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nut-photo-del {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 1;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 12, 14, 0.82);
  color: var(--ink);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.nut-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.nut-scan {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  margin-bottom: 0.05rem;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 0.9rem;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.nut-scan .pf-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.nut-add-wrap {
  position: relative;
}

.nut-add-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 5;
  display: grid;
  gap: 0.35rem;
  width: min(16rem, 100%);
  padding: 0.4rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--bg-2);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.45);
}

.nut-add-menu button {
  min-height: 2.6rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.nut-add-menu button:active {
  background: rgba(214, 255, 74, 0.12);
  color: var(--accent);
}

.nut-name-row.is-hit input {
  animation: nut-hit 1.6s ease forwards;
}

@keyframes nut-hit {
  0% { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
  70% { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(214, 255, 74, 0.35); }
  100% { border-color: var(--stroke); box-shadow: none; }
}

html.barcode-lock,
html.barcode-lock body,
html.food-lock,
html.food-lock body,
html.time-lock,
html.time-lock body,
html.kind-lock,
html.kind-lock body {
  overflow: hidden !important;
  height: 100%;
  overscroll-behavior: none;
}

html.food-lock #app,
html.barcode-lock #app,
html.time-lock #app,
html.kind-lock #app {
  z-index: 80;
}

.nut-add-main {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.8rem;
  margin-top: 0.2rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.food-screen {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg);
  color: var(--ink);
}

.food-head {
  display: grid;
  grid-template-columns: 2.6rem 1fr 2.6rem;
  align-items: center;
  padding: max(0.7rem, env(safe-area-inset-top)) 0.8rem 0.6rem;
}

.food-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  text-transform: capitalize;
}

.food-head-x,
.food-close,
.food-ok {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.food-head-x {
  background: transparent;
  color: var(--ink);
}

.food-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.food-soon {
  grid-row: 1 / -1;
}

.food-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0 0.9rem 0.7rem;
}

.food-search input {
  min-height: 2.8rem;
  padding: 0 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.food-qr,
.food-search-plus {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.food-qr svg,
.food-tabs svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.food-list {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 0 0.9rem 1rem;
}

.food-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name kcal" "macros grams";
  gap: 0.15rem 0.8rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--stroke);
  border-radius: 1.1rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.food-card-name { grid-area: name; font-weight: 700; }
.food-card-kcal { grid-area: kcal; justify-self: end; font-weight: 750; }
.food-card-kcal small { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 600; text-align: right; }
.food-card-macros { grid-area: macros; display: flex; gap: 0.55rem; font-size: 0.82rem; font-style: normal; }
.food-card-macros i { font-style: normal; font-weight: 700; }
.food-card-grams { grid-area: grams; justify-self: end; align-self: end; color: var(--muted); font-size: 0.82rem; }

.food-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem max(0.55rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--stroke);
  background: var(--bg-2);
}

.food-tabs button {
  display: grid;
  place-items: center;
  min-height: 2.8rem;
  border: 0;
  border-radius: 0.9rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.food-tabs button.is-on {
  background: rgba(214, 255, 74, 0.14);
  color: var(--accent);
}

.food-tab-soon {
  font-size: 0.78rem;
  font-weight: 700;
}

.food-soon {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  height: 100%;
  color: var(--muted);
  text-align: center;
}

.food-soon strong { color: var(--ink); font-size: 1.15rem; }

.food-composer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: max(1rem, env(safe-area-inset-top)) 1rem 5.2rem;
  background: var(--bg);
  overflow: auto;
}

.food-composer h2 {
  margin: 0.4rem 0 0.2rem;
  font-size: 1.4rem;
}

.food-composer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.food-composer-grid .lib-field:last-child { grid-column: 1 / -1; }

.food-composer-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 0.9rem max(0.7rem, env(safe-area-inset-bottom));
  background: var(--bg);
}

.food-close {
  background: #ff7a6e;
  color: #1a0d0c;
}

.food-ok {
  background: var(--accent);
  color: var(--accent-ink);
}

.barcode-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(5, 6, 7, 0.88);
  touch-action: none;
  overscroll-behavior: none;
}

.barcode-card {
  display: grid;
  gap: 0.75rem;
  max-height: min(92dvh, 44rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--stroke);
  border-radius: 1.4rem;
  background: var(--bg-2);
}

.barcode-card h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.barcode-frame {
  position: relative;
  overflow: hidden;
  height: 16rem;
  border-radius: 1rem;
  background: #000;
  box-shadow: inset 0 0 0 3px transparent;
}

.barcode-frame.is-miss {
  animation: barcode-shake 0.5s ease-in-out 3;
  box-shadow: inset 0 0 0 4px #ff5a5a;
}

.barcode-frame.is-miss .barcode-reticle {
  border-color: #ff5a5a;
  box-shadow: 0 0 0 999px rgba(90, 0, 0, 0.35);
}

@keyframes barcode-shake {
  0%,
  100% { transform: translateX(0); }
  15% { transform: translateX(-8px); }
  30% { transform: translateX(7px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.barcode-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.barcode-reticle {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 32%;
  height: 36%;
  border: 2px solid var(--accent);
  border-radius: 0.7rem;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
}

.nut-edit,
.nut-meal-tools {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-content: flex-end;
  width: 5.5rem;
  margin-top: 0;
}

.nut-edit {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.nut-meal-tools {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nut-photo-add:disabled {
  opacity: 0.5;
}

.plan-view {
  display: grid;
  gap: 0.4rem;
}

.plan-sheet {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.plan-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plan-sheet-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: capitalize;
}

.plan-badge {
  flex: none;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(244, 240, 230, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-badge.is-done {
  background: var(--accent);
  color: var(--accent-ink);
}

.plan-badge.is-missed {
  background: var(--danger);
  color: #1a0d0c;
}

.plan-badge.is-planned,
.plan-badge.is-live {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--accent);
}

.plan-preview {
  margin-bottom: 0;
}

.plan-actions {
  display: grid;
  gap: 0.55rem;
}

.plan-sheet .lib-field {
  margin: 0;
}

.macro-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.2rem 0 0.9rem;
}

.macro-field {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  background: var(--card);
}

.macro-field:first-child {
  grid-column: 1 / -1;
}

.macro-field span,
.macro-field small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.macro-field input {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.macro-field input:focus {
  outline: none;
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.report-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.report-cal {
  display: grid;
  place-items: center;
  color: var(--ink);
}

.report-cal .pf-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.report-cal.is-on {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

.report-list {
  display: grid;
  gap: 0.65rem;
}

button.history-card.report-workout {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.report-workout small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.report-workout .history-card-head strong {
  font-size: 1rem;
}

.nut-meals-head {
  align-items: center;
  margin-top: 0.3rem;
}

.nut-meals-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.nut-meals-head small {
  color: var(--muted);
  font-size: 0.8rem;
}

.nut-meal {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 1.2rem;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.nut-meal-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.08rem;
}

.nut-meal-clock {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 4.6rem;
  min-height: 2.35rem;
  padding: 0 0.55rem;
  border-radius: 0.8rem;
  background: rgba(214, 255, 74, 0.1);
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.nut-meal-head.has-sub .nut-meal-clock {
  grid-row: 1 / span 2;
}

.nut-clock {
  width: 1.65rem;
  min-height: 2.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: center;
}

.nut-clock::placeholder {
  color: rgba(214, 255, 74, 0.38);
}

.nut-clock:focus {
  outline: none;
  border-radius: 0.35rem;
  background: rgba(214, 255, 74, 0.16);
}

.nut-meal-title {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  min-width: 0;
}

.nut-meal-kcal {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: baseline;
  gap: 0.28rem;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.nut-meal-kcal .nut-macro-row {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.nut-meal-title strong,
.nut-meal-name,
.nut-kind-btn {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.nut-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nut-kind {
  min-height: 1.7rem;
  padding: 0.1rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(244, 240, 230, 0.16);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.nut-kind.is-on {
  background: var(--accent);
  box-shadow: none;
  color: #11130c;
  font-weight: 700;
}

.nut-meal-title small {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.12rem 0.35rem;
  overflow: visible;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.nut-meal-title small .nut-b { color: #d6ff4a; }
.nut-meal-title small .nut-j { color: #ffb347; }
.nut-meal-title small .nut-u { color: #66c7ff; }

.nut-macro-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}

.nut-macro-row .nut-b { color: #d6ff4a; }
.nut-macro-row .nut-j { color: #ffb347; }
.nut-macro-row .nut-u { color: #66c7ff; }

.nut-macro-row i {
  margin-right: 0.12em;
  font-style: normal;
  font-weight: inherit;
  font-size: inherit;
}

.nut-meal-del {
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.nut-items {
  display: grid;
  gap: 0.15rem;
}

.nut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.6rem 0.2rem;
  border: 0;
  border-top: 1px solid var(--stroke);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nut-item-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.nut-item-copy strong {
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nut-item-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.nut-item-kcal {
  display: grid;
  flex: none;
  justify-items: end;
  font-size: 1rem;
  font-weight: 700;
}

.nut-item-kcal small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.nut-add-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  border: 1px dashed rgba(244, 240, 230, 0.16);
  border-radius: 0.9rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.nut-add-item span {
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}

.nut-form {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px rgba(214, 255, 74, 0.22);
  animation: invite-panel-in 0.18s ease;
}

.nut-form-name {
  font-size: 1.05rem;
}

.nut-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.nut-form-grid .lib-field:nth-child(n + 3) {
  grid-column: span 1;
}

@media (min-width: 30rem) {
  .nut-form-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.nut-form .lib-field input {
  background: var(--card);
}

.nut-form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.nut-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.nut-form-actions .btn {
  width: 100%;
  min-height: 2.9rem;
  margin: 0;
}

.nut-form-actions .btn:first-child {
  grid-column: 1 / -1;
}

.nut-form-del {
  background: transparent;
  color: var(--danger);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 110, 0.5);
}

.nut-loading {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 4rem 0;
}

.nut-loading span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  animation: nut-dot 0.9s ease-in-out infinite;
}

.nut-loading span:nth-child(2) {
  animation-delay: 0.15s;
}

.nut-loading span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes nut-dot {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-0.3rem);
  }
}

button.nut-meal-clock {
  border: 0;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.time-sheet {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: end center;
  padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
}

.time-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 6, 7, 0.78);
  cursor: pointer;
}

.time-card {
  --time-row: 2.75rem;
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1rem 0.85rem;
  border-radius: 1.4rem;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.time-card h2 {
  margin: 0;
  text-align: center;
  font-size: 1.25rem;
}

.time-readout {
  margin: 0;
  text-align: center;
  color: var(--accent);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.time-labels,
.time-drums {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.1rem minmax(0, 1fr);
  align-items: center;
}

.time-labels span {
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.time-drums {
  position: relative;
}

.time-colon {
  text-align: center;
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}

.time-wheel {
  height: calc(var(--time-row) * 5);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.time-wheel::-webkit-scrollbar {
  display: none;
}

.time-pad {
  height: calc(var(--time-row) * 2);
}

.time-tick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--time-row);
  scroll-snap-align: center;
  border: 0;
  background: transparent;
  color: rgba(244, 240, 230, 0.34);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.time-tick.is-on {
  color: var(--ink);
  font-size: 1.55rem;
}

.time-notch {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--time-row) * 2);
  height: var(--time-row);
  border-radius: 0.8rem;
  background: rgba(214, 255, 74, 0.1);
  box-shadow: inset 0 0 0 1px rgba(214, 255, 74, 0.4);
  pointer-events: none;
}

.time-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 0.15rem;
}

.nut-kind-btn {
  justify-self: start;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.nut-kind-btn.is-empty {
  color: var(--accent);
}

.nut-kind-btn::after {
  content: " ▾";
  color: var(--muted);
  font-weight: 500;
}

.kind-sheet {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: end center;
  padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
}

.kind-card {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 1.4rem;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.kind-card h2 {
  margin: 0;
  text-align: center;
  font-size: 1.3rem;
}

.kind-options {
  display: grid;
  gap: 0.45rem;
}

.kind-option {
  min-height: 3.15rem;
  border: 0;
  border-radius: 1rem;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--stroke);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.kind-option.is-on {
  background: var(--accent);
  box-shadow: none;
  color: var(--accent-ink);
}

.food-ask,
.food-portion {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.food-ask {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.food-ask-card {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem 1rem 1rem;
  border-radius: 1.3rem;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.food-ask-card h2 {
  margin: 0;
  font-size: 1.25rem;
  text-align: center;
}

.food-ask-name {
  margin: 0;
  text-align: center;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
}

.food-ask-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.food-portion {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: max(1.1rem, env(safe-area-inset-top)) 1rem 5.4rem;
  background: var(--bg);
  overflow: auto;
}

.food-portion h2 {
  margin: 0;
  font-size: 1.45rem;
}

.portion-macros {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.portion-macros div {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0.7rem 0.2rem;
  border-radius: 0.9rem;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.portion-macros strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.portion-macros small {
  color: var(--muted);
  font-size: 0.68rem;
}

.portion-macros .nut-b { color: #d6ff4a; }
.portion-macros .nut-j { color: #ffb347; }
.portion-macros .nut-u { color: #66c7ff; }

.portion-basis {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.portion-basis .nut-b { color: #d6ff4a; font-weight: 700; }
.portion-basis .nut-j { color: #ffb347; font-weight: 700; }
.portion-basis .nut-u { color: #66c7ff; font-weight: 700; }
