:root {
  --ink: #1a1714;
  --ink-soft: #3d3730;
  --foam: #f7f1e8;
  --foam-muted: rgba(247, 241, 232, 0.78);
  --paper: #f3ebe0;
  --paper-deep: #e7dccb;
  --line: rgba(26, 23, 20, 0.12);
  --amber: #c47a2c;
  --amber-deep: #9a5c1a;
  --glass: rgba(26, 23, 20, 0.38);
  --glass-border: rgba(247, 241, 232, 0.18);
  --field: rgba(247, 241, 232, 0.12);
  --field-focus: rgba(247, 241, 232, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-ui: 'Sora', sans-serif;
}

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

html,
body {
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--foam);
  font-family: var(--font-ui);
  background: #1a1714;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.landing {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.landing__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(196, 122, 44, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(90, 110, 70, 0.28), transparent 50%),
    linear-gradient(165deg, #2a2218 0%, #1a1714 45%, #12100d 100%);
}

.landing__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.06);
  animation: drift 28s var(--ease) infinite alternate;
}

.landing__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(18, 14, 10, 0.34) 0%,
      rgba(18, 14, 10, 0.28) 40%,
      rgba(18, 14, 10, 0.55) 100%
    ),
    radial-gradient(ellipse at 50% 40%, transparent 20%, rgba(18, 14, 10, 0.4) 100%);
}

.landing__content {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 1.35rem;
  justify-items: center;
  text-align: center;
}

.landing__brand {
  animation: rise 0.9s var(--ease) both;
}

.landing__name {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.onboarding,
.login {
  width: 100%;
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: rise 1s var(--ease) 0.18s both;
  text-align: left;
}

.onboarding__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--foam);
  text-align: center;
}

.onboarding__lede {
  margin: 0 0 0.15rem;
  color: var(--foam-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.onboarding__form {
  display: grid;
  gap: 0.85rem;
}

.login__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.login__tab {
  padding: 0.65rem 0.5rem;
  border: 1px solid rgba(247, 241, 232, 0.18);
  background: transparent;
  color: var(--foam-muted);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.login__tab:hover {
  color: var(--foam);
  background: rgba(247, 241, 232, 0.08);
}

.login__tab.is-active {
  background: rgba(247, 241, 232, 0.16);
  border-color: rgba(247, 241, 232, 0.35);
  color: var(--foam);
}

.login__field {
  display: grid;
  gap: 0.4rem;
}

.login__field span {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--foam-muted);
}

.login__field input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--field);
  color: var(--foam);
  outline: none;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.login__field input:focus {
  background: var(--field-focus);
  border-color: rgba(247, 241, 232, 0.35);
}

.login__submit {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 0;
  border-radius: 0;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.login__submit:hover {
  background: var(--amber-deep);
  color: var(--foam);
}

.login__submit:active {
  transform: translateY(1px);
}

.login__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login__link {
  display: inline-block;
  width: fit-content;
  margin: 0.15rem auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foam-muted);
  font: inherit;
  font-size: 0.88rem;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.login__link:hover {
  color: var(--foam);
}

.login__reset-link {
  margin: 0;
  text-align: center;
}

.login__reset-link a {
  color: var(--amber);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.login__message {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--foam-muted);
  animation: rise 0.45s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (min-width: 820px) {
  .landing {
    place-items: center;
  }

  .landing__content {
    width: min(100% - 4rem, 26rem);
    margin-inline: auto;
    padding-block: 0;
  }

  .landing__photo {
    object-position: center 40%;
  }

  .landing__veil {
    background:
      linear-gradient(
        180deg,
        rgba(18, 14, 10, 0.34) 0%,
        rgba(18, 14, 10, 0.28) 40%,
        rgba(18, 14, 10, 0.55) 100%
      ),
      radial-gradient(ellipse at 50% 40%, transparent 20%, rgba(18, 14, 10, 0.4) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing__photo,
  .landing__brand,
  .login,
  .onboarding,
  .login__message {
    animation: none;
  }

  .landing__photo {
    transform: none;
  }
}

/* —— App / calendar —— */

.app-body {
  position: relative;
  color: var(--ink);
  background-color: #1a1714;
  isolation: isolate;
}

.app-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(26, 23, 20, 0.42) 0%,
      rgba(26, 23, 20, 0.28) 35%,
      rgba(26, 23, 20, 0.5) 100%
    ),
    radial-gradient(ellipse at 50% 20%, transparent 20%, rgba(26, 23, 20, 0.35) 100%),
    url('images/hub-nature-goldenhour.png') center 45% / cover no-repeat;
}

.app {
  position: relative;
  z-index: 1;
  width: min(100% - 1rem, 96rem);
  margin: 0 auto;
  padding: 0.85rem 0 max(1.5rem, env(safe-area-inset-bottom));
  display: grid;
  gap: 1rem;
  min-height: 100svh;
}

.app-top {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(247, 241, 232, 0.18);
}

.app-top__logo {
  justify-self: center;
  grid-column: 2;
  font-family: var(--font-ui);
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--foam);
  text-decoration: none;
  text-align: center;
}

.app-top__brand {
  grid-column: 1;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.app-top__brand .app-top__logo {
  grid-column: auto;
  justify-self: center;
}

.app-top__brand .app-top__link {
  min-width: 7.5rem;
}

.app-top__brand .app-top__link.is-active:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
  color: var(--ink);
}

.app-top__hello {
  grid-column: 1;
  justify-self: start;
  margin: 0;
  font-size: 0.92rem;
  color: var(--foam-muted);
}

.app-top__logout,
.app-top__link {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  height: 2.85rem;
  min-height: 2.85rem;
  padding: 0 1.15rem;
  border: 1px solid rgba(247, 241, 232, 0.32);
  background: #2c2824;
  color: var(--foam);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.app-top__logout:hover,
.app-top__link:hover {
  background: #3a3530;
  border-color: rgba(247, 241, 232, 0.45);
  color: var(--foam);
}

.app-top__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.1rem;
}

.app-top__actions::-webkit-scrollbar {
  display: none;
}

.app-top__link.is-active,
.app-top__logout.is-active {
  border-color: var(--amber-deep);
  color: var(--ink);
  background: var(--amber);
}

.app-top__logout.is-active:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
  color: var(--ink);
}

.app-top--home {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 1rem;
}

.app-top--home .app-top__hello {
  grid-column: 1;
  justify-self: center;
  order: 1;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--foam);
}

.app-top--home .app-top__actions {
  grid-column: 1;
  justify-self: center;
  order: 2;
}

.app-top--home .app-top__actions:has(> :nth-child(3):last-child),
.app-top--home .app-top__actions:has(> :nth-child(4):last-child) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  width: min(100%, 28rem);
}

.app-top--home .app-top__actions:has(> :nth-child(3):last-child) .app-top__link,
.app-top--home .app-top__actions:has(> :nth-child(3):last-child) .app-top__logout,
.app-top--home .app-top__actions:has(> :nth-child(4):last-child) .app-top__link,
.app-top--home .app-top__actions:has(> :nth-child(4):last-child) .app-top__logout {
  width: 100%;
  min-width: 0;
  height: 2.85rem;
  min-height: 2.85rem;
  padding-inline: 0.4rem;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

@media (min-width: 720px) {
  .app-top--home .app-top__actions:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 44rem);
  }
}

