@font-face {
  font-family: "Maplestory";
  src: url("./assets/fonts/Maplestory-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Maplestory";
  src: url("./assets/fonts/Maplestory-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --green-950: #183829;
  --green-800: #28533c;
  --green-700: #356b4d;
  --green-100: #dfeadf;
  --green-50: #eff5ee;
  --cream: #f6f4ed;
  --paper: #fdfcf8;
  --ink: #1f2923;
  --muted: #7a817b;
  --line: #e5e5dc;
  --orange: #dc8b52;
  --yellow: #e7b84c;
  --blue: #6d8fa3;
  --shadow: 0 12px 35px rgba(31, 41, 35, 0.07);
  font-family: "Maplestory", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 8%, rgba(219, 229, 211, 0.55), transparent 25%),
    var(--cream);
}

.app-initializing .app-shell {
  visibility: hidden;
}

.app-initializing .nav-item {
  transition: none;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.crop-svg {
  display: block;
  width: 1em;
  height: 1em;
  overflow: visible;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 26px 22px 22px;
  border-right: 2px solid #294c3a;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(50, 77, 57, 0.025) 0,
      rgba(50, 77, 57, 0.025) 1px,
      transparent 1px,
      transparent 5px
    ),
    #f2eddf;
  box-shadow: inset -5px 0 #dfb84e;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 2px 5px 23px;
  border-bottom: 1px dashed rgba(41, 76, 58, 0.38);
  color: var(--green-950);
  font-family: "Maplestory", sans-serif;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #294c3a;
  border-radius: 11px 11px 11px 5px;
  background:
    radial-gradient(circle at 72% 23%, #f1c65c 0 3px, transparent 3.5px),
    linear-gradient(145deg, #fbf8e8, #e9f0df);
  box-shadow: 3px 3px 0 #294c3a;
  transform: rotate(-2deg);
}

.brand-mark img {
  width: 31px;
  height: 36px;
  object-fit: contain;
}

.main-nav {
  display: grid;
  gap: 10px;
}

.main-nav::before {
  margin: 0 4px 2px;
  color: #7e846f;
  content: "MENU / 05";
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 54px;
  gap: 11px;
  padding: 7px 10px;
  border: 2px solid transparent;
  border-radius: 12px;
  color: #58665d;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.nav-item:hover {
  color: #203e2f;
  background: rgba(255, 252, 239, 0.78);
  border-color: rgba(41, 76, 58, 0.28);
  transform: translateX(2px);
}

.nav-item.active {
  color: #203e2f;
  border-color: #294c3a;
  background: #f3cf63;
  box-shadow: 4px 4px 0 #294c3a;
  transform: translate(-2px, -2px);
}

.nav-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(41, 76, 58, 0.32);
  border-radius: 9px;
  background: rgba(255, 253, 245, 0.66);
  font-family: "Maplestory", sans-serif;
  font-size: 18px;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active .nav-icon {
  color: #f8e7a4;
  border-color: #294c3a;
  background: #294c3a;
}

.nav-label {
  flex: 1;
}

.nav-index {
  color: #7f7150;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.nav-item.active .nav-index {
  color: #294c3a;
}

.sidebar-spacer {
  flex: 1;
}

.large-progress {
  overflow: hidden;
  background: #dfe4dc;
}

.profile-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 7px;
  border: 1px dashed rgba(41, 76, 58, 0.34);
  border-radius: 12px;
  background: rgba(255, 252, 239, 0.5);
  cursor: pointer;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #294c3a;
  border-radius: 9px;
  color: #294c3a;
  background: #df8d56;
  box-shadow: 2px 2px 0 #294c3a;
  font-size: 13px;
  font-weight: 700;
}

.profile-copy {
  display: grid;
  gap: 2px;
  margin-left: 10px;
  text-align: left;
}

.profile-copy strong {
  font-size: 13px;
}

.profile-copy small {
  color: var(--muted);
  font-size: 10px;
}

.more-icon {
  margin-left: auto;
  color: #939a94;
  letter-spacing: 1px;
}

.main-content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 38px 48px 60px;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: page-in 180ms ease;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  margin: 4px 0 7px;
  font-size: 36px;
  letter-spacing: -0.04em;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.page-section-slot {
  width: 100%;
}

.task-page-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.task-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.task-filter-list button,
.archive-toggle {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.task-filter-list button.active {
  border-color: var(--green-700);
  color: #fff;
  background: var(--green-700);
}

.task-filter-list button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.archive-toggle {
  flex: 0 0 auto;
  color: var(--green-700);
}

.archive-toggle.active {
  border-color: #c8d7c8;
  background: var(--green-50);
}

.task-archive-policy {
  min-width: 260px;
  flex: 1 1 320px;
  margin: 0;
  color: #657168;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

#tasksPage .task-section {
  width: 100%;
}

#tasksPage .board-column {
  min-height: 520px;
}

#taskBoard.archive-view {
  grid-template-columns: minmax(280px, 1fr);
}

#taskBoard.archive-view .board-column:not([data-status="done"]) {
  display: none;
}

#taskBoard.archive-view .task-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#habitsPage .habit-section {
  width: 100%;
  max-width: none;
}

#habitsPage .habit-form {
  max-width: 520px;
}

#habitsPage .habit-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#habitsPage .reward-note {
  max-width: 420px;
}

.habit-heatmap {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.habit-heatmap > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.habit-heatmap h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.heatmap-nav {
  display: flex;
  gap: 5px;
}

.heatmap-nav button {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-700);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}

.heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.heatmap-grid {
  display: grid;
  align-items: center;
  width: max-content;
  gap: 4px;
}

.heatmap-day-label {
  color: #999f9a;
  font-size: 10px;
  text-align: center;
}

.heatmap-habit-name {
  overflow: hidden;
  padding-right: 10px;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-cell {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #eeeee8;
}

.heatmap-cell.scheduled {
  border: 1px solid #d8e1d5;
  background: #e8efe5;
}

.heatmap-cell.completed {
  border: 1px solid #4f805e;
  background: var(--green-700);
  box-shadow: inset 0 -2px rgba(0, 0, 0, 0.08);
}

.heatmap-cell.inactive {
  opacity: 0.5;
}

.heatmap-legend {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.heatmap-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.heatmap-legend i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.heatmap-legend i.scheduled {
  border: 1px solid #d8e1d5;
  background: #e8efe5;
}

.heatmap-legend i.completed {
  background: var(--green-700);
}

.farm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 22px;
}

.farm-panel,
.seed-shop {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.farm-panel {
  padding: 22px;
}

.farm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.farm-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.farm-storage-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.farm-storage-toolbar button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid #dce3d7;
  border-radius: 11px;
  background: #f7faf5;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.farm-storage-toolbar small {
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--green-700);
  font-size: 11px;
}

.farm-panel-header h2,
.seed-shop h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.farm-name-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.farm-name-display h2 {
  margin: 0;
}

.farm-name-display > button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid #d5dfd2;
  border-radius: 9px;
  color: var(--green-700);
  background: var(--green-50);
  cursor: pointer;
}

.farm-name-display svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.farm-name-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.farm-name-display[hidden],
.farm-name-form[hidden] {
  display: none;
}

.farm-name-form input {
  width: min(240px, 35vw);
  height: 38px;
  padding: 0 11px;
  border: 1px solid #9eb49e;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
}

.farm-name-form button {
  height: 34px;
  padding: 0 9px;
  border: 1px solid #cdd9cb;
  border-radius: 8px;
  color: var(--green-700);
  background: #fff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.farm-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e2d7b8;
  border-radius: 12px;
  background: #fffaf0;
}

.farm-wallet > span {
  color: var(--yellow);
}

.farm-wallet strong {
  font-size: 13px;
}

.farm-wallet small {
  color: var(--muted);
  font-size: 11px;
}

.farm-wallet.negative {
  border-color: #d9b3a8;
  color: #9c4f3e;
  background: #fff7f4;
}

.seed-inventory {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #dce5d9;
  border-radius: 14px;
  background: #f4f8f1;
}

.farm-supply-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 7px;
}

.farm-supply-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #ded7c1;
  border-radius: 10px;
  background: #fff;
}

.farm-supply-item > span {
  grid-row: 1 / 3;
  font-size: 20px;
}

.farm-supply-item strong {
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: normal;
  white-space: normal;
  word-break: keep-all;
}

.farm-supply-item small {
  color: var(--muted);
  font-size: 10px;
}

.farm-supply-item button {
  grid-column: 3;
  grid-row: 1 / 3;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--green-700);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.farm-supply-item.empty {
  opacity: 0.48;
}

.farm-supply-item.selected {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(53, 107, 77, 0.12);
}

.farm-supply-item select {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
}

.farm-supply-item .boost-status {
  grid-column: 1 / -1;
  color: #a36b24;
  font-weight: 700;
}

.seed-inventory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  min-width: 0;
  width: 100%;
  gap: 7px;
}

.inventory-seed {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 6px;
  min-width: 78px;
  padding: 7px 9px;
  border: 1px solid #d9e0d5;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.inventory-seed > span {
  grid-row: 1 / 3;
  font-size: 18px;
}

.inventory-seed strong {
  font-size: 11px;
}

.inventory-seed small {
  color: var(--muted);
  font-size: 10px;
}

.inventory-seed.empty {
  opacity: 0.45;
}

.inventory-seed.selected {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(53, 107, 77, 0.12);
}

.farm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  gap: 11px;
  padding: 18px;
  border: 1px solid #b9caa9;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    #8dad72;
  box-shadow: inset 0 0 30px rgba(37, 70, 41, 0.14);
}

