:root {
  --ink: #173d3a;
  --muted: #6f8581;
  --paper: #fbfdfb;
  --mint-50: #f1f8f5;
  --mint-100: #e3f1ec;
  --mint-200: #c9e4db;
  --mint-400: #66c6b3;
  --mint-600: #168d84;
  --mint-700: #0f756f;
  --red: #d84f46;
  --blue: #428fcb;
  --shadow: 0 24px 70px rgba(27, 78, 71, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(114, 202, 181, 0.2), transparent 28%),
    radial-gradient(circle at 90% 36%, rgba(139, 195, 224, 0.16), transparent 30%),
    #edf5f1;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: center;
  gap: clamp(45px, 9vw, 120px);
  width: min(calc(100% - 40px), 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 60px 0;
}

.auth-brand h1 {
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.12;
}

.brand-drop {
  display: grid;
  width: 70px;
  height: 84px;
  margin-bottom: 34px;
  place-items: center;
  border-radius: 50% 50% 55% 45% / 40% 40% 60% 60%;
  background: linear-gradient(145deg, #78d6c4, #188e85);
  color: rgba(255, 255, 255, 0.66);
  font-size: 19px;
  transform: rotate(45deg);
  box-shadow: 0 20px 35px rgba(15, 117, 111, 0.2);
}

.brand-drop::first-letter {
  display: block;
  transform: rotate(-45deg);
}

.auth-intro {
  max-width: 470px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.auth-card {
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 29px;
  background: rgba(251, 253, 251, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 30px;
  padding: 5px;
  border-radius: 13px;
  background: var(--mint-100);
}

.auth-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.auth-tabs button.active {
  background: white;
  color: var(--mint-700);
  box-shadow: 0 5px 15px rgba(25, 92, 83, 0.08);
}

.auth-card form {
  display: grid;
  gap: 11px;
}

.auth-card form > div {
  margin-bottom: 8px;
}

.auth-card label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-message {
  min-height: 18px;
  margin: 1px 0 0;
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}

.form-message.success {
  color: var(--mint-700);
}

.cloud-note {
  margin: 22px 0 0;
  color: #91a29f;
  font-size: 10px;
  text-align: center;
}

.app-shell {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 34px 72px;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-email {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.topbar,
.section-heading,
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--mint-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.icon-button,
.date-arrow,
.close-button {
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(23, 61, 58, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 24px rgba(23, 61, 58, 0.06);
}

.icon-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 18px;
}

.date-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  font-size: 27px;
}

.date-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.25;
}

.date-display {
  min-width: 180px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.date-display strong,
.date-display span {
  display: block;
}

.date-display strong {
  font-size: 16px;
}

.date-display span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.progress-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 230px;
  overflow: hidden;
  min-height: 310px;
  padding: 44px 48px 34px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 243, 0.82));
  box-shadow: var(--shadow);
}

.progress-card::before {
  position: absolute;
  top: -110px;
  right: -90px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: rgba(128, 207, 190, 0.12);
  content: "";
}

.progress-copy {
  align-self: center;
}

.amount-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.amount-line strong {
  font-family: "Arial Rounded MT Bold", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(54px, 10vw, 84px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.amount-line span {
  color: var(--mint-600);
  font-size: 20px;
  font-weight: 700;
}

.progress-copy p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.water-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: center;
}

.drop {
  width: 150px;
  overflow: visible;
  filter: drop-shadow(0 18px 15px rgba(16, 112, 104, 0.18));
}

.drop-shell {
  fill: #dceee9;
  stroke: rgba(22, 141, 132, 0.16);
  stroke-width: 2;
}

.drop-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.58);
  stroke-linecap: round;
  stroke-width: 7;
}

#waterFill,
#waterWave {
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.water-visual > span {
  position: absolute;
  top: 106px;
  color: white;
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 1px 5px rgba(15, 117, 111, 0.2);
}

.progress-footer {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 18px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--mint-100);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-400), var(--mint-600));
  transition: width 0.55s ease;
}

.progress-footer p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-add,
.history-section {
  margin-top: 46px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--mint-700);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 19px;
}

.source-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 215px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(23, 61, 58, 0.06);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 36px rgba(27, 78, 71, 0.07);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.source-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(27, 78, 71, 0.12);
}

.source-card:active {
  transform: scale(0.98);
}