@media (max-width: 720px) {
  .app-top {
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: center;
    gap: 0.75rem;
  }

  .app-top__hello,
  .app-top__logo,
  .app-top__brand,
  .app-top__actions {
    grid-column: 1;
    justify-self: stretch;
  }

  .app-top__brand {
    justify-items: center;
  }

  .app-top__actions {
    justify-content: flex-start;
    padding-inline: 0.1rem;
  }

  .app-top--home .app-top__actions {
    justify-content: flex-start;
  }

  .app-top--home .app-top__hello {
    font-size: clamp(1.7rem, 8vw, 2.35rem);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Shopping list —— */

.shop {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 58rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.shop--lists {
  width: min(100%, 58rem);
}

.shop__intro {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

.shop__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--foam);
}

.shop__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.shop-body {
  display: grid;
  gap: 0.9rem;
  align-items: start;
}

@media (min-width: 720px) {
  .shop-body {
    grid-template-columns: minmax(11.5rem, 14.5rem) minmax(0, 1fr);
    gap: 1rem;
  }
}

.shop-sidebar {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.shop-main {
  min-width: 0;
}

.shop__create {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  width: 100%;
}

.shop__create[hidden] {
  display: none !important;
}

.shop__new-list {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--amber-deep);
  background: var(--amber);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.shop__new-list:hover {
  background: var(--amber-deep);
  color: var(--foam);
}

.shop__new-list[hidden] {
  display: none !important;
}

.shop__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem;
  width: 100%;
  align-self: start;
  align-items: center;
}

.shop__field {
  display: grid;
  min-width: 0;
  align-items: center;
}

.shop__field input {
  width: 100%;
  height: 2.1rem;
  min-height: 2.1rem;
  max-height: 2.1rem;
  padding: 0 0.65rem;
  border: 1px solid rgba(26, 23, 20, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.shop__create .shop__field input {
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.2;
  background: rgba(247, 241, 232, 0.92);
}

.shop__field input:focus {
  border-color: rgba(196, 122, 44, 0.55);
  background: rgba(255, 255, 255, 0.96);
}

.shop__add {
  height: 2.1rem;
  min-height: 2.1rem;
  max-height: 2.1rem;
  padding: 0 0.75rem;
  border: 0;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.shop__create .shop__add {
  height: auto;
  min-height: 0;
  max-height: none;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  line-height: 1.2;
}

.shop__add:hover {
  background: var(--amber-deep);
  color: var(--foam);
}

.shop-lists {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.shop-lists > li {
  display: block;
  min-width: 0;
}

.shop-lists__item {
  width: 100%;
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(196, 122, 44, 0.55);
  background: #c47a2c;
  color: #fff8ef;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.shop-lists__item small {
  color: rgba(255, 248, 239, 0.82);
  font-size: 0.75rem;
  font-weight: 500;
}

.shop-lists__item:hover {
  border-color: #9a5c1a;
  background: #b56a22;
  color: #fff8ef;
}

.shop-lists__item.is-active {
  border-color: #2f6b3a;
  background: #3f8f4e;
  color: #f4fff6;
}

.shop-lists__item.is-active small,
.shop-lists__item:hover small {
  color: rgba(255, 248, 239, 0.88);
}

.shop-lists__item.is-active small {
  color: rgba(244, 255, 246, 0.88);
}

.shop-detail {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  width: 100%;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: rgba(247, 241, 232, 0.92);
  padding: 1rem 0.95rem 1.1rem;
  min-height: 14rem;
}

.shop-detail[hidden] {
  display: none !important;
}

.shop-placeholder {
  display: none;
}

.shop-detail__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.shop-detail__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.shop-detail__delete {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.35rem 0.2rem;
}

.shop-detail__delete:hover {
  color: var(--ink);
}

.shop__count {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.shop-budget {
  display: grid;
  gap: 0.3rem;
  width: min(100%, 14rem);
}

.shop-budget__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.shop-budget__input {
  width: 100%;
  height: 2.1rem;
  padding: 0 0.65rem;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.shop-budget__input:focus {
  border-color: rgba(196, 122, 44, 0.55);
  background: #fff;
}

.shop__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.shop-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem;
  align-items: center;
  width: 100%;
  padding: 0.15rem 0.25rem 0.15rem 0.2rem;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.shop-item__toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.45rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.shop-item__check {
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid rgba(26, 23, 20, 0.35);
  background: transparent;
  flex: 0 0 auto;
}

.shop-item.is-done .shop-item__check {
  border-color: var(--amber-deep);
  background: var(--amber);
}

.shop-item__text {
  font-size: 0.95rem;
  line-height: 1.3;
  word-break: break-word;
}

.shop-item.is-done .shop-item__text {
  color: var(--ink-soft);
  text-decoration: line-through;
}

.shop-item__remove {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c0392b;
  cursor: pointer;
}

.shop-item__remove svg {
  width: 1.05rem;
  height: 1.05rem;
}

.shop-item__remove:hover {
  color: #9b2c20;
}

.shop__empty,
.shop-placeholder {
  margin: 0;
  padding: 0.35rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
}

.shop__empty--lists {
  color: var(--foam-muted);
  text-align: left;
  padding: 0;
}

/* —— Home hub —— */

.hub {
  display: grid;
  gap: 1.35rem;
  animation: rise 0.55s var(--ease) both;
}

.hub__intro {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

.hub__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--foam);
}

.hub__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
}

.hub__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  width: min(100%, 64rem);
  margin-inline: auto;
}

.hub-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 0.35rem;
  align-content: stretch;
  min-height: 11.5rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid rgba(247, 241, 232, 0.28);
  background: rgba(247, 241, 232, 0.86);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    background 0.2s var(--ease);
}

.hub-card:hover {
  border-color: rgba(196, 122, 44, 0.75);
  transform: translateY(-3px);
  background: rgba(247, 241, 232, 0.95);
}

.hub-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
  cursor: grabbing;
}

.hub-card.is-drag-over {
  border-color: rgba(196, 122, 44, 0.95);
  box-shadow: 0 0 0 2px rgba(196, 122, 44, 0.28);
}

.hub-card[draggable='true'] {
  cursor: grab;
}

.hub-card__art {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 5.25rem;
  margin: 0 0 0.35rem;
  border: 1px solid rgba(26, 23, 20, 0.08);
  background:
    radial-gradient(circle at 70% 20%, rgba(196, 122, 44, 0.18), transparent 55%),
    rgba(255, 255, 255, 0.35);
}

.hub-card__art svg {
  width: min(100%, 7.5rem);
  height: auto;
  transition: transform 0.25s var(--ease);
}

.hub-card:hover .hub-card__art svg {
  transform: scale(1.06);
}

.hub-card--calendar .hub-card__art {
  background:
    radial-gradient(circle at 30% 80%, rgba(196, 122, 44, 0.16), transparent 50%),
    linear-gradient(160deg, #f7f1e8, #e7dccb);
}

.hub-card--shop .hub-card__art {
  background:
    radial-gradient(circle at 75% 25%, rgba(196, 122, 44, 0.2), transparent 45%),
    linear-gradient(160deg, #f3ebe0, #e8d7bd);
}

.hub-card--menu .hub-card__art {
  background:
    radial-gradient(circle at 40% 40%, rgba(196, 122, 44, 0.2), transparent 50%),
    linear-gradient(160deg, #f7f1e8, #ead8be);
}

.hub-card--workout .hub-card__art {
  background:
    radial-gradient(circle at 50% 30%, rgba(196, 122, 44, 0.22), transparent 50%),
    linear-gradient(160deg, #efe4d4, #e0cfb4);
}

.hub-card--chores .hub-card__art {
  background:
    radial-gradient(circle at 70% 70%, rgba(196, 122, 44, 0.18), transparent 48%),
    linear-gradient(160deg, #f7f1e8, #ebdfcb);
}

.hub-card--projects .hub-card__art {
  background:
    radial-gradient(circle at 40% 30%, rgba(196, 122, 44, 0.2), transparent 50%),
    linear-gradient(160deg, #f4ebe0, #e6d5ba);
}

.hub-card--skincare .hub-card__art {
  background:
    radial-gradient(circle at 55% 35%, rgba(196, 122, 44, 0.22), transparent 48%),
    linear-gradient(160deg, #f7f1e8, #eddcc4);
}

.hub-card--period .hub-card__art {
  background:
    radial-gradient(circle at 45% 40%, rgba(196, 92, 106, 0.22), transparent 48%),
    linear-gradient(160deg, #f7ecef, #e8d4d8);
}

.hub-card--pomodoro .hub-card__art {
  background:
    radial-gradient(circle at 50% 35%, rgba(196, 122, 44, 0.24), transparent 48%),
    linear-gradient(160deg, #f7f1e8, #e8d4b8);
}

.hub-card--budget .hub-card__art {
  background:
    radial-gradient(circle at 70% 40%, rgba(196, 122, 44, 0.2), transparent 50%),
    linear-gradient(160deg, #f3ebe0, #e5d4b8);
}

.hub-card--needs .hub-card__art {
  background:
    radial-gradient(circle at 35% 65%, rgba(196, 122, 44, 0.18), transparent 48%),
    linear-gradient(160deg, #f7f1e8, #ead9c0);
}

.hub-card--wishlist .hub-card__art {
  background:
    radial-gradient(circle at 50% 40%, rgba(196, 122, 44, 0.22), transparent 48%),
    linear-gradient(160deg, #f7f1e8, #edd9c2);
}

.hub-card--cooking .hub-card__art {
  background:
    radial-gradient(circle at 60% 55%, rgba(196, 122, 44, 0.2), transparent 50%),
    linear-gradient(160deg, #f3ebe0, #e6d4b9);
}

.hub-card--inspiration .hub-card__art {
  background:
    radial-gradient(circle at 45% 40%, rgba(196, 122, 44, 0.22), transparent 50%),
    linear-gradient(160deg, #f7f1e8, #ead8bf);
}

.hub-card--flyers .hub-card__art {
  background:
    radial-gradient(circle at 55% 40%, rgba(111, 158, 74, 0.22), transparent 52%),
    linear-gradient(160deg, #f3ebe0, #e0efd8);
}

.hub-card__label {
  font-family: var(--font-ui);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hub-card__hint {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.35;
}

@media (min-width: 720px) {
  .hub__grid {
    width: min(100%, 68rem);
  }

  .hub-card {
    min-height: 13.5rem;
  }
}

/* —— Projekty —— */

.projects {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 42rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.projects__intro {
  display: grid;
  gap: 0.35rem;
}

.projects__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.projects__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.projects-notes {
  display: grid;
}

.projects-notes__input {
  width: 100%;
  min-height: 18rem;
  resize: vertical;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(247, 241, 232, 0.88);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.98rem;
  line-height: 1.55;
  box-sizing: border-box;
}

.projects-notes__input::placeholder {
  color: var(--ink-soft);
}

.projects-notes__input:focus {
  outline: 2px solid rgba(214, 122, 48, 0.55);
  outline-offset: 2px;
}

.projects-notes__status {
  margin: 0;
  min-height: 1.2em;
  color: var(--foam-muted);
  font-size: 0.85rem;
}

/* —— Menstruační kalendář —— */

.period {
  display: grid;
  gap: 1rem;
  width: min(100%, 44rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.period__intro {
  display: grid;
  gap: 0.35rem;
}

.period__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.period__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.period-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: rgba(247, 241, 232, 0.88);
}

.period-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.period-cal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 400;
  text-align: center;
  text-transform: capitalize;
  color: var(--ink);
}

.period-cal__nav-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

.period-cal__nav-btn:hover {
  border-color: rgba(196, 92, 106, 0.55);
}

.period-cal__grid .month-cell {
  min-height: 3.35rem;
  display: grid;
  place-items: center;
  text-align: center;
}

.period-cal__grid .month-cell.is-period {
  background: rgba(196, 92, 106, 0.42);
}

.period-cal__grid .month-cell.is-predicted {
  background: rgba(196, 92, 106, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(196, 92, 106, 0.45);
}

.period-cal__grid .month-cell.is-fertile {
  background: rgba(139, 106, 168, 0.22);
}

.period-cal__grid .month-cell.is-ovulation {
  background: rgba(139, 106, 168, 0.45);
}

.period-cal__grid .month-cell.is-selected {
  outline: 2px solid rgba(154, 92, 26, 0.85);
  outline-offset: -2px;
}

.period-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.period-legend__swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.35rem;
  vertical-align: -0.1rem;
  border: 1px solid rgba(26, 23, 20, 0.12);
}

.period-legend__swatch.is-period {
  background: rgba(196, 92, 106, 0.55);
}

.period-legend__swatch.is-predicted {
  background: rgba(196, 92, 106, 0.18);
  box-shadow: inset 0 0 0 1px rgba(196, 92, 106, 0.5);
}

.period-legend__swatch.is-fertile {
  background: rgba(139, 106, 168, 0.28);
}

.period-legend__swatch.is-ovulation {
  background: rgba(139, 106, 168, 0.55);
}

.period-day__title,
.period-settings__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.period-day__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.period-day__toggle,
.period-day__quick {
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}

.period-day__toggle.is-active,
.period-day__toggle:not(:disabled):hover,
.period-day__quick:hover {
  background: rgba(196, 92, 106, 0.2);
  border-color: rgba(196, 92, 106, 0.45);
}

.period-day__toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.period-day__field {
  display: grid;
  gap: 0.45rem;
}

.period-day__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.period-day__flows,
.period-day__symptoms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.period-day__flows button,
.period-day__symptoms button {
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

.period-day__flows button.is-active,
.period-day__symptoms button.is-active {
  background: rgba(196, 92, 106, 0.28);
  border-color: rgba(196, 92, 106, 0.5);
  font-weight: 600;
}

.period-day__flows button:disabled,
.period-day__symptoms button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.period-day__note {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  box-sizing: border-box;
}

.period-day__note:focus {
  outline: 2px solid rgba(196, 92, 106, 0.45);
  outline-offset: 2px;
}

.period-settings__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.period-settings__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}

.period-settings__field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.period-settings__field input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  box-sizing: border-box;
}

.period-status {
  margin: 0;
  min-height: 1.2em;
  color: var(--foam-muted);
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  .period-settings__grid {
    grid-template-columns: 1fr;
  }
}

/* —— Pomodoro —— */

.pomodoro {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 64rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
  justify-items: stretch;
}

.pomodoro__intro {
  display: grid;
  gap: 0.35rem;
  text-align: center;
  justify-items: center;
}

.pomodoro__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.pomodoro__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.pomodoro-plan {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: rgba(247, 241, 232, 0.9);
  box-sizing: border-box;
}

.pomodoro-plan__table {
  width: 100%;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-sizing: border-box;
}

.pomodoro-plan__head,
.pomodoro-plan__row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) 2.2rem;
  border-bottom: 1px solid rgba(26, 23, 20, 0.1);
}

.pomodoro-plan__row:last-child {
  border-bottom: 0;
}

.pomodoro-plan__head {
  background: rgba(231, 220, 203, 0.7);
}

.pomodoro-plan__cell {
  padding: 0.45rem 0.55rem;
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.pomodoro-plan__head .pomodoro-plan__cell {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  align-items: center;
}

.pomodoro-plan__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  padding-top: 0.85rem;
}

.pomodoro-plan__cell--action {
  justify-content: center;
  align-items: flex-start;
  padding-inline: 0.2rem;
  padding-top: 0.55rem;
}

.pomodoro-plan__input {
  width: 100%;
  min-height: 2.3rem;
  height: auto;
  padding: 0.55rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  field-sizing: content;
}

.pomodoro-plan__input:focus {
  outline: none;
  border-color: rgba(196, 122, 44, 0.55);
  background: #fff;
}

.pomodoro-plan__row.is-done .pomodoro-plan__label {
  color: #3f6f4f;
}

.pomodoro-plan__row.is-done .pomodoro-plan__input {
  text-decoration: line-through;
  color: var(--ink-soft);
}

.pomodoro-plan__remove {
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.pomodoro-plan__remove:hover:not(:disabled) {
  color: #9a2f2f;
}

.pomodoro-plan__remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pomodoro-plan__add {
  justify-self: start;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: var(--amber);
  color: var(--foam);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.pomodoro-plan__add:hover:not(:disabled) {
  background: var(--amber-deep);
}

.pomodoro-plan__add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pomodoro-plan__progress {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.pomodoro-plan__progress.is-done {
  color: #3f6f4f;
}

@media (max-width: 520px) {
  .pomodoro-plan__head,
  .pomodoro-plan__row {
    grid-template-columns: 6.4rem minmax(0, 1fr) 2rem;
  }
}

.pomodoro-board {
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: min(100%, 28rem);
  margin-inline: auto;
  padding: 1.35rem 1.2rem 1.4rem;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: rgba(247, 241, 232, 0.9);
  box-sizing: border-box;
}

.pomodoro-board__mode {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.pomodoro-board[data-mode='short'] .pomodoro-board__mode,
.pomodoro-board[data-mode='long'] .pomodoro-board__mode {
  color: #3f6f4f;
}

.pomodoro-board__ring {
  position: relative;
  width: min(100%, 17rem);
  aspect-ratio: 200 / 220;
  display: grid;
  place-items: center;
}

.pomodoro-board__ring svg.pomodoro-tomato {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  overflow: visible;
}

.pomodoro-board__track,
.pomodoro-board__progress {
  fill: none;
}

.pomodoro-board__track {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 7;
}

.pomodoro-board__progress {
  stroke: #fff4e8;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}

.pomodoro-board[data-mode='short'] .pomodoro-board__progress,
.pomodoro-board[data-mode='long'] .pomodoro-board__progress {
  stroke: #dff5d4;
}

.pomodoro-tomato__face {
  fill: rgba(255, 248, 240, 0.94);
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 2;
}

.pomodoro-board__time {
  position: absolute;
  top: 58.5%;
  left: 50%;
  z-index: 1;
  margin: 0;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 11vw, 3.25rem);
  line-height: 1;
  color: #1a1714;
  letter-spacing: 0.02em;
  font-weight: 400;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.pomodoro-board__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.pomodoro-board__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.pomodoro-btn {
  min-width: 6.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.pomodoro-btn:hover {
  border-color: rgba(196, 122, 44, 0.55);
}

.pomodoro-btn--primary {
  background: var(--amber);
  border-color: var(--amber-deep);
  color: var(--foam);
}

.pomodoro-btn--primary:hover {
  background: var(--amber-deep);
}

.pomodoro-board__meta {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.pomodoro-board__meta strong {
  color: var(--ink);
}

.pomodoro-board__dots {
  display: flex;
  gap: 0.4rem;
}

.pomodoro-dot {
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid rgba(26, 23, 20, 0.2);
  background: transparent;
}

.pomodoro-dot.is-filled {
  background: var(--amber);
  border-color: var(--amber-deep);
}

/* —— Skincare —— */

.skincare {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 36rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.skincare__intro {
  display: grid;
  gap: 0.35rem;
}

.skincare__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.skincare__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hub-card[hidden] {
  display: none !important;
}

/* —— Nastavit aplikaci —— */

.app-settings {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 48rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.app-settings__intro {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

.app-settings__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.app-settings__lede {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.45;
}

.app-settings__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-settings__btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  aspect-ratio: 1;
  width: 100%;
  min-height: 0;
  padding: 0.55rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  background: var(--field);
  color: var(--foam);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.app-settings__btn-label {
  font-size: clamp(0.72rem, 1.6vw, 0.9rem);
  font-weight: 600;
  line-height: 1.2;
}

.app-settings__btn-state {
  font-size: clamp(0.65rem, 1.3vw, 0.75rem);
  opacity: 0.85;
  line-height: 1.2;
}

.app-settings__btn.is-on {
  border-color: var(--amber-deep);
  background: var(--amber);
  color: var(--ink);
}

.app-settings__btn.is-on:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
}

.app-settings__btn.is-off:hover {
  background: var(--field-focus);
}

@media (max-width: 720px) {
  .app-settings__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
  }
}

/* —— Jídelníček —— */

.mealplan {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 42rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.mealplan.is-month {
  width: min(100%, 72rem);
}

.mealplan__intro {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  text-align: center;
}

.mealplan__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.mealplan__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.mealplan__toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.mealplan__mode-btn {
  appearance: none;
  border: 1px solid var(--amber-deep);
  background: var(--amber);
  color: var(--ink);
  min-height: 2.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: 0.55rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.mealplan__mode-btn:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
}

.mealplan__mode-btn.is-active {
  border-color: var(--amber-deep);
  background: var(--amber-deep);
  color: var(--ink);
}

.mealplan__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.mealplan__period {
  margin: 0;
  min-width: 12rem;
  text-align: center;
  color: #fff;
  font-size: 0.92rem;
}

.mealplan__nav-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.mealplan__nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.mealplan__weeks {
  display: grid;
  gap: 1rem;
  justify-items: stretch;
}

.mealplan.is-week {
  width: min(100%, 68rem);
}

.mealplan.is-week .mealplan__weeks {
  width: 100%;
  margin-inline: auto;
}

.mealplan.is-week .mealplan-week__days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    'd0 d1 d2'
    'd3 d4 d5'
    '.  d6 .';
  gap: 0.75rem;
}

.mealplan.is-week .mealplan-day[data-wd='0'] {
  grid-area: d0;
}

.mealplan.is-week .mealplan-day[data-wd='1'] {
  grid-area: d1;
}

.mealplan.is-week .mealplan-day[data-wd='2'] {
  grid-area: d2;
}

.mealplan.is-week .mealplan-day[data-wd='3'] {
  grid-area: d3;
}

.mealplan.is-week .mealplan-day[data-wd='4'] {
  grid-area: d4;
}

.mealplan.is-week .mealplan-day[data-wd='5'] {
  grid-area: d5;
}

.mealplan.is-week .mealplan-day[data-wd='6'] {
  grid-area: d6;
}

@media (max-width: 820px) {
  .mealplan.is-week .mealplan-week__days {
    grid-template-columns: 1fr;
    grid-template-areas:
      'd0'
      'd1'
      'd2'
      'd3'
      'd4'
      'd5'
      'd6';
  }
}

.mealplan.is-month .mealplan__weeks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

@media (max-width: 720px) {
  .mealplan.is-month .mealplan__weeks {
    grid-template-columns: 1fr;
  }
}

.mealplan-week {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
  background: var(--glass);
  align-content: start;
}

.mealplan-week__head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.mealplan-week__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foam);
}

.mealplan-week__range {
  color: var(--foam-muted);
  font-size: 0.82rem;
}

.mealplan-week__days {
  display: grid;
  gap: 0.75rem;
}

.mealplan-day {
  display: grid;
  gap: 0.4rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.65rem;
  background: rgba(247, 241, 232, 0.04);
}

.mealplan-day.is-today {
  border-color: var(--amber);
  border-width: 2px;
  background: rgba(196, 122, 44, 0.12);
}

.mealplan-day.is-lunch-only {
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
}

.mealplan-day.is-lunch-only .mealplan-day__slots {
  gap: 0;
}

.mealplan-day.is-lunch-only .mealplan-slot {
  grid-template-columns: 1fr;
}

.mealplan-day.is-lunch-only .mealplan-slot__label {
  display: none;
}

.mealplan-day__label {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.mealplan-day.is-weekend .mealplan-day__label {
  color: #e8b56a;
}

.mealplan-day__slots {
  display: grid;
  gap: 0.35rem;
}

.mealplan-slot {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.45rem;
  align-items: center;
}

.mealplan-slot__label {
  color: var(--foam-muted);
  font-size: 0.75rem;
}

.mealplan-slot__field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem;
  align-items: center;
  min-width: 0;
}

.mealplan-slot__add {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--amber-deep);
  border-radius: 0.45rem;
  background: var(--amber);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.mealplan-slot__add:hover {
  background: var(--amber-deep);
}

.mealplan-slot__add.is-added {
  background: #6f9e4a;
  border-color: #5a8439;
  color: #fff;
}

.mealplan-slot__add:disabled {
  opacity: 0.65;
  cursor: wait;
}

.mealplan-day__input {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.45rem;
  background: var(--field);
  color: var(--foam);
  outline: none;
  font-size: 0.88rem;
}

.mealplan-day__input:focus {
  background: var(--field-focus);
  border-color: rgba(196, 122, 44, 0.55);
}

@media (max-width: 520px) {
  .mealplan-slot {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .mealplan-day.is-lunch-only {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* —— Rozpočet —— */

.budget {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 96rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.budget__intro {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

.budget__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.budget__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.budget-grid {
  display: grid;
  gap: 0.85rem;
  align-items: stretch;
  justify-items: stretch;
}

.budget-grid--hero {
  justify-items: center;
  align-items: start;
}

@media (min-width: 900px) {
  .budget-grid:not(.budget-grid--hero) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .budget-grid:not(.budget-grid--hero) > .budget-sheet {
    width: 100%;
    max-width: none;
    height: 100%;
    justify-self: stretch;
    align-self: stretch;
  }
}

.budget-sheet {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
  width: 100%;
  padding: 0.9rem 0.75rem 1rem;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: rgba(247, 241, 232, 0.42);
  box-sizing: border-box;
}

.budget-sheet--green {
  border-color: #3f8f56;
  background: #c8e6d0;
  width: 100%;
  min-width: 100%;
  height: 100%;
  justify-self: stretch;
  align-self: stretch;
  align-content: stretch;
  grid-template-rows: auto minmax(0, 1fr);
}

.budget-sheet--green .budget-sheet__body {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.budget-sheet--green .budget-table--summary {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.budget-table--summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.budget-table--summary .budget-table__body {
  display: grid;
  align-content: start;
}

.budget-table--summary .budget-table__row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.budget-table--summary .budget-table__cell {
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: center;
}

.budget-table--summary .budget-table__cell--amount {
  justify-content: flex-end;
}

.budget-summary__label,
.budget-summary__amount {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.budget-table__row--remain {
  background: #a8d5b4;
}

.budget-sheet__total.is-negative,
.budget-table__total-amount.is-negative {
  color: #9a2f2f;
}

.budget-sheet--hero {
  width: min(100%, 32rem);
}

.budget-sheet__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  align-items: start;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.budget-sheet__head::-webkit-details-marker {
  display: none;
}

.budget-sheet__head::after {
  content: '▾';
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease);
}

.budget-sheet:not([open]) > .budget-sheet__head::after {
  transform: rotate(-90deg);
}

.budget-sheet:not([open]) {
  padding-bottom: 0.9rem;
}

.budget-sheet__body {
  display: grid;
  gap: 0.75rem;
}

.budget-sheet__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.budget-sheet__total {
  margin: 0;
  grid-column: 1;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.budget-table {
  display: grid;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: #fff;
}

.budget-table__row--total {
  background: rgba(231, 220, 203, 0.85);
  border-top: 1px solid rgba(26, 23, 20, 0.14);
}

.budget-table__row--total .budget-table__cell {
  padding: 0.5rem;
  display: flex;
  align-items: center;
}

.budget-table__row--total .budget-table__cell--amount {
  justify-content: flex-end;
}

.budget-table__total-label,
.budget-table__total-amount {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.budget-table__body {
  display: grid;
}

.budget-table__row {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr) 5.75rem 2.1rem;
  border-bottom: 1px solid rgba(26, 23, 20, 0.1);
}

.budget-table__row:last-child {
  border-bottom: 0;
}

.budget-table__row--head {
  background: rgba(231, 220, 203, 0.7);
}

.budget-table__row--head .budget-table__cell {
  padding: 0.45rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.budget-table__cell {
  min-width: 0;
  border-right: 1px solid rgba(26, 23, 20, 0.1);
}

.budget-table__cell:last-child {
  border-right: 0;
}

.budget-table__cell--amount {
  text-align: right;
}

.budget-table__cell--action {
  display: grid;
  place-items: center;
}

.budget-table__input {
  width: 100%;
  height: 2.2rem;
  padding: 0 0.5rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  outline: none;
}

.budget-table__input--amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.budget-table__input:focus {
  background: rgba(196, 122, 44, 0.1);
}

.budget-table__remove {
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.budget-table__remove:hover {
  color: #9b2c20;
}

.budget-sheet__add {
  justify-self: start;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--amber-deep);
  background: var(--amber);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.budget-sheet__add:hover {
  background: var(--amber-deep);
  color: var(--foam);
}

@media (max-width: 899px) {
  .budget {
    width: 100%;
  }

  .budget-table__row {
    grid-template-columns: 6rem minmax(0, 1fr) 6rem 2.1rem;
  }

  .budget-table--summary .budget-table__row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .budget-table__input {
    height: 2.4rem;
  }
}

/* —— Co je potřeba —— */

.needs {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 36rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.needs__intro {
  display: grid;
  gap: 0.35rem;
}

.needs__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.needs__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* —— Wishlist —— */

.wishlist {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 36rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.wishlist__intro {
  display: grid;
  gap: 0.35rem;
}

.wishlist__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.wishlist__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* —— Vaření —— */

.cooking {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 72rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.cooking__intro {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

.cooking__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.cooking__lede,
.cooking__range {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.cooking__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.cooking-panel {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
  background: var(--glass);
}

.cooking-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foam);
}

.cooking-panel__days {
  display: grid;
  gap: 0.75rem;
}

.cooking-day {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem 0.75rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.65rem;
  background: rgba(247, 241, 232, 0.04);
}

.cooking-day.is-today {
  border-color: var(--amber);
  border-width: 2px;
  background: rgba(196, 122, 44, 0.12);
}

.cooking-day__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--foam-muted);
}

.cooking-day.is-weekend .cooking-day__title {
  color: #e8b56a;
}

.cooking-day.is-today .cooking-day__title {
  color: var(--foam);
}

.cooking-day__body {
  display: grid;
  gap: 0.35rem;
}

.cooking-day__body--cal {
  gap: 0.4rem;
}

.cooking-day__empty {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.85rem;
}

.cooking-cal-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr 1.75rem;
  gap: 0.4rem;
  align-items: center;
  padding: 0.3rem 0.35rem;
  border-radius: 0.4rem;
  background: var(--field);
}

.cooking-cal-row.is-done .cooking-cal-row__input {
  opacity: 0.65;
  text-decoration: line-through;
}

.cooking-cal-row__check {
  appearance: none;
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 0.35rem;
  background: rgba(247, 241, 232, 0.08);
  color: var(--foam-muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.cooking-cal-row__check:hover {
  border-color: rgba(111, 158, 74, 0.65);
  color: #8fbf66;
}

.cooking-cal-row__check.is-on {
  border-color: #5a8439;
  background: #6f9e4a;
  color: #fff;
}

.cooking-cal-row__input {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.4rem;
  background: rgba(247, 241, 232, 0.06);
  color: var(--foam);
  outline: none;
  font-size: 0.88rem;
}

.cooking-cal-row__input:focus {
  background: var(--field-focus);
  border-color: rgba(196, 122, 44, 0.55);
}

.cooking-cal-row__remove {
  appearance: none;
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--foam-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.cooking-cal-row__remove:hover {
  color: #f0c4bf;
  background: rgba(155, 44, 32, 0.2);
}

.cooking-day__add {
  appearance: none;
  justify-self: start;
  margin-top: 0.15rem;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--amber-deep);
  border-radius: 0.45rem;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.cooking-day__add:hover {
  background: var(--amber-deep);
}

@media (max-width: 820px) {
  .cooking__grid {
    grid-template-columns: 1fr;
  }
}

/* —— Inspirace —— */

.inspiration {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 56rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.inspiration__intro {
  display: grid;
  gap: 0.35rem;
}

.inspiration__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foam);
}

.inspiration__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.inspiration__create {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.inspiration__input {
  min-height: 2.6rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.55rem;
  background: var(--field);
  color: var(--foam);
  outline: none;
}

.inspiration__input:focus {
  background: var(--field-focus);
  border-color: rgba(196, 122, 44, 0.55);
}

.inspiration__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--amber-deep);
  border-radius: 0.55rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.inspiration__btn:hover {
  background: var(--amber-deep);
}

.inspiration__btn--ghost {
  background: var(--field);
  border-color: var(--glass-border);
  color: var(--foam);
}

.inspiration__btn--ghost:hover {
  background: var(--field-focus);
}

.inspiration__btn--danger {
  background: transparent;
  border-color: rgba(155, 44, 32, 0.55);
  color: #f0c4bf;
}

.inspiration__btn--danger:hover {
  background: rgba(155, 44, 32, 0.25);
}

.inspiration__albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.85rem;
}

.inspiration-album {
  appearance: none;
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
  background: var(--glass);
  color: var(--foam);
  text-align: left;
  cursor: pointer;
}

.inspiration-album:hover {
  background: rgba(247, 241, 232, 0.12);
}

.inspiration-album__cover {
  display: block;
  aspect-ratio: 1;
  border-radius: 0.55rem;
  background:
    linear-gradient(160deg, rgba(247, 241, 232, 0.16), rgba(196, 122, 44, 0.18));
  background-size: cover;
  background-position: center;
}

.inspiration-album__cover.has-image {
  background-color: rgba(26, 23, 20, 0.35);
}

.inspiration-album__meta {
  display: grid;
  gap: 0.15rem;
}

.inspiration-album__title {
  font-weight: 650;
  font-size: 0.95rem;
}

.inspiration-album__count {
  color: var(--foam-muted);
  font-size: 0.8rem;
}

.inspiration__album-bar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.inspiration__album-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foam);
}

.inspiration__album-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.inspiration__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.65rem;
}

.inspiration-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass);
}

.inspiration-photo__img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.inspiration-photo__delete {
  appearance: none;
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(26, 23, 20, 0.72);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.inspiration__empty {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .inspiration__create {
    grid-template-columns: 1fr;
  }
}

/* —— Chores / Úklid —— */

.chores {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 36rem);
  margin-inline: auto;
  animation: rise 0.55s var(--ease) both;
}

.chores__intro {
  display: grid;
  gap: 0.35rem;
  text-align: center;
  justify-items: center;
}

.chores__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--foam);
}

.chores__lede {
  margin: 0;
  color: var(--foam-muted);
  font-size: 0.95rem;
}

.chores__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.chores__field {
  display: grid;
}

.chores__field input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  outline: none;
}

.chores__field input:focus {
  border-color: rgba(196, 122, 44, 0.55);
}

.chores__add {
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--foam);
  font-weight: 600;
  cursor: pointer;
}

.chores__add:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.chores__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.chores__empty {
  margin: 0;
  color: var(--foam-muted);
  text-align: center;
}

.chore-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.chore-item.is-done {
  opacity: 0.62;
}

.chore-item__check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chore-item__box {
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid var(--ink-soft);
  background: transparent;
}

.chore-item.is-done .chore-item__box {
  border-color: var(--amber);
  background: var(--amber);
}

.chore-item.is-done .chore-item__text {
  text-decoration: line-through;
}

.chore-item__remove {
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  cursor: pointer;
}

.chore-item__remove:hover {
  color: var(--ink);
}

.calendar {
  display: grid;
  gap: 1.15rem;
  animation: rise 0.55s var(--ease) both;
}

.calendar__toolbar {
  display: grid;
  gap: 0.9rem;
  align-items: center;
}

.calendar__nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.calendar__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: capitalize;
  color: var(--foam);
}

.calendar__nav-btn,
.calendar__today,
.calendar__view-btn {
  border: 1px solid rgba(247, 241, 232, 0.35);
  background: rgba(247, 241, 232, 1);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.calendar__nav-btn {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1;
}

.calendar__nav-btn:hover,
.calendar__today:hover,
.calendar__view-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.calendar__views {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.calendar__view-btn {
  padding: 0.65rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.calendar__view-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--foam);
}

.calendar__today {
  padding: 0.65rem 0.9rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.calendar__board--day {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  max-height: min(70svh, 42rem);
  overflow: auto;
}

.day-layout {
  display: grid;
  grid-template-columns: minmax(0, 25%) minmax(0, 75%);
  align-items: stretch;
  min-height: 100%;
}

.day-cooking {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 0.85rem 0.75rem;
  border-right: 1px solid var(--line);
  background: rgba(247, 241, 232, 0.72);
}

.day-cooking__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.day-cooking__item {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
  min-height: 2.5rem;
}

.day-cooking__item.is-done .day-cooking__input {
  text-decoration: line-through;
  color: var(--ink-soft);
}

.day-cooking__check {
  width: 1.45rem;
  height: 1.45rem;
  border: 2px solid rgba(26, 23, 20, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  padding: 0;
  cursor: pointer;
}

.day-cooking__check.is-on {
  border-color: var(--amber-deep);
  background: var(--amber);
  box-shadow: inset 0 0 0 3px rgba(247, 241, 232, 0.95);
}

.day-cooking__input {
  width: 100%;
  min-width: 0;
  height: 2.35rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(26, 23, 20, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  box-sizing: border-box;
}

.day-cooking__input:focus {
  outline: none;
  border-color: rgba(196, 122, 44, 0.55);
  background: #fff;
}

.day-cooking__remove {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.day-cooking__remove:hover:not(:disabled) {
  color: #9a2f2f;
}

.day-cooking__remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.day-cooking__add {
  justify-self: start;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.day-cooking__add:hover {
  border-color: rgba(196, 122, 44, 0.55);
}

.day-schedule {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  min-width: 0;
}

@media (max-width: 720px) {
  .day-layout {
    grid-template-columns: 1fr;
  }

  .day-cooking {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.day-schedule__loading {
  margin: 0;
  padding: 1.25rem;
  color: var(--ink-soft);
}

.day-schedule__rows {
  display: grid;
}

.day-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
  min-height: 3.1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.day-row:last-child {
  border-bottom: 0;
}

.day-row.is-in-week {
  background: rgba(196, 122, 44, 0.28);
}

.day-row.is-from-cooking {
  grid-template-columns: minmax(0, 1fr) auto;
  background: rgba(196, 122, 44, 0.16);
  box-shadow: inset 3px 0 0 var(--amber);
}

.day-row.is-from-period {
  grid-template-columns: minmax(0, 1fr) auto;
  background: rgba(196, 92, 106, 0.18);
  box-shadow: inset 3px 0 0 #c45c6a;
}

.day-row.is-from-period .day-row__text {
  font-weight: 600;
}

.week-day__note.is-from-period {
  background: rgba(196, 92, 106, 0.2);
  border-color: rgba(196, 92, 106, 0.35);
}

.day-row__time,
.day-row__text {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  outline: none;
}

.day-row__time {
  font-weight: 600;
  text-align: center;
}

.day-row__time:focus,
.day-row__text:focus {
  border-color: rgba(196, 122, 44, 0.55);
  background: rgba(255, 255, 255, 1);
}

.day-row__time::placeholder,
.day-row__text::placeholder {
  color: rgba(61, 55, 48, 0.45);
}

.day-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.day-row__action {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.day-row__action:hover {
  border-color: var(--amber);
  color: var(--ink);
  background: rgba(196, 122, 44, 0.34);
}

.day-row__week.is-on {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--ink);
}

.day-row__remove {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.day-row__remove:hover {
  color: var(--ink);
}

@media (max-width: 720px) {
  .day-row {
    grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  }

  .day-row.is-from-cooking {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .day-row.is-from-period {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .day-row__actions {
    grid-column: 1 / -1;
  }
}

.day-schedule__add {
  justify-self: start;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--foam);
  font-weight: 600;
  cursor: pointer;
}

.day-schedule__add:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.calendar__board--week {
  display: grid;
  gap: 0.55rem;
}

.week-day {
  min-height: 7.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  display: grid;
  grid-template-rows: auto 1fr;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease);
}

.week-day:hover {
  background: rgba(255, 255, 255, 0.9);
}

.week-day.is-today {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.week-day.is-weekend {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 3px var(--amber);
}

.week-day__head {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--line);
}

.week-day__name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.week-day__date {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: capitalize;
  white-space: nowrap;
}

.week-day__body {
  min-height: 4.5rem;
  padding: 0.55rem 0.75rem 0.75rem;
}

.week-day__notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.week-day__note {
  display: grid;
  gap: 0.1rem;
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--ink);
}

.week-day__note strong {
  font-size: 0.78rem;
  color: var(--amber-deep);
}

.month-grid,
.year-month {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.month-grid__head,
.year-month__head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.month-grid__head span,
.year-month__head span {
  padding: 0.65rem 0.2rem;
}

.month-grid__body,
.year-month__body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.month-cell,
.year-day {
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease);
}

.month-cell {
  min-height: 4.5rem;
  padding: 0.55rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.month-cell:hover,
.year-day:hover:not(.is-outside) {
  background: rgba(196, 122, 44, 0.3);
}

.month-cell.is-weekend,
.year-day.is-weekend:not(.is-outside) {
  box-shadow: inset 0 0 0 3px var(--amber);
}

.month-cell.is-outside,
.year-day.is-outside {
  color: rgba(26, 23, 20, 0.28);
}

.month-cell.is-today .month-cell__num,
.year-day.is-today {
  background: var(--amber);
  color: var(--ink);
}

.calendar__board--month .month-cell.is-period {
  background: rgba(196, 92, 106, 0.42);
}

.calendar__board--month .month-cell.is-period-predicted {
  background: rgba(196, 92, 106, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(196, 92, 106, 0.45);
}

.calendar__board--month .month-cell.is-period.is-today .month-cell__num,
.calendar__board--month .month-cell.is-period-predicted.is-today .month-cell__num {
  background: #9a3d4a;
  color: #fff;
}

.month-period-legend {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.month-period-legend__swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.35rem;
  vertical-align: -0.1rem;
  border: 1px solid rgba(26, 23, 20, 0.12);
}

.month-period-legend__swatch.is-period {
  background: rgba(196, 92, 106, 0.55);
}

.month-period-legend__swatch.is-predicted {
  background: rgba(196, 92, 106, 0.18);
  box-shadow: inset 0 0 0 1px rgba(196, 92, 106, 0.5);
}

.month-cell__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.year-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

.year-month {
  padding: 0.75rem 0.65rem 0.85rem;
}

.year-month__title {
  margin: 0 0 0.55rem;
  padding: 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  text-transform: capitalize;
}

.year-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0;
  border: 0;
  font-size: 0.72rem;
  text-align: center;
}

.year-day.is-today {
  font-weight: 700;
}

@media (min-width: 720px) {
  .calendar__toolbar {
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
  }

  .calendar__views {
    width: 22rem;
  }

  .calendar__board--week {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
  }

  .week-day {
    min-height: 22rem;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
  }

  .week-day:last-child {
    border-right: 0;
  }

  .week-day.is-today {
    background: #fff;
  }

  .week-day.is-weekend {
    box-shadow: inset 0 0 0 3px var(--amber);
    z-index: 1;
  }

  .week-day:hover {
    background: rgba(255, 255, 255, 0.55);
  }

  .week-day.is-today:hover {
    background: #fff;
  }

  .year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .app {
    width: min(100% - 2rem, 100rem);
    padding-top: 1.75rem;
  }

  .year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* —— Workouts —— */

.workout {
  display: grid;
  gap: 1.25rem;
  animation: rise 0.55s var(--ease) both;
}

.workout__intro {
  display: grid;
  gap: 0.35rem;
  text-align: center;
  justify-items: center;
}

.workout__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--foam);
}

.workout__layout {
  display: grid;
  gap: 1rem;
}

.workout-sidebar,
.workout-detail {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  padding: 1rem;
}

.workout-create {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.workout-create__field,
.workout-exercise-form label {
  display: grid;
  gap: 0.35rem;
}

.workout-create__field span,
.workout-exercise-form label span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.workout-create__field input,
.workout-detail__title,
.workout-exercise-form input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  outline: none;
}

.workout-create__field input:focus,
.workout-detail__title:focus,
.workout-exercise-form input:focus {
  border-color: rgba(26, 23, 20, 0.35);
}

.workout-create__submit,
.workout-exercise-form button[type='submit'] {
  padding: 0.8rem 1rem;
  border: 0;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.workout-create__submit:hover,
.workout-exercise-form button[type='submit']:hover {
  background: var(--amber-deep);
  color: var(--foam);
}

.workout-plans {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.workout-plans__item {
  width: 100%;
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid transparent;
  background: rgba(26, 23, 20, 0.04);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.workout-plans__item small {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.workout-plans__item.is-active,
.workout-plans__item:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.workout-detail__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
}

.workout-detail__title {
  flex: 1;
  min-width: 12rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.workout-detail__delete,
.workout-exercise button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.35rem 0.2rem;
}

.workout-detail__delete:hover,
.workout-exercise button:hover {
  color: var(--ink);
}

.workout-exercise-form {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.workout-exercises {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.workout-exercise {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.2rem;
  border-bottom: 1px solid var(--line);
}

.workout-exercise:last-child {
  border-bottom: 0;
}

.workout-exercise div {
  display: grid;
  gap: 0.15rem;
}

.workout-exercise strong {
  font-weight: 600;
}

.workout-exercise span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.workout-empty,
.workout-placeholder {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.workout-placeholder {
  padding: 1.5rem 0.25rem;
}

@media (min-width: 860px) {
  .workout__layout {
    grid-template-columns: minmax(15rem, 20rem) 1fr;
    align-items: start;
  }

  .workout-exercise-form {
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: end;
  }
}

/* —— Exercise library —— */

.workout-tools {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.workout-tools__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  width: min(100%, 42rem);
  margin-inline: auto;
}

.workout-tile {
  display: grid;
  gap: 0.25rem;
  align-content: center;
  min-height: 4.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55) 0%, rgba(247, 241, 232, 0.35) 100%),
    var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.workout-tile:hover {
  border-color: rgba(196, 122, 44, 0.45);
  transform: translateY(-2px);
}

.workout-tile.is-open {
  border-color: var(--amber-deep);
  background: var(--amber);
  color: var(--ink);
  box-shadow: none;
}

.workout-tile.is-open .workout-tile__hint {
  color: rgba(26, 23, 20, 0.72);
}

.workout-tile__label {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.workout-tile__hint {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .workout-tools__buttons {
    gap: 0.45rem;
  }

  .workout-tile {
    min-height: 4.25rem;
    padding: 0.7rem 0.7rem;
  }
}

.history__panel[hidden],
.history-overview__panel[hidden],
.go-train__panel[hidden],
.plan-schedule[hidden],
#plan-view[hidden],
.workout-cal__detail[hidden],
.plan-detail__gallery[hidden] {
  display: none !important;
}

.go-train {
  display: grid;
  gap: 0.65rem;
}

.go-train__panel {
  width: min(100%, 36rem);
  margin-inline: auto;
  display: grid;
  gap: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 1rem 1.1rem 1.15rem;
}

.go-train__panel:has(#go-train-session:not([hidden])) {
  width: min(100%, 42rem);
}

.go-train-session {
  display: grid;
  gap: 0.9rem;
}

.go-train-session[hidden] {
  display: none !important;
}

#go-train-picker[hidden] {
  display: none !important;
}

.go-train-session__toolbar {
  display: flex;
  justify-content: flex-start;
}

.go-train-session__back {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.2rem 0;
}

.go-train-session__back:hover {
  color: var(--amber-deep);
}

.go-train-session__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.go-train-session__icon {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  object-fit: contain;
}

.go-train-session__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 400;
  line-height: 1.15;
}

.go-train-session__progress {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.go-train__lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.go-train__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.go-train__item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem 0.9rem;
}

.go-train__item.is-active {
  border-color: rgba(196, 122, 44, 0.55);
  background: rgba(196, 122, 44, 0.12);
  box-shadow: inset 3px 0 0 var(--amber);
}

.go-train__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.go-train__icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  object-fit: contain;
}

.go-train__info {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 12rem;
}

.go-train__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.go-train__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.go-train__tag {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  font-weight: 600;
}

.go-train__tag--muted {
  color: var(--ink-soft);
  font-weight: 500;
}

.go-train__count {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--amber-deep);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.go-train__count:hover:not(:disabled),
.go-train__count.is-open {
  color: var(--ink);
}

.go-train__count:disabled {
  color: var(--ink-soft);
  text-decoration: none;
  cursor: default;
}

.go-train__pick {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--foam);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.go-train__pick:hover {
  background: var(--amber);
  border-color: var(--amber);
}

.go-train__pick.is-on {
  background: rgba(196, 122, 44, 0.18);
  border-color: var(--amber);
  color: var(--ink);
}

.go-train__details {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.go-train__gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.go-train__gallery-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.go-train__exercise {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

.go-train__exercise-image {
  width: 4.5rem;
  height: 3.2rem;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #efe6d8;
}

.go-train__exercise-image--empty {
  display: block;
}

.go-train__exercise-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.go-train__exercise-body strong {
  font-size: 0.95rem;
}

.go-train__exercise-body span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.library__toolbar {
  display: grid;
  gap: 0.75rem;
}

.library__heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 400;
}

.library__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.library__filter {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.library__filter.is-active,
.library__filter:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--foam);
}

.library__grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

.library-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  display: grid;
  overflow: hidden;
}

.library-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #efe6d8;
  border-bottom: 1px solid var(--line);
}

.library-card__body {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem 1rem;
}

.library-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.library-card__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.library-card__cue {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.library-card__variants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.library-card__variant {
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem 0.45rem 0.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  text-align: center;
}

.library-card__variant strong {
  font-size: 0.78rem;
  font-weight: 600;
}

.library-card__reps-wrap {
  display: grid;
  gap: 0.15rem;
}

.library-card__reps-hint {
  font-size: 0.68rem;
  color: var(--ink-soft);
}

.library-card__reps {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  outline: none;
}

.library-card__reps:focus {
  border-color: rgba(196, 122, 44, 0.55);
}

.library-card__add {
  padding: 0.4rem 0.35rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--foam);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.library-card__add:hover {
  background: var(--amber);
  border-color: var(--amber);
}

.library-card__variant.is-selected {
  border-color: rgba(46, 125, 50, 0.55);
  background: rgba(76, 175, 80, 0.18);
  box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.25);
}

.library-card__variant.is-selected .library-card__add {
  border-color: #2e7d32;
  background: #2e7d32;
  color: #fff;
}

.library-card__variant.is-selected .library-card__add:hover {
  background: #256628;
  border-color: #256628;
}

.library-card__added {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.my-plan {
  display: grid;
  gap: 0.65rem;
}

.my-plan__panel {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  display: grid;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  padding: 0;
  justify-items: center;
}

.my-plan__panel:has(#plan-detail-view:not([hidden])),
.my-plan__panel:has(#plan-builder:not([hidden])) {
  width: min(100%, 61.2rem);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 1rem 1.1rem 1.15rem;
  justify-items: stretch;
}

.my-plan__panel:has(#plan-builder:not([hidden])) {
  width: min(100%, 68rem);
}

.my-plan__panel[hidden] {
  display: none !important;
}

#plan-view {
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: 100%;
  text-align: center;
}

#plan-view:has(#plan-detail-view:not([hidden])) {
  justify-items: stretch;
}

#plan-view .plan-cards,
#plan-view .plan-detail {
  width: 100%;
  text-align: left;
}

#plan-grid-view {
  width: 100%;
  display: flex;
  justify-content: center;
}

#plan-grid-view[hidden],
#plan-detail-view[hidden] {
  display: none !important;
}

.plan-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  width: fit-content;
  max-width: 100%;
}

.plan-grid > li {
  width: 8.5rem;
  flex: 0 0 8.5rem;
}

.plan-grid__tile {
  display: grid;
  place-content: center;
  gap: 0.4rem;
  aspect-ratio: 1;
  width: 100%;
  padding: 0.85rem;
  border: 2px solid var(--amber);
  background:
    linear-gradient(160deg, rgba(196, 122, 44, 0.16) 0%, rgba(255, 255, 255, 0.95) 100%),
    #fff;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.plan-grid__icon {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto;
  object-fit: contain;
}

.plan-grid__tile:hover {
  border-color: var(--amber-deep);
  transform: translateY(-2px);
}

.plan-grid__tile.is-active {
  border-color: var(--amber-deep);
  box-shadow: inset 0 0 0 1px rgba(196, 122, 44, 0.25);
}

.plan-grid__tile--create {
  border: 1px dashed var(--line);
  background:
    linear-gradient(160deg, rgba(196, 122, 44, 0.16) 0%, rgba(255, 255, 255, 0.85) 100%),
    rgba(255, 255, 255, 0.95);
}

.plan-grid__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.plan-grid__badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.plan-grid__action {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.plan-grid__tile:hover .plan-grid__action {
  color: var(--amber-deep);
}

.plan-card__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.35;
}

.plan-detail {
  display: grid;
  gap: 0.85rem;
}

.plan-detail__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.plan-detail__back,
.plan-detail__delete {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.plan-detail__back:hover {
  border-color: var(--amber);
  background: rgba(196, 122, 44, 0.12);
}

.plan-detail__delete {
  color: var(--ink-soft);
}

.plan-detail__delete:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.plan-detail__name {
  display: grid;
  gap: 0.35rem;
}

.plan-detail__name span,
.plan-detail__heading {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.plan-detail__name input {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}

.plan-detail__name input:focus {
  border-color: rgba(196, 122, 44, 0.55);
}

.plan-detail__library {
  justify-self: start;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--foam);
  font-weight: 600;
  cursor: pointer;
}

.plan-detail__library:hover {
  background: var(--amber);
  border-color: var(--amber);
}

.plan-detail__gallery {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  padding: 0.85rem;
}

.plan-builder__icons {
  display: grid;
  gap: 0.5rem;
}

.plan-icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.plan-icon-picker__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.18s var(--ease),
    background 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.plan-icon-picker__btn img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  pointer-events: none;
}

.plan-icon-picker__btn:hover {
  border-color: rgba(196, 122, 44, 0.55);
  transform: translateY(-1px);
}

.plan-icon-picker__btn.is-selected {
  border-color: var(--amber-deep);
  background: rgba(196, 122, 44, 0.16);
  box-shadow: inset 0 0 0 1px rgba(196, 122, 44, 0.2);
}

.plan-builder__name {
  display: grid;
  gap: 0.35rem;
}

.plan-builder__name span {
  font-size: 0.85rem;
  font-weight: 600;
}

.plan-builder__name input {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
}

.plan-builder__name input:focus {
  border-color: rgba(196, 122, 44, 0.55);
}

#exercises-empty {
  text-align: center;
}

.plan-builder__save,
.plan-builder__cancel {
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  font-weight: 600;
  cursor: pointer;
}

.plan-builder__save {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--foam);
}

.plan-builder__save:hover {
  background: var(--amber);
  border-color: var(--amber);
}

.plan-builder__save:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.plan-builder__save:disabled:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.plan-builder__cancel {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.plan-builder__cancel:hover {
  border-color: var(--amber-deep);
  background: rgba(196, 122, 44, 0.12);
}

.plan-builder {
  display: grid;
  gap: 1.25rem;
}

.plan-builder[hidden] {
  display: none !important;
}

.plan-schedule {
  width: min(100%, 68rem);
  margin-inline: auto;
  display: grid;
  gap: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 1rem 1.1rem 1.15rem;
  text-align: left;
}

.plan-schedule[hidden] {
  display: none !important;
}

.plan-schedule__head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 0.85rem;
}

.plan-schedule__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 400;
}

.plan-schedule__lede {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.plan-schedule__back {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.plan-schedule__back:hover {
  border-color: var(--amber-deep);
  background: rgba(196, 122, 44, 0.12);
}

.plan-schedule__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.plan-schedule__month {
  margin: 0;
  min-width: 10rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  text-transform: capitalize;
}

.plan-schedule__nav-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.plan-schedule__nav-btn:hover {
  border-color: var(--amber-deep);
  background: rgba(196, 122, 44, 0.12);
}

.plan-schedule__grid .month-cell.is-scheduled {
  border-color: #2e7d32;
  background: rgba(76, 175, 80, 0.22);
}

.plan-schedule__grid .month-cell.is-scheduled:hover {
  background: rgba(76, 175, 80, 0.32);
}

.plan-schedule__grid .month-cell.is-selected {
  box-shadow: inset 0 0 0 2px #2e7d32;
}

.plan-schedule__grid .month-cell__count {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #2e7d32;
  line-height: 1;
}

.plan-schedule__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.plan-schedule__list:empty {
  display: none;
}

.plan-schedule__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.plan-schedule__item-title {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.25;
}

.plan-schedule__item-remove {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  padding: 0.3rem 0.55rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}

.plan-schedule__item-remove:hover {
  border-color: var(--amber-deep);
  background: rgba(196, 122, 44, 0.12);
  color: var(--ink);
}

.plan-schedule__empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.plan-schedule__empty[hidden] {
  display: none !important;
}

.plan-schedule__detail {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.plan-schedule__detail[hidden] {
  display: none !important;
}

.plan-schedule__detail-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  text-transform: capitalize;
}

.plan-schedule__field {
  display: grid;
  gap: 0.35rem;
}

.plan-schedule__field span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.plan-schedule__field select {
  width: min(100%, 24rem);
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.plan-schedule__detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.plan-schedule__save,
.plan-schedule__clear {
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.plan-schedule__save {
  border: 1px solid var(--amber-deep);
  background: var(--amber);
  color: #fff;
}

.plan-schedule__save:hover {
  background: var(--amber-deep);
}

.plan-schedule__clear {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.plan-schedule__clear:hover:not(:disabled) {
  border-color: var(--amber-deep);
  background: rgba(196, 122, 44, 0.12);
}

.plan-schedule__clear:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.plan-builder__head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 0.85rem;
}

.plan-builder__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 400;
}

.plan-builder__lede {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.plan-builder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.plan-builder__section-title {
  margin: 0 0 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.plan-builder__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border: 1px solid var(--line);
  background: rgba(196, 122, 44, 0.16);
  font-size: 0.8rem;
}

.plan-builder__draft,
.plan-builder__gallery,
.plan-builder__extras {
  display: grid;
  gap: 0.65rem;
}

.plan-extras {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.plan-extra {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  cursor: pointer;
}

.plan-extra input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--amber-deep);
}

.plan-extra__run {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-left: 1.65rem;
}

.plan-extra__run[hidden] {
  display: none !important;
}

.plan-extra__field {
  display: grid;
  gap: 0.3rem;
}

.plan-extra__field span {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.plan-extra__field input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
}

.plan-extra__field input:focus {
  border-color: rgba(196, 122, 44, 0.55);
}

@media (max-width: 560px) {
  .plan-extra__run {
    grid-template-columns: 1fr;
  }
}

.plan-builder__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.plan-draft-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.plan-draft-item__index {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--line);
  background: rgba(196, 122, 44, 0.12);
  font-size: 0.8rem;
  font-weight: 600;
}

.plan-draft-item__body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.plan-draft-item__body strong {
  font-size: 0.95rem;
}

.plan-draft-item__body span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.plan-draft-item__reps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.plan-draft-item__reps input {
  width: 5.5rem;
  min-width: 0;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
}

.plan-draft-item__reps input:focus {
  border-color: rgba(196, 122, 44, 0.55);
}

.plan-draft-item__remove {
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.plan-draft-item__remove:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.plan-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

.plan-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.plan-card.is-done {
  border-color: rgba(154, 92, 26, 0.45);
  background: rgba(196, 122, 44, 0.1);
}

.plan-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #efe6d8;
  border-bottom: 1px solid var(--line);
}

.plan-card__image--empty {
  min-height: 0;
}

.plan-card__image--badge {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(160deg, rgba(196, 122, 44, 0.22) 0%, rgba(247, 241, 232, 0.7) 100%),
    #efe6d8;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--line);
}

.plan-card__run-fields {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.plan-card__body {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.9rem 0.95rem;
}

.plan-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.plan-card__name {
  margin: 0;
  font-size: 1.05rem;
}

.plan-card__meta {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.plan-card__reps-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.plan-card__reps {
  width: 5.5rem;
  min-width: 0;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.plan-card__reps--wide {
  width: 6.5rem;
}

.plan-card__reps:focus {
  border-color: rgba(196, 122, 44, 0.55);
}

.plan-card__remove {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.2rem 0;
}

.plan-card__remove:hover {
  color: var(--ink);
}

.plan-card__check {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: start;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
}

.plan-card__box {
  width: 1.1rem;
  height: 1.1rem;
  border: 1.5px solid rgba(26, 23, 20, 0.35);
  flex: 0 0 auto;
}

.plan-card__check[aria-pressed='true'] .plan-card__box {
  border-color: var(--amber-deep);
  background: var(--amber);
}

.history {
  display: grid;
  gap: 1rem;
}

.history__panel {
  width: min(100%, 68rem);
  margin-inline: auto;
  display: grid;
  gap: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 1rem 1.1rem 1.15rem;
}

.workout-cal__motto {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.workout-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.workout-cal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 400;
  text-align: center;
  text-transform: capitalize;
}

.workout-cal__nav-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

.workout-cal__nav-btn:hover {
  border-color: rgba(196, 122, 44, 0.55);
}

.workout-cal__grid .month-cell {
  min-height: 3.4rem;
  display: grid;
  place-items: center;
  text-align: center;
}

.workout-cal__grid .month-cell.is-weekend {
  box-shadow: none;
}

.workout-cal__grid .month-cell.is-workout {
  background: rgba(72, 145, 90, 0.28);
}

.workout-cal__grid .month-cell.is-workout:hover {
  background: rgba(72, 145, 90, 0.4);
}

.workout-cal__grid .month-cell.is-selected {
  outline: 2px solid rgba(72, 145, 90, 0.85);
  outline-offset: -2px;
}

.workout-cal__grid .month-cell.is-workout.is-today .month-cell__num {
  background: #3f8f56;
  color: #fff;
}

.workout-cal__detail {
  display: grid;
  gap: 0.45rem;
  border: 1px solid rgba(72, 145, 90, 0.35);
  background: rgba(72, 145, 90, 0.1);
  padding: 0.85rem 0.95rem;
}

.workout-cal__detail-date {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: capitalize;
}

.workout-cal__detail-plan {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.workout-cal__detail-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.workout-cal__detail-list strong {
  color: var(--ink);
  font-weight: 600;
}

.workout-cal__month-stats {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem 0.95rem;
}

.workout-cal__month-stats[hidden] {
  display: none !important;
}

.workout-cal__month-stats-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.workout-cal__month-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.workout-cal__month-stats-list strong {
  color: var(--ink);
  font-weight: 600;
}

.workout-cal__exercises-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.workout-cal__exercises-toggle {
  margin: 0;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(72, 145, 90, 0.45);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.workout-cal__exercises-toggle:hover,
.workout-cal__exercises-toggle.is-open {
  border-color: rgba(72, 145, 90, 0.75);
  background: rgba(72, 145, 90, 0.14);
}

.workout-cal__exercise-panel {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.55rem;
}

.workout-cal__exercise-panel[hidden] {
  display: none !important;
}

.workout-cal__exercise-group {
  display: grid;
  gap: 0.35rem;
}

.workout-cal__exercise-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.workout-cal__exercise-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
}

.workout-cal__exercise-tile {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  width: 3.6rem;
}

.workout-cal__exercise-tile.is-pending {
  opacity: 0.55;
  filter: grayscale(0.25);
}

.workout-cal__exercise-icon {
  width: 3.1rem;
  height: 3.1rem;
  object-fit: cover;
  border: 1px solid rgba(72, 145, 90, 0.35);
  background: rgba(255, 255, 255, 0.85);
}

.workout-cal__exercise-tile.is-pending .workout-cal__exercise-icon {
  border-color: rgba(26, 23, 20, 0.2);
}

.workout-cal__exercise-icon--empty {
  display: block;
}

.workout-cal__exercise-stats {
  display: grid;
  gap: 0.05rem;
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.history-block {
  display: grid;
  gap: 0.75rem;
}

.history-block__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 400;
}

.history-days {
  display: grid;
  gap: 0.55rem;
}

.history-day {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  overflow: hidden;
}

.history-day__toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  text-transform: capitalize;
  cursor: pointer;
}

.history-day__toggle:hover {
  background: rgba(255, 255, 255, 0.35);
}

.history-day__summary {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
}

.history-day__body {
  padding: 0 1rem 1rem;
}

.history-day__grid {
  margin: 0;
}

.history-last-day {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  padding: 0.9rem 1rem 1.1rem;
  display: grid;
  gap: 0.85rem;
}

.history-last-day__date {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: capitalize;
}

.history-overview {
  display: grid;
  gap: 0.75rem;
}

.history-overview__toggle {
  justify-self: start;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.history-overview__toggle.is-open {
  background: var(--ink);
  color: var(--foam);
}

.history-overview__panel {
  display: grid;
  gap: 0.55rem;
}

.history-week {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.35rem;
}

.history-week__label {
  margin: 0;
  font-weight: 600;
}

.history-week__meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}


.history-card__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(196, 122, 44, 0.14);
}

.history-card__delete {
  justify-self: start;
  margin-top: 0.25rem;
  padding: 0.45rem 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.82rem;
}

.history-card__delete:hover {
  color: var(--ink);
}

@media (min-width: 900px) {
  .activity-forms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .library__grid,
  .plan-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .library__grid,
  .plan-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* —— Mobile-first polish —— */

@media (max-width: 719px) {
  .hub__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
  }

  .hub-card {
    min-height: 8.5rem;
    padding: 0.55rem 0.4rem 0.65rem;
  }

  .hub-card__art {
    min-height: 2.85rem;
  }

  .hub-card__art svg {
    width: min(100%, 4.5rem);
  }

  .hub-card__label {
    font-size: 0.78rem;
  }

  .hub-card__hint {
    font-size: 0.62rem;
    line-height: 1.25;
  }

  .shop {
    width: 100%;
  }

  .shop--lists {
    width: 100%;
  }

  .shop-body {
    grid-template-columns: 1fr;
  }

  .shop-item__remove {
    width: 2.4rem;
    height: 2.4rem;
  }

  .shop-item__remove svg {
    width: 1.2rem;
    height: 1.2rem;
  }

  .calendar__toolbar {
    gap: 0.65rem;
  }

  .calendar__title {
    font-size: clamp(1.2rem, 5.5vw, 1.55rem);
    text-align: center;
  }

  .calendar__views {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calendar__view-btn,
  .calendar__today,
  .calendar__nav-btn {
    min-height: 2.6rem;
  }

  .day-row {
    grid-template-columns: 4.75rem minmax(0, 1fr) auto;
    gap: 0.35rem;
  }

  .day-row.is-from-cooking {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .day-row.is-from-period {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .day-row__actions {
    grid-column: 1 / -1;
  }

  .day-row__action {
    flex: 1 1 auto;
    min-height: 2.5rem;
  }

  .chores,
  .workout {
    width: min(100%, 36rem);
  }

  .activity-forms {
    grid-template-columns: 1fr;
  }

  .plan-card__check,
  .chore-item__check {
    min-height: 2.75rem;
  }
}

@media (min-width: 720px) {
  .app {
    width: min(100% - 1.5rem, 96rem);
    padding: 1.25rem 0 2.5rem;
    gap: 1.5rem;
  }

  .app-top__actions {
    flex-wrap: wrap;
    overflow: visible;
  }
}