.farm-scene {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.farm-scene-grid {
  width: 100%;
}

.farm-scene .farm-grid {
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
}

.farm-scene .farm-plot {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.farm-scene .crop-visual {
  min-height: 0;
}

.farm-scene .crop-info {
  position: absolute;
  z-index: 3;
  top: 5px;
  right: 5px;
  left: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 0;
  pointer-events: none;
}

.farm-scene .crop-info strong,
.farm-scene .crop-info small {
  padding: 2px 4px;
  border-radius: 5px;
  color: #fff;
  background: rgba(70, 47, 27, 0.58);
  line-height: 1.2;
  text-shadow: none;
}

.farm-scene .crop-plot > button,
.farm-scene .plot-growth-actions button,
.farm-scene .mature-label {
  min-height: 20px;
}

.farm-plot {
  position: relative;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1 / 0.92;
  border: 1px solid #8a633d;
  border-radius: 13px;
  color: var(--ink);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(82, 47, 24, 0.1) 0,
      rgba(82, 47, 24, 0.1) 2px,
      transparent 2px,
      transparent 12px
    ),
    #b88451;
  box-shadow:
    inset 0 4px 8px rgba(89, 51, 25, 0.16),
    0 2px 0 rgba(79, 49, 27, 0.13);
}

.empty-plot {
  display: grid;
  place-content: center;
  border-style: dashed;
  color: rgba(255, 255, 255, 0.63);
  cursor: pointer;
}

.empty-plot > span {
  font-size: 21px;
}

.empty-plot small {
  font-size: 10px;
}

.empty-plot.ready {
  border-color: #f4df89;
  color: #fff7c9;
  box-shadow:
    inset 0 0 0 3px rgba(255, 240, 170, 0.16),
    0 0 0 2px rgba(255, 239, 168, 0.24);
}

.crop-plot {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  padding: 7px;
  text-align: center;
}

.growable-plot {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
}

.growable-plot:hover {
  filter: brightness(1.05);
}

.growable-plot:focus-visible {
  outline: 3px solid rgba(255, 240, 170, 0.8);
  outline-offset: 2px;
}

.crop-visual {
  display: grid;
  place-items: center;
  min-height: 38px;
}

.crop-visual span {
  filter: drop-shadow(0 3px 2px rgba(52, 34, 16, 0.2));
  font-size: clamp(21px, 3vw, 36px);
  transition: transform 180ms ease;
}

.crop-visual.stage-0 span {
  color: #5a341e;
  font-size: 24px;
}

.crop-info {
  display: grid;
  gap: 1px;
  margin-bottom: 5px;
}

.crop-info strong {
  color: #fff;
  font-size: 11px;
  text-shadow: 0 1px rgba(65, 39, 20, 0.35);
}

.crop-info small {
  color: #f3e5ce;
  font-size: 11px;
}

.crop-plot > button,
.mature-label {
  display: grid;
  min-height: 25px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #244a34;
  background: #fff8d8;
  font-size: 10px;
  font-weight: 700;
}

.crop-plot > button {
  cursor: pointer;
}

.plot-growth-actions {
  display: grid;
  grid-template-columns: minmax(38px, 0.7fr) minmax(0, 1.3fr);
  gap: 4px;
}

.plot-growth-actions button {
  display: inline-flex;
  min-width: 0;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  border: 0;
  border-radius: 6px;
  color: #294c3a;
  background: #fff8d8;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.plot-growth-actions .water-plot-button {
  color: #285d60;
  background: #d9f0ed;
}

.plot-growth-actions .water-plot-button:disabled {
  color: #73857e;
  background: #dfe5df;
  cursor: not-allowed;
}

.crop-plot > .harvest-button {
  color: #fff;
  background: var(--green-700);
}

.crop-plot.wilted {
  border-color: #8a633d;
}

.crop-plot.wilted .crop-svg {
  filter: none;
  transform: none;
}

.crop-plot > .discard-button {
  color: #fff;
  background: #8e4f45;
}

.mature-label {
  color: #fff;
  background: var(--green-700);
}

.seed-shop {
  padding: 20px;
}

.seed-shop > header {
  margin-bottom: 16px;
}

.morrison-profile {
  display: flex;
  align-items: center;
  gap: 11px;
}

.morrison-avatar {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d9e3d4;
  border-radius: 14px;
  background: var(--green-50);
  font-size: 27px;
}

.seed-shop > header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.market-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  padding: 10px 11px;
  border: 1px solid #e4ddc8;
  border-radius: 10px;
  background: #fffaf0;
}

.market-balance > span {
  color: var(--muted);
  font-size: 10px;
}

.market-balance strong {
  color: #6c5a26;
  font-size: 10px;
}

.market-utility-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 17px;
}

.market-utility-row .market-balance {
  min-height: 58px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
}

.farm-weekly-ranking-button {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid #e4ddc8;
  border-radius: 10px;
  color: #294c3a;
  background: #eef3e7;
  text-align: left;
  cursor: pointer;
}

.farm-weekly-ranking-button span {
  color: var(--muted);
  font-size: 10px;
}

.farm-weekly-ranking-button strong {
  font-size: 13px;
}

.farm-weekly-ranking-button:hover {
  background: #f7e6aa;
}

.market-section-title {
  margin: 15px 0 8px;
  font-size: 11px;
}

.seed-shop-list {
  display: grid;
  gap: 8px;
}

.crop-storage {
  width: 100%;
  max-width: none;
  margin: 0 auto 14px;
  padding: 11px 13px;
  border: 1px solid #dfded3;
  border-radius: 13px;
  background: #f8f7f1;
}

.crop-storage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  min-width: 0;
  width: 100%;
  gap: 6px;
}

.farm-kitchen {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 590px;
  margin: 0 auto 18px;
  padding: 15px;
  border: 1px solid #ddd6bf;
  border-radius: 15px;
  background: #fffaf0;
}

.open-farm-kitchen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #ddcf9f;
  border-radius: 11px;
  color: #5d4b20;
  background: linear-gradient(135deg, #fff9dc, #fff0bd);
  cursor: pointer;
}

.open-farm-mail {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #b9cbb9;
  border-radius: 10px;
  color: #294c3a;
  background: #e8f0e4;
  cursor: pointer;
}

.farm-mail-header-unread {
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  border: 2px solid #fffaf0;
  border-radius: 12px;
  color: #fffaf0;
  background: #df7f4c;
  box-shadow: 2px 2px 0 #294c3a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.farm-mail-header-unread[hidden] {
  display: none;
}

.open-farm-mail.has-unread {
  background: #fff3bf;
}

.open-farm-mail span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.open-farm-kitchen span {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-1px);
}

.open-farm-kitchen small {
  display: none;
}

.kitchen-modal-panel {
  width: min(980px, 100%);
}

.kitchen-modal-panel .farm-kitchen {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.kitchen-modal-panel .recipe-lab > #cookRecipeButton {
  min-height: 42px;
  font-size: 14px;
}

.kitchen-modal-panel .recipe-book-heading {
  font-size: 15px;
}

.kitchen-modal-panel .recipe-entry strong,
.kitchen-modal-panel .food-item strong {
  font-size: 14px;
}

.kitchen-modal-panel .recipe-entry small,
.kitchen-modal-panel .food-item small,
.kitchen-modal-panel .empty-food-message {
  font-size: 12px;
}

.farm-kitchen > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.farm-kitchen h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.farm-kitchen > header > span {
  color: var(--muted);
  font-size: 10px;
}

.recipe-lab {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 7px;
}

.recipe-lab > #cookRecipeButton {
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--green-700);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.food-inventory {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.food-item {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 1px 6px;
  padding: 7px 9px;
  border: 1px solid #e0d9c5;
  border-radius: 9px;
  background: #fff;
}

.food-item i {
  grid-row: 1 / 3;
  font-size: 20px;
  font-style: normal;
}

.food-item strong {
  font-size: 11px;
}

.food-item small,
.empty-food-message {
  color: var(--muted);
  font-size: 10px;
}

.waste-item {
  padding: 7px 9px;
  border: 1px solid #d9c7bb;
  border-radius: 9px;
  color: #875b4e;
  background: #fff8f3;
  font-size: 10px;
  cursor: pointer;
}

.recipe-book {
  border-top: 1px solid #e7dfca;
  padding-top: 10px;
}

.recipe-book-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
}

.recipe-book-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.recipe-book-heading > button {
  padding: 4px 7px;
  border: 1px solid #9eafa0;
  border-radius: 6px;
  color: #315f46;
  background: #e8eddc;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.recipe-book-heading > button:hover {
  background: #dfe9db;
}

.recipe-book.collapsed > #recipeBook {
  display: none;
}

.recipe-book > #recipeBook {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.recipe-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 7px;
  padding: 8px;
  border: 1px solid #e1dac8;
  border-radius: 9px;
  background: #fff;
}

.recipe-entry > span {
  grid-row: 1 / 3;
  font-size: 20px;
}

.recipe-entry strong {
  font-size: 11px;
}

.recipe-entry small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.recipe-entry.locked {
  opacity: 0.55;
}

.harvest-item {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 5px;
  min-width: 65px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.harvest-item i {
  grid-row: 1 / 3;
  font-size: 17px;
  font-style: normal;
}

.harvest-item strong {
  font-size: 10px;
}

.harvest-item small {
  color: var(--muted);
  font-size: 11px;
}

.harvest-item.empty {
  opacity: 0.45;
}

.morrison-buy-list {
  display: grid;
  gap: 7px;
}

.farm-item-shop {
  display: grid;
  gap: 7px;
  max-height: 430px;
  padding-right: 3px;
  overflow-y: auto;
}

.open-permanent-market {
  display: grid;
  width: 100%;
  gap: 3px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid #d9c98f;
  border-radius: 11px;
  color: #5f4d20;
  background: linear-gradient(135deg, #fff8d8, #fff0b5);
  text-align: left;
  cursor: pointer;
}

.open-permanent-market span {
  font-size: 16px;
  font-weight: 700;
}

.open-permanent-market small {
  font-size: 11px;
}

.market-modal {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.market-modal.hidden {
  display: none;
}

.market-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 43, 32, 0.55);
  backdrop-filter: blur(5px);
}

.market-modal-panel {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  padding: 10px;
  overflow: hidden;
  border: 1px solid #ddd3b4;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(22, 39, 29, 0.3);
}

.modal-scroll-area {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #87968b transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.market-modal-panel > .modal-scroll-area {
  width: 100%;
  max-height: calc(min(760px, calc(100vh - 48px)) - 20px);
  padding: 14px;
}

.modal-scroll-area::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.modal-scroll-area::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.modal-scroll-area::-webkit-scrollbar-track {
  margin-block: 16px;
  background: transparent;
}

.modal-scroll-area::-webkit-scrollbar-thumb {
  border: 2px solid var(--paper);
  border-radius: 10px;
  background: #87968b;
}

.market-modal-panel > .modal-scroll-area > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.market-modal-panel h2 {
  margin: 4px 0 5px;
  font-size: 28px;
}

.market-modal-panel header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.market-modal-panel header > button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--green-50);
  font-size: 24px;
  cursor: pointer;
}

.modal-market-balance {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #6a5725;
  background: #fff6d5;
  font-size: 13px;
}

.farm-ranking-modal-panel {
  width: min(620px, 100%);
  overflow: hidden;
}

.farm-ranking-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px dashed #91a08e;
  border-radius: 9px;
  color: #294c3a;
  background: #eef3e7;
}

.farm-ranking-period span {
  font-size: 15px;
  font-weight: 700;
}

.farm-ranking-period small {
  color: var(--muted);
  font-size: 12px;
}

.farm-ranking-my-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 13px 14px;
  border: 2px solid #294c3a;
  border-radius: 10px;
  color: #294c3a;
  background: #f7e6aa;
  box-shadow: 3px 3px 0 #d4b95f;
  font-size: 14px;
  font-weight: 700;
}

.farm-ranking-my-score strong {
  color: #7d5e15;
  font-size: 16px;
}

.farm-ranking-rewards {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-bottom: 10px;
  padding: 11px 13px;
  border: 1px solid #d9c98f;
  border-radius: 9px;
  color: #52665a;
  background: #fff8dc;
  font-size: 12px;
}

.farm-ranking-rewards > strong {
  color: #294c3a;
  font-size: 14px;
}

.farm-ranking-rewards > span {
  font-weight: 700;
  white-space: nowrap;
}

.farm-ranking-rewards > small {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
}

.farm-ranking-demo-note {
  margin: 14px 0 8px;
  color: #7a817b;
  font-size: 12px;
  text-align: center;
}

.farm-ranking-list {
  display: grid;
  gap: 7px;
  max-height: min(430px, 48vh);
  margin: 0;
  padding: 0 4px 4px 0;
  overflow-y: auto;
  list-style: none;
}

.farm-ranking-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 8px 12px;
  border: 1px solid #cdd5c8;
  border-radius: 9px;
  background: #fffaf0;
}

.farm-ranking-row.is-me {
  border: 2px solid #294c3a;
  background: #fff3bf;
  box-shadow: 2px 2px 0 #d4b95f;
}

.farm-ranking-rank {
  color: #294c3a;
  font-family: "Maplestory", sans-serif;
  font-size: 19px;
  text-align: center;
}

.farm-ranking-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.farm-ranking-name strong {
  overflow: hidden;
  color: #294c3a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-ranking-name small {
  color: var(--muted);
  font-size: 12px;
}

.farm-ranking-score {
  color: #7d5e15;
  font-size: 14px;
  white-space: nowrap;
}

.farm-mail-modal-panel {
  width: min(760px, 100%);
  overflow: hidden;
}

.farm-mail-modal-panel .section-kicker,
.farm-ranking-modal-panel .section-kicker,
.kitchen-modal-panel .section-kicker,
.farm-reward-box-panel .section-kicker,
#permanentMarketModal .section-kicker {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.2;
}

