* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(93, 198, 255, 0.34), transparent 22%),
    radial-gradient(circle at 84% 38%, rgba(91, 221, 158, 0.2), transparent 18%),
    linear-gradient(180deg, #f7fbff, #eaf6ff 52%, #d6ecf7);
  font-family: "Segoe UI", Arial, sans-serif;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus,
button:focus-visible,
input:focus {
  outline: none;
}

#game-root {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.screen {
  --blue: #32a7e2;
  --green: #45d493;
  --ink: #17202a;
  --muted: #6e7c88;
  --line: #e8eef2;
  position: relative;
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.78vw);
  max-width: 430px;
  max-height: 764px;
  overflow: hidden;
  /* border-radius: clamp(0px, 6vw, 36px); */
  background:
    radial-gradient(circle at 50% 0%, rgba(79, 180, 229, 0.18), transparent 34%),
    #ffffff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(34, 60, 82, 0.24);
}

.app-header {
  height: 126px;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  padding: 26px 24px 10px;
}

.app-header h1 {
  justify-self: center;
  font-size: 40px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.today-title {
  display: grid;
  justify-items: center;
  align-self: center;
}

.today-title span {
  margin-top: 6px;
  color: #7d7d82;
  font-size: 22px;
  line-height: 1;
}

.header-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: transparent;
}

.app-header .menu-btn {
  opacity: 0;
  pointer-events: none;
}

.app-header .search-btn::before {
  content: "›";
  position: absolute;
  inset: 0;
  color: #b9c0c9;
  font-size: 58px;
  line-height: 38px;
  font-weight: 300;
}

.app-header .search-btn i {
  display: none;
}

.menu-btn {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-content: center;
}

.menu-btn i {
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: #6b747c;
}

.search-btn i {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 19px;
  height: 19px;
  border: 3px solid #6b747c;
  border-radius: 50%;
}

.search-btn i::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -7px;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: #6b747c;
  transform: rotate(45deg);
}

.hero-card {
  margin: 0 22px 12px;
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 12px;
  align-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, #eef9ff, #ffffff);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 34px rgba(40, 86, 118, 0.1);
}

.mission-copy span,
.panel-label {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-copy strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.mission-copy p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.streak-ring {
  --progress: 0deg;
  position: relative;
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 60%, transparent 61%),
    conic-gradient(from -30deg, #ff8a1f 0 76deg, #554148 76deg 118deg, #1557a8 118deg 220deg, #22c766 220deg var(--progress), #e6edf3 var(--progress) 360deg);
}

.streak-ring strong {
  margin-top: 16px;
  font-size: 39px;
  line-height: 0.85;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.streak-ring > span:last-child {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}

.flame {
  position: absolute;
  top: 23px;
  width: 18px;
  height: 22px;
}

.flame::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 13px;
  height: 18px;
  border-radius: 60% 60% 60% 8%;
  background: linear-gradient(135deg, #ffe065, #ff8428);
  transform: rotate(45deg);
}

.flame i {
  position: absolute;
  left: 9px;
  top: 9px;
  width: 6px;
  height: 9px;
  border-radius: 60% 60% 60% 8%;
  background: #fff4aa;
  transform: rotate(45deg);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 62px;
  gap: 8px;
  margin: 0 22px 10px;
}

.search-input,
.add-input {
  height: 46px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: #f8fcff;
  color: var(--ink);
  font-size: 15px;
}

.search-input:focus,
.add-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(50, 167, 226, 0.12);
}

.search-close {
  border-radius: 16px;
  background: #eef9ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.habit-list {
  max-height: 400px;
  margin: 0 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 16px;
}

.habit-list::-webkit-scrollbar {
  width: 4px;
}

.habit-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d7edf8;
}

.habit-row {
  position: relative;
  width: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 58px 1fr 72px;
  align-items: center;
  border: 0;
  border-radius: 10px;
  background: #f1f3f8;
  color: var(--ink);
  text-align: left;
  padding: 0 18px 0 14px;
}

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

.habit-row:active {
  background: #f6fcff;
}

.habit-row::after {
  content: "›";
  position: absolute;
  right: 12px;
  color: #c1c8d1;
  font-size: 28px;
  line-height: 1;
  opacity: 0;
}

.symbol {
  position: relative;
  justify-self: center;
  width: 28px;
  height: 28px;
}

.symbol-drop::before,
.symbol-water::before,
.symbol-spark::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 17px;
  height: 24px;
  border-radius: 60% 60% 60% 12%;
  background: linear-gradient(135deg, #8bdcff, #238bde);
  transform: rotate(45deg);
}

.symbol-spark::before {
  background: linear-gradient(135deg, #f8d86a, #ff9e2d);
}

.symbol-book::before,
.symbol-read::before,
.symbol-book::after,
.symbol-read::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 13px;
  height: 18px;
  border-radius: 4px 2px 2px 4px;
  background: #ffd15c;
}

.symbol-book::before,
.symbol-read::before {
  left: 1px;
}

.symbol-book::after,
.symbol-read::after {
  right: 1px;
}

.symbol-read::before {
  background: #c68345;
}

.symbol-read::after {
  background: #c68345;
}

.symbol-body::before,
.symbol-exercise::before,
.symbol-walk::before,
.symbol-cycling::before,
.symbol-learn::before,
.symbol-money::before,
.symbol-sugar::before {
  content: "";
  position: absolute;
}

.symbol-body::before,
.symbol-exercise::before,
.symbol-walk::before {
  left: 10px;
  top: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.symbol-body,
.symbol-exercise {
  color: #38c76e;
}

.symbol-walk {
  color: #ff7a2e;
}

.symbol-body::after,
.symbol-exercise::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 13px;
  width: 17px;
  height: 14px;
  border: 3px solid currentColor;
  border-radius: 12px 12px 5px 5px;
}

.symbol-walk::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 11px;
  width: 6px;
  height: 17px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(15deg);
}

.symbol-cycling {
  color: #2cc77d;
}