.source-icon {
  display: grid;
  place-items: center;
  height: 96px;
  margin: -4px auto 12px;
}

.glass-icon {
  position: relative;
  width: 67px;
  height: 82px;
  overflow: hidden;
  border: 4px solid rgba(23, 61, 58, 0.2);
  border-top-width: 2px;
  border-radius: 6px 6px 18px 18px;
  transform: perspective(120px) rotateX(-4deg);
}

.glass-water {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  height: 65%;
  border-radius: 2px 2px 12px 12px;
  background: linear-gradient(#83d8ca, #32aa9e);
}

.bottle-icon {
  position: relative;
  width: 48px;
  height: 91px;
  border: 2px solid rgba(23, 61, 58, 0.15);
  border-radius: 12px 12px 16px 16px;
  background: linear-gradient(90deg, #f5fbff, #d9eef6 48%, #f7fdff);
}

.bottle-cap {
  position: absolute;
  top: -9px;
  width: 25px;
  height: 11px;
  border-radius: 4px 4px 2px 2px;
  background: var(--red);
}

.bottle-label {
  width: 100%;
  padding: 5px 1px;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.purified .bottle-cap,
.purified .bottle-label {
  background: var(--blue);
}

.source-name {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.source-card strong {
  margin-top: 5px;
  font-size: 15px;
}

.add-mark {
  position: absolute;
  right: 18px;
  bottom: 17px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-100);
  color: var(--mint-700);
  font-size: 20px;
}

.cup-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.record-count {
  padding: 6px 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.history-item {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid rgba(23, 61, 58, 0.05);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.58);
}

.history-dot {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--mint-100);
  color: var(--mint-700);
  font-size: 18px;
}

.history-info strong,
.history-info span {
  display: block;
}

.history-info strong {
  font-size: 14px;
}

.history-info span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.history-amount {
  font-size: 14px;
}

.delete-record {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9aaba8;
  cursor: pointer;
  font-size: 19px;
}

.delete-record:hover {
  background: #fff0ef;
  color: var(--red);
}

.empty-state {
  padding: 32px 18px;
  border: 1px dashed var(--mint-200);
  border-radius: 19px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

dialog {
  width: min(calc(100% - 32px), 430px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(21, 60, 56, 0.25);
}

dialog::backdrop {
  background: rgba(20, 49, 47, 0.32);
  backdrop-filter: blur(5px);
}

dialog form {
  display: grid;
  gap: 13px;
  padding: 28px;
}

.close-button {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--mint-50);
  font-size: 23px;
}

dialog label {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.number-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--mint-200);
  border-radius: 14px;
  background: white;
}

.number-field input,
.text-field {
  width: 100%;
  padding: 13px 15px;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
}

.text-field {
  border: 1px solid var(--mint-200);
  border-radius: 14px;
  background: white;
}

.number-field span {
  padding-right: 15px;
  color: var(--muted);
  font-size: 12px;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.preset-row button {
  padding: 8px 4px;
  border: 1px solid var(--mint-200);
  border-radius: 10px;
  background: var(--mint-50);
  color: var(--mint-700);
  cursor: pointer;
  font-size: 12px;
}

.primary-button {
  margin-top: 6px;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--mint-700);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 50%;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 15px 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  box-shadow: 0 12px 35px rgba(17, 50, 47, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 20px);
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(50%, 0);
}

.toast button {
  border: 0;
  background: transparent;
  color: #81ddcc;
  cursor: pointer;
  font-weight: 800;
}

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

@media (max-width: 680px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 35px;
    width: min(calc(100% - 34px), 430px);
    padding: 38px 0;
  }

  .auth-brand h1 {
    font-size: 42px;
  }

  .auth-brand br {
    display: none;
  }

  .brand-drop {
    width: 48px;
    height: 57px;
    margin-bottom: 22px;
  }

  .auth-intro {
    margin-top: 14px;
    font-size: 14px;
  }

  .app-shell {
    padding: 28px 17px 55px;
  }

  .user-email {
    display: none;
  }

  .progress-card {
    grid-template-columns: 1fr 130px;
    min-height: 265px;
    padding: 32px 25px 26px;
    border-radius: 27px;
  }

  .drop {
    width: 115px;
  }

  .water-visual > span {
    top: 81px;
    font-size: 17px;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .source-card {
    display: grid;
    grid-template-columns: 82px 1fr 28px;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    min-height: 112px;
    padding: 14px 18px;
  }

  .source-icon {
    grid-row: 1 / 3;
    height: 82px;
    margin: 0;
    transform: scale(0.78);
  }

  .source-name {
    align-self: end;
    margin: 0;
  }

  .source-card strong {
    align-self: start;
    margin-top: 2px;
  }

  .add-mark {
    position: static;
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .supplement-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 14px 8px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .supplement-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .supplement-card {
    min-height: 120px;
    padding: 16px 12px 14px;
  }

  .supplement-emoji {
    font-size: 28px;
  }

  .history-item {
    grid-template-columns: 40px 1fr auto;
  }

  .delete-record {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}

@media (max-width: 430px) {
  .progress-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .water-visual {
    display: none;
  }

  .amount-line {
    justify-content: center;
  }

  .progress-footer {
    margin-top: 35px;
  }
}

/* ---- 标签页导航 ---- */
.tab-nav {
  display: flex;
  gap: 5px;
  margin: 22px 0 6px;
  padding: 5px;
  border-radius: 13px;
  background: var(--mint-100);
}

.tab-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tab-button.active {
  background: white;
  color: var(--mint-700);
  box-shadow: 0 5px 15px rgba(25, 92, 83, 0.08);
}

.tab-icon {
  font-size: 16px;
}

.tab-panel[hidden] {
  display: none !important;
}

/* ---- 历史弹窗 ---- */
#historyDialog {
  width: min(calc(100% - 32px), 700px);
}

.hist-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0;
  padding: 14px 0;
  border-bottom: 1px solid rgba(23, 61, 58, 0.06);
}

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

.hist-date strong {
  display: block;
  font-size: 15px;
}

.hist-date span {
  font-size: 11px;
  color: var(--muted);
}

.hist-col {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  font-size: 13px;
  flex-wrap: wrap;
}

.hist-label {
  font-size: 14px;
  width: 22px;
  flex-shrink: 0;
}

.hist-val {
  font-weight: 700;
  min-width: 45px;
}

.hist-bar {
  width: 80px;
  height: 6px;
  border-radius: 99px;
  background: var(--mint-100);
  overflow: hidden;
  flex-shrink: 0;
}

.hist-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint-400), var(--mint-600));
}