.farm-mail-modal-panel h2,
.farm-ranking-modal-panel h2,
.kitchen-modal-panel h2,
.farm-reward-box-panel h2,
#permanentMarketModal h2 {
  margin: 0 0 9px;
  font-size: 30px;
  line-height: 1.1;
}

.farm-mail-modal-panel header p,
.farm-ranking-modal-panel header p,
.kitchen-modal-panel header p,
.farm-reward-box-panel header p,
#permanentMarketModal header p {
  font-size: 15px;
  line-height: 1.45;
}

.farm-mail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid #aab5a7;
  border-radius: 9px;
  background: #eef1e8;
}

.farm-mail-tabs button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  color: #5c6e63;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.farm-mail-tabs button.active {
  color: #294c3a;
  background: #fffaf0;
  box-shadow: 2px 2px 0 #d4b95f;
}

.farm-mail-tabs small {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  color: #fffaf0;
  background: #df8d56;
  font-size: 11px;
}

.farm-mail-tabs small[hidden],
.farm-mail-view.hidden {
  display: none;
}

.farm-mail-inbox-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px dashed #91a08e;
  border-radius: 8px;
  color: #60736a;
  background: #eef3e7;
  font-size: 12px;
  text-align: center;
}

.farm-mail-inbox {
  display: grid;
  gap: 8px;
}

.farm-mail-inbox-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #cdd5c8;
  border-radius: 9px;
  background: #fffaf0;
}

.farm-mail-inbox-row.claimed {
  opacity: 0.62;
  background: #eef1e9;
}

.farm-mail-inbox-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #e8eddc;
  font-size: 24px;
}

.farm-mail-inbox-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.farm-mail-sender {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.farm-mail-sender > strong {
  color: #203e2f;
  font-size: 14px;
}

.farm-mail-sender > small {
  color: var(--muted);
  font-size: 11px;
}

.farm-mail-inbox-copy > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #294c3a;
  font-size: 14px;
}

.farm-mail-inbox-copy > strong svg {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
}

.farm-mail-inbox-row > button {
  min-width: 76px;
  min-height: 36px;
  border: 2px solid #294c3a;
  border-radius: 7px;
  color: #fffaf0;
  background: #315f46;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.farm-mail-inbox-row > button:disabled {
  color: #6f7d73;
  border-color: #aab4aa;
  background: #dce2dc;
  cursor: default;
}

.farm-mail-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 2px solid #294c3a;
  border-radius: 10px;
  color: #294c3a;
  background: #f7e6aa;
  box-shadow: 3px 3px 0 #d4b95f;
  font-size: 14px;
  font-weight: 700;
}

.farm-mail-status strong {
  font-size: 18px;
}

.farm-mail-demo-note {
  margin: 12px 0 15px;
  color: #7a817b;
  font-size: 12px;
  text-align: center;
}

.farm-mail-compose {
  display: grid;
  gap: 16px;
}

.farm-mail-step h3,
.farm-mail-history-section > h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #294c3a;
  font-size: 15px;
}

.farm-mail-step h3 > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #fffaf0;
  background: #315f46;
  font-size: 12px;
}

.farm-mail-step h3 small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.farm-mail-friends {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.farm-mail-friend {
  display: grid;
  min-width: 0;
  min-height: 76px;
  grid-template-columns: 31px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 2px 8px;
  padding: 9px;
  border: 1px solid #cdd5c8;
  border-radius: 9px;
  color: #294c3a;
  background: #fffaf0;
  text-align: left;
  cursor: pointer;
}

.farm-mail-friend > span {
  grid-row: 1 / 3;
  font-size: 24px;
  text-align: center;
}

.farm-mail-friend strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-mail-friend small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-mail-friend.selected,
.farm-mail-item.selected {
  border: 2px solid #294c3a;
  background: #fff3bf;
  box-shadow: 2px 2px 0 #d4b95f;
}

.farm-mail-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.farm-mail-categories button {
  min-height: 36px;
  border: 1px solid #9ba99a;
  border-radius: 7px;
  color: #52665a;
  background: #f4f0e5;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.farm-mail-categories button.active {
  color: #294c3a;
  border: 2px solid #294c3a;
  background: #e8eddc;
}

.farm-mail-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 230px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}

.farm-mail-item {
  display: grid;
  min-width: 0;
  min-height: 105px;
  place-items: center;
  gap: 3px;
  padding: 8px;
  border: 1px solid #cdd5c8;
  border-radius: 9px;
  color: #294c3a;
  background: #fffaf0;
  cursor: pointer;
}

.farm-mail-item > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  font-size: 27px;
}

.farm-mail-item > span svg {
  width: 40px;
  height: 40px;
}

.farm-mail-item strong {
  overflow: hidden;
  width: 100%;
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-mail-item small {
  color: var(--muted);
  font-size: 10px;
}

.farm-mail-send {
  min-height: 44px;
  border: 2px solid #294c3a;
  border-radius: 8px;
  color: #fffaf0;
  background: #315f46;
  box-shadow: 3px 3px 0 #d4b95f;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.farm-mail-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.farm-mail-history-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed #9ca594;
}

.farm-mail-history {
  display: grid;
  gap: 6px;
}

.farm-mail-history-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #eef3e7;
}

.farm-mail-history-row > span {
  color: #315f46;
  font-weight: 700;
  text-align: center;
}

.farm-mail-history-row p {
  margin: 0;
  color: #52665a;
  font-size: 13px;
}

.farm-mail-history-row small {
  color: var(--muted);
  font-size: 11px;
}

.farm-mail-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px dashed #aab4a5;
  border-radius: 8px;
  color: var(--muted);
  background: #f8f5ec;
  font-size: 12px;
  text-align: center;
}

.farm-reward-box-modal {
  z-index: 980;
}

.farm-reward-box-panel {
  width: min(700px, 100%);
  overflow: hidden;
}

.farm-reward-box-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 2px solid #294c3a;
  border-radius: 10px;
  color: #294c3a;
  background: #f7e6aa;
  box-shadow: 3px 3px 0 #d4b95f;
  font-size: 14px;
  font-weight: 700;
}

.farm-reward-box-status strong {
  color: #7d5e15;
  font-size: 17px;
}

.farm-reward-box-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.farm-reward-box {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 145px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 12px 8px;
  overflow: visible;
  border: 2px solid #294c3a;
  border-radius: 13px;
  color: #294c3a;
  background: #fffaf0;
  font: inherit;
}

.farm-reward-box.sealed {
  background: linear-gradient(145deg, #fff8d9, #f5d878);
  box-shadow: 4px 4px 0 #d4b95f;
  cursor: pointer;
  animation: reward-box-float 1.8s ease-in-out infinite;
}

.farm-reward-box.sealed:nth-child(even) {
  animation-delay: -0.7s;
}

.farm-reward-box.sealed:hover {
  transform: translateY(-4px) rotate(-2deg);
  filter: brightness(1.04);
}

.farm-reward-box > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  font-size: 48px;
  line-height: 1;
}

.farm-reward-box > span svg {
  width: 58px;
  height: 58px;
}

.farm-reward-box > strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-reward-box > small {
  color: var(--muted);
  font-size: 10px;
}

.farm-reward-box.opened {
  opacity: 1;
  border-color: #8da58f;
  background: #eef3e7;
}

.farm-reward-box.just-opened {
  z-index: 1;
  animation: reward-crop-reveal 560ms cubic-bezier(0.18, 0.9, 0.3, 1.25);
}

.farm-reward-box.just-opened::before,
.farm-reward-box.just-opened::after {
  position: absolute;
  top: 8px;
  color: #d4a62d;
  content: "✦";
  font-size: 22px;
  animation: reward-sparkle 700ms ease-out forwards;
}

.farm-reward-box.just-opened::before {
  left: 9px;
}

.farm-reward-box.just-opened::after {
  right: 9px;
  animation-delay: 80ms;
}

.farm-reward-box-guide {
  margin: 17px 0 12px;
  color: #60736a;
  font-size: 13px;
  text-align: center;
}

.farm-reward-box-close {
  width: 100%;
  min-height: 42px;
  border: 2px solid #294c3a;
  border-radius: 8px;
  color: #fffaf0;
  background: #315f46;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

@keyframes reward-box-float {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes reward-crop-reveal {
  0% { opacity: 0.3; transform: scale(0.55) rotate(-8deg); }
  65% { transform: scale(1.1) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes reward-sparkle {
  0% { opacity: 0; transform: translateY(8px) scale(0.4); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-18px) scale(1.25); }
}

.market-modal-panel .farm-item-shop {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
}

.market-modal-panel .farm-item-card {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 100px;
  padding: 14px;
}

.market-modal-panel .farm-item-card > span {
  width: 46px;
  height: 46px;
  font-size: 26px;
}

.market-modal-panel .farm-item-card strong {
  font-size: 14px;
}

.market-modal-panel .farm-item-card small {
  font-size: 11px;
}

.market-modal-panel .farm-item-card button {
  min-height: 38px;
  font-size: 12px;
}

#permanentMarketModal .modal-market-balance {
  font-size: 14px;
}

#permanentMarketModal .farm-item-card small {
  font-size: 12px;
  line-height: 1.4;
}

#permanentMarketModal .farm-item-card button {
  font-size: 13px;
}

.storage-modal-panel {
  width: min(1180px, 100%);
}

.storage-grid-44 {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 8px;
}

.storage-grid-44 .inventory-seed,
.storage-grid-44 .harvest-item {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  padding: 8px;
}

.storage-grid-44 .inventory-seed strong,
.storage-grid-44 .harvest-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: clip;
  white-space: nowrap;
}

.storage-grid-44 .long-name strong {
  font-size: 12px;
  letter-spacing: -0.05em;
}

.storage-grid-44 .inventory-seed > span,
.storage-grid-44 .harvest-item i {
  font-size: 28px;
}

.supply-storage-modal .farm-supply-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.supply-storage-modal .farm-supply-item {
  position: relative;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 100px;
  padding: 14px;
}

.supply-storage-modal .supply-card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #ded7c1;
  border-radius: 13px;
  color: var(--ink);
  background: #fff8dc;
  font-size: 26px;
}

.supply-card-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.supply-card-copy strong,
.supply-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supply-card-copy strong {
  font-size: 14px;
}

.supply-card-copy small {
  color: var(--muted);
  font-size: 11px;
}

.supply-card-actions {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.supply-card-actions em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.supply-card-actions button {
  min-width: 58px;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--green-700);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.supply-card-actions button:disabled {
  cursor: default;
  opacity: 0.35;
}

.supply-storage-modal .farm-supply-item.target-item {
  grid-column: span 2;
}

.supply-storage-modal .farm-supply-item.target-item select {
  grid-column: 2 / 4;
  width: 100%;
  padding: 8px;
  font-size: 10px;
}

.farm-item-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.farm-item-card > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #fff6d8;
  font-size: 18px;
}

.farm-item-card > div {
  display: grid;
  gap: 3px;
}

.farm-item-card strong {
  font-size: 10px;
}

.farm-item-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.farm-item-card button {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  color: #6c5620;
  background: #fff0b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.fertilizer-badge {
  position: absolute;
  z-index: 5;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #fff8d8;
  box-shadow: 0 2px 7px rgba(55, 42, 25, 0.25);
  font-size: 11px;
}

.harvest-celebration {
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.harvest-celebration i {
  --confetti-color: #f2c84b;
  position: absolute;
  top: 48%;
  left: 50%;
  width: 9px;
  height: 16px;
  border-radius: 3px;
  background: var(--confetti-color);
  animation: harvest-firework 1.5s var(--delay) cubic-bezier(0.2, 0.75, 0.3, 1) forwards;
}

.harvest-celebration i:nth-child(4n + 2) {
  --confetti-color: #e66b56;
}

.harvest-celebration i:nth-child(4n + 3) {
  --confetti-color: #5ea76d;
}

.harvest-celebration i:nth-child(4n) {
  --confetti-color: #7e78bd;
}

@keyframes harvest-firework {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(0);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--tx)), calc(-50% + 260px))
      rotate(620deg);
  }
}

