:root {
  --ink:#173f35;
  --green:#296047;
  --lime:#d9ee94;
  --paper:#fffdf5;
  --muted:#6f8174;
  --line:#d9e0d5;
  font-family:Inter,"Trebuchet MS",Arial,sans-serif;
  color:var(--ink);
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:#173f35;
  overscroll-behavior:none;
}
button,input {
  -webkit-tap-highlight-color:transparent;
}
button {
  font:inherit;
  cursor:pointer;
  touch-action:manipulation;
  border:0;
  color:inherit;
}
button:disabled {
  cursor:not-allowed;
  opacity:.44;
}
button:focus-visible,input:focus-visible {
  outline:3px solid #dcab3a;
  outline-offset:4px;
}
button svg {
  pointer-events:none;
}
svg {
  width:24px;
  height:24px;
  vertical-align:middle;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
[hidden] {
  display:none!important;
}
#app {
  height:100dvh;
  min-height:430px;
  max-width:1600px;
  margin:auto;
  background:var(--paper);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.topbar {
  height:82px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 32px;
  border-bottom:1px solid var(--line);
  z-index:2;
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:18px;
  letter-spacing:1.5px;
  line-height:1.3;
}
.brand strong {
  font-weight:800;
}
.brand-icon {
  width:42px;
  height:42px;
  background:var(--green);
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--lime);
}
.brand-icon svg {
  width:27px;
  height:27px;
}
.edition {
  display:block;
  font-size:10px;
  letter-spacing:2.5px;
  margin-top:4px;
  color:var(--muted);
}
.top-actions {
  display:flex;
  gap:10px;
}
.icon-btn {
  display:grid;
  place-items:center;
  background:transparent;
  width:44px;
  height:44px;
  border-radius:50%;
}
.icon-btn:hover {
  background:#e9eedf;
}
#garden {
  position:relative;
  flex:1;
  min-height:0;
  overflow:hidden;
  background:#c7ded3;
  isolation:isolate;
}
canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none;
  user-select:none;
}
.time-card {
  position:absolute;
  top:24px;
  left:28px;
  width:233px;
  padding:16px 19px 14px;
  border:1px solid #fff9;
  background:#fffdf5ed;
  border-radius:16px;
  box-shadow:0 5px 20px #20483509;
  pointer-events:none;
}
.eyebrow {
  font-size:11px;
  letter-spacing:1.7px;
  font-weight:700;
  color:#71826d;
}
.time-card .eyebrow {
  display:flex;
  justify-content:space-between;
}
.time-card .eyebrow span:last-child {
  letter-spacing:0;
  text-transform:none;
  font-weight:500;
}
.day-line {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:10px 0;
}
.day-line strong {
  font-size:29px;
  letter-spacing:-1px;
}
.day-line>span {
  font-size:19px;
  font-variant-numeric:tabular-nums;
  color:#667b69;
}
.level-line {
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
}
.coins {
  font-size:19px;
  color:#937125;
  font-weight:800;
}
.level-track {
  height:3px;
  background:#dfe6d4;
  margin-top:11px;
  border-radius:9px;
  overflow:hidden;
}
.level-track i {
  display:block;
  height:100%;
  background:#85a257;
  width:0;
}
.shop-button {
  position:absolute;
  right:28px;
  top:24px;
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--ink);
  color:#fffdf5;
  text-align:left;
  font-size:13px;
  line-height:1.4;
  padding:12px 17px;
  border-radius:14px;
  box-shadow:0 5px 0 #102e27;
}
.shop-button svg {
  color:var(--lime);
  width:27px;
  height:27px;
}
.plant-stats {
  position:absolute;
  top:213px;
  left:32px;
  display:flex;
  gap:13px;
  padding:14px 12px;
  background:#fffdf5dd;
  border-radius:14px;
}
.stat {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  font-size:11px;
  color:#488fb1;
}
.stat svg {
  height:18px;
  width:18px;
}
.stat.health {
  color:#dc6c61;
}
.stat.food {
  color:#8a9c46;
}
.meter {
  height:76px;
  width:8px;
  border-radius:6px;
  background:#d7e0d0;
  position:relative;
  overflow:hidden;
}
.meter i {
  position:absolute;
  bottom:0;
  width:100%;
  height:100%;
  background:currentColor;
  border-radius:6px;
  transition:height .2s;
}
.tools {
  position:absolute;
  right:28px;
  top:136px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.tools button {
  display:flex;
  flex-direction:column;
  gap:5px;
  align-items:center;
  justify-content:center;
  width:64px;
  min-height:68px;
  padding:9px;
  background:#fffdf5ec;
  border:1px solid #fff;
  border-radius:14px;
  box-shadow:0 3px 0 #263e2c18;
  transition:background .15s,transform .15s;
}
.tools button:hover {
  transform:translateY(-2px);
}
.tools button svg {
  width:28px;
  height:28px;
}
.tools button small {
  font-size:11px;
}
.tools button.selected {
  background:var(--ink);
  color:var(--lime);
  border:1px solid #fff9;
  box-shadow:0 3px 0 #102e27;
}
.plant-info {
  position:absolute;
  bottom:110px;
  left:50%;
  transform:translateX(-50%);
  text-align:center;
  background:#fffdf5ee;
  border:1px solid #fff9;
  border-radius:14px;
  padding:12px 20px;
  min-width:230px;
  max-width:380px;
  pointer-events:none;
}
.plant-name {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:15px;
  font-weight:700;
}
.plant-name span+span {
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:#718064;
  font-weight:500;
}
#plant-hint {
  font-size:12px;
  color:#728064;
  margin-top:5px;
}
#harvest {
  pointer-events:auto;
  background:var(--green);
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  border-radius:8px;
  padding:11px;
  margin-top:10px;
  font-size:14px;
}
#harvest b {
  color:var(--lime);
}
.world-nav {
  position:absolute;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  width:320px;
  display:flex;
  align-items:center;
  gap:13px;
}
.world-nav button {
  width:42px;
  height:42px;
  flex-shrink:0;
  border:1px solid #fff7;
  border-radius:50%;
  background:#fffdf5da;
  display:grid;
  place-items:center;
}
.map-wrap {
  position:relative;
  flex:1;
  text-align:center;
}
.map-wrap>span {
  font-size:10px;
  letter-spacing:2px;
  color:#fffdf5;
  text-shadow:0 1px 4px #173f3588;
  font-weight:600;
}
.map-wrap input {
  width:100%;
  margin:9px 0 0;
  accent-color:var(--paper);
  height:16px;
  cursor:ew-resize;
}
.map-wrap input::-webkit-slider-runnable-track {
  height:4px;
  background:#ffffff80;
  border-radius:9px;
}
.map-wrap input::-webkit-slider-thumb {
  margin-top:-6px;
}
#map-dots {
  height:5px;
  position:relative;
}
#map-dots i {
  position:absolute;
  top:0;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#dcf399;
}
footer {
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:9px 28px;
  font-size:12px;
  color:#69806b;
  background:var(--paper);
  flex-shrink:0;
}
footer button {
  background:transparent;
  font-size:12px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:6px 0;
  white-space:nowrap;
}
footer svg {
  width:17px;
  height:17px;
}
.desktop-tip {
  color:#879081;
}
.welcome {
  position:absolute;
  z-index:4;
  left:50%;
  top:46%;
  transform:translate(-50%,-50%);
  width:min(410px,calc(100% - 38px));
  padding:34px 32px;
  background:#fffdf5f5;
  border:1px solid white;
  box-shadow:0 18px 70px #173f3526;
  border-radius:24px;
  text-align:center;
}
.welcome h1 {
  font-family:Georgia,serif;
  font-size:45px;
  font-weight:500;
  line-height:1.04;
  letter-spacing:-1.5px;
  margin:20px 0;
  color:#244c39;
}
.welcome p {
  font-size:15px;
  line-height:1.7;
  color:#73806d;
  margin:0 0 26px;
}
.welcome small {
  display:block;
  max-width:245px;
  margin:17px auto 0;
  font-size:11px;
  line-height:1.6;
  color:#839078;
}
.primary {
  background:var(--ink);
  color:var(--paper);
  border-radius:10px;
  padding:15px 20px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  font-size:15px;
  font-weight:600;
  width:100%;
  min-height:48px;
}
.primary svg {
  color:var(--lime);
}
#shade {
  position:absolute;
  inset:0;
  background:#173f3518;
  backdrop-filter:blur(2px);
  z-index:3;
  pointer-events:none;
}
#toast {
  position:absolute;
  top:28px;
  left:50%;
  transform:translateX(-50%);
  max-width:360px;
  width:max-content;
  background:#173f35ef;
  border:1px solid #ffffff40;
  border-radius:12px;
  padding:13px 18px;
  color:#fffdf5;
  font-size:14px;
  text-align:center;
  pointer-events:none;
  opacity:0;
  transition:opacity .2s;
  z-index:6;
}
#toast.visible {
  opacity:1;
}
#placement {
  position:absolute;
  bottom:210px;
  left:50%;
  transform:translateX(-50%);
  padding:13px 16px;
  background:#fffdf5;
  border-radius:12px;
  font-size:13px;
  text-align:center;
  max-width:300px;
  box-shadow:0 5px 30px #0001;
}
#cancel-plant {
  display:block;
  margin:9px auto 0;
  background:transparent;
  text-decoration:underline;
}
dialog {
  width:min(470px,calc(100vw - 28px));
  max-height:88dvh;
  padding:25px;
  border:1px solid #d8e2cf;
  border-radius:20px;
  background:var(--paper);
  color:var(--ink);
  box-shadow:0 25px 100px #132e3866;
  overscroll-behavior:contain;
}
dialog::backdrop {
  background:#173f3570;
  backdrop-filter:blur(4px);
}
.modal-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
}
.modal-head h2 {
  font-family:Georgia,serif;
  font-size:29px;
  font-weight:500;
  margin:5px 0 0;
}
.modal-head .icon-btn {
  flex-shrink:0;
}
#modal-body p,#modal-body li {
  font-size:14px;
  line-height:1.65;
  color:#667762;
}
#modal-body ul {
  padding-left:20px;
}
.shop-section {
  margin:21px 0 10px;
  font-size:11px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:#75836b;
}
.shop-item {
  display:flex;
  gap:14px;
  align-items:center;
  padding:13px 0;
  border-bottom:1px solid #e1e6d9;
}
.shop-item>span {
  display:grid;
  place-items:center;
  width:37px;
  height:37px;
  background:#e9eedb;
  border-radius:10px;
  flex-shrink:0;
}
.shop-item>div {
  flex:1;
}
.shop-item strong {
  display:block;
  font-size:14px;
}
.shop-item small {
  display:block;
  color:#78846e;
  font-size:12px;
  line-height:1.5;
  margin-top:4px;
}
.shop-item button {
  background:var(--ink);
  color:#faffeb;
  padding:11px 12px;
  border-radius:8px;
  font-size:13px;
  min-width:66px;
}
.modal-note {
  font-size:12px!important;
  background:#eaf0df;
  padding:12px 14px;
  border-radius:9px;
}
.progress-row {
  display:flex;
  justify-content:space-between;
  padding:12px 0;
  border-bottom:1px solid #e1e6d9;
  font-size:14px;
}
.secondary {
  width:100%;
  min-height:44px;
  background:#e8eddd;
  border-radius:8px;
  margin-top:10px;
  font-size:14px;
}
.danger {
  color:#9a4d42;
}
body.playing .welcome,body.playing #shade {
  display:none;
}
@media(min-width:1200px) {
  #app {
    border-left:1px solid #ffffff20;
    border-right:1px solid #ffffff20;
  }
}
@media(max-width:650px) {
  .topbar {
    height:65px;
    padding:0 15px;
  }
  .brand {
    font-size:13px;
    letter-spacing:1px;
    gap:9px;
  }
  .brand-icon {
    width:33px;
    height:33px;
  }
  .brand-icon svg {
    width:22px;
    height:22px;
  }
  .edition {
    font-size:8px;
    letter-spacing:1.4px;
    margin-top:3px;
  }
  .top-actions {
    gap:0;
  }
  .icon-btn {
    width:37px;
    height:42px;
  }
  .icon-btn svg {
    width:20px;
    height:20px;
  }
  .time-card {
    left:14px;
    top:16px;
    width:184px;
    padding:12px 14px;
    border-radius:13px;
  }
  .time-card .eyebrow {
    font-size:9px;
    letter-spacing:1px;
  }
  .day-line {
    margin:7px 0;
  }
  .day-line strong {
    font-size:26px;
  }
  .day-line>span {
    font-size:17px;
  }
  .level-line {
    font-size:10px;
  }
  .coins {
    font-size:18px;
  }
  .level-track {
    margin-top:9px;
  }
  .shop-button {
    right:14px;
    top:16px;
    font-size:11px;
    gap:6px;
    padding:10px 12px;
    border-radius:12px;
  }
  .shop-button svg {
    width:22px;
    height:22px;
  }
  .plant-stats {
    left:15px;
    top:163px;
    padding:11px 9px;
    gap:10px;
  }
  .meter {
    height:64px;
    width:7px;
  }
  .stat {
    gap:7px;
    font-size:10px;
  }
  .stat svg {
    width:16px;
    height:16px;
  }
  .tools {
    right:14px;
    top:105px;
    gap:10px;
  }
  .tools button {
    width:53px;
    min-height:61px;
    border-radius:12px;
    padding:7px;
  }
  .tools button svg {
    width:26px;
    height:26px;
  }
  .tools button small {
    font-size:10px;
  }
  .plant-info {
    bottom:82px;
    padding:11px 14px;
    min-width:205px;
    width:max-content;
    max-width:calc(100% - 40px);
  }
  .plant-name {
    font-size:14px;
  }
  .plant-name span+span {
    font-size:9px;
  }
  #plant-hint {
    font-size:11px;
    max-width:255px;
  }
  .world-nav {
    bottom:16px;
    width:265px;
    gap:12px;
  }
  .world-nav button {
    width:36px;
    height:36px;
  }
  .map-wrap>span {
    font-size:9px;
  }
  footer {
    padding:7px 15px;
    min-height:43px;
    gap:6px;
    font-size:10px;
  }
  footer button {
    font-size:10px;
    gap:4px;
  }
  .desktop-tip {
    display:none;
  }
  footer svg {
    width:14px;
    height:14px;
  }
  #toast {
    top:145px;
    max-width:calc(100% - 100px);
    font-size:12px;
    padding:11px 14px;
  }
  .welcome {
    padding:27px 25px;
  }
  .welcome h1 {
    font-size:42px;
  }
  .welcome p {
    font-size:14px;
  }
  .plant-stats,.tools {
    z-index:1;
  }
}
@media(max-height:620px) {
  .topbar {
    height:54px;
  }
  .plant-stats {
    top:147px;
  }
  .meter {
    height:42px;
  }
  .tools {
    top:92px;
    gap:6px;
  }
  .tools button {
    min-height:48px;
    padding:5px;
  }
  .tools button svg {
    height:21px;
  }
  .plant-info {
    bottom:67px;
  }
  .world-nav {
    bottom:9px;
  }
  .welcome {
    padding:20px;
  }
  .welcome h1 {
    font-size:32px;
    margin:12px 0;
  }
  .welcome p {
    margin-bottom:14px;
  }
  .welcome small {
    margin-top:12px;
  }
}