.hist-pct {
  font-size: 11px;
  color: var(--muted);
  min-width: 30px;
}

.hist-dot {
  display: inline-grid;
  width: 20px; height: 20px;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.hist-dot.green { background: #e3f7f0; color: var(--mint-600); }
.hist-dot.yellow { background: #fff8e8; color: #b8952e; }
.hist-dot.red { background: #fff0ef; color: var(--red); }
.hist-dot.gray { background: #f5f5f5; color: #bbb; }

.hist-empty {
  color: #ccc;
  font-size: 12px;
}

/* ---- 补剂统计卡片 ---- */
.supplement-summary {
  margin-bottom: 20px;
}

.supplement-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(27, 78, 71, 0.05);
}

.stat-card strong {
  font-family: "Arial Rounded MT Bold", "Microsoft YaHei UI", sans-serif;
  font-size: 32px;
  color: var(--mint-700);
  letter-spacing: -0.04em;
}

.medicine-stat strong {
  color: #1a8a65;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* ---- 补剂卡片网格 ---- */
.supplement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 19px;
}

.supplement-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 140px;
  padding: 22px 18px 18px;
  border: 2px solid rgba(23, 61, 58, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 30px rgba(27, 78, 71, 0.06);
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.supplement-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(27, 78, 71, 0.11);
}

.supplement-card:active {
  transform: scale(0.97);
}

.supplement-card.taken {
  border-color: var(--mint-400);
  background: linear-gradient(145deg, rgba(241, 248, 245, 0.9), rgba(201, 228, 219, 0.55));
  box-shadow: 0 10px 30px rgba(22, 141, 132, 0.12);
}

/* 药物卡片——翠绿色调，与补剂薄荷绿区分 */
.medicine-card.taken {
  border-color: #4caf92;
  background: linear-gradient(145deg, rgba(232, 246, 238, 0.92), rgba(183, 224, 205, 0.58));
  box-shadow: 0 10px 30px rgba(16, 128, 97, 0.13);
}

.supplement-emoji {
  font-size: 36px;
  line-height: 1;
}

.supplement-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.supplement-dosage {
  font-size: 12px;
  color: var(--muted);
}

.supplement-check {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-100);
  color: var(--mint-600);
  font-size: 16px;
  font-weight: 800;
  transition: background 0.2s, color 0.2s;
}

/* ---- 健身日开关 ---- */
.workout-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.workout-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}

.workout-toggle.active {
  border-color: #f59e0b;
  background: #fffbf0;
  color: #b45309;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.workout-icon { font-size: 18px; }

.workout-indicator {
  display: grid;
  width: 22px; height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #e0e0e0;
  color: white;
  font-size: 12px;
  font-weight: 800;
  transition: background 0.2s;
}

.workout-toggle.active .workout-indicator {
  background: #f59e0b;
}

/* ---- 跳过卡片 ---- */
.supplement-card.skipped {
  opacity: 0.45;
  pointer-events: auto;
  cursor: default;
  border-style: dashed;
}

.supplement-card.skipped:hover {
  transform: none;
  box-shadow: 0 10px 30px rgba(27, 78, 71, 0.06);
}

.skip-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  background: #f0f0f0;
  color: #999;
  font-size: 11px;
  font-weight: 600;
}

/* ---- 计数圆点 ---- */
.count-dots {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.count-dot {
  font-size: 11px;
  color: #c9d5d2;
  transition: color 0.2s;
}

.count-dot.filled {
  color: var(--mint-600);
}

.medicine-card .count-dot.filled {
  color: #1a8a65;
}

/* ---- 计数控制按钮 ---- */
.count-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.count-minus,
.count-reset {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-100);
  color: var(--mint-700);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}

.count-minus:hover,
.count-reset:hover {
  background: var(--mint-200);
}

.count-reset {
  font-size: 13px;
}

.medicine-card .count-minus,
.medicine-card .count-reset {
  background: #e2f3ec;
  color: #1a8a65;
}

.medicine-card .count-minus:hover,
.medicine-card .count-reset:hover {
  background: #c8e8d8;
}

/* ---- 历史 partial 状态 ---- */
.supplement-dot.partial {
  background: #fff8e8;
  color: #b8952e;
}

.supplement-status.partial {
  background: #fff8e8;
  color: #8a7020;
}

/* 编辑图标 */
.card-edit-icon {
  position: absolute;
  top: 10px;
  left: 12px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #b0bfbc;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.card-edit-icon:hover {
  background: rgba(23, 61, 58, 0.06);
  color: var(--mint-700);
}

.supplement-card.taken .supplement-check {
  background: var(--mint-600);
  color: white;
}

.medicine-card.taken .supplement-check {
  background: #1a8a65;
  color: white;
}

/* ---- 补剂历史列表 ---- */
.supplement-dot {
  font-size: 14px;
  font-weight: 800;
}

.supplement-dot.taken {
  background: #e3f7f0;
  color: var(--mint-600);
}

.supplement-dot.missed {
  background: #fff0ef;
  color: var(--red);
}

.supplement-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
}

.supplement-status.taken {
  background: #e3f7f0;
  color: var(--mint-700);
}

.supplement-status.missed {
  background: #fff0ef;
  color: var(--red);
}

/* ---- 厕所记录 ---- */
.toilet-section {
  margin-top: 38px;
}

.toilet-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.toilet-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px 18px;
  border: 2px solid rgba(23, 61, 58, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 30px rgba(27, 78, 71, 0.06);
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.toilet-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(27, 78, 71, 0.11);
}

.toilet-btn:active {
  transform: scale(0.97);
}

.toilet-emoji {
  font-size: 40px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.toilet-emoji svg {
  display: block;
  width: 40px;
  height: 40px;
}

.toilet-btn:hover .toilet-emoji {
  transform: scale(1.15);
}

.toilet-btn strong {
  font-size: 16px;
  color: var(--ink);
}

.toilet-add {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-100);
  color: var(--mint-700);
  font-size: 18px;
  font-weight: 700;
}

.big-btn {
  border-left: 4px solid #d84f46;
}

.big-btn:hover {
  border-color: #d84f46;
  background: rgba(255, 240, 239, 0.4);
}

.small-btn {
  border-left: 4px solid #428fcb;
}

.small-btn:hover {
  border-color: #428fcb;
  background: rgba(227, 240, 251, 0.4);
}

.toilet-dot {
  font-size: 20px;
}

.toilet-history-item {
  grid-template-columns: 42px 1fr auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