.symbol-cycling::before,
.symbol-cycling::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 13px;
  height: 13px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.symbol-cycling::before {
  left: 1px;
}

.symbol-cycling::after {
  right: 1px;
}

.symbol-cycling i {
  position: absolute;
  left: 9px;
  top: 10px;
  width: 13px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-24deg);
}

.symbol-learn {
  color: #3f7df1;
}

.symbol-learn::before {
  left: 2px;
  top: 8px;
  width: 24px;
  height: 13px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 35%, 50% 70%, 0 35%);
}

.symbol-learn::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 19px;
  width: 12px;
  height: 6px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.symbol-money {
  color: #46c46f;
}

.symbol-money::before {
  left: 3px;
  top: 7px;
  width: 23px;
  height: 16px;
  border-radius: 5px;
  background: currentColor;
  box-shadow: inset 7px 0 0 rgba(255, 255, 255, 0.35), inset -7px 0 0 rgba(255, 255, 255, 0.35);
}

.symbol-sugar {
  color: #f04f93;
}

.symbol-sugar::before {
  left: 5px;
  top: 8px;
  width: 20px;
  height: 15px;
  border-radius: 10px 12px 12px 10px;
  background: currentColor;
  transform: rotate(-12deg);
}

.symbol-sugar::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 12px;
  width: 8px;
  height: 8px;
  border: 3px solid currentColor;
  transform: rotate(45deg);
}

.symbol-moon::before,
.symbol-sleep::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7ba7ff;
  box-shadow: inset -7px 0 0 #f8fcff;
}

.habit-title {
  display: grid;
  gap: 2px;
}

.habit-title strong {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
}

