/* Acabamento dos menus: dimensões compactas e hierarquia visual consistente. */
#window:not([open]) {
  display: none !important;
}
#window .title:after {
  display: none;
}
#window {
  border-color: #72563b;
  box-shadow:
    0 24px 70px #13281766,
    0 0 0 1px #d5b580;
  border-radius: 17px;
}
#window[data-kind="settings"] {
  width: min(430px, calc(100vw - 28px));
  height: fit-content;
  max-height: calc(100dvh - 28px);
  border-radius: 13px;
}
#window[data-kind="settings"] #windowBody {
  height: auto;
  max-height: none;
  padding: 14px;
}
#window[data-kind="settings"] .window-emblem {
  width: 34px;
  height: 34px;
  left: 14px;
}
.settings-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.settings-menu button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 54px;
  padding: 8px;
  border: 1px solid #aac68c;
  border-radius: 7px;
  background: linear-gradient(#f8ffe9, #e2efcd);
  color: #3b583a;
  font: 700 13px Georgia, serif;
  cursor: pointer;
}
.settings-menu button:hover {
  border-color: #789858;
  background: linear-gradient(#fffde9, #eaf3d7);
}
.settings-menu button img,
.settings-menu button svg {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  object-fit: contain;
}
.settings-menu button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#window .title {
  background: linear-gradient(100deg, #795435, #a57a4d 48%, #88603c);
  border-bottom: 2px solid #d5b77a;
  height: 58px;
  font-size: 23px;
  letter-spacing: 0.3px;
}
#windowBody {
  background: radial-gradient(ellipse at 0 0, #fffdf5, transparent 70%), #f4f0e3;
  padding: 17px 20px 18px;
}
.window-intro {
  border-bottom: 1px solid #d6dac5;
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.window-intro p {
  color: #6d7c58;
  font-size: 12px;
}
.window-wallet > span {
  background: #fffdf5;
  border-color: #e1ddc6;
  box-shadow: 0 2px 5px #6b70380a;
  font-size: 10px;
}
.window-wallet img {
  width: 18px;
  height: 18px;
}
#window .tabs button {
  background: #eae8d8;
  border-color: #dddcc7;
  color: #7c8469;
}
#window .tabs button.selected {
  background: linear-gradient(#879b5e, #657e46);
  border-color: #6a804b;
  box-shadow:
    inset 0 1px #c4d0a4,
    0 2px 4px #4a612b1a;
}
#window .seed {
  background: linear-gradient(145deg, #fffef8, #f8f6eb);
  border-color: #e1dfcc;
  box-shadow: 0 3px 7px #5e623512;
  border-radius: 12px;
}
#window .seed:hover {
  border-color: #a8b68a;
  box-shadow: 0 5px 12px #64794220;
  transform: translateY(-2px);
}
#window .seed > b {
  color: #4e6342;
}
#window .seed > img {
  background: radial-gradient(ellipse, #e6ecd359, transparent 67%);
}
.seed-prices {
  justify-content: center;
  gap: 5px;
}
#window .seed .buy-seed {
  flex: 0 0 calc(50% - 2.5px);
  width: calc(50% - 2.5px);
  min-width: 0;
  min-height: 38px;
  padding: 5px 3px;
  gap: 4px;
  border: 1px solid #d6c596;
  background: linear-gradient(#fff7dc, #eee2bd);
  box-shadow:
    inset 0 1px #fffef5,
    0 2px 0 #cab88b33;
  color: #8e773f;
  border-radius: 7px;
}
#window .seed .buy-seed img {
  width: 17px;
  height: 17px;
}
#window .seed .buy-seed span {
  text-align: center;
  font: 8px/1.1 Arial;
  white-space: normal;
}
#window .seed .buy-seed strong {
  font: bold 11px/1.5 Arial;
  text-align: center;
}
#window .seed .mv-buy {
  background: linear-gradient(#f0f6df, #e1eccb);
  border-color: #b6ca9b;
  color: #617f47;
}
#window .seed .buy-seed:disabled {
  opacity: 0.45;
}
#window .shop-footer {
  padding-top: 10px;
}
.shop-footer > span:empty {
  display: none;
}
.shop-footer > div {
  margin-left: auto;
}
#window .items .item {
  background: linear-gradient(145deg, #fffef8, #f7f4e8);
  border-color: #dedfc9;
  box-shadow: 0 3px 9px #68724310;
}
#window .item img {
  filter: drop-shadow(0 3px 2px #52693413);
}
#window .empty {
  border: 1px solid #dce0c8;
  background: radial-gradient(ellipse at center, #e9eed9aa, transparent 75%), #f9f8ef;
  color: #7a8769;
  box-shadow: inset 0 1px #fff;
  min-height: 165px;
}
#window .empty img {
  padding: 7px;
  background: #e8edd8;
  border-radius: 16px;
  width: 60px;
  height: 60px;
}
#window .friend-search {
  background: linear-gradient(120deg, #e7ecd9, #f0f2e5);
  border-color: #d5ddc4;
  box-shadow: inset 0 1px #fbfff5;
}
#window .friend-search input {
  background: #fffef9;
}
#windowBody h3 {
  letter-spacing: 0.1px;
}
#window .friend-list > li:not(.friend-row) {
  font: 12px/1.7 Arial;
  color: #8b9578;
  padding: 14px;
  border: 1px dashed #d6ddc2;
  border-radius: 10px;
  background: #fbfbf0;
}
#window .friend-row {
  box-shadow: 0 3px 8px #6574370c;
  border-color: #e0e3cf;
}
#window .friend-row > img {
  border-radius: 50%;
  border: 2px solid #d1ddba;
}
#window .gift-list li {
  background: #ecefdf;
  border-left: 3px solid #b0c190;
  border-radius: 4px 9px 9px 4px;
  color: #7e8b6a;
}
#window .vip-intro {
  background: radial-gradient(ellipse at top, #fff8dd, #ece4c4);
  border-color: #e3d6af;
  box-shadow: inset 0 1px #fffbee;
  position: relative;
  overflow: hidden;
}
#window .vip-intro:before {
  content: "✦";
  position: absolute;
  font: 90px Georgia;
  right: 20px;
  top: 0;
  color: #c1a1561a;
  pointer-events: none;
}
#window .vip-intro > b {
  color: #947943;
}
#window .vip-plans > div {
  border-color: #ddd8be;
  background: linear-gradient(#fffdf4, #f6f1df);
  box-shadow: 0 3px 10px #96793810;
}
#window .vip-plans > div:nth-child(2) {
  border-color: #b7bf8e;
  box-shadow:
    inset 0 3px #92a461,
    0 3px 10px #66773912;
}
#window .vip-plans > div > b {
  color: #727c4d;
}
#window .classic-form {
  border-color: #e0dfc9;
  background: linear-gradient(130deg, #fffef7, #f8f6ea);
  box-shadow: 0 3px 12px #5a6d3110;
}
#window .classic-form input,
#window .classic-form select {
  background: #fffef8;
}
#window .avatar-options img {
  background: #eef0df;
  border-color: #e0e4cf;
}
#window .avatar-options input:checked + img {
  border-color: #8fa86d;
  box-shadow: 0 0 0 3px #e3ebd4;
}
#purchaseBox {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(390px, 92vw);
  height: fit-content;
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid #b8bc95;
  border-radius: 18px;
  padding: 25px;
  background: linear-gradient(135deg, #fffef6, #f1eddb);
  box-shadow: 0 20px 70px #1d321d66;
  color: #536545;
}
#purchaseBox::backdrop {
  background: #24351b88;
  backdrop-filter: none;
}
.purchase-close {
  position: absolute;
  right: 12px;
  top: 8px;
  background: none;
  border: 0;
  color: #92967b;
  font: 25px Arial;
}
.purchase-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 22px;
}
.purchase-heading > img {
  width: 67px;
  height: 67px;
  object-fit: contain;
  background: radial-gradient(#e5ebd0, transparent 70%);
}
.purchase-heading h2 {
  font: bold 21px Georgia;
  color: #52693f;
  margin: 5px 0 6px;
}
.purchase-heading p {
  font: 11px Arial;
  color: #899373;
  margin: 0;
}
.purchase-heading .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
}
.quantity-label {
  display: block;
  font: bold 11px Arial;
  color: #7b876a;
  margin-bottom: 8px;
}
.quantity-control {
  display: flex;
  border: 1px solid #cdd4b4;
  border-radius: 10px;
  overflow: hidden;
  height: 41px;
  background: #fffef8;
}
.quantity-control button {
  width: 43px;
  border: 0;
  background: #e9eedb;
  color: #6c8350;
  font: 22px Arial;
}
.quantity-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-inline: 1px solid #dbe0c7;
  background: none;
  text-align: center;
  font: bold 16px Arial;
  color: #5e7247;
  appearance: textfield;
  -moz-appearance: textfield;
}
.quantity-control input::-webkit-inner-spin-button {
  appearance: none;
}
.quantity-control input:focus {
  outline: 2px solid #a3b77e;
  outline-offset: -3px;
}
.purchase-summary {
  margin-top: 18px;
  padding: 15px;
  background: #e8ecd9;
  border: 1px solid #d6ddc2;
  border-radius: 11px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font: 12px Arial;
}
.purchase-summary b {
  font: bold 15px Arial;
  color: #637f41;
}
.purchase-summary small {
  grid-column: 1/-1;
  font: 10px Arial;
  color: #8b9578;
}
.purchase-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 18px;
}
.purchase-actions button {
  font: 12px Arial;
  padding: 10px 15px;
  border-radius: 8px;
}
.purchase-actions #confirmSeed {
  background: linear-gradient(#88a05f, #688346);
  border: 1px solid #658044;
  box-shadow: inset 0 1px #bfcea2;
  color: #fffef0;
  font-weight: bold;
}
.purchase-actions #confirmSeed:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#purchaseBox #purchaseError {
  font: 11px/1.5 Arial;
  color: #af6e4c;
  margin: 10px 0 0;
  min-height: 0;
}
#purchaseBox #purchaseError:empty {
  display: none;
}
@media (max-width: 600px) {
  #windowBody {
    padding: 13px 11px;
  }
  #window .seed .buy-seed {
    flex-direction: column;
    gap: 1px;
    padding: 3px 1px;
    min-height: 47px;
    flex-wrap: nowrap;
  }
  #window .seed .buy-seed span {
    font-size: 7px;
  }
  #window .seed .buy-seed strong {
    font-size: 9px;
  }
  #window .seed .buy-seed img {
    width: 14px;
    height: 14px;
  }
  .window-wallet > span {
    font-size: 8px;
    padding: 3px 5px;
  }
  .window-wallet img {
    width: 15px;
    height: 15px;
  }
  .window-intro p {
    font-size: 10px;
    max-width: 130px;
  }
  #window .shop-grid {
    grid-auto-rows: 188px;
  }
  .window-wallet {
    gap: 4px;
  }
}