.focus-page-stage {
  position: relative;
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd9c2;
  border-radius: 24px;
  background:
    linear-gradient(rgba(10, 30, 22, 0.24), rgba(10, 30, 22, 0.38)),
    var(--focus-background-image, url("./assets/focus-farm-background.png")) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.focus-page-stage::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 25, 20, 0.1));
  content: "";
  pointer-events: none;
}

.focus-stage-toolbar {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.focus-item-picker {
  position: relative;
  display: grid;
  width: min(300px, 38vw);
  min-width: 0;
  gap: 3px;
  padding: 9px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  color: #fff;
  background: rgba(14, 38, 29, 0.62);
  box-shadow: 0 8px 24px rgba(7, 24, 18, 0.16);
  backdrop-filter: blur(12px);
}

.focus-item-picker > span {
  color: #d9e9dd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.focus-item-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  outline: none;
  color: #fff;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.focus-item-trigger > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-item-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: 100%;
  max-height: 280px;
  gap: 4px;
  overflow-y: auto;
  padding: 8px;
  border: 2px solid #294c3a;
  border-radius: 9px;
  color: #203e2f;
  background: #eff5ee;
  box-shadow: 5px 5px 0 #294c3a;
}

.focus-item-menu.hidden {
  display: none;
}

.focus-item-group-label {
  margin-top: 5px;
  padding: 7px 8px 4px;
  border-top: 1px dashed #a2a995;
  color: #58705f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.focus-item-option {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #294c3a;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.focus-item-option:hover,
.focus-item-option:focus-visible {
  border-color: #294c3a;
  outline: none;
  background: #dfeadf;
}

.focus-item-option.selected {
  color: #fffaf0;
  background: #315f46;
}

.focus-item-option.clear-option {
  color: #7a817b;
}

.focus-item-option.clear-option.selected {
  color: #294c3a;
  background: #e8eddc;
}

.focus-item-menu .focus-item-option {
  grid-template-columns: minmax(0, 1fr) 14px;
}

.focus-item-menu .focus-item-option i {
  display: none;
}

.focus-item-menu .focus-item-option.selected {
  color: #294c3a;
}

.focus-item-empty {
  margin: 4px 8px 7px;
  color: #7a817b;
  font-size: 10px;
}

.focus-item-picker:focus-within {
  border-color: rgba(255, 226, 128, 0.72);
  background: rgba(14, 38, 29, 0.78);
  box-shadow:
    0 0 0 3px rgba(255, 216, 92, 0.12),
    0 8px 24px rgba(7, 24, 18, 0.18);
}

.focus-stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.focus-stage-actions button,
.focus-stage-actions label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 11px;
  color: #fff;
  background: rgba(22, 49, 38, 0.72);
  backdrop-filter: blur(10px);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.focus-stage-actions button.active {
  color: #263f30;
  background: #fff2c8;
}

.focus-page-slot {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: calc(100vh - 170px);
}

.focus-card.standalone {
  width: 100%;
  min-height: inherit;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 92px 8% 58px;
  border: 0;
  border-radius: 23px;
  background: rgba(17, 45, 31, 0.16);
  backdrop-filter: none;
  box-shadow: none;
  text-shadow: 0 2px 10px rgba(7, 22, 15, 0.82);
  text-align: center;
}

.focus-card.standalone::before {
  display: none;
}

.focus-card.standalone .focus-copy {
  width: min(500px, 100%);
  align-self: auto;
}

.focus-card.standalone .focus-mode-row,
.focus-card.standalone .focus-controls {
  justify-content: center;
}

.focus-card.standalone .focus-mode-row {
  margin-right: auto;
  margin-left: auto;
}

.focus-card.standalone .focus-reward {
  margin-right: auto;
  margin-left: auto;
}

.focus-card.standalone .focus-visual {
  position: relative;
  order: -1;
  width: 198px;
  height: 198px;
  min-width: 198px;
  flex: 0 0 198px;
  opacity: 1;
}

.focus-card.standalone .timer-ring {
  top: 50%;
  right: 50%;
  width: 178px;
  height: 178px;
  transform: translate(50%, -50%);
}

.focus-card.standalone .section-kicker {
  display: none;
}

.focus-card.standalone .focus-copy h2 {
  font-size: 33px;
}

.focus-card.standalone .focus-copy p {
  min-height: 20px;
  color: #f1f8f2;
  font-size: 14px;
}

.focus-card.standalone .focus-mode-switch button {
  font-size: 11px;
}

.focus-card.standalone .primary-button {
  min-height: 45px;
  padding: 0 22px;
  font-size: 14px;
}

.focus-card.standalone .sprout {
  display: none;
}

.focus-page-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.focus-page-stage:fullscreen .focus-page-slot {
  width: 100%;
  min-height: 100vh;
}

.focus-page-stage:fullscreen .focus-card.standalone {
  min-height: 100vh;
  padding-top: 110px;
}

.focus-page-stage:fullscreen .focus-card.standalone .focus-visual {
  width: clamp(280px, 40vh, 400px);
  height: clamp(280px, 40vh, 400px);
  min-width: clamp(280px, 40vh, 400px);
  flex-basis: clamp(280px, 40vh, 400px);
}

.focus-page-stage:fullscreen .focus-card.standalone .timer-ring {
  width: clamp(250px, 36vh, 360px);
  height: clamp(250px, 36vh, 360px);
  --timer-ring-width: 13px;
  --timer-ring-stroke: 3.7;
}

.focus-page-stage:fullscreen .focus-card.standalone .timer-ring strong {
  font-size: clamp(48px, 6vh, 68px);
}

.focus-page-stage:fullscreen .focus-card.standalone .timer-ring span {
  font-size: clamp(12px, 1.5vh, 17px);
}

#focusPage .focus-page-stage:fullscreen .focus-stage-toolbar {
  top: clamp(18px, 2.5vh, 30px);
  right: clamp(18px, 2vw, 34px);
  left: clamp(18px, 2vw, 34px);
  gap: clamp(12px, 1.5vw, 24px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-picker {
  width: clamp(320px, 28vw, 460px);
  gap: 6px;
  padding: clamp(11px, 1.4vh, 16px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-picker > span {
  font-size: clamp(13px, 0.95vw, 16px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-trigger {
  height: clamp(44px, 5.5vh, 56px);
  padding: 0 clamp(12px, 1.2vw, 18px);
  font-size: clamp(14px, 1.05vw, 18px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-menu {
  max-height: min(420px, 58vh);
  gap: 7px;
  padding: clamp(9px, 1vw, 14px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-group-label {
  padding: 9px 10px 6px;
  font-size: clamp(13px, 0.95vw, 16px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-option {
  min-height: clamp(42px, 5vh, 52px);
  padding: 8px 11px;
  font-size: clamp(14px, 1.05vw, 18px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-option b {
  font-size: clamp(14px, 1.05vw, 18px);
}

#focusPage .focus-page-stage:fullscreen .focus-item-empty {
  font-size: clamp(13px, 0.95vw, 16px);
}

#focusPage .focus-page-stage:fullscreen .focus-stage-actions {
  gap: clamp(8px, 0.8vw, 14px);
}

#focusPage .focus-page-stage:fullscreen .focus-stage-actions button,
#focusPage .focus-page-stage:fullscreen .focus-stage-actions label {
  min-height: clamp(44px, 5.5vh, 56px);
  padding: 0 clamp(14px, 1.4vw, 22px);
  gap: 8px;
  font-size: clamp(14px, 1.05vw, 18px);
}

#focusPage .focus-page-stage:fullscreen .focus-card.standalone .focus-copy h2 {
  margin: 14px 0 10px;
  font-size: clamp(36px, 3.2vw, 52px);
}

#focusPage .focus-page-stage:fullscreen .focus-card.standalone .focus-mode-switch button {
  min-height: 34px;
  padding: 0 13px;
  font-size: clamp(13px, 1vw, 16px);
}

#focusPage .focus-page-stage:fullscreen .focus-card.standalone .focus-mode-row {
  --focus-settings-button-size: 44px;
}

#focusPage .focus-page-stage:fullscreen .focus-card.standalone .focus-settings-button {
  width: 44px;
  height: 44px;
  font-size: 17px;
  transform: none;
}

#focusPage .focus-page-stage:fullscreen .focus-card.standalone .primary-button {
  min-height: 54px;
  padding: 0 28px;
  font-size: clamp(16px, 1.2vw, 20px);
}

#focusPage .focus-page-stage:fullscreen .focus-card.standalone .focus-reward {
  width: clamp(290px, 25vw, 410px);
  margin-top: 18px;
}

#focusPage .focus-page-stage:fullscreen .focus-reward > div:first-child,
#focusPage .focus-page-stage:fullscreen .focus-reward strong {
  font-size: clamp(13px, 1vw, 16px);
}

#focusPage .focus-page-stage:fullscreen .focus-reward-track {
  height: 6px;
}

.morrison-buy-card {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.morrison-buy-card > span {
  font-size: 18px;
}

.morrison-buy-card > div {
  display: grid;
  gap: 2px;
}

.morrison-buy-card strong {
  font-size: 11px;
}

.morrison-buy-card small {
  color: var(--muted);
  font-size: 11px;
}

.morrison-buy-card button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #d8d1b6;
  border-radius: 7px;
  color: #6d5b23;
  background: #fff9df;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.seed-shop-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.seed-shop-emoji {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--green-50);
  font-size: 20px;
}

.seed-shop-card > div {
  display: grid;
  gap: 3px;
}

.seed-shop-card strong {
  font-size: 10px;
}

.seed-shop-card small {
  color: var(--muted);
  font-size: 10px;
}

.seed-shop-card button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--green-700);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Larger type and crop visuals within My Farm */
#farmPage .farm-panel-header h2,
#farmPage .seed-shop h2 {
  font-size: 24px;
}

#farmPage .farm-wallet strong {
  font-size: 14px;
}

#farmPage .farm-wallet small {
  font-size: 11px;
}

#farmPage .market-section-title {
  font-size: 15px;
}

#farmPage .seed-shop > header p {
  font-size: 12px;
}

#farmPage .inventory-seed > span {
  font-size: 32px;
}

#farmPage .inventory-seed strong,
#farmPage .harvest-item strong {
  font-size: 13px;
}

#farmPage .inventory-seed small,
#farmPage .harvest-item small {
  font-size: 11px;
}

#farmPage .crop-visual span {
  font-size: clamp(40px, 5vw, 64px);
}

#farmPage .crop-visual.stage-0 span {
  font-size: 32px;
}

#farmPage .crop-info strong {
  font-size: 14px;
}

#farmPage .crop-info small {
  font-size: 11px;
}

#farmPage .crop-plot > button,
#farmPage .plot-growth-actions button,
#farmPage .mature-label {
  min-height: 30px;
  font-size: 11px;
}

#farmPage .morrison-avatar {
  font-size: 32px;
}

#farmPage .market-balance > span,
#farmPage .seed-shop-card small,
#farmPage .morrison-buy-card small {
  font-size: 10px;
}

#farmPage .market-balance strong,
#farmPage .seed-shop-card strong,
#farmPage .morrison-buy-card strong {
  font-size: 14px;
}

#farmPage .seed-shop-emoji,
#farmPage .morrison-buy-card > span {
  font-size: 31px;
}

#farmPage .seed-shop-card button,
#farmPage .morrison-buy-card button {
  font-size: 12px;
}

#farmPage .harvest-item i {
  font-size: 30px;
}

#farmPage .farm-supply-item strong {
  font-size: 11px;
}

