:root {
  color-scheme: light;
  font-family: "DM Sans", "Noto Serif JP", sans-serif;
  color: #43382e;
  background: #fff8ed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #493b2f;
  --muted: #8f8173;
  --green: #628d58;
  --rose: #dc6c73;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 85% 24%, rgb(255 224 164 / 49%), transparent 26rem),
    radial-gradient(ellipse at 8% 61%, rgb(195 222 169 / 40%), transparent 30rem),
    #fff8ed;
}

button,
a {
  font: inherit;
}

.page-shell {
  width: min(100% - 44px, 904px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  height: 77px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(114 97 74 / 11%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: "Noto Serif JP", serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  color: #e66f67;
  font-size: 22px;
}

.today-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #796c5e;
  font-size: 12px;
}

.account-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-status {
  max-width: 110px;
  overflow: hidden;
  color: #7f735f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-button,
.logout-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #e8d9bd;
  border-radius: 10px;
  color: #5b704a;
  background: #fffdf5;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.account-button:hover,
.logout-button:hover {
  border-color: #b4c398;
  background: #f5f7ed;
}

.sun-icon {
  color: #edae41;
  font-size: 17px;
}

.intro {
  padding: 38px 0 27px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: #93846f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #75905f;
  font-family: "Noto Serif JP", serif;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.eyebrow span {
  color: #e77a72;
  font-size: 15px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 12px 0 8px;
  color: #544337;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(26px, 5vw, 37px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.intro-copy {
  margin: 0;
  color: #8c7c6d;
  font-family: "Noto Serif JP", serif;
  font-size: 12px;
}

.garden-panel {
  padding: 23px;
  border: 1px solid rgb(174 148 105 / 17%);
  border-radius: 23px;
  background: rgb(255 253 248 / 92%);
  box-shadow: 0 18px 55px rgb(127 103 63 / 10%), 0 2px 5px rgb(127 103 63 / 4%);
}

.daily-banner {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 10px 15px;
  border: 1px solid #f6e5c9;
  border-radius: 14px;
  background: #fff6e7;
}

.daily-flower {
  color: #e4736f;
  font-size: 23px;
}

.daily-heading {
  margin: 0 0 2px;
  color: #5c4839;
  font-family: "Noto Serif JP", serif;
  font-size: 13px;
  font-weight: 600;
}

.daily-copy {
  margin: 0;
  color: #8b7a68;
  font-size: 10px;
}

.plant-card {
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid rgb(137 155 92 / 23%);
  border-radius: 19px;
  background: #fbfaec;
  box-shadow: 0 7px 23px rgb(100 110 63 / 7%);
}

.plant-scene {
  position: relative;
  display: flex;
  min-height: 365px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(ellipse at 51% 81%, rgb(194 211 127 / 30%), transparent 27%),
    radial-gradient(ellipse at 51% 87%, rgb(162 190 124 / 19%), transparent 39%),
    linear-gradient(155deg, #fff9e9, #f4f2d9 51%, #eaf0d8);
  transition: background 300ms ease;
}

.plant-scene::before,
.plant-scene::after {
  position: absolute;
  z-index: 0;
  color: rgb(117 148 85 / 17%);
  content: "✿";
  pointer-events: none;
}

.plant-scene::before {
  top: 33px;
  left: 8%;
  font-size: 40px;
  transform: rotate(-17deg);
}

.plant-scene::after {
  right: 9%;
  bottom: 25px;
  font-size: 33px;
  transform: rotate(19deg);
}

.plant-image-frame {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 327px;
  align-items: center;
  justify-content: center;
}

.plant-image {
  width: min(100%, 340px);
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 13px 8px rgb(64 72 40 / 13%));
  animation: plant-arrive 370ms ease-out;
}

.stage-tag {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 17px;
  padding: 7px 10px;
  border: 1px solid rgb(107 139 82 / 16%);
  border-radius: 99px;
  color: #648154;
  background: rgb(255 255 250 / 76%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.growth-caption {
  position: absolute;
  z-index: 2;
  right: 17px;
  bottom: 13px;
  left: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5c704e;
  font-size: 10px;
}

.stage-name {
  padding: 5px 9px;
  border-radius: 50px;
  background: rgb(254 255 248 / 84%);
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
}

.growth-count {
  padding: 5px 8px;
  border-radius: 50px;
  color: #7d7857;
  background: rgb(255 253 239 / 86%);
}

.progress-drops {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 17px;
  display: flex;
  gap: 5px;
}

.progress-drop {
  width: 12px;
  height: 12px;
  color: #e6dcc8;
  font-size: 10px;
  line-height: 1;
  transform: rotate(45deg) scale(0.78);
  transition: color 160ms ease, transform 160ms ease;
}

.progress-drop.is-filled {
  color: #76a9d1;
  text-shadow: 0 1px 2px rgb(63 130 180 / 17%);
  transform: rotate(45deg) scale(1);
}

.plant-scene.just-grew .plant-image {
  animation: plant-grow 650ms cubic-bezier(0.15, 0.75, 0.35, 1.3);
}

.plant-scene.just-grew {
  background:
    radial-gradient(ellipse at 50% 55%, rgb(252 217 117 / 52%), transparent 34%),
    radial-gradient(ellipse at 51% 81%, rgb(194 211 127 / 30%), transparent 27%),
    linear-gradient(155deg, #fffbe9, #f3f2d3 51%, #eaf0d8);
}

.plant-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 17px;
  border-top: 1px solid rgb(131 149 85 / 15%);
  background: #fffef9;
}

.plant-name-group {
  display: grid;
  gap: 3px;
}

.plant-name {
  color: #554536;
  font-family: "Noto Serif JP", serif;
  font-size: 15px;
  font-weight: 600;
}

.plant-subtitle {
  color: #938573;
  font-size: 10px;
}

.water-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 21px;
  border: 1px solid #dc6b5e;
  border-radius: 13px;
  color: #fffdf4;
  background: linear-gradient(105deg, #f18b6f, #e65e65 75%);
  box-shadow: 0 5px 0 #c94e54, 0 8px 17px rgb(222 98 92 / 20%);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: filter 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  white-space: nowrap;
}

.water-button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #c94e54, 0 10px 20px rgb(222 98 92 / 25%);
}

.water-button:active:not(:disabled),
.water-button.is-watering {
  transform: translateY(3px) scale(0.99);
  box-shadow: 0 2px 0 #c94e54, 0 4px 10px rgb(222 98 92 / 15%);
}

.water-button:disabled {
  border-color: #b6c6a3;
  color: #59744c;
  background: #edf3e5;
  box-shadow: none;
  cursor: not-allowed;
}

.water-icon {
  font-size: 17px;
}

.button-sparkle {
  color: #ffe6aa;
  font-size: 12px;
}

.water-button:disabled .button-sparkle {
  display: none;
}

.flower-collection {
  margin-top: 25px;
}

.collection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.collection-heading h2 {
  margin: 5px 0 0;
  color: #564638;
  font-family: "Noto Serif JP", serif;
  font-size: 16px;
  font-weight: 600;
}

.collection-count {
  padding: 5px 9px;
  border-radius: 99px;
  color: #78866b;
  background: #eff3e7;
  font-size: 10px;
}

.flower-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.flower-card {
  display: flex;
  min-width: 0;
  min-height: 141px;
  flex-direction: column;
  align-items: flex-start;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #eee6d8;
  border-radius: 13px;
  color: #54473a;
  background: #fffdfa;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.flower-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgb(109 92 68 / 9%);
}

.flower-card[aria-pressed="true"] {
  border-color: #d99078;
  background: #fff6eb;
  box-shadow: 0 0 0 2px rgb(229 158 123 / 13%);
}

.flower-thumb {
  position: relative;
  display: flex;
  width: 100%;
  height: 77px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(140deg, #fff6df, #edf2dc);
}

.flower-thumb img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.thumb-stage {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 9px;
  color: #687650;
  background: rgb(255 254 246 / 91%);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.flower-name {
  max-width: 100%;
  margin: 7px 2px 0;
  overflow: hidden;
  color: #59493b;
  font-family: "Noto Serif JP", serif;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flower-status {
  margin: 3px 2px 0;
  overflow: hidden;
  color: #968675;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-note {
  margin: 18px 0 0;
  color: #978978;
  font-size: 9px;
  text-align: center;
}

.storage-note span {
  color: #e07872;
}

.error-message {
  margin: 12px 0 0;
  color: #b54744;
  font-size: 12px;
  text-align: center;
}

.account-dialog {
  width: min(100% - 32px, 400px);
  max-width: 400px;
  padding: 0;
  overflow: visible;
  border: 1px solid #eee0c9;
  border-radius: 21px;
  color: var(--ink);
  background: #fffdf7;
  box-shadow: 0 28px 80px rgb(65 52 35 / 20%);
}

.account-dialog::backdrop {
  background: rgb(73 61 46 / 38%);
  backdrop-filter: blur(4px);
}

.account-form {
  display: grid;
  padding: 31px 27px 24px;
}

.account-form h2 {
  margin: 8px 0 7px;
  color: #574638;
  font-family: "Noto Serif JP", serif;
  font-size: 21px;
}

.account-description {
  min-height: 37px;
  margin: 0 0 18px;
  color: #887968;
  font-size: 11px;
  line-height: 1.7;
}

.account-label {
  margin: 11px 0 6px;
  color: #655646;
  font-size: 11px;
  font-weight: 600;
}

.account-form input {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid #e8dece;
  border-radius: 10px;
  color: #443a31;
  background: #fffefb;
  font: inherit;
  font-size: 12px;
}

.account-form input:focus {
  border-color: #96a87b;
  outline: 3px solid rgb(137 163 108 / 18%);
}

.account-form input::placeholder {
  color: #b2a99c;
}

.account-submit {
  min-height: 45px;
  margin-top: 19px;
  border: 0;
  border-radius: 11px;
  color: #fffdf7;
  background: linear-gradient(105deg, #759966, #598052);
  box-shadow: 0 4px 11px rgb(83 127 76 / 17%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.account-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.account-switch {
  justify-self: center;
  margin-top: 13px;
  padding: 5px;
  border: 0;
  color: #668053;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-hint {
  margin: 14px 0 0;
  color: #988978;
  font-size: 9px;
  line-height: 1.7;
}

.account-error {
  margin: 10px 0 0;
  color: #b54744;
  font-size: 11px;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 9px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #897a6a;
  background: #f6f0e6;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px 0 28px;
  color: #938474;
  font-family: "Noto Serif JP", serif;
  font-size: 10px;
}

.footer-flower {
  color: #e47b70;
  font-size: 12px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #d88963;
  outline-offset: 3px;
}

@keyframes plant-arrive {
  from { opacity: 0.65; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes plant-grow {
  0% { transform: scale(0.96); }
  42% { transform: scale(1.07) rotate(-1deg); }
  72% { transform: scale(0.99) rotate(1deg); }
  100% { transform: scale(1); }
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 24px, 480px);
  }

  .topbar {
    height: 65px;
  }

  .today-label {
    font-size: 10px;
  }

  .topbar {
    gap: 7px;
  }

  .brand {
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
  }

  .account-controls {
    gap: 5px;
  }

  .account-status {
    display: none;
  }

  .account-button,
  .logout-button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 9px;
  }

  .intro {
    padding: 31px 0 22px;
  }

  h1 {
    letter-spacing: 0;
  }

  .garden-panel {
    padding: 13px;
    border-radius: 18px;
  }

  .daily-banner {
    padding-right: 10px;
    padding-left: 11px;
  }

  .plant-scene {
    min-height: 324px;
    padding: 14px;
  }

  .plant-image-frame {
    height: 290px;
  }

  .plant-image {
    width: min(100%, 290px);
  }

  .plant-footer {
    min-height: 69px;
    gap: 8px;
    padding: 10px 11px;
  }

  .plant-name {
    font-size: 13px;
  }

  .plant-subtitle {
    font-size: 8px;
  }

  .water-button {
    min-height: 43px;
    gap: 6px;
    padding: 0 12px;
    font-size: 11px;
  }

  .flower-grid {
    gap: 6px;
  }

  .flower-card {
    min-height: 111px;
    padding: 5px;
    border-radius: 10px;
  }

  .flower-thumb {
    height: 59px;
  }

  .flower-thumb img {
    width: 58px;
    height: 58px;
  }

  .flower-name {
    font-size: 8px;
  }

  .flower-status {
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