.habit-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.habit-progress {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.habit-progress strong {
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.habit-progress em {
  color: #7d7d82;
  font-size: 21px;
  line-height: 1;
  font-style: normal;
}

.morning-title {
  margin: 8px 22px 30px;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.check-box {
  position: relative;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #dce8e3;
}

.habit-row.done .check-box {
  background: var(--green);
}

.check-box i {
  width: 15px;
  height: 8px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.habit-row:not(.done) .check-box i {
  opacity: 0;
}

.detail-screen {
  padding: 0 24px 30px;
  background: #ffffff;
}

.detail-header {
  height: 164px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: start;
  padding-top: 70px;
}

.detail-back,
.detail-more {
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: #b7bec8;
}

.detail-back {
  font-size: 52px;
  line-height: 0.7;
  text-align: left;
}

.detail-more {
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.detail-title {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.detail-title h1 {
  max-width: 230px;
  overflow: hidden;
  color: #050505;
  font-size: 41px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-title span {
  color: #85858a;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.timer-card {
  display: grid;
  place-items: center;
  margin-top: 112px;
}

.timer-ring {
  width: 292px;
  height: 292px;
  display: grid;
  place-items: center;
  border: 18px solid #f0f1f6;
  border-radius: 50%;
}offer-banner

.timer-ring strong {
  color: #050505;
  font-size: 64px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.start-timer {
  position: absolute;
  left: 86px;
  right: 86px;
  bottom: 118px;
  min-height: 88px;
  border-radius: 9px;
  background: #bc743d;
  color: #ffffff;
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 16px 28px rgba(188, 116, 61, 0.18);
  transition: transform 160ms ease, filter 160ms ease;
}

.start-timer:active {
  transform: scale(0.98);
  filter: brightness(0.96);
}

.start-timer:disabled {
  cursor: default;
  opacity: 0.76;
}

.start-timer.done {
  background: #45d493;
}

.empty-state {
  min-height: 110px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
}

.week-strip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 82px;
  height: 76px;
  padding: 0 42px;
  background: #fbfdff;
}

.week-labels,
.week-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  justify-items: center;
}

.week-labels {
  height: 30px;
  color: #82919a;
  font-size: 15px;
  font-weight: 750;
}

.week-dots {
  height: 34px;
}

.week-dot {
  position: relative;
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 50%;
  background: #dce8e3;
}

.week-dot.done {
  background: var(--green);
}

.week-dot.today {
  outline: 3px solid #dff4ff;
}

.week-dot i {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 13px;
  height: 7px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.week-dot:not(.done) i {
  opacity: 0;
}

.bottom-tabs {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  height: 58px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(41, 66, 84, 0.1);
  z-index: 20;
}

.tab-btn {
  position: relative;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  opacity: 1;
}

.tab-btn.active {
  background: transparent;
}

.tab-pill {
  position: absolute;
  inset: 5px -3px;
  opacity: 0;
  transform: scaleX(0.82);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tab-pill img {
  width: 100%;
  height: 100%;
  display: block;
}

.tab-btn.active .tab-pill {
  opacity: 1;
  transform: scaleX(1);
}

.tab-img {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none;
}

.panel {
  margin: 72px 24px 0;
  min-height: 405px;
  padding: 26px 22px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  border-radius: 30px;
  background: linear-gradient(180deg, #f8fcff, #ffffff);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 34px rgba(40, 86, 118, 0.1);
  text-align: center;
}

.panel > strong {
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.panel p {
  max-width: 260px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 650;
}

.stat-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-grid span {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #eef9ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.summary-screen {
  padding: 0;
  background: #ffffff;
}

.summary-content {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 0 22px 118px;
}

.summary-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.summary-header {
  height: 178px;
  display: grid;
  place-items: start center;
  padding-top: 86px;
}

.summary-title {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.summary-title h1 {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #050505;
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.summary-title h1 span {
  font-size: 30px;
  line-height: 0.8;
}

.summary-title p {
  color: #85858a;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
}

.summary-section-title {
  margin: 26px 0 28px;
  color: #050505;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.completion-card {
  min-height: 438px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 28px 22px 20px;
  border-radius: 12px;
  background: #f0f2f7;
}

.completion-ring {
  width: 284px;
  height: 284px;
  display: grid;
  place-items: center;
  border: 20px solid #ffffff;
  border-radius: 50%;
}

.completion-ring strong {
  color: #050505;
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.completion-counts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
}

.summary-count {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.summary-count:first-child {
  justify-items: start;
}

.summary-count:last-child {
  justify-items: end;
}

.summary-count strong {
  font-size: 32px;
  line-height: 1;
  font-weight: 500;
}

.summary-count em {
  color: #85858a;
  font-size: 16px;
  line-height: 1;
  font-style: normal;
  font-weight: 600;
}

.summary-count.green strong {
  color: #39c970;
}

.summary-count.orange strong {
  color: #ff7a00;
}

.summary-count.red strong {
  color: #f30b1c;
}

.comparison-title {
  margin-top: 60px;
}

.comparison-card {
  display: grid;
  gap: 28px;
  padding: 28px 22px 24px;
  border-radius: 12px;
  background: #f0f2f7;
}

.compare-row {
  display: grid;
  gap: 10px;
}

.compare-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compare-copy strong,
.compare-copy span {
  color: #050505;
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
}

.compare-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff;
}

.compare-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #39c970;
}

.settings-screen {
  padding: 0;
  background: #ffffff;
}

.settings-content {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 86px 22px 120px;
}

.settings-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.settings-title {
  margin-bottom: 88px;
  text-align: center;
  color: #050505;
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.settings-section {
  display: grid;
  gap: 12px;
  margin-bottom: 76px;
}

.settings-section h2 {
  margin-bottom: 20px;
  color: #050505;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.settings-row {
  min-height: 80px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 20px;
  border-radius: 9px;
  background: #f0f2f7;
  color: #050505;
  text-align: left;
}

.settings-row strong {
  font-size: 27px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.settings-value {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #85858a;
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
}

.settings-value b {
  color: #c2c7cf;
  font-size: 50px;
  line-height: 0.7;
  font-weight: 300;
}

.settings-toggle {
  position: relative;
  width: 88px;
  height: 46px;
  border-radius: 999px;
  background: #b7b9bd;
  transition: background 180ms ease;
}

.settings-toggle i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transition: transform 180ms ease;
}

.settings-toggle.on {
  background: #2fd064;
}

.settings-toggle.on i {
  transform: translateX(42px);
}

.habit-settings-screen {
  padding: 0;
  background: #ffffff;
}

.habit-settings-content {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 74px 22px 40px;
}

.habit-settings-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.habit-settings-header {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  margin-bottom: 94px;
}

.habit-settings-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: #b8c0ca;
  font-size: 52px;
  line-height: 0.7;
  text-align: left;
}

.habit-settings-header h1 {
  justify-self: center;
  color: #050505;
  font-size: 37px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.habit-settings-section {
  margin-bottom: 76px;
}

.habit-settings-section h2 {
  margin-bottom: 30px;
  color: #050505;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.edit-habits-section {
  margin-bottom: 0;
}

.edit-habit-list {
  display: grid;
  gap: 12px;
}

.edit-habit-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  padding: 0 18px 0 20px;
  border-radius: 9px;
  background: #f0f2f7;
  color: #050505;
  text-align: left;
}

.edit-habit-row .symbol {
  justify-self: start;
  transform: scale(1.05);
}

.edit-habit-row strong {
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.edit-habit-row b {
  color: #c2c7cf;
  font-size: 52px;
  line-height: 0.7;
  font-weight: 300;
}

.create-row {
  grid-template-columns: 48px 1fr;
}

.create-plus {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #c6ccd5;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
}

.week-start-screen {
  padding: 0;
  background: #ffffff;
}

.week-start-content {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 25px 22px 40px;
}

.week-start-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.option-header {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  margin-bottom: 52px;
}

.option-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: #b8c0ca;
  font-size: 52px;
  line-height: 0.7;
  text-align: left;
}

.option-header h1 {
  justify-self: center;
  color: #050505;
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 20px;
  border-radius: 9px;
  background: #f0f2f7;
  color: #050505;
  text-align: left;
}

.option-row strong {
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.option-row b {
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

@media (max-height: 760px) {
  .summary-header {
    height: 152px;
    padding-top: 64px;
  }

  .summary-section-title {
    margin: 20px 0 20px;
  }

  .completion-card {
    min-height: 360px;
  }

  .completion-ring {
    width: 230px;
    height: 230px;
  }

  .comparison-title {
    margin-top: 42px;
  }
}

.add-input {
  width: 100%;
  max-width: 270px;
  text-align: center;
}

.primary-action {
  width: 100%;
  max-width: 220px;
  min-height: 54px;
  border-radius: 18px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  box-shadow: 0 14px 24px rgba(50, 167, 226, 0.24);
}

.primary-action.light {
  background: #eef9ff;
  color: var(--blue);
  box-shadow: none;
}

.guide-step {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.guide-step span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 850;
}

.side-menu {
  position: absolute;
  left: 18px;
  top: 70px;
  z-index: 8;
  width: 190px;
  padding: 16px;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(25, 23, 20, 0.18);
  backdrop-filter: blur(14px);
}

.side-menu strong {
  font-size: 20px;
}

.side-menu button {
  min-height: 42px;
  border-radius: 15px;
  background: #eef9ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.side-menu .danger {
  background: #fff0f0;
  color: #f05e66;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 92px;
  z-index: 9;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(30, 30, 30, 0.86);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  transform: translateX(-50%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.choose-screen {
  overflow: hidden;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(34, 60, 82, 0.2);
}

.choose-content {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 18px 18px 124px;
  overscroll-behavior: contain;
}

.setup-mode .choose-content {
  padding-bottom: 34px;
}

.setup-mode::after {
  display: none;
}

.choose-content::-webkit-scrollbar {
  width: 0;
}

.choose-header {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  margin: 20px 0 28px;
}

.choose-header h1 {
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.choose-close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  color: #b4bac4;
  font-size: 50px;
  line-height: 1;
  font-weight: 850;
}

.custom-create {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.custom-row,
.choice-tile {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 14px;
  border-radius: 8px;
  background: #f1f2f7;
  color: #070707;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.01);
}

.custom-row {
  width: 100%;
  padding: 0 18px;
}

.custom-row strong,
.choice-tile strong {
  font-size: 20px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.custom-plus {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #c5cad3;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
}

.custom-form {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 8px;
}

.custom-form .add-input {
  max-width: none;
  text-align: left;
}

.create-small {
  border-radius: 16px;
  background: #111111;
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
}

.choose-section {
  margin-top: 22px;
}

.choose-section h2 {
  margin-bottom: 24px;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.habit-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.choice-tile {
  position: relative;
  min-height: 86px;
  padding: 0 14px;
}

.choice-tile:active,
.custom-row:active {
  transform: scale(0.98);
}

.choice-icon {
  position: relative;
  width: 32px;
  height: 32px;
  display: block;
}

.choice-icon::before,
.choice-icon::after,
.choice-icon i {
  content: "";
  position: absolute;
  display: block;
}

.choice-walk::before,
.choice-run::before,
.choice-exercise::before {
  left: 13px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.choice-walk::after,
.choice-run::after,
.choice-exercise::after,
.choice-stretch::after,
.choice-stand::after,
.choice-squats::after,
.choice-pushups::after {
  left: 13px;
  top: 10px;
  width: 6px;
  height: 20px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(18deg);
}

.choice-walk { color: #f26a2c; }
.choice-stretch { color: #6548ee; }
.choice-exercise { color: #38c96d; }
.choice-run { color: #ef3e72; }
.choice-stand { color: #5d6b85; }
.choice-squats { color: #3578ef; }
.choice-pushups { color: #f04d1b; }
.choice-more { color: #a9b0ba; }
.choice-breathe { color: #18d7cc; }
.choice-meditate { color: #38d6b5; }
.choice-visualize { color: #58c96d; }
.choice-read { color: #bd7b3f; }
.choice-relax { color: #e43772; }
.choice-learn { color: #4089e8; }
.choice-focus { color: #878b95; }

.choice-stretch::before,
.choice-squats::before,
.choice-meditate::before,
.choice-focus::before {
  left: 12px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.choice-stretch i,
.choice-squats i {
  left: 5px;
  top: 17px;
  width: 26px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-32deg);
}

.choice-more::before {
  left: 2px;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 11px 0 0 currentColor, 22px 0 0 currentColor;
}

.choice-breathe::before,
.choice-relax::before {
  left: 6px;
  top: 4px;
  width: 20px;
  height: 22px;
  border-radius: 18px 18px 6px 6px;
  background: currentColor;
}

.choice-meditate::after {
  left: 7px;
  top: 17px;
  width: 20px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.choice-visualize::before {
  left: 1px;
  top: 9px;
  width: 14px;
  height: 14px;
  border: 4px solid currentColor;
  border-radius: 50%;
  box-shadow: 15px 0 0 -4px #fff, 15px 0 0 0 currentColor;
}

.choice-read::before {
  left: 2px;
  top: 7px;
  width: 13px;
  height: 19px;
  border-radius: 4px 1px 1px 4px;
  background: currentColor;
  box-shadow: 15px 0 0 currentColor;
}

.choice-learn::before {
  left: 3px;
  top: 5px;
  width: 26px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 36%, 50% 72%, 0 36%);
}

.choice-learn::after {
  left: 8px;
  top: 18px;
  width: 16px;
  height: 8px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

  @media (max-height: 700px) {
  .app-header {
    height: 66px;
  }

  .hero-card {
    margin-bottom: 8px;
  }

  .streak-ring {
    width: 110px;
    height: 110px;
  }

  .habit-list {
    max-height: 240px;
  }

  .habit-row {
    min-height: 52px;
  }

  .panel {
    margin-top: 46px;
    min-height: 385px;
  }

  .choose-header h1 {
    font-size: 34px;
  }

  .custom-row,
  .choice-tile {
    min-height: 74px;
  }

  .choose-section h2 {
    margin-bottom: 16px;
    font-size: 29px;
  }
}

/* Choose Habit refinements */
.custom-row,
.choice-tile {
  grid-template-columns: 46px 1fr;
  border-radius: 12px;
  background: #f1f3f8;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.015),
    0 8px 18px rgba(28, 42, 58, 0.035);
}

.habit-choice-grid {
  gap: 14px 18px;
}

.choice-icon {
  width: 34px;
  height: 34px;
}

.choice-sleep { color: #6b7cff; }
.choice-cycling { color: #23c57a; }
.choice-money { color: #42bd66; }
.choice-sugar { color: #ef4d8d; }
.choice-water { color: #2ba9ef; }

.choice-sleep::before,
.choice-cycling::before,
.choice-money::before,
.choice-sugar::before,
.choice-water::before,
.choice-sleep::after,
.choice-cycling::after,
.choice-money::after,
.choice-sugar::after,
.choice-water::after {
  content: "";
  position: absolute;
  display: block;
}

.choice-sleep::before {
  left: 4px;
  top: 6px;
  width: 24px;
  height: 20px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: inset -9px 0 0 #f1f3f8;
}

.choice-cycling::before {
  left: 0;
  bottom: 3px;
  width: 12px;
  height: 12px;
  border: 4px solid currentColor;
  border-radius: 50%;
  box-shadow: 20px 0 0 -4px #f1f3f8, 20px 0 0 0 currentColor;
}

.choice-cycling::after {
  left: 12px;
  top: 10px;
  width: 14px;
  height: 10px;
  border-left: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  transform: skew(-20deg);
}

.choice-money::before {
  left: 3px;
  top: 7px;
  width: 26px;
  height: 20px;
  border-radius: 6px;
  background: currentColor;
}

.choice-money::after {
  left: 14px;
  top: 10px;
  width: 8px;
  height: 14px;
  border-left: 3px solid #f1f3f8;
  border-right: 3px solid #f1f3f8;
}

.choice-sugar::before {
  left: 5px;
  top: 8px;
  width: 24px;
  height: 17px;
  border-radius: 9px;
  background: currentColor;
}

.choice-sugar::after {
  left: 1px;
  top: 12px;
  width: 8px;
  height: 8px;
  border: 3px solid currentColor;
  transform: rotate(45deg);
}

.choice-water::before {
  left: 8px;
  top: 2px;
  width: 18px;
  height: 28px;
  border-radius: 60% 60% 60% 12%;
  background: currentColor;
  transform: rotate(45deg);
}

.choice-water i {
  left: 15px;
  top: 10px;
  width: 7px;
  height: 12px;
  border-left: 3px solid #f1f3f8;
  border-radius: 50%;
  transform: rotate(20deg);
}

/* Compact Choose Habit screen so the app nav remains visible. */
.choose-screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  height: 96px;
  margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0), #ffffff 42%, #ffffff);
  pointer-events: none;
  z-index: 10;
}

.choose-header {
  margin: 4px 0 18px;
}

.choose-header h1 {
  font-size: 34px;
}

.choose-close {
  font-size: 42px;
}

.custom-create {
  margin-bottom: 18px;
}

.custom-row,
.choice-tile {
  min-height: 74px;
}

.custom-row strong,
.choice-tile strong {
  font-size: 18px;
}

.custom-plus {
  width: 32px;
  height: 32px;
}

.custom-form {
  grid-template-columns: 1fr 84px;
}

.choose-section {
  margin-top: 18px;
}

.choose-section h2 {
  margin-bottom: 14px;
  font-size: 29px;
}

.habit-choice-grid {
  gap: 12px 16px;
}

.choice-tile {
  padding: 0 13px;
}

/* Habit setup screen */
.setup-header {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  margin: 16px 0 30px;
}

.setup-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: #b8c0ca;
  font-size: 46px;
  line-height: 1;
}

.setup-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.setup-title h1 {
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.setup-title .choice-icon {
  width: 34px;
  height: 34px;
}

.setup-block {
  margin-bottom: 26px;
}

.setup-block h2,
.style-cell h2 {
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.goal-row,
.setting-row {
  min-height: 72px;
  display: grid;
  align-items: center;
  border-radius: 8px;
  background: #f1f3f8;
}

.goal-row {
  grid-template-columns: 52px 1fr 52px;
  padding: 0 12px;
}

.goal-row strong {
  color: #6f737d;
  font-size: 23px;
  line-height: 1;
  font-weight: 750;
}

.goal-row strong::first-letter {
  color: #111;
}

.stepper {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: #3f7df1;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(29, 55, 90, 0.08);
}

.setting-row {
  grid-template-columns: 1fr 32px;
  padding: 0 26px;
}

.setting-row strong {
  font-size: 25px;
  font-weight: 900;
}

.setting-row span {
  color: #bdc3cb;
  font-size: 42px;
  line-height: 1;
}

.time-chips {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.time-chips::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.time-chip {
  min-width: 122px;
  height: 58px;
  border-radius: 10px;
  background: #f1f3f8;
  color: #747983;
  font-size: 24px;
  font-weight: 900;
}

.time-chip.active {
  background: #3f7df1;
  color: #fff;
}

.note {
  margin-top: 10px;
  color: #7b8088;
  font-size: 17px;
  line-height: 1.25;
}

.setup-style-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.style-cell {
  display: grid;
  gap: 12px;
}

.style-icon,
.style-color,
.style-sound {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f3f8;
}

.style-color {
  background: #3f7df1;
}

.style-sound {
  color: #3f7df1;
  font-size: 34px;
  font-weight: 800;
}

.save-habit {
  width: 190px;
  min-height: 64px;
  display: block;
  margin: 56px auto 10px;
  border-radius: 12px;
  background: #3f7df1;
  color: #fff;
  font-size: 27px;
  font-weight: 950;
  box-shadow: 0 14px 26px rgba(63, 125, 241, 0.24);
}

@media (max-height: 700px) {
  .setup-header {
    margin: 8px 0 20px;
  }

  .setup-title h1 {
    font-size: 34px;
  }

  .setup-block {
    margin-bottom: 20px;
  }

  .setup-block h2,
  .style-cell h2 {
    font-size: 24px;
  }

  .goal-row,
  .setting-row {
    min-height: 62px;
  }

  .time-chip {
    min-width: 108px;
    height: 52px;
    font-size: 21px;
  }

  .save-habit {
    margin-top: 32px;
  }
}

/* Compact pass: keep the same screens, but make them easier to scan. */
.app-header {
  height: 108px;
  padding-top: 22px;
}

.app-header h1,
.today-title h1,
.summary-title h1,
.settings-title {
  font-size: 34px;
}

.today-title span,
.summary-title p,
.detail-title span {
  font-size: 18px;
}

.morning-title,
.summary-section-title,
.settings-section h2,
.habit-settings-section h2 {
  font-size: 28px;
}

.habit-list {
  max-height: 318px;
  gap: 12px;
}

.habit-row {
  min-height: 74px;
  grid-template-columns: 48px 1fr 64px;
}

.habit-title strong,
.habit-progress strong {
  font-size: 19px;
}

.habit-progress em {
  font-size: 17px;
}

.detail-header {
  height: 132px;
  padding-top: 52px;
}

.detail-title h1,
.habit-settings-header h1 {
  font-size: 32px;
}

.timer-card {
  margin-top: 82px;
}

.timer-ring {
  width: 238px;
  height: 238px;
  border-width: 14px;
}

.timer-ring strong {
  font-size: 52px;
}

.start-timer {
  min-height: 72px;
  bottom: 96px;
  font-size: 24px;
}

.summary-header {
  height: 142px;
  padding-top: 62px;
}

.completion-card {
  min-height: 330px;
  padding: 22px 18px 18px;
}

.completion-ring {
  width: 210px;
  height: 210px;
  border-width: 16px;
}

.completion-ring strong {
  font-size: 34px;
}

.comparison-title {
  margin-top: 36px;
}

.settings-content {
  padding-top: 62px;
}

.settings-title {
  margin-bottom: 28px;
}

.settings-section {
  gap: 10px;
  margin-bottom: 52px;
}

.settings-row {
  min-height: 66px;
}

.settings-row strong,
.edit-habit-row strong {
  font-size: 22px;
}

.settings-value {
  font-size: 21px;
}

.settings-toggle {
  width: 70px;
  height: 38px;
}

.settings-toggle i {
  width: 32px;
  height: 32px;
}

.settings-toggle.on i {
  transform: translateX(32px);
}

.habit-settings-content {
  padding-top: 52px;
}

.habit-settings-header {
  margin-bottom: 68px;
}

.habit-settings-section {
  margin-bottom: 52px;
}

.edit-habit-row {
  min-height: 64px;
}

.choose-header h1,
.setup-title h1 {
  font-size: 34px;
}

.choice-tile,
.custom-row {
  min-height: 72px;
}

.setup-block h2,
.style-cell h2 {
  font-size: 24px;
}

.goal-row,
.setting-row {
  min-height: 62px;
}

.time-chip {
  height: 50px;
  font-size: 20px;
}

/* Softer settings typography */
.settings-title {
  font-size: 30px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.settings-section h2,
.habit-settings-section h2,
.option-header h1,
.habit-settings-header h1 {
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.settings-row strong,
.edit-habit-row strong,
.option-row strong {
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.015em;
}

.settings-value {
  font-size: 18px;
  font-weight: 450;
}

.settings-value b,
.edit-habit-row b {
  font-size: 38px;
}

.settings-row {
  min-height: 58px;
}

.edit-habit-row,
.option-row {
  min-height: 58px;
}

.screen.text-small {
  font-size: 92%;
}

.screen.text-small .settings-row strong,
.screen.text-small .edit-habit-row strong,
.screen.text-small .habit-title strong {
  font-size: 20px;
}

.screen.text-small .settings-value {
  font-size: 19px;
}

.screen.text-large {
  font-size: 104%;
}

.screen.dark-theme,
.screen.dark-theme .settings-screen,
.screen.dark-theme .summary-screen,
.screen.dark-theme .detail-screen,
.screen.dark-theme .habit-settings-screen,
.screen.dark-theme .week-start-screen,
.screen.dark-theme .choose-screen {
  --ink: #f8fafc;
  --muted: #aab3bf;
  --line: #263241;
  background: #10151d;
  color: #f8fafc;
}

.screen.dark-theme .settings-content,
.screen.dark-theme .summary-content,
.screen.dark-theme .habit-settings-content,
.screen.dark-theme .week-start-content,
.screen.dark-theme .choose-content {
  background: #10151d;
}

.screen.dark-theme .settings-title,
.screen.dark-theme .settings-section h2,
.screen.dark-theme .summary-title h1,
.screen.dark-theme .summary-section-title,
.screen.dark-theme .habit-settings-header h1,
.screen.dark-theme .habit-settings-section h2,
.screen.dark-theme .option-header h1,
.screen.dark-theme .detail-title h1,
.screen.dark-theme .today-title h1,
.screen.dark-theme .morning-title,
.screen.dark-theme .choose-header h1,
.screen.dark-theme .choose-section h2,
.screen.dark-theme .setup-title h1,
.screen.dark-theme .setup-block h2,
.screen.dark-theme .style-cell h2 {
  color: #f8fafc;
}

.screen.dark-theme .settings-row,
.screen.dark-theme .habit-row,
.screen.dark-theme .completion-card,
.screen.dark-theme .comparison-card,
.screen.dark-theme .edit-habit-row,
.screen.dark-theme .option-row,
.screen.dark-theme .custom-row,
.screen.dark-theme .choice-tile,
.screen.dark-theme .goal-row,
.screen.dark-theme .setting-row,
.screen.dark-theme .time-chip,
.screen.dark-theme .style-icon,
.screen.dark-theme .style-sound {
  background: #1b2330;
  color: #f8fafc;
}

.screen.dark-theme .bottom-tabs {
  background: rgba(20, 27, 37, 0.94);
}

.screen.dark-theme .tab-img {
  filter: invert(1);
}

.screen.dark-theme .completion-ring,
.screen.dark-theme .timer-ring {
  border-color: #273243;
}

.screen.dark-theme .timer-ring strong,
.screen.dark-theme .completion-ring strong,
.screen.dark-theme .compare-copy strong,
.screen.dark-theme .compare-copy span,
.screen.dark-theme .settings-row strong,
.screen.dark-theme .option-row strong,
.screen.dark-theme .edit-habit-row strong {
  color: #f8fafc;
}

.screen.show-icon-badge .symbol b {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 9px;
  height: 9px;
  display: block;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #ff4d6d;
}

/* Improved timer detail screen */
.detail-screen {
  background:
    radial-gradient(circle at 50% 28%, rgba(214, 229, 244, 0.58), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 58%, #f7fafc 100%);
}

.detail-header {
  height: 124px;
  padding-top: 48px;
}

.detail-title h1 {
  font-size: 30px;
  font-weight: 820;
  letter-spacing: -0.035em;
}

.detail-title span {
  font-size: 16px;
  font-weight: 600;
}

.timer-card {
  margin-top: 74px;
}

.timer-ring {
  position: relative;
  width: 258px;
  height: 258px;
  align-content: center;
  gap: 12px;
  border: 14px solid #eef1f7;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 0 0 16px rgba(255, 255, 255, 0.6),
    0 28px 64px rgba(88, 104, 124, 0.13);
}

.timer-ring::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 14px solid transparent;
  border-top-color: #d79a6b;
  border-right-color: #d79a6b;
  border-radius: 50%;
  opacity: 0.9;
  transform: rotate(28deg);
}

.timer-ring span {
  position: relative;
  z-index: 1;
  color: #9aa3af;
  font-size: 13px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timer-ring strong {
  position: relative;
  z-index: 1;
  font-size: 52px;
  font-weight: 650;
}

.timer-ring.long-time strong {
  font-size: 42px;
  letter-spacing: -0.04em;
}

.start-timer {
  left: 72px;
  right: 72px;
  bottom: 96px;
  min-height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #c98250, #d8a06f);
  font-size: 23px;
  font-weight: 850;
  box-shadow: 0 22px 38px rgba(188, 116, 61, 0.22);
}

.start-timer.running {
  background: linear-gradient(135deg, #2f3744, #57606f);
  box-shadow: 0 22px 38px rgba(47, 55, 68, 0.22);
}

.start-timer.paused {
  background: linear-gradient(135deg, #4f8fdf, #6bb6f0);
  box-shadow: 0 22px 38px rgba(79, 143, 223, 0.2);
}

.screen.dark-theme .detail-screen {
  background:
    radial-gradient(circle at 50% 28%, rgba(69, 84, 104, 0.45), transparent 30%),
    #10151d;
}

.screen.dark-theme .timer-ring {
  background: rgba(20, 27, 37, 0.88);
  border-color: #273243;
}

.progress-detail-card {
  display: grid;
  place-items: center;
  margin-top: 82px;
}

.progress-ring {
  --progress-angle: 0deg;
  position: relative;
  width: 258px;
  height: 258px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 66%, transparent 67%),
    conic-gradient(#45ce58 0 var(--progress-angle), #eef1f7 var(--progress-angle) 360deg);
  box-shadow: 0 28px 64px rgba(88, 104, 124, 0.1);
}

.progress-ring strong {
  color: #050505;
  font-size: 58px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.06em;
}

.progress-ring em {
  color: #8d939c;
  font-size: 30px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}

.quick-add {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 42px;
}

.quick-title {
  display: grid;
  grid-template-columns: 1fr 52px;
  align-items: center;
  margin-bottom: 24px;
}

.quick-title h2 {
  color: #050505;
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.undo-progress {
  width: 52px;
  height: 42px;
  border-radius: 16px;
  background: transparent;
  color: #b6bec9;
  font-size: 42px;
  line-height: 1;
}

.undo-progress:disabled {
  opacity: 0.25;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.quick-add-btn {
  min-height: 86px;
  border-radius: 9px;
  background: #45ce58;
  color: #ffffff;
  font-size: 30px;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(69, 206, 88, 0.18);
}

.quick-add-btn:active {
  transform: scale(0.98);
}

.screen.dark-theme .progress-ring {
  background:
    radial-gradient(circle, #10151d 0 66%, transparent 67%),
    conic-gradient(#45ce58 0 var(--progress-angle), #273243 var(--progress-angle) 360deg);
}

.screen.dark-theme .progress-ring strong,
.screen.dark-theme .quick-title h2 {
  color: #f8fafc;
}

/* Home progress rows */
.habit-list {
  gap: 10px;
}

.habit-list .inline-title {
  margin: 0 0 12px;
}

.habit-list .completed-title {
  margin: 34px 0 12px;
}

.habit-row {
  overflow: hidden;
}

.habit-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--row-progress, 0%);
  min-width: 0;
  background: var(--row-fill, #45ce58);
  opacity: 1;
  pointer-events: none;
}

.habit-row .symbol,
.habit-row .habit-title,
.habit-row .habit-progress {
  position: relative;
  z-index: 1;
}

.habit-row.done {
  --row-progress: 100%;
  --row-fill: #4cd155;
}

.habit-row.done .habit-title strong,
.habit-row.done .habit-progress strong,
.habit-row.done .habit-progress em {
  color: rgba(255, 255, 255, 0.82);
}

.habit-row.has-progress .symbol,
.habit-row.done .symbol {
  color: #ffffff;
  filter: none;
  opacity: 0.9;
}

.habit-row.has-progress .symbol-drop::before,
.habit-row.has-progress .symbol-water::before,
.habit-row.has-progress .symbol-spark::before,
.habit-row.done .symbol-drop::before,
.habit-row.done .symbol-water::before,
.habit-row.done .symbol-spark::before,
.habit-row.has-progress .symbol-moon::before,
.habit-row.has-progress .symbol-sleep::before,
.habit-row.done .symbol-moon::before,
.habit-row.done .symbol-sleep::before {
  background: #ffffff;
  box-shadow: none;
}

.habit-row.has-progress .symbol-book::before,
.habit-row.has-progress .symbol-read::before,
.habit-row.has-progress .symbol-book::after,
.habit-row.has-progress .symbol-read::after,
.habit-row.done .symbol-book::before,
.habit-row.done .symbol-read::before,
.habit-row.done .symbol-book::after,
.habit-row.done .symbol-read::after {
  background: #ffffff;
}

.habit-row.has-progress .symbol-money::before,
.habit-row.done .symbol-money::before,
.habit-row.has-progress .symbol-sugar::before,
.habit-row.done .symbol-sugar::before {
  background: #ffffff;
}

.habit-row.has-progress .symbol-sugar::after,
.habit-row.done .symbol-sugar::after {
  border-color: #ffffff;
}

.habit-row.habit-read,
.habit-row.habit-book {
  --row-fill: #bd743c;
}

.habit-row.habit-exercise,
.habit-row.habit-walk,
.habit-row.habit-cycling,
.habit-row.habit-body {
  --row-fill: #4cd155;
}

.habit-row.habit-learn {
  --row-fill: #4cd155;
}

.habit-row.habit-read.has-progress .habit-title strong,
.habit-row.habit-book.has-progress .habit-title strong {
  color: #ffffff;
}

.habit-row.habit-read.has-progress .habit-progress strong,
.habit-row.habit-book.has-progress .habit-progress strong,
.habit-row.habit-exercise.has-progress .habit-progress strong,
.habit-row.habit-walk.has-progress .habit-progress strong,
.habit-row.habit-cycling.has-progress .habit-progress strong {
  color: #050505;
}

.habit-row.habit-read.has-progress .habit-progress em,
.habit-row.habit-book.has-progress .habit-progress em,
.habit-row.habit-exercise.has-progress .habit-progress em,
.habit-row.habit-walk.has-progress .habit-progress em,
.habit-row.habit-cycling.has-progress .habit-progress em {
  color: #85858a;
}

.habit-row .symbol {
  color: inherit;
}

.habit-row::after {
  display: none;
}

.habit-row {
  background: #f0f1f6;
  grid-template-columns: 72px minmax(0, 1fr) 66px;
  padding: 0 14px 0 0;
}

.habit-row .symbol {
  justify-self: center;
  align-self: center;
  width: 30px;
  height: 30px;
}

.habit-title {
  min-width: 0;
  padding-left: 2px;
}

.habit-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.habit-progress {
  justify-self: end;
  min-width: 58px;
}

.screen.dark-theme .habit-row {
  background: #1b2330;
}

.screen.dark-theme .habit-row.has-progress .habit-progress strong,
.screen.dark-theme .habit-row.has-progress .habit-progress em {
  color: #f8fafc;
}

/* Home list fills space without scrolling. */
.habit-list {
  max-height: calc(100% - 190px);
  overflow-y: auto;
  padding-bottom: 86px;
  overscroll-behavior: auto;
  scrollbar-width: none;
}

.habit-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Summary ring should show the actual completion progress. */
.completion-ring {
  border: 0;
  background:
    radial-gradient(circle, #f0f2f7 0 61%, transparent 62%),
    conic-gradient(#39c970 0 var(--completion-angle, 0deg), #ffffff var(--completion-angle, 0deg) 360deg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.screen.dark-theme .completion-ring {
  background:
    radial-gradient(circle, #1b2330 0 61%, transparent 62%),
    conic-gradient(#39c970 0 var(--completion-angle, 0deg), #273243 var(--completion-angle, 0deg) 360deg);
}

/* App-wide compact typography pass. */
.app-header h1,
.today-title h1,
.summary-title h1,
.settings-title,
.choose-header h1,
.option-header h1,
.habit-settings-header h1,
.setup-title h1 {
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.today-title span,
.summary-title p,
.detail-title span,
.note {
  font-size: 15px;
}

.morning-title,
.summary-section-title,
.settings-section h2,
.habit-settings-section h2,
.choose-section h2,
.setup-block h2 {
  font-size: 22px;
  font-weight: 780;
  letter-spacing: -0.015em;
}

.habit-title strong,
.choice-tile strong,
.edit-habit-row strong,
.settings-row strong,
.option-row strong,
.setting-row strong {
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.habit-progress strong,
.summary-count strong,
.compare-copy strong,
.goal-row strong,
.settings-value {
  font-size: 18px;
  font-weight: 650;
}

.habit-progress em,
.summary-count em,
.compare-copy span,
.habit-title em {
  font-size: 12px;
}

.detail-title h1 {
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.timer-ring strong {
  font-size: 44px;
  font-weight: 650;
}

.timer-ring.long-time strong {
  font-size: 34px;
}

.progress-ring strong {
  font-size: 48px;
  font-weight: 760;
}

.progress-ring span {
  font-size: 25px;
}

.start-timer,
.quick-add-btn,
.save-habit {
  font-size: 21px;
  font-weight: 760;
}

.time-chip {
  font-size: 15px;
}

.completion-ring strong {
  font-size: 28px;
  font-weight: 700;
}

.settings-row {
  min-height: 56px;
}

.habit-row {
  min-height: 74px;
}

.choice-tile {
  min-height: 62px;
}

/* Setup page fit: keep Save visible and stop long titles from taking over. */
.setup-mode .choose-content {
  padding: 12px 18px 18px;
}

.setup-header {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  margin: 6px 0 14px;
}

.setup-back {
  width: 32px;
  height: 32px;
  font-size: 30px;
}

.setup-title {
  min-width: 0;
  gap: 7px;
}

.setup-title h1 {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 23px;
  line-height: 1.05;
  font-weight: 760;
}

.setup-title .choice-icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
}

.setup-block {
  margin-bottom: 14px;
}

.setup-block h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.goal-row,
.setting-row {
  min-height: 48px;
}

.goal-row {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.goal-row strong,
.setting-row strong {
  font-size: 15px;
}

.stepper {
  width: 32px;
  height: 32px;
  font-size: 22px;
}

.setting-row {
  padding: 0 18px;
}

.setting-row span {
  font-size: 28px;
}

.time-chips {
  gap: 8px;
  margin-top: 10px;
}

.time-chip {
  min-width: 96px;
  height: 40px;
  font-size: 14px;
}

.save-habit {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  width: 148px;
  min-height: 46px;
  margin: 14px auto 0;
  font-size: 19px;
  box-shadow: 0 12px 24px rgba(63, 125, 241, 0.22);
}

/* Detail pages: no overlap, smaller typography, cleaner spacing. */
.detail-screen {
  overflow-y: auto;
  padding-bottom: 18px;
  scrollbar-width: none;
}

.detail-screen::-webkit-scrollbar {
  display: none;
}

.detail-header {
  height: 86px;
  padding: 28px 24px 0;
}

.detail-title h1 {
  font-size: 22px;
  font-weight: 700;
}

.detail-title span {
  font-size: 13px;
}

.progress-detail-card,
.timer-card {
  margin-top: 18px;
}

.progress-ring,
.timer-ring {
  width: 156px;
  height: 156px;
}

.progress-ring strong,
.timer-ring strong {
  font-size: 29px;
  font-weight: 700;
}

.progress-ring em {
  font-size: 18px;
}

.timer-ring.long-time strong {
  font-size: 23px;
}

.quick-add {
  position: static;
  width: auto;
  margin: 22px 28px 0;
}

.quick-title {
  grid-template-columns: 1fr 34px;
  margin-bottom: 10px;
}

.quick-title h2 {
  font-size: 17px;
  font-weight: 700;
}

.undo-progress {
  width: 34px;
  height: 30px;
  font-size: 26px;
}

.quick-grid {
  gap: 10px;
}

.quick-add-btn {
  min-height: 52px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.start-timer {
  position: static;
  display: block;
  width: 142px;
  min-height: 44px;
  margin: 26px auto 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
}

.start-timer.done,
.start-timer.running,
.start-timer.paused {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