.seed-prices {
  height: 46px;
  align-items: stretch;
}
#window .seed .buy-seed {
  height: 46px;
  min-height: 46px;
}
#window .seed .buy-seed span {
  min-width: 0;
}
/* Compra curta, controles e confirmação com a cor da moeda. */
#purchaseBox {
  width: min(340px, 92vw);
  padding: 20px;
}
.purchase-heading {
  gap: 12px;
  margin: 1px 0 17px;
}
.purchase-heading > img {
  width: 54px;
  height: 54px;
}
.purchase-heading h2 {
  font-size: 19px;
}
.purchase-heading p {
  display: flex;
  align-items: center;
  gap: 4px;
}
.inline-coin {
  display: inline-block;
  width: 19px;
  height: 19px;
  object-fit: contain;
  vertical-align: middle;
}
.quantity-label {
  text-align: center;
}
.quantity-control {
  width: 146px;
  height: 32px;
  margin: 0 auto;
}
.quantity-control button {
  width: 32px;
  flex: none;
  font-size: 18px;
}
.quantity-control input {
  font-size: 13px;
}
.purchase-summary {
  padding: 12px;
  margin-top: 15px;
}
.purchase-summary b {
  display: flex;
  align-items: center;
  gap: 4px;
}
.purchase-actions {
  justify-content: center;
  margin-top: 15px;
}
.purchase-actions button {
  padding: 9px 13px;
  font-size: 11px;
}
#purchaseBox[data-currency="coins"] #confirmSeed {
  background: linear-gradient(#efd47e, #cfaa4a);
  border-color: #b9963f;
  color: #66501f;
  box-shadow: inset 0 1px #fff2bd;
}
#purchaseBox[data-currency="mv"] #confirmSeed {
  background: linear-gradient(#90c16a, #619a46);
  border-color: #58863f;
  color: #fffef0;
  box-shadow: inset 0 1px #cbe4af;
}
.animal-profile {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 15px;
  border: 1px solid #d8dfc3;
  background: #fffdf4;
  border-radius: 13px;
}
.animal-profile > img {
  width: 130px;
  height: 130px;
  object-fit: contain;
}
.animal-profile p {
  font: 12px/1.6 Arial;
  color: #7e8d68;
}
.animal-profile small {
  font: 10px Arial;
  color: #94a17f;
}
.animal-profile > div {
  flex: 1;
}
.animal-progress {
  height: 9px;
  background: #e0e5d0;
  border-radius: 8px;
  overflow: hidden;
}
.animal-progress i {
  height: 100%;
  display: block;
  background: linear-gradient(#b6cd83, #789c52);
}
.animal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 13px 0;
}
.animal-actions .classic-button {
  margin: 0 !important;
}
.feed-stock {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.feed-stock span {
  padding: 8px 12px;
  border-radius: 8px;
  background: #e9efda;
  font: 11px Arial;
  color: #7b8e5c;
}
@media (max-width: 600px) {
  .animal-profile {
    gap: 12px;
    padding: 10px;
  }
  .animal-profile > img {
    width: 78px;
    height: 100px;
  }
  .animal-profile h3 {
    font-size: 15px !important;
  }
  .animal-profile p {
    font-size: 11px;
  }
}
