/* Warm miniature-farm theme. Visual layer only; title art and game rules remain owned by their original modules. */
:root {
  --q-cream: #fff9e9;
  --q-ink: #285849;
  --q-leaf: #438b68;
  --q-gold: #edbd67;
  --q-edge: #d5c89b;
  --q-shadow: #36574826;
}
#game-root { color: var(--q-ink); }
#game-root button, .facility-ui button, .app-dialog button { -webkit-tap-highlight-color: transparent; }
#game-root button:focus-visible, .facility-ui button:focus-visible, .app-dialog button:focus-visible {
  outline: 3px solid #cc7c2f; outline-offset: 3px;
}
#game-root .hud {
  background: linear-gradient(180deg, #fffef5, #fff4d9);
  border-bottom: 3px solid #d3bd86;
  box-shadow: 0 4px 16px #345e3f18;
  position: relative; z-index: 5;
}
#game-root .brand svg {
  background: linear-gradient(145deg, #eff6d6, #bed9a8);
  border: 2px solid #fffcdf;
  box-shadow: 0 3px 0 #a6bb83, inset 0 2px 3px #ffffff;
  border-radius: 35%;
}
#game-root .brand strong { color: #265f4b; text-shadow: 0 1px #fff; }
#game-root .cash {
  border: 1px solid #e3cd8b;
  border-radius: 15px; padding: 5px 12px;
  background: linear-gradient(145deg, #fffbe0, #f6e7b5);
  box-shadow: inset 0 2px #fffef1, 0 2px 0 #cfb77566;
}
#game-root .cash strong { color: #725126; font-variant-numeric: tabular-nums; }
#game-root .calendar { border-color: #dccfa8; }
#game-root .chapter {
  background: linear-gradient(155deg, #fffff2, #f5edcc);
  border: 2px solid #c8b886; border-radius: 19px;
  box-shadow: inset 0 2px #fff, 0 4px 0 #52714c33, 0 6px 18px #345b3c12;
}
#game-root .chapter b { color: #496a44; }
#game-root .selection {
  background: #fffce9f2; border: 1px solid #d6c99a;
  box-shadow: 0 3px 0 #4a654623; color: #426448;
}
#game-root .toolbar {
  border-top: 3px solid #d5c18d;
  background: linear-gradient(180deg, #fffbea, #efdfb7);
  box-shadow: 0 -6px 22px #355b3814;
}
#game-root .toolbar-actions > button[data-open] {
  background: linear-gradient(155deg, #fffff5, #eee4bf);
  border: 1.5px solid #d2c393; border-radius: 16px;
  box-shadow: inset 0 2px #fff, 0 3px 0 #baa875;
  color: #476348; transition: transform .12s, box-shadow .12s, background .12s;
}
#game-root .toolbar-actions > button[data-open]:hover {
  background: linear-gradient(155deg, #fffef1, #e5edbf); border-color: #9aac73;
}
#game-root .toolbar-actions > button[data-open]:active { transform: translateY(2px); box-shadow: inset 0 1px #fff, 0 1px 0 #baa875; }
#game-root .tool-symbol {
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 0 #50633a18);
}
#game-root .toolbar b { font-weight: 800; }
#game-root .next-day {
  background: linear-gradient(180deg, #438f70, #226650);
  border: 2px solid #1c5a44; border-radius: 17px;
  box-shadow: inset 0 2px #9ec7a770, 0 3px 0 #164a39;
  color: #fff7d7; text-shadow: 0 1px #1b5c44;
}
#game-root .next-day:active { transform: translateY(2px); box-shadow: inset 0 2px #9ec7a740, 0 1px 0 #164a39; }
#game-root :is(.iso-controls button, .farm-layout-open, #game-settings, .version-chip--game) {
  background: linear-gradient(155deg, #fffef1, #f3e6be);
  border: 2px solid #beaf81;
  color: #47664d;
  box-shadow: inset 0 2px #fff, 0 3px 0 #778b5b55;
}
#game-root .iso-controls button { border-radius: 14px; min-width: 44px; min-height: 44px; }
#game-root .farm-layout-open { min-height: 44px; border-radius: 18px; }
#game-root .farm-layout-panel {
  background: linear-gradient(150deg, #fffced, #f5edcf);
  border: 2px solid #c8b886; border-radius: 22px;
  box-shadow: inset 0 2px #fff, 0 7px 0 #5b72452b, 0 16px 36px #2c4c4530;
}
#game-root .farm-layout-panel header { border-bottom: 1px dashed #d0c094; padding-bottom: 9px; }
#game-root .farm-layout-panel button { min-height: 44px; border-radius: 12px; }
#game-root .farm-layout-nudge { grid-template-columns: repeat(4, 44px) 1fr; }
#game-root .farm-layout-panel :is(select, input) { min-height: 44px; border-radius: 12px; border-color: #cfbf8b; background: #fffef5; }
#game-root .farm-layout-actions .is-primary { background: linear-gradient(#4a9971, #2c7356); border-color: #2c7356; color: #fffbe6; }
#game-root .farm-layout-actions button { box-shadow: 0 2px 0 #b4a67d; }
.facility-ui {
  --facility-ink: #335947; --facility-muted: #65745b; --facility-green: #347556;
  border: 2px solid #cbbb8b; border-radius: 28px;
  background: #fff9e9;
  box-shadow: 0 7px 0 #52634536, 0 28px 85px #193f3a45;
}
.facility-ui__shell {
  background: radial-gradient(ellipse at 100% 0, #e7edc6 0, transparent 42%), linear-gradient(155deg, #fffdf1, #f9f0d9);
}
.facility-ui__header { padding-bottom: 15px; border-bottom: 2px dashed #dbceaa; margin-bottom: 16px; }
.facility-ui__icon {
  width: 50px; height: 50px; border-radius: 18px;
  border: 2px solid #c3d5a1; background: linear-gradient(140deg, #f4f9de, #c5dda9);
  box-shadow: inset 0 2px #fff, 0 3px 0 #9cb58455;
}
.facility-ui__icon svg { width: 32px; height: 32px; }
.facility-ui__header h2 { color: #2d624a; font-size: 23px; }
.facility-ui__eyebrow { color: #8b774d; letter-spacing: .08em; }
.facility-ui__close, .app-dialog__close {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 1.5px solid #d1bd8e; color: #80643b;
  background: linear-gradient(#fffdf1, #f3e3b9); box-shadow: 0 2px 0 #bdaa7b;
}
.facility-ui :is(.facility-ui__stat, .facility-ui__task, .facility-ui__order, .facility-ui__species-option, .facility-ui__finance-card, .facility-ui__routine, .water-ecology-card, .shrimp-handling, .facility-ui__card) {
  border-color: #ddd1aa; border-radius: 18px;
  background: #fffdf2; box-shadow: 0 2px 0 #d6c9a04d;
}
.facility-ui button:is(.facility-ui__primary, .primary, .facility-ui__task-claim) {
  background: linear-gradient(180deg, #4c9672, #2c7457); border: 1px solid #29664d;
  color: #fffce9; box-shadow: inset 0 2px #b5d5ac55, 0 3px 0 #1f563f;
}
.facility-ui button:not(.facility-ui__close) { border-radius: 13px; min-height: 44px; }
.facility-ui :is(input:not([type='checkbox']):not([type='radio']), select) { min-height: 44px; border-radius: 11px; border-color: #c7bd98; background-color: #fffef5; }
.facility-ui :is(.facility-ui__description, .facility-ui__simulation-note, .play-notes) { color: #68745d; }
.facility-ui :is(button, input, select):disabled { opacity: .52; box-shadow: none; cursor: not-allowed; }
.facility-ui details { border-color: #d9cba3; }
#game-root :is(.sample-card, .harvest-panel, .workshop) { border-color: #cfbf91; border-radius: 22px; background-color: #fff9e8; }
#game-root .toast { border: 2px solid #d9dfb5; border-radius: 20px; box-shadow: 0 5px 0 #274a3e30, 0 12px 26px #294c4030; }
.app-dialog, #welcome {
  border: 2px solid #cbbc91; border-radius: 26px;
  background: linear-gradient(145deg, #fffdf0, #f7edce); color: #355d49;
}
.app-dialog button:not(.app-dialog__close), #welcome button { min-height: 44px; border-radius: 14px; }
@media (max-width: 620px) {
  #game-root .hud { gap: 5px; padding-inline: 8px; }
  #game-root .brand strong { font-size: 11px; }
  #game-root .cash { min-width: 0; padding: 5px 7px; border-radius: 12px; }
  #game-root .cash strong { font-size: 15px; }
  #game-root .hud-stats { gap: 5px; }
  #game-root .toolbar { grid-template-rows: 50px 42px; }
  #game-root .toolbar-actions > button[data-open] { border-radius: 12px; }
  #game-root .toolbar .next-day { min-height: 42px; border-radius: 13px; }
  #game-root .farm-layout-panel { top: 56px; max-height: calc(100% - 64px); }
  #game-root .chapter { max-width: 48vw; }
  .facility-ui__shell { padding: 18px 16px; }
  .facility-ui__header h2 { font-size: 21px; }
}
@media (max-width: 620px) {
  #game-root .toolbar { grid-template-columns: minmax(0, 1fr); }
  #game-root .toolbar-actions { display: flex; gap: 4px; min-width: 0; overflow-x: auto; padding: 0 1px 4px; scrollbar-width: none; }
  #game-root .toolbar-actions > button[data-open] { min-width: 44px; min-height: 44px; flex: 1 0 44px; }
}
@media (max-width: 369px) {
  #game-root .brand strong { max-width: 94px; }
  #game-root .cash strong { font-size: 13px; }
  #game-root .toolbar { overflow-x: auto; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #game-root .farm-layout-panel { top: 52px; max-height: calc(100% - 58px); }
  .facility-ui { max-height: calc(100dvh - 16px); }
  .facility-ui__shell { padding: 13px 18px; }
  .facility-ui__header { padding-bottom: 9px; margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #game-root button, .facility-ui[open] { transition: none; animation: none; }
}

.facility-ui button.primary small { color: #e4efd8; }
.facility-ui .fertilizer-status { margin-top: 14px; padding: 13px; border: 1px solid #ded1a7; border-radius: 17px; background: #f3efd9; }
.facility-ui .fertilizer-status > b { display: block; margin-bottom: 7px; font-size: 13px; }
.facility-ui .fertilizer-status > small { display: block; margin-block: 7px; color: #6a775e; font-size: 11px; line-height: 1.65; }
#game-root :is(.test-card, .harvest-game, .underwater-dialog) { background: linear-gradient(145deg,#fffdf1,#f6edce); border: 2px solid #cebd8c; border-radius: 25px; box-shadow: 0 5px 0 #576e4130,0 18px 50px #284f4230; }
#game-root :is(.test-card, .harvest-game) header button, #game-root .underwater-close { min-width: 44px; min-height: 44px; border: 1px solid #cebc8d; background: #fbefcc; color: #785c32; border-radius: 50%; }
#game-root .underwater-header { color: #345f4b; }
#game-root .underwater-chip { border-radius: 16px; background: #fff9e5; border-color: #d8c99e; }
/* Floating settings/version chips must not sit over a facility's scroll area. */
#game-root:has(.facility-ui[open]) > :is(#game-settings, #game-version) { visibility: hidden; }
#game-root .toolbar-toggle { min-width: 58px; min-height: 44px; border: 1.5px solid #c9b783; border-radius: 14px; background: linear-gradient(#fffdf0,#f2e3b7); color: #47664d; box-shadow: 0 3px 0 #baa875; }
#game-root .farm-layout-actions { position: sticky; bottom: -10px; padding: 9px 0 5px; background: #f8efd3; border-top: 1px solid #dfd0a7; }
.facility-ui__header { position: sticky; top: -18px; z-index: 2; padding-top: 8px; background: #fff9e9; }