#farmPage .farm-supply-item small,
#farmPage .farm-supply-item button {
  font-size: 10px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.eyebrow,
.section-kicker {
  display: block;
  margin: 0 0 5px;
  color: var(--green-700);
  font-family: "Maplestory", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.topbar h1 {
  margin: 0;
  font-family: "Maplestory", sans-serif;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 3px 10px rgba(31, 41, 35, 0.03);
}

.currency span {
  font-size: 13px;
}

.currency strong {
  font-family: "Maplestory", sans-serif;
  font-size: 13px;
}

.currency small {
  color: var(--muted);
  font-size: 11px;
}

.coin span {
  color: var(--yellow);
}

.coin.negative {
  border-color: #d9b3a8;
  color: #9c4f3e;
  background: #fff7f4;
}

.farm-money span {
  color: var(--green-700);
}

.icon-button,
.mobile-menu {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
}

.mobile-menu {
  display: none;
  width: 40px;
  height: 40px;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}

.focus-card,
.progress-card {
  min-height: 230px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.focus-card {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 30px 32px;
  color: #f7fbf7;
  background:
    linear-gradient(120deg, rgba(37, 81, 58, 0.98), rgba(54, 107, 77, 0.94)),
    var(--green-800);
}

.focus-card:has(.focus-settings:not(.hidden)) {
  z-index: 20;
  overflow: visible;
}

.focus-card:has(.focus-settings:not(.hidden))::before {
  clip-path: inset(0 45px 80px 0);
}

.focus-card::before {
  position: absolute;
  right: -45px;
  bottom: -80px;
  width: 330px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.focus-card .section-kicker {
  color: #bcd6c3;
}

.focus-copy {
  position: relative;
  z-index: 2;
}

.focus-mode-row {
  --focus-settings-button-size: 29px;
  position: relative;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 7px;
}

.focus-copy h2 {
  margin: 10px 0 7px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.focus-mode-switch {
  display: inline-flex;
  gap: 3px;
  margin-top: 5px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  background: rgba(14, 47, 31, 0.24);
}

.focus-mode-switch button {
  min-height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #bcd0c1;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.focus-mode-switch button.active {
  color: var(--green-950);
  background: #eff4ea;
}

.focus-settings-button {
  display: grid;
  width: var(--focus-settings-button-size);
  height: var(--focus-settings-button-size);
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: #c4d5c8;
  background: rgba(14, 47, 31, 0.24);
  cursor: pointer;
}

.focus-copy p {
  margin: 0 0 24px;
  color: #c8d9cc;
  font-size: 12px;
}

.focus-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.focus-reward {
  width: 240px;
  margin-top: 14px;
}

.focus-reward > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #e4eee6;
  font-size: 12px;
}

.focus-reward strong {
  color: #fff;
  font-family: "Maplestory", sans-serif;
  font-size: 12px;
}

.focus-reward-track {
  overflow: hidden;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.13);
}

.focus-reward-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #e6cb74;
  transition: width 200ms ease;
}

.focus-settings {
  position: absolute;
  top: calc(100% + 1px);
  right: auto;
  left: calc(100% - var(--focus-settings-button-size));
  z-index: 5;
  display: grid;
  width: min(230px, calc(100vw - 48px));
  gap: 7px;
  padding: 12px;
  border: 1px solid #dfe5dd;
  border-radius: 13px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 16px 35px rgba(13, 37, 24, 0.22);
}

.focus-settings.hidden {
  display: none;
}

.focus-settings label {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 10px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 700;
}

.focus-settings label > span:last-child {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.focus-settings input[type="number"] {
  width: 64px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  font-size: 13px;
}

.focus-settings input[type="checkbox"] {
  width: 18px;
  height: 18px;
  justify-self: end;
  accent-color: var(--green-700);
}

.focus-settings input:disabled {
  opacity: 0.4;
}

.focus-settings > button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--green-700);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: var(--green-950);
  background: #eef4ea;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #fff;
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary-button.compact {
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: var(--green-700);
}

.focus-visual {
  position: relative;
  flex: 1;
  min-width: 190px;
}

.timer-ring {
  --timer-offset: 0;
  --timer-ring-color: #ffd65c;
  --timer-ring-width: 8px;
  --timer-ring-stroke: 5.5;
  --timer-track-color: rgba(255, 255, 255, 0.12);
  position: absolute;
  top: 50%;
  right: 25px;
  display: grid;
  width: 146px;
  height: 146px;
  place-items: center;
  border-radius: 50%;
  transform: translateY(-50%);
}

.timer-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.timer-progress circle {
  fill: none;
  stroke-width: var(--timer-ring-stroke);
}

.timer-progress-track {
  stroke: var(--timer-track-color);
}

.timer-progress-value {
  stroke: var(--timer-ring-color);
  stroke-dasharray: 289.0265;
  stroke-dashoffset: var(--timer-offset);
  stroke-linecap: round;
  transition: stroke-dashoffset 300ms linear;
}

.timer-ring::after {
  position: absolute;
  inset: var(--timer-ring-width);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.timer-ring div {
  display: grid;
  position: relative;
  z-index: 1;
  gap: 2px;
  text-align: center;
}

.timer-ring strong {
  font-family: "Maplestory", sans-serif;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.timer-ring span {
  color: #bad0c0;
  font-family: "Maplestory", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.focus-card.standalone .timer-ring {
  --timer-ring-width: 9px;
  --timer-ring-stroke: 5;
  --timer-track-color: rgba(255, 255, 255, 0.22);
}

.focus-card.standalone .timer-ring strong {
  color: #fff;
  font-size: 38px;
}

.focus-card.standalone .timer-ring span {
  color: #f2fff4;
  font-size: 13px;
  letter-spacing: 0.15em;
}

.sprout {
  position: absolute;
  color: rgba(207, 226, 197, 0.28);
  font-size: 55px;
  transform: rotate(-14deg);
}

.sprout-left {
  right: 153px;
  bottom: -23px;
}

.sprout-right {
  right: -8px;
  bottom: -7px;
  font-size: 70px;
  transform: rotate(20deg);
}

.progress-card {
  padding: 28px;
  border: 1px solid rgba(229, 229, 220, 0.8);
  background: rgba(253, 252, 248, 0.9);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-heading h2 {
  margin: 7px 0 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.progress-percent {
  color: var(--green-700);
  font-family: "Maplestory", sans-serif;
  font-size: 25px;
  font-weight: 700;
}

.large-progress {
  height: 8px;
  margin: 27px 0;
  border-radius: 5px;
}

.large-progress span {
  display: block;
  width: 43%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700), #78a27f);
  transition: width 250ms ease;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.progress-stats > div {
  position: relative;
  padding-left: 15px;
}

.progress-stats > div + div {
  border-left: 1px solid var(--line);
  padding-left: 23px;
}

.stat-dot {
  position: absolute;
  top: 5px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.progress-stats > div + div .stat-dot {
  left: 9px;
}

.todo-dot {
  background: var(--orange);
}

.habit-dot {
  background: var(--green-700);
}

.focus-dot {
  background: var(--blue);
}

.progress-stats p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
}

.progress-stats strong {
  font-family: "Maplestory", sans-serif;
  font-size: 14px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 17px;
}

.section-header h2 {
  margin: 2px 0 0;
  font-size: 19px;
  letter-spacing: -0.04em;
}

.add-button,
.text-button {
  border: 0;
  color: var(--green-700);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.add-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #cfdacf;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
}

.add-button span {
  font-size: 18px;
  line-height: 1;
}

.text-button {
  min-height: 36px;
  padding: 7px 10px;
}

.quick-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px auto auto;
  gap: 8px;
  margin-bottom: 15px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.quick-form.hidden {
  display: none;
}

.quick-form input,
.quick-form select {
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.quick-form input:focus,
.quick-form select:focus {
  border-color: #9bb29f;
  box-shadow: 0 0 0 3px rgba(65, 116, 81, 0.09);
}

.secondary-button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green-700);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.group-manager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(253, 252, 248, 0.9);
}

.group-manager.hidden {
  display: none;
}

.group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 9px;
  border-radius: 7px;
  color: var(--green-700);
  background: var(--green-50);
  font-size: 11px;
  font-weight: 700;
}

.group-chip button {
  display: grid;
  width: 15px;
  height: 15px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #869188;
  background: transparent;
  cursor: pointer;
}

.group-add {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.group-add input {
  width: 120px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  font-size: 10px;
}

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

.board-column {
  min-width: 0;
  min-height: 300px;
  padding: 14px 12px;
  border: 1px solid rgba(229, 229, 220, 0.9);
  border-radius: 16px;
  background: rgba(247, 246, 240, 0.72);
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.board-column.drag-over {
  border-color: var(--green-700);
  background: rgba(223, 234, 223, 0.8);
}

.board-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 3px 12px;
}

.board-column > header div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-column h3 {
  margin: 0;
  font-size: 13px;
}

.column-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.column-dot.waiting {
  background: #a4aaa5;
}

.column-dot.doing {
  background: var(--orange);
}

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

.count {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  background: #e8e8e1;
  font-family: "Maplestory", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task-card {
  position: relative;
  padding: 13px;
  border: 1px solid #e4e4db;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 3px 12px rgba(34, 44, 37, 0.035);
  cursor: grab;
  animation: card-in 180ms ease;
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.35;
}

.task-card.drop-before::before,
.task-card.drop-after::after,
.habit-item.drop-before::before,
.habit-item.drop-after::after {
  position: absolute;
  right: 8px;
  left: 8px;
  height: 3px;
  border-radius: 2px;
  background: #df8d56;
  content: "";
}

.task-card.drop-before::before,
.habit-item.drop-before::before {
  top: -6px;
}

.task-card.drop-after::after,
.habit-item.drop-after::after {
  bottom: -6px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.task-card.done {
  opacity: 0.65;
}

.task-card.archived {
  opacity: 1;
  border-style: dashed;
  background: #f7f7f1;
}

.task-card.done h4 {
  text-decoration: line-through;
}

.task-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
}

.task-card h4 {
  margin: 0;
  padding-right: 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.task-actions {
  position: absolute;
  top: 8px;
  right: 10px;
  display: flex;
  align-items: center;
  margin: 0;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  margin-top: 7px;
}

.task-focus-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #dbe2d9;
  border-radius: 7px;
  color: var(--green-700);
  background: #f5f8f3;
  font-family: "Maplestory", sans-serif;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.task-focus-pill:hover {
  border-color: #aebead;
  background: var(--green-100);
}

.custom-group-select {
  position: relative;
  min-width: 0;
}

.custom-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.custom-group-trigger[aria-expanded="true"] {
  border-color: #294c3a;
  box-shadow: 0 0 0 3px rgba(41, 76, 58, 0.1);
}

.custom-group-trigger > span:last-child {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: #55705e;
  font-size: 0;
  line-height: 1;
}

.custom-group-trigger > span:last-child::before {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.custom-group-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 80;
  display: grid;
  width: max(100%, 150px);
  gap: 4px;
  padding: 7px;
  border: 2px solid #294c3a;
  border-radius: 9px;
  background: #fffaf0;
  box-shadow: 4px 4px 0 #d4b95f;
}

.custom-group-menu.hidden {
  display: none;
}

.custom-group-option {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #294c3a;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.custom-group-option:hover,
.custom-group-option:focus-visible {
  border-color: #8b9b8b;
  outline: none;
  background: #edf1e5;
}

.custom-group-option.selected {
  background: #e8eddc;
}

.custom-group-option i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a4aaa3;
}

.custom-group-option b {
  visibility: hidden;
  color: #315f46;
}

.custom-group-option.selected b {
  visibility: visible;
}

.custom-group-option.group-color-0 i { background: #6d987c; }
.custom-group-option.group-color-1 i { background: #df8d56; }
.custom-group-option.group-color-2 i { background: #d4b95f; }
.custom-group-option.group-color-3 i { background: #72a0b3; }
.custom-group-option.group-color-4 i { background: #9a85b8; }
.custom-group-option.group-color-5 i { background: #c9879c; }
.custom-group-option.group-color-6 i { background: #69a398; }
.custom-group-option.group-color-7 i { background: #a88668; }

.recipe-ingredient-trigger {
  height: 42px;
  font-size: 14px;
}

.recipe-ingredient-trigger > span:first-child {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-ingredient-menu {
  z-index: 100;
  max-height: 290px;
  overflow-y: auto;
}

.recipe-ingredient-option {
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  min-height: 45px;
  font-size: 13px;
}

.recipe-ingredient-option > i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: #eef3e7;
  font-style: normal;
}

.recipe-ingredient-option > i:empty {
  background: transparent;
}

.recipe-ingredient-option > i svg {
  width: 27px;
  height: 27px;
}

.recipe-ingredient-option > span {
  display: grid;
  gap: 2px;
}

.recipe-ingredient-option > span strong {
  font-size: 13px;
}

.recipe-ingredient-option > span small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}


#todayPage #toggleGroupManager,
#tasksPage #toggleGroupManager {
  font-size: 12px;
}

#todayPage .group-add input,
#tasksPage .group-add input {
  font-size: 12px;
}

#todayPage .group-add .primary-button,
#tasksPage .group-add .primary-button {
  border: 2px solid #173727;
  border-radius: 8px;
  color: #294c3a;
  background: #f4d46f;
  box-shadow: 3px 3px 0 #173727;
}

#todayPage .group-add .primary-button:hover,
#tasksPage .group-add .primary-button:hover {
  background: #ffe28b;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #173727;
}

.task-focus-pill.completed-focus-time {
  cursor: default;
  opacity: 0.72;
}

.task-focus-pill.completed-focus-time:hover {
  border-color: #dbe2d9;
  background: #f5f8f3;
}

.task-archived-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  color: #7f8780;
  background: #e9eae5;
  font-size: 11px;
  font-weight: 700;
}

.task-archive-button {
  width: 100%;
  min-height: 28px;
  margin-top: 10px;
  border: 1px dashed #cbd4c8;
  border-radius: 8px;
  color: var(--green-700);
  background: #f7faf5;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.task-category {
  display: inline-block;
  margin: 0;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--green-700);
  background: var(--green-50);
  font-size: 10px;
  font-weight: 700;
}

.delete-button {
  width: 18px;
  min-height: 18px;
  padding: 0;
  color: #a47c70;
  border: 0;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.delete-button:hover {
  color: #8a4e3d;
  background: #f5e9e4;
}

.habit-section {
  min-width: 0;
}

.habit-form {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
}

.habit-measure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 68px;
  gap: 6px;
}

.weekday-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.weekday-field legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.weekday-field > div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.weekday-field label {
  cursor: pointer;
}

.weekday-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.weekday-field span {
  display: grid;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.weekday-field input:checked + span {
  border-color: var(--green-700);
  color: #fff;
  background: var(--green-700);
}

.habit-date-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.habit-date-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.habit-date-row input {
  width: 100%;
  padding: 0 7px;
  font-size: 11px;
}

.habit-submit {
  width: 100%;
}

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

.habit-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 65px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(34, 44, 37, 0.035);
}

.habit-item.reorderable {
  cursor: grab;
}

.habit-item.reorderable:active {
  cursor: grabbing;
}

.habit-item.dragging {
  opacity: 0.4;
}

.habit-item.count-habit {
  grid-template-columns: 70px minmax(0, 1fr) auto;
}

.habit-count-control {
  display: grid;
  grid-template-columns: 23px 24px 23px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #9eafa0;
  border-radius: 8px;
  background: #f4f7f1;
}

.habit-count-control button {
  display: grid;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--green-700);
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.habit-count-control button:hover:not(:disabled) {
  color: #fff;
  background: var(--green-700);
}

.habit-count-control button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.habit-count-control strong {
  font-size: 13px;
  text-align: center;
}

.habit-item.complete .habit-count-control {
  border-color: var(--green-700);
  background: var(--orange);
}

.habit-item.complete .habit-count-control strong {
  color: #fff;
}

.habit-item.complete .habit-count-control button {
  color: #fff;
}

.habit-item.complete .habit-count-control button:hover:not(:disabled) {
  background: var(--green-800);
}

.habit-item.off-day {
  opacity: 0.5;
  background: #f6f5f0;
}

.habit-item.off-day .habit-check,
.habit-item.off-day .habit-focus-button {
  cursor: not-allowed;
}

.habit-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d9ded7;
  border-radius: 11px;
  color: transparent;
  background: #f4f5f1;
  font-size: 16px;
  cursor: pointer;
}

.habit-item.complete .habit-check {
  border-color: var(--green-700);
  color: #fff;
  background: var(--green-700);
}

.habit-copy {
  display: grid;
  gap: 4px;
}

.habit-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.habit-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.habit-copy .habit-summary {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.habit-schedule {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.habit-focus-button {
  width: fit-content;
  padding: 0;
  border: 0;
  color: var(--green-700);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.streak {
  color: var(--orange);
  font-family: "Maplestory", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.habit-delete {
  padding: 4px;
  border: 0;
  color: #aaa;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.reward-note {
  display: flex;
  gap: 11px;
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed #cbd8c9;
  border-radius: 13px;
  background: rgba(235, 242, 232, 0.65);
}

.reward-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--yellow);
  background: #fff;
  font-size: 12px;
}

.reward-note strong {
  font-size: 10px;
}

.reward-note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* Retro treatment: Today */
#todayPage .topbar {
  padding-bottom: 22px;
  border-bottom: 2px solid #294c3a;
}

#todayPage .eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  padding: 4px 7px 3px;
  border: 1px solid #294c3a;
  border-radius: 5px;
  color: #294c3a;
  background: #f3cf63;
  font-size: 11px;
  letter-spacing: 0.08em;
  box-shadow: 2px 2px 0 #294c3a;
}

#todayPage .topbar h1 {
  color: #203e2f;
  font-weight: 700;
}

#todayPage .today-description {
  margin: 7px 0 0;
  color: #657168;
  font-size: 15px;
}

#todayPage .currency {
  height: 40px;
  border: 2px solid #294c3a;
  border-radius: 10px;
  background: #fffaf0;
  box-shadow: 3px 3px 0 #294c3a;
}

#todayPage .focus-card,
#todayPage .progress-card {
  border: 2px solid #203e2f;
  border-radius: 16px;
}

#todayPage .focus-card {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 2px,
      transparent 2px,
      transparent 8px
    ),
    #315f46;
  box-shadow: 6px 6px 0 #d7ad44;
}

#todayPage .focus-card::before {
  border-width: 2px;
  border-color: rgba(255, 231, 154, 0.16);
}

#todayPage .focus-mode-switch {
  margin-top: 0;
  border-color: rgba(255, 235, 174, 0.36);
  border-radius: 7px;
}

#todayPage .focus-mode-row {
  --focus-settings-button-size: 35px;
}

#todayPage .focus-settings-button {
  width: 35px;
  height: 35px;
  border-color: rgba(255, 235, 174, 0.36);
}

#todayPage .focus-mode-switch button,
#todayPage .focus-settings-button {
  border-radius: 5px;
}

#todayPage .focus-mode-switch button.active {
  background: #f3cf63;
}

#todayPage .primary-button {
  border: 2px solid #173727;
  border-radius: 8px;
  background: #f4d46f;
  box-shadow: 3px 3px 0 #173727;
}

#todayPage .primary-button:hover {
  background: #ffe28b;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #173727;
}

#todayPage .progress-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(41, 76, 58, 0.025) 0,
      rgba(41, 76, 58, 0.025) 1px,
      transparent 1px,
      transparent 5px
    ),
    #fffaf0;
  box-shadow: 6px 6px 0 #294c3a;
}

#todayPage .card-heading .section-kicker {
  font-size: 13px;
}

#todayPage .card-heading h2 {
  font-size: 25px;
}

#todayPage .progress-percent {
  min-width: 64px;
  padding: 7px 10px 5px;
  border: 2px solid #294c3a;
  border-radius: 7px;
  color: #294c3a;
  background: #f3cf63;
  box-shadow: 2px 2px 0 #294c3a;
  font-size: 19px;
  line-height: 1;
  text-align: center;
}

#todayPage .large-progress {
  height: 11px;
  border: 1px solid #294c3a;
  border-radius: 3px;
  background: #e4ddca;
}

#todayPage .progress-stats p {
  margin-bottom: 7px;
  font-size: 12px;
}

#todayPage .progress-stats strong {
  font-size: 17px;
}

#todayPage .stat-dot {
  top: 5px;
  width: 7px;
  height: 7px;
}

#todayPage .large-progress span {
  border-radius: 1px;
  background: #df8d56;
}

#todayPage .section-header {
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(41, 76, 58, 0.48);
}

#todayPage .section-header .section-kicker {
  color: #a06d2f;
}

#todayPage .add-button {
  border: 2px solid #294c3a;
  border-radius: 8px;
  color: #294c3a;
  background: #f3cf63;
  box-shadow: 2px 2px 0 #294c3a;
}

#todayPage .text-button {
  padding: 8px 10px;
  border-bottom: 2px solid #df8d56;
  color: #294c3a;
}

#todayPage .quick-form,
#todayPage .group-manager {
  border: 2px solid #294c3a;
  border-radius: 10px;
  background: #fffaf0;
  box-shadow: 4px 4px 0 #d4b95f;
}

#todayPage .quick-form input,
#todayPage .quick-form select,
#todayPage .group-add input,
#todayPage .secondary-button {
  border-color: #9aa494;
  border-radius: 6px;
}

#todayPage .board-column {
  border: 2px solid #82917f;
  border-radius: 12px;
  background: #eeeadd;
  box-shadow: 3px 3px 0 #d4b95f;
}

#todayPage .board-column > header {
  margin-bottom: 4px;
  border-bottom: 1px dashed #a8aa98;
}

#todayPage .count {
  border: 1px solid #294c3a;
  border-radius: 5px;
  color: #294c3a;
  background: #fffaf0;
}

#todayPage .task-card {
  border: 1px solid #9aa494;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 3px 3px 0 #d8d0ba;
}

#todayPage .task-category,
#todayPage .task-focus-pill {
  border-radius: 4px;
}

#todayPage .habit-section {
  align-self: start;
  padding: 14px;
  border: 2px solid #294c3a;
  border-radius: 14px;
  background: #e8eddc;
  box-shadow: 4px 4px 0 #294c3a;
}

#todayPage .habit-item {
  border: 1px solid #899987;
  border-radius: 9px;
  background: #fffaf0;
  box-shadow: 3px 3px 0 #cdd3be;
}

#todayPage .habit-check {
  border: 2px solid #294c3a;
  border-radius: 7px;
  background: #f2eddf;
}

#todayPage .habit-item.complete .habit-check {
  background: #df8d56;
}

#todayPage .reward-note {
  border: 2px dashed #7f947b;
  border-radius: 9px;
  background: #f7e6aa;
}

#todayPage .reward-icon {
  border: 1px solid #294c3a;
  border-radius: 7px;
  background: #fffaf0;
}

/* Retro treatment: remaining pages */
#tasksPage .page-header,
#habitsPage .page-header,
#focusPage .page-header,
#farmPage .page-header {
  padding-bottom: 22px;
  border-bottom: 2px solid #294c3a;
}

#tasksPage .page-header .section-kicker,
#habitsPage .page-header .section-kicker,
#focusPage .page-header .section-kicker,
#farmPage .page-header .section-kicker {
  display: inline-block;
  padding: 4px 7px 3px;
  border: 1px solid #294c3a;
  border-radius: 5px;
  color: #294c3a;
  background: #f3cf63;
  font-size: 11px;
  letter-spacing: 0.08em;
  box-shadow: 2px 2px 0 #294c3a;
}

#tasksPage .page-header h1,
#habitsPage .page-header h1,
#focusPage .page-header h1,
#farmPage .page-header h1 {
  color: #203e2f;
  font-weight: 700;
}

#tasksPage .page-header p,
#habitsPage .page-header p,
#focusPage .page-header p,
#farmPage .page-header p {
  color: #657168;
}

#tasksPage .task-page-tools {
  padding: 12px;
  border: 2px solid #294c3a;
  border-radius: 11px;
  background: #eeeadd;
  box-shadow: 4px 4px 0 #d4b95f;
}

#tasksPage .task-filter-list button,
#tasksPage .archive-toggle {
  border: 1px solid #768677;
  border-radius: 6px;
  color: #294c3a;
  background: #fffaf0;
}

#tasksPage .task-filter-list button.active,
#tasksPage .archive-toggle.active {
  border: 2px solid #294c3a;
  color: #294c3a;
  background: #f3cf63;
  box-shadow: 2px 2px 0 #294c3a;
}

#tasksPage .section-header {
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(41, 76, 58, 0.48);
}

#tasksPage .add-button {
  border: 2px solid #294c3a;
  border-radius: 8px;
  color: #294c3a;
  background: #f3cf63;
  box-shadow: 2px 2px 0 #294c3a;
}

#tasksPage .quick-form,
#tasksPage .group-manager {
  width: min(820px, 100%);
  margin-left: auto;
  border: 2px solid #294c3a;
  border-radius: 10px;
  background: #fffaf0;
  box-shadow: 4px 4px 0 #d4b95f;
}

#tasksPage .quick-form {
  grid-template-columns: minmax(280px, 1fr) 110px auto auto;
  padding: 12px;
}

#tasksPage .quick-form input,
#tasksPage .quick-form select {
  font-size: 13px;
}

#tasksPage .quick-form button {
  font-size: 12px;
}

#tasksPage .board-column {
  border: 2px solid #82917f;
  border-radius: 12px;
  background: #eeeadd;
  box-shadow: 3px 3px 0 #d4b95f;
}

#tasksPage .board-column > header {
  margin-bottom: 4px;
  border-bottom: 1px dashed #a8aa98;
}

#tasksPage .count {
  border: 1px solid #294c3a;
  border-radius: 5px;
  color: #294c3a;
  background: #fffaf0;
}

#tasksPage .task-card {
  border: 1px solid #9aa494;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 3px 3px 0 #d8d0ba;
}

#tasksPage .task-category,
#tasksPage .task-focus-pill,
#tasksPage .task-archive-button {
  border-radius: 4px;
}

#habitsPage .habit-heatmap {
  border: 2px solid #294c3a;
  border-radius: 14px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(41, 76, 58, 0.025) 0,
      rgba(41, 76, 58, 0.025) 1px,
      transparent 1px,
      transparent 5px
    ),
    #fffaf0;
  box-shadow: 6px 6px 0 #d4b95f;
}

#habitsPage .habit-heatmap > header {
  padding-bottom: 12px;
  border-bottom: 1px dashed #a8aa98;
}

#habitsPage .heatmap-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  border: 2px solid #294c3a;
  border-radius: 6px;
  color: #294c3a;
  background: #f3cf63;
  box-shadow: 2px 2px 0 #294c3a;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

#habitsPage .heatmap-cell {
  border-radius: 2px;
}

#habitsPage .heatmap-cell.scheduled {
  border-color: #9cac93;
  background: #e4e8d5;
}

#habitsPage .heatmap-cell.completed {
  border-color: #294c3a;
  background: var(--green-700);
}

#habitsPage .heatmap-cell.progress-1 {
  border: 1px solid #b8cbb9;
  background: #cfe0cf;
}

#habitsPage .heatmap-cell.progress-2 {
  border: 1px solid #82a188;
  background: #8fb699;
}

#habitsPage .heatmap-cell.progress-3 {
  border: 1px solid #4f805e;
  background: #5f8f6b;
}

#habitsPage .heatmap-legend i.completed {
  border: 1px solid #294c3a;
  background: var(--green-700);
}

#habitsPage .habit-section {
  padding: 18px;
  border: 2px solid #294c3a;
  border-radius: 14px;
  background: #e8eddc;
  box-shadow: 5px 5px 0 #294c3a;
}

#habitsPage .section-header {
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(41, 76, 58, 0.48);
}

#habitsPage .text-button {
  padding: 7px 10px;
  border: 2px solid #294c3a;
  border-radius: 7px;
  color: #294c3a;
  background: #f3cf63;
  box-shadow: 2px 2px 0 #294c3a;
}

#habitsPage .quick-form {
  border: 2px solid #294c3a;
  border-radius: 10px;
  background: #fffaf0;
  box-shadow: 4px 4px 0 #d4b95f;
}

#habitsPage .habit-item {
  border: 1px solid #899987;
  border-radius: 9px;
  background: #fffaf0;
  box-shadow: 3px 3px 0 #cdd3be;
}

#habitsPage .habit-check {
  border: 2px solid #294c3a;
  border-radius: 7px;
  background: #f2eddf;
}

#habitsPage .habit-item.complete .habit-check {
  background: #df8d56;
}

#habitsPage .reward-note {
  border: 2px dashed #7f947b;
  border-radius: 9px;
  background: #f7e6aa;
}

#focusPage .focus-page-stage {
  border: 3px solid #294c3a;
  border-radius: 16px;
  box-shadow: 7px 7px 0 #d4b95f;
}

#focusPage .focus-page-stage:fullscreen {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#focusPage .focus-item-picker {
  border: 2px solid rgba(235, 245, 235, 0.72);
  border-radius: 9px;
  color: #fff;
  background: rgba(32, 62, 47, 0.82);
  box-shadow: 4px 4px 0 rgba(18, 40, 29, 0.82);
  backdrop-filter: blur(10px);
}

#focusPage .focus-item-picker > span {
  color: #d9e9dd;
}

#focusPage .focus-item-trigger {
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(235, 245, 235, 0.42);
  border-radius: 6px;
  color: #fff;
  background: rgba(14, 38, 29, 0.42);
  font-size: 12px;
  font-weight: 700;
}

#focusPage .focus-stage-actions button,
#focusPage .focus-stage-actions label {
  border: 2px solid rgba(255, 244, 207, 0.72);
  border-radius: 8px;
  background: rgba(32, 62, 47, 0.8);
  box-shadow: 3px 3px 0 rgba(18, 40, 29, 0.82);
}

#focusPage .focus-stage-actions button.active {
  color: #294c3a;
  border-color: #294c3a;
  background: #f3cf63;
}

#focusPage .focus-card.standalone .focus-mode-switch,
#focusPage .focus-card.standalone .focus-settings-button {
  border: 2px solid rgba(255, 244, 207, 0.62);
  border-radius: 6px;
}

#focusPage .focus-card.standalone .focus-mode-switch {
  margin-top: 0;
}

#focusPage .focus-card.standalone .focus-mode-row {
  --focus-settings-button-size: 37px;
}

#focusPage .focus-card.standalone .focus-settings-button {
  width: 37px;
  height: 37px;
  transform: translateY(1px);
}

#focusPage .focus-card.standalone .focus-settings {
  text-align: left;
  text-shadow: none;
}

#focusPage .focus-card.standalone .focus-mode-switch button.active,
#focusPage .focus-card.standalone .primary-button {
  color: #294c3a;
  background: #f3cf63;
}

#focusPage .focus-card.standalone .primary-button {
  border: 2px solid #173727;
  border-radius: 8px;
  box-shadow: 3px 3px 0 #173727;
}

#farmPage .farm-panel,
#farmPage .seed-shop {
  border: 2px solid #294c3a;
  border-radius: 15px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(41, 76, 58, 0.02) 0,
      rgba(41, 76, 58, 0.02) 1px,
      transparent 1px,
      transparent 5px
    ),
    #fffaf0;
}

#farmPage .farm-panel {
  box-shadow: 6px 6px 0 #294c3a;
}

#farmPage .seed-shop {
  box-shadow: 6px 6px 0 #d4b95f;
}

#farmPage .farm-panel-header,
#farmPage .morrison-profile {
  padding-bottom: 13px;
  border-bottom: 1px dashed #9ca594;
}

#farmPage .farm-name-display > button,
#farmPage .farm-wallet,
#farmPage .open-farm-mail,
#farmPage .open-farm-kitchen {
  border: 2px solid #294c3a;
  border-radius: 7px;
  box-shadow: 2px 2px 0 #294c3a;
}

#farmPage .open-farm-kitchen {
  background: #f3cf63;
}

#farmPage .farm-storage-toolbar button {
  border: 2px solid #294c3a;
  border-radius: 8px;
  color: #294c3a;
  background: #e8eddc;
  box-shadow: 2px 2px 0 #294c3a;
}

#farmPage .farm-storage-toolbar small {
  border-radius: 4px;
  background: #df8d56;
}

#farmPage .farm-grid {
  border: 3px solid #294c3a;
  border-radius: 12px;
  box-shadow:
    inset 0 0 30px rgba(37, 70, 41, 0.14),
    4px 4px 0 #d4b95f;
}

#farmPage .farm-plot {
  border-width: 2px;
  border-radius: 8px;
}

#farmPage .morrison-avatar {
  border: 2px solid #294c3a;
  border-radius: 9px;
  background: #f3cf63;
  box-shadow: 2px 2px 0 #294c3a;
}

#farmPage .market-balance,
#farmPage .farm-weekly-ranking-button,
#farmPage .open-permanent-market {
  border: 2px solid #294c3a;
  border-radius: 8px;
  box-shadow: 3px 3px 0 #294c3a;
}

#farmPage .open-permanent-market {
  color: #294c3a;
  background: #f3cf63;
}

#farmPage .market-section-title {
  padding-bottom: 6px;
  border-bottom: 1px dashed #9ca594;
}

#farmPage .seed-shop-card,
#farmPage .morrison-buy-card {
  border: 1px solid #899987;
  border-radius: 8px;
  background: #fffdf6;
  box-shadow: 2px 2px 0 #d8d0ba;
}

#farmPage .seed-shop-card button,
#farmPage .morrison-buy-card button {
  border: 1px solid #294c3a;
  border-radius: 5px;
  color: #fffaf0;
  background: #294c3a;
}

.habit-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.habit-modal.hidden {
  display: none;
}

.habit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 45, 32, 0.58);
  backdrop-filter: blur(5px);
}

.habit-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  padding: 8px;
  border: 2px solid #294c3a;
  border-radius: 14px;
  background: #fdfcf8;
  box-shadow: 7px 7px 0 #294c3a;
}

.habit-modal-panel > .modal-scroll-area {
  width: 100%;
  max-height: calc(100vh - 64px);
  padding: 14px;
}

.habit-modal-panel > .modal-scroll-area > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #9ca594;
}

.habit-modal-panel h2 {
  margin: 4px 0 5px;
  color: #203e2f;
  font-size: 27px;
}

.habit-modal-panel header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.habit-modal-panel .section-kicker {
  font-size: 11px;
}

.habit-modal-panel header > button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 2px solid #294c3a;
  border-radius: 7px;
  color: #294c3a;
  background: #dfeadf;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.delete-confirm-panel {
  width: min(420px, 100%);
  overflow: visible;
  padding: 22px;
  text-align: center;
}

.delete-confirm-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: -50px auto 14px;
  place-items: center;
  border: 2px solid #294c3a;
  border-radius: 50%;
  color: #fffaf0;
  background: #d96f52;
  box-shadow: 3px 3px 0 #294c3a;
  font-size: 30px;
  font-weight: 700;
}

.group-chip.group-color-0,
.task-category.group-color-0 {
  color: #315f46;
  background: #dfeadf;
}

.group-chip.group-color-1,
.task-category.group-color-1 {
  color: #9a4f2f;
  background: #fbe1cf;
}

.group-chip.group-color-2,
.task-category.group-color-2 {
  color: #80621b;
  background: #f8edbd;
}

.group-chip.group-color-3,
.task-category.group-color-3 {
  color: #38657b;
  background: #dcebf0;
}

.group-chip.group-color-4,
.task-category.group-color-4 {
  color: #655285;
  background: #e8e0f2;
}

.group-chip.group-color-5,
.task-category.group-color-5 {
  color: #99546a;
  background: #f4dfe6;
}

.group-chip.group-color-6,
.task-category.group-color-6 {
  color: #38746c;
  background: #dceee9;
}

.group-chip.group-color-7,
.task-category.group-color-7 {
  color: #76583c;
  background: #eee1d2;
}

.delete-confirm-panel h2 {
  margin: 6px 0 10px;
  font-size: 25px;
}

.delete-confirm-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.delete-confirm-panel > p strong {
  display: block;
  color: #294c3a;
  font-size: 16px;
}

.delete-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.delete-confirm-actions button {
  min-height: 42px;
  border: 2px solid #294c3a;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.delete-confirm-actions .danger-button {
  color: #fffaf0;
  background: #d96f52;
  box-shadow: 2px 2px 0 #294c3a;
}

.delete-confirm-actions .danger-button:hover {
  background: #c95d44;
}

#todayPage .habit-modal .habit-form,
#habitsPage .habit-modal .habit-form {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#todayPage .habit-modal .primary-button,
#habitsPage .habit-modal .primary-button {
  color: #fff;
  border-color: #294c3a;
  background: var(--green-700);
  box-shadow: none;
}

#todayPage #taskForm .primary-button.compact,
#todayPage #habitForm .primary-button.compact {
  min-height: 40px;
  color: #fff;
  border-color: var(--green-700);
  background: var(--green-700);
  box-shadow: none;
  font-size: 12px;
}

#todayPage #taskForm .primary-button.compact:hover,
#todayPage #habitForm .primary-button.compact:hover {
  color: #fff;
  background: var(--green-800);
  transform: none;
}

#todayPage #habitForm input,
#todayPage #habitForm select,
#habitsPage #habitForm input,
#habitsPage #habitForm select {
  min-height: 42px;
  font-size: 13px;
}

#todayPage #habitForm .weekday-field legend,
#habitsPage #habitForm .weekday-field legend,
#todayPage #habitForm .habit-date-row label,
#habitsPage #habitForm .habit-date-row label {
  font-size: 11px;
}

#todayPage #habitForm .weekday-field span,
#habitsPage #habitForm .weekday-field span {
  height: 34px;
  font-size: 11px;
}

#todayPage #habitForm .habit-date-row input,
#habitsPage #habitForm .habit-date-row input {
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

#todayPage #habitForm .habit-submit,
#habitsPage #habitForm .habit-submit {
  min-height: 42px;
  font-size: 13px;
}

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 1200;
  max-width: calc(100vw - 32px);
  padding: 12px 17px;
  border-radius: 11px;
  color: #fff;
  background: var(--green-950);
  box-shadow: 0 10px 30px rgba(24, 56, 41, 0.24);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: 180ms ease;
}

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

.mini-focus-timer {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 250px;
  padding: 12px;
  border: 2px solid #294c3a;
  border-radius: 13px;
  background: #fffaf0;
  box-shadow: 5px 5px 0 #d4b95f;
}

.mini-focus-timer[hidden] {
  display: none;
}

.mini-focus-main {
  display: grid;
  width: 100%;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px dashed #9ca594;
  color: #294c3a;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mini-focus-main span {
  color: #a06d2f;
  font-size: 11px;
  font-weight: 700;
}

.mini-focus-main strong {
  overflow: hidden;
  margin-top: 4px;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-focus-main b {
  margin-top: 5px;
  font-family: "Maplestory", sans-serif;
  font-size: 25px;
}

.mini-focus-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.mini-focus-actions button {
  min-height: 35px;
  border: 1px solid #294c3a;
  border-radius: 7px;
  color: #294c3a;
  background: #e8eddc;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.mini-focus-actions button:last-child {
  color: #fffaf0;
  background: #d96f52;
}

@media (max-width: 560px) {
  .mini-focus-timer {
    right: 16px;
    bottom: 16px;
    width: min(250px, calc(100vw - 32px));
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .sidebar {
    align-items: center;
    padding-inline: 12px;
  }

  .brand {
    padding-inline: 0;
  }

  .main-nav::before,
  .nav-label,
  .nav-index {
    display: none;
  }

  .brand > span:last-child,
  .nav-item:not(.active)::after,
  .nav-item {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
    width: 50px;
    padding: 5px;
    gap: 0;
  }

  .nav-icon {
    flex: 0 0 36px;
    font-size: 18px;
  }

  .nav-item.active {
    box-shadow: 3px 3px 0 #294c3a;
  }

  .profile-copy,
  .more-icon {
    display: none;
  }

  .profile-button {
    justify-content: center;
    width: 50px;
    padding: 8px 5px;
  }

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

  .habit-section {
    max-width: none;
  }

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

  .reward-note {
    max-width: 380px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 25px 20px 45px;
  }

  .mobile-menu {
    display: grid;
    margin-right: 12px;
  }

  .topbar {
    justify-content: flex-start;
  }

  .topbar-actions {
    margin-left: auto;
  }

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

  .board {
    overflow-x: auto;
    grid-template-columns: repeat(3, minmax(230px, 1fr));
    padding-bottom: 5px;
  }

  .group-manager {
    align-items: stretch;
    flex-direction: column;
  }

  .group-add input {
    flex: 1;
    width: auto;
  }

  .habit-list {
    grid-template-columns: 1fr;
  }

  #habitsPage .habit-list {
    grid-template-columns: 1fr;
  }

  #taskBoard.archive-view .task-list {
    grid-template-columns: 1fr;
  }

  .task-page-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-toggle {
    width: fit-content;
  }

  .task-archive-policy {
    min-width: 0;
    flex-basis: auto;
    text-align: left;
  }

  .farm-layout {
    grid-template-columns: 1fr;
  }

  .seed-shop {
    order: -1;
  }
}

@media (max-width: 560px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .page-header h1,
  .topbar h1 {
    font-size: 28px;
  }

  .topbar {
    align-items: flex-start;
  }

  .mobile-menu {
    display: none;
  }

  .topbar-actions {
    gap: 4px;
  }

  .currency {
    padding: 0 9px;
  }

  .currency small,
  .farm-money,
  .icon-button {
    display: none;
  }

  .focus-card {
    min-height: 260px;
    padding: 25px;
  }

  .focus-page-stage {
    min-height: calc(100vh - 135px);
    padding: 0;
    border-radius: 17px;
  }

  .focus-stage-toolbar {
    top: 10px;
    right: 10px;
    left: 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .focus-item-picker {
    width: 100%;
  }

  .focus-item-trigger {
    width: 100%;
  }

  .focus-stage-actions button,
  .focus-stage-actions label {
    width: 100%;
  }

  .focus-stage-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-page-stage:fullscreen {
    padding: 0;
  }

  .focus-card.standalone {
    min-height: calc(100vh - 135px);
    padding: 175px 25px 30px;
  }

  .focus-card.standalone .focus-copy {
    width: 100%;
    max-width: 100%;
  }

  .focus-card.standalone .focus-visual {
    width: 150px;
    height: 150px;
    min-width: 150px;
    flex-basis: 150px;
  }

  .focus-card.standalone .timer-ring {
    width: 138px;
    height: 138px;
  }

  .focus-visual {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 155px;
    height: 160px;
    opacity: 0.58;
  }

  .timer-ring {
    right: 18px;
    width: 120px;
    height: 120px;
  }

  .focus-card.standalone .timer-ring strong {
    font-size: 30px;
  }

  .focus-copy {
    max-width: 75%;
  }

  .progress-card {
    min-height: 0;
  }

  .farm-panel,
  .seed-shop {
    padding: 14px;
  }

  .farm-panel-header {
    align-items: flex-start;
  }

  .farm-header-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .seed-inventory {
    align-items: stretch;
    flex-direction: column;
  }

  .crop-storage {
    align-items: stretch;
    flex-direction: column;
  }

  .seed-inventory-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .crop-storage-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .recipe-lab {
    grid-template-columns: 1fr;
  }

  .recipe-lab > #cookRecipeButton {
    min-height: 36px;
  }

  .recipe-book > #recipeBook {
    grid-template-columns: 1fr;
  }

  .market-modal {
    padding: 10px;
  }

  .market-modal-panel {
    max-height: calc(100vh - 20px);
    padding: 8px;
  }

  .market-modal-panel > .modal-scroll-area {
    max-height: calc(100vh - 36px);
    padding: 8px;
  }

  .market-modal-panel .farm-item-shop {
    grid-template-columns: 1fr;
  }

  .supply-storage-modal .farm-supply-list {
    grid-template-columns: 1fr;
  }

  .supply-storage-modal .farm-supply-item {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    min-height: 88px;
    padding: 10px;
  }

  .supply-storage-modal .farm-supply-item.target-item {
    grid-column: auto;
  }

  .supply-storage-modal .supply-card-icon {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .supply-card-copy small {
    font-size: 11px;
  }

  .supply-card-actions button {
    min-width: 48px;
    min-height: 32px;
  }

  .inventory-seed {
    min-width: 0;
  }

  .farm-grid {
    gap: 6px;
    padding: 9px;
  }

  .farm-scene .farm-grid {
    gap: 3px;
    padding: 5px;
  }

  .farm-scene .crop-plot {
    padding: 3px;
  }

  .farm-scene .crop-visual span {
    font-size: 27px;
  }

  .farm-scene .crop-info {
    margin-bottom: 2px;
  }

  .farm-scene .crop-info small {
    display: none;
  }

  .farm-scene .crop-plot > button,
  .farm-scene .plot-growth-actions button,
  .farm-scene .mature-label {
    min-height: 21px;
    font-size: 10px;
  }

  .crop-plot {
    padding: 4px;
  }

  .crop-plot > button,
  .plot-growth-actions button,
  .mature-label {
    min-height: 22px;
    font-size: 11px;
  }

  .quick-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .quick-form select {
    grid-column: 1;
  }

  .quick-form .custom-group-select {
    grid-column: 1;
  }

  .secondary-button {
    grid-column: 2;
    grid-row: 2;
  }

}

@media (min-width: 561px) and (max-width: 900px) {
  .storage-grid-44 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .supply-storage-modal .farm-supply-list {
    grid-template-columns: 1fr;
  }

  .supply-storage-modal .farm-supply-item.target-item {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .farm-reward-box-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .farm-reward-box {
    min-height: 125px;
  }

  .farm-mail-friends,
  .farm-mail-items,
  .farm-mail-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .farm-mail-history-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .farm-mail-history-row small {
    grid-column: 2;
  }

  .farm-mail-inbox-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .farm-mail-inbox-avatar {
    width: 38px;
    height: 38px;
  }

  .farm-mail-inbox-row > button {
    grid-column: 2;
    justify-self: start;
  }

  .habit-modal {
    padding: 12px;
  }

  .habit-modal-panel {
    max-height: calc(100vh - 24px);
    padding: 7px;
    box-shadow: 4px 4px 0 #294c3a;
  }

  .habit-modal-panel > .modal-scroll-area {
    max-height: calc(100vh - 38px);
    padding: 10px;
  }

  .delete-confirm-panel {
    padding: 17px;
  }
}
