.rehearsal-login form {
  max-width: 390px;
  width: 100%;
  text-align: left;
  display: grid;
  gap: 12px;
  padding: 23px;
  border: 1px solid #d5e1cf;
  border-radius: 19px;
  background: #fbfcf0;
}
.rehearsal-login form > p { margin: 0; }
.rehearsal-login form label { display: grid; gap: 6px; font-size: 13px; color: #3f5946; }
.rehearsal-login form input, .rehearsal-login form select {
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid #c9d8c7;
  border-radius: 8px;
  font: inherit;
  color: #284e40;
  background: white;
}
.rehearsal-login #login-error { color: #8b4133; font-size: 13px; }
.login-entry-actions, html[data-farm-runtime="production"] .engagement-app:has(#boot[hidden]) .farm-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}
.login-entry-actions[hidden], .farm-guide-links { display: none; }
.login-entry-actions a, .farm-guide-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  color: #345842;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-entry-actions a:first-child { border: 1px solid #b8cbb1; border-radius: 9px; background: #edf5e8; }
.farm-guide-links a:focus-visible, .login-entry-actions a:focus-visible { outline: 2px solid #496c51; outline-offset: -2px; }
.camera-tools button, .icon-button { font-size: 23px; font-family: inherit; }
.dock-icon { font-size: 21px; line-height: 1; }
.dock-outings {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 68px;
  height: 65px;
  border-radius: 17px;
  color: #72816c;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
  transition: background .18s, color .18s;
}
.dock-outings:is(:hover, :focus-visible) { background: #e9efdf; color: #315a40; }
.dock-outings:focus-visible { outline: 3px solid #dfa84c; outline-offset: -3px; }
.brand-mark { font-size: 19px; }
#farm-summary { margin: 8px 0 2px; font-size: 13px; line-height: 1.5; }
.rehearsal-batches .b-contract-head { align-items: center; }
.rehearsal-batches .b-contract:nth-of-type(n + 2) { margin-top: 8px; }
.rehearsal-batches button[data-native-action] { min-height: 44px; }
.rehearsal-order-lines { margin: 8px 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }
.farm-utility-links { flex-wrap: wrap; }
.farm-utility-links > * { flex-basis: calc(50% - 4px); }
.farm-utility-links :is(a,button), .farm-utility-materials :is(a,button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}
.farm-utility-materials { display: grid; gap: 4px; list-style: none; margin: 10px 0; padding: 0; }
.farm-utility-materials li {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  font-size: 13px;
}
.farm-utility-materials .secondary { width: auto; margin: 0; padding: 5px 10px; }
.rehearsal-stock { margin: 10px 0 0; }
.rehearsal-stock > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid #dce5cf; }
.rehearsal-stock dd { margin: 0; font-variant-numeric: tabular-nums; }
.batch-timing { display: grid; gap: 4px; margin: 8px 0; font-size: 13px; }
.batch-timing > div { display: grid; grid-template-columns: 5.1em 1fr; gap: 8px; align-items: baseline; }
.batch-timing dt { color: #506b53; }
.batch-timing dd { margin: 0; font-variant-numeric: tabular-nums; }
.batch-timing [data-collect-before] { font-weight: 700; }
.batch-timing dd small { display: inline-block; margin-left: 5px; color: #596f56; }
.stock-card { margin: 0 0 8px; }
.stock-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 8px 0; margin: 6px 0 0; border-top: 1px solid #dbe4cf; }
.stock-counts > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.stock-counts dt { color: #506b53; font-size: 12px; }
.stock-counts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock-counts .stock-expired :is(dt, dd) { color: #934733; }
.stock-freshness { list-style: none; display: grid; gap: 3px; border-top: 1px solid #dbe4cf; margin: 0; padding: 7px 0 0; font-size: 12px; }
.stock-freshness li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; color: #446148; }
.stock-freshness time { font-variant-numeric: tabular-nums; }
.stock-freshness-details summary { padding: 8px 0; min-height: 44px; color: #446148; font-size: 13px; cursor: pointer; }
.ranch-capacity { display: grid; gap: 4px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid #d0e1c4; border-radius: 12px; background: #eff5e6; }
.ranch-capacity span, .ranch-capacity small { color: #4b6750; font-size: 12px; }
.selected-slot { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; padding: 6px 11px; border-radius: 9px; background: #eef1df; font-size: 13px; }
.selected-slot span { color: #506b53; }
.ranch-picker { margin: 8px 0; }
.ranch-prices { display: grid; gap: 4px; margin: 8px 0; font-size: 13px; }
.ranch-prices > div { display: flex; justify-content: space-between; gap: 8px; }
.ranch-prices dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.ranch-feed-lines { display: grid; padding: 0; margin: 8px 0; list-style: none; font-size: 12px; }
.ranch-feed-lines li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; padding: 3px 0; }
.ranch-feed-lines li > div { line-height: 1.65; }
.ranch-source-actions, .ranch-dialog-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 6px; margin-top: 8px; }
.ranch-remove-link { margin-top: 5px; min-height: 44px; padding: 4px 9px; color: #814c39; border-radius: 7px; background: #f2eadd; font-size: 12px; }
.ranch-remove-dialog { width: min(420px, calc(100vw - 32px)); max-width: none; border: 1px solid #cbd9c4; border-radius: 16px; padding: 18px; background: #fbfcf0; color: #284e40; margin: auto; }
.ranch-remove-dialog::backdrop { background: #173a2c91; }
.ranch-remove-dialog h2 { font-size: 18px; margin-bottom: 8px; }
.ranch-remove-dialog p { font-size: 14px; line-height: 1.65; }
.ranch-dialog-actions button { margin: 0; }
.receipt-notice { margin-top: 8px; }
.receipt-notice button { margin-top: 5px; min-height: 44px; }
.receipt-notice[hidden], .receipt-notice button[hidden] { display: none; }
.rehearsal-subtle { color: #5c755d; font-size: 12px; line-height: 1.6; }
.rehearsal-error { color: #8b4133; font-weight: 600; }
.rehearsal-picker label { display: grid; gap: 6px; margin-bottom: 9px; font-size: 13px; }
.rehearsal-picker select { min-height: 44px; padding: 6px 8px; font: inherit; background: #fffdf4; border: 1px solid #c9d8c7; border-radius: 8px; }
.rehearsal-piece { margin: 8px 0 12px; padding: 9px 0; border-bottom: 1px solid #dce5cf; }
.rehearsal-piece > span { margin-left: 8px; font-size: 12px; color: #5c755d; }
.rehearsal-piece p { font-variant-numeric: tabular-nums; }
.rehearsal-piece .b-row { flex-wrap: wrap; }
.starter-guide { display: grid; gap: 3px; border-top: 1px solid #ccdcc7; margin-top: 6px; padding-top: 7px; }
.starter-guide[hidden] { display: none; }
.starter-guide p { font-size: 12px; line-height: 1.5; color: #315340; margin: 0; }
.starter-guide button { justify-self: start; min-height: 44px; padding: 4px 12px; border-radius: 9px; background: #316148; color: #fffef0; font-weight: 700; font-size: 12px; }
.starter-context { border: 1px solid #d0e1c4; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; background: #eff5e6; }
.starter-context p { font-size: 13px; line-height: 1.55; margin: 4px 0; }
.prep-link { min-height: 44px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; background: #e9f1e1; color: #345e47; }
.starter-context .prep-link { background: #e1ecd8; }
.order-prep-lines { list-style: none; padding: 0; }
.order-prep-lines li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; min-height: 27px; }
[data-order-feed] .prep-link { display: block; margin-top: 4px; }
.market-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 4px; margin-bottom: 10px; border-radius: 13px; background: #e7eedc; }
.engagement-app .market-tabs button { margin: 0; min-height: 44px; padding: 6px 4px; border-radius: 10px; }
.market-tabs .secondary { background: transparent; }
.market-management-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.market-stall-form { display: grid; gap: 10px; }
.market-stall-form label { display: grid; gap: 4px; }
.market-stall-form :is(input,textarea,select) { width: 100%; min-height: 44px; padding: 6px 9px; border: 1px solid #c9d8c7; border-radius: 9px; background: #fffdf4; color: #284e40; font: inherit; }
.farm-verification-dialog { max-height: calc(100dvh - 24px); }
.farm-verification-sprite { position: relative; width: min(14rem, 69vw); overflow: hidden; margin: 6px auto; border-radius: 8px; }
.farm-verification-sprite img { position: absolute; inset: 0 auto auto 0; max-width: none; }
.farm-verification-choices { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; }
.farm-verification-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.farm-verification-dialog button { min-height: 44px; }
.market-card .b-contract-head strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.market-sell label, .market-buy label { display: grid; gap: 4px; min-width: 0; font-size: 13px; color: #3f5946; }
.market-sell :is(input, select), .market-buy input { width: 100%; min-width: 0; min-height: 44px; padding: 6px 8px; border: 1px solid #c9d8c7; border-radius: 8px; background: #fffdf4; color: #284e40; font: inherit; }
.market-inputs, .market-buy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
.market-buy { margin-top: 9px; }
.market-buy [data-market-total] { grid-row: 2; grid-column: 1 / -1; margin: 0; }
.market-buy button { grid-column: 2; grid-row: 1; min-height: 44px; }
.market-sell button { margin-top: 8px; }
.market-card button[data-native-action] { min-height: 44px; }
.market-card time { font-variant-numeric: tabular-nums; }
[data-market-total]:empty { display: none; }
.market-sell [data-market-total], .market-buy [data-market-total] { font-variant-numeric: tabular-nums; color: #37583d; }
.market-pagination { align-items: center; text-align: center; }
.market-pagination span { flex: none; font-size: 12px; }
.transfer-entry { margin: 10px 0; }
.transfer-form label { display: grid; gap: 4px; margin: 9px 0; font-size: 13px; color: #3f5946; }
.transfer-form :is(input,select) { width: 100%; min-height: 44px; min-width: 0; padding: 6px 8px; border: 1px solid #c9d8c7; border-radius: 8px; background: #fffdf4; color: #284e40; font: inherit; }
.transfer-form button { margin-top: 8px; }
.transfer-form p, .gift-card p { color: #506b53; }
.transfer-form [data-transfer-total] { font-weight: 700; font-variant-numeric: tabular-nums; color: #37583d; }
[data-transfer-total]:empty { display: none; }
.gift-card time { font-variant-numeric: tabular-nums; }
.transfer-history { list-style: none; padding: 0; font-size: 13px; }
.transfer-history li { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 9px 0; border-block-end: 1px solid #dce5cf; }
.transfer-history time { grid-column: 1 / -1; color: #506b53; font-size: 12px; }
.neighbor-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.friend-search { margin: 6px 0 12px; color: #3f5946; font-size: 13px; }
.friend-search label { display: block; margin-bottom: 5px; }
.friend-search > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.friend-search input { min-width: 0; min-height: 44px; padding: 6px 9px; border: 1px solid #c9d8c7; border-radius: 9px; background: #fffdf4; color: #284e40; font: inherit; }
.friend-search button { width: auto; min-width: 60px; }
.friend-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
.friend-identity h4 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.friend-identity small { color: #506b53; overflow-wrap: anywhere; }
.friend-card .b-row button { min-height: 44px; padding: 6px 4px; }
.notice-toolbar { position: absolute; z-index: 10; top: max(30px, env(safe-area-inset-top)); right: 32px; display: flex; gap: 8px; align-items: center; }
.engagement-app .notice-toolbar .wallet { position: static; min-width: 0; max-width: none; }
.notice-button { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 48px; min-height: 48px; border: 1px solid #fff9; border-radius: 17px; background: #fffff0ed; box-shadow: 0 5px 20px #2e482a15; font-size: 21px; }
.notice-button[hidden], .notice-button [hidden] { display: none; }
.notice-button [data-notice-count] { position: absolute; top: -4px; right: -3px; display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 4px; border: 1px solid #fff9; border-radius: 12px; background: #315e46; color: #fffef0; font-size: 10px; font-weight: 700; }
.notice-button [data-notice-count][hidden] { display: none; }
.notice-button[aria-expanded="true"] { border-color: #719766; background: #e8f0dd; }
.notice-options { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 13px; color: #3f5946; }
.notice-options .secondary { width: auto; min-height: 44px; margin: 0; }
.notice-list { display: grid; gap: 7px; }
.notice-row button { display: grid; gap: 6px; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d9e2cf; border-radius: 12px; background: #f2f4e9; text-align: left; }
.notice-row[data-notice-read="false"] button { border-color: #a3bb96; background: #eaf2e1; }
.notice-row button:disabled { opacity: .85; }
.notice-heading, .notice-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px 8px; flex-wrap: wrap; font-size: 12px; }
.notice-heading strong { font-size: 14px; }
.notice-unread { border-radius: 12px; padding: 2px 7px; background: #366348; color: #fffef0; }
.notice-text { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.notice-meta { color: #4b6951; font-variant-numeric: tabular-nums; }
[data-notice-destination] { box-shadow: inset 0 0 0 2px #78a16c; }
[data-theft-notice] time { color: #4b6951; font-size: 12px; }
.message-unread { background: #eff5e6; color: #315d44; border-radius: 7px; padding: 2px 4px; font-size: 10px; }
.friend-card [data-open-messages] { gap: 3px; flex-wrap: wrap; align-content: center; line-height: 1.15; }
.message-thread-head { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.message-thread-head strong { overflow-wrap: anywhere; }
.message-thread-head .secondary { width: auto; flex: 0 0 auto; min-height: 44px; margin: 0; }
.message-pages { align-items: center; text-align: center; font-size: 12px; }
.message-pages span { flex: none; font-variant-numeric: tabular-nums; }
.message-log { display: flex; flex-direction: column; gap: 8px; min-height: 72px; max-height: min(29dvh,295px); overflow-y: auto; overscroll-behavior: contain; margin: 9px 0; padding: 6px; border: 1px solid #e0e6d5; border-radius: 12px; background: #f8f8ed; list-style: none; }
.message-bubble { flex: none; align-self: start; max-width: min(88%,29em); border-radius: 12px; background: #eef1e5; padding: 8px 10px; }
.message-bubble[data-message-mine="true"] { align-self: end; background: #e1eedc; }
.message-bubble p { margin: 0; color: #274f3e; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.message-bubble footer { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; color: #4b6951; font-size: 11px; line-height: 1.4; }
.message-restriction { margin: 8px 0; }
.message-composer { display: grid; align-items: end; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.message-composer[hidden] { display: none; }
.message-composer textarea { width: 100%; min-height: 52px; max-height: 120px; padding: 7px 8px; border: 1px solid #c9d8c7; border-radius: 10px; background: #fffdf4; color: #284e40; font: inherit; font-size: 14px; resize: vertical; }
.message-composer button { width: auto; min-width: 56px; min-height: 44px; }
.public-chat-button { grid-template-rows: auto auto; align-content: center; gap: 1px; padding: 3px; line-height: 1; }
.public-chat-button-label { color: #315d44; font-size: 10px; font-weight: 700; white-space: nowrap; }
.public-chat-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 2px 0 8px; }
.public-chat-status, .public-chat-retention { margin: 0; color: #486c51; font-size: 12px; }
.public-chat-status { display: flex; align-items: center; gap: 6px; }
.public-chat-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #729a68; }
.public-chat-mute { margin: 0 0 8px; padding: 8px 10px; border-radius: 9px; background: #f7ebd7; color: #754422; font-size: 13px; line-height: 1.55; }
.public-chat-mute time { font-weight: 700; white-space: nowrap; }
.public-chat-feedback { grid-column: 1/-1; margin: 0; padding: 8px 10px; border-radius: 9px; background: #f7ebd7; color: #754422; font-size: 13px; line-height: 1.55; }
.public-chat-feedback [data-public-chat-retry] { font-weight: 700; }
.public-chat-log { min-height: 100px; max-height: min(32dvh,330px); gap: 0; padding: 3px 11px; }
.public-chat-row { padding: 8px 0; border-bottom: 1px solid #e4e8d9; flex: 0 0 auto; }
.public-chat-row:last-child { border-bottom: 0; }
.public-chat-row > div { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; }
.public-chat-row strong { font-size: 12px; color: #355d46; overflow-wrap: anywhere; }
.public-chat-row time { font-size: 11px; color: #506b53; font-variant-numeric: tabular-nums; }
.public-chat-row p { margin: 4px 0 0; color: #274f3e; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.announcement-eligibility { margin: 0 0 8px; color: #506b53; font-size: 12px; line-height: 1.55; }
.announcement-control { margin-top: 6px; }
.report-control { background: #eeeadd; color: #79503e; }
.moderation-entry { color: #40674e; font-size: 13px; width: fit-content; text-underline-offset: 3px; }
[data-report-preview] { white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-published { display: inline-block; margin-top: 6px; color: #5b755d; font-size: 11px; }
.farm-announcement { position: absolute; z-index: 35; inset-inline: 0; top: max(30px,env(safe-area-inset-top)); width: min(470px,calc(100% - 32px)); margin-inline: auto; padding: 10px 15px; border: 1px solid #d6af6a; border-radius: 13px; background: #fff6dc; color: #503b24; box-shadow: 0 6px 26px #553b1926; pointer-events: none; }
.farm-announcement[hidden] { display: none; }
.farm-announcement strong { display: block; color: #805222; font-size: 12px; overflow-wrap: anywhere; }
.farm-announcement p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; }
.farm-announcement.gm { background: #2d293e; border-color: #dfbb6d; color: #fff5dc; }
.farm-announcement.gm strong { color: #ffe0a0; }
@media (min-width: 651px) and (max-width: 940px) {
  .farm-announcement { top: max(96px,calc(env(safe-area-inset-top) + 64px)); }
}
@media (min-width: 651px) and (max-height: 550px) {
  .notice-toolbar { top: 15px; right: 15px; }
  .dock-outings { width: 48px; height: 54px; font-size: 10px; }
}
@media (min-width: 651px) and (max-width: 800px) and (max-height: 550px) {
  .engagement-app:has(.dock-with-outings) .panel { bottom: 98px; }
}
@media (max-width: 650px) {
  .farm-announcement { top: max(70px,calc(env(safe-area-inset-top) + 55px)); }
  .farm-announcement p { font-size: 14px; }
  .public-chat-panel:has(.public-chat-feedback:not([hidden])) .public-chat-log { max-height: min(22dvh,240px); }
  .notice-toolbar { top: max(17px, env(safe-area-inset-top)); right: 13px; gap: 6px; }
  .notice-button { width: 44px; min-height: 44px; border-radius: 15px; font-size: 20px; }
  .engagement-app .dock { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); width: min(420px,calc(100% - 16px)); max-width: none; gap: 2px; padding: 5px; }
  .engagement-app .dock button { width: 100%; min-width: 0; }
  .engagement-app .dock-with-outings { grid-template-columns: repeat(8,minmax(0,1fr)); width: min(420px,calc(100% - 8px)); }
  .dock-outings { width: 100%; height: 57px; gap: 4px; border-radius: 14px; font-size: 11px; }
  #farm-summary { font-size: 12px; }
  .engagement-app.panel-open .toast { bottom: calc(112px + env(safe-area-inset-bottom) + min(54dvh, 470px)); }
}
@media (max-width: 385px) {
  .engagement-app:has(.dock-with-outings) { --compact-dock-offset: 45px; }
  .engagement-app .dock-with-outings { grid-template-columns: repeat(4,minmax(0,1fr)); width: calc(100% - 16px); }
  .dock-with-outings :is(button, .dock-outings) { height: 50px; }
  .engagement-app:has(.dock-with-outings) .panel { bottom: calc(104px + env(safe-area-inset-bottom) + var(--compact-dock-offset)); }
  .engagement-app:has(.dock-with-outings) .camera-tools { bottom: calc(119px + env(safe-area-inset-bottom) + var(--compact-dock-offset)); }
  .engagement-app:has(.dock-with-outings) .toast { bottom: calc(110px + env(safe-area-inset-bottom) + var(--compact-dock-offset)); }
  .engagement-app.panel-open:has(.dock-with-outings) .toast { bottom: calc(112px + env(safe-area-inset-bottom) + min(54dvh, 470px) + var(--compact-dock-offset)); }
}
.processing-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f8f4e8;
  border-bottom: 1px solid #d8ccb2;
}
#processing-dialog {
  width: min(940px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fbf8ef;
  color: #314736;
  border: 1px solid #d8ccb2;
  border-radius: 20px;
}
#processing-dialog::backdrop { background: #193126b8; }
.processing-header h2 { min-width: 0; font-size: clamp(17px, 4vw, 23px); margin: 0; }
#processing-back { width: auto; min-height: 44px; flex: 0 0 auto; margin: 0; }
.processing-recovery { margin: 10px 14px; padding: 10px 12px; background: #f1e5cc; border-radius: 12px; }
.processing-recovery p { margin: 0 0 8px; }
#processing-stage { min-width: 0; }
@media (max-width: 650px) {
  #processing-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); }
  .processing-header { padding: 8px 10px; }
}

/* Homepage wordmark, 2026-12-05. */
#farm-app > header.brand h1 > .farm-title-art {
  --farm-title-width: 220px;
  display: block;
  width: var(--farm-title-width);
  height: auto;
}
@media (max-width: 650px) {
  #farm-app > header.brand h1 > .farm-title-art { --farm-title-width: clamp(128px, calc(100vw - 226px), 180px); }
}
@media (max-width: 350px) {
  #farm-app > header.brand h1 > .farm-title-art { --farm-title-width: min(142px, calc(100vw - 178px)); }
}

.engagement-app {
  --farm-ivory: #f8f1df;
  --farm-forest: #253d31;
  --farm-moss: #6c8059;
  --farm-brass: #ae7d4b;
  --farm-rule: #a29370;
  --farm-serif: "Noto Serif TC", "PMingLiU", "Songti TC", serif;
}

#farm-app {
  color: var(--farm-forest);
  background:
    radial-gradient(ellipse at 42% 36%, #f3efd4 2%, #e2e4cc 42%, #c5cdb1 76%, #afbda0 110%);
}

#farm-app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(ellipse at 110% 0, transparent 0 24px, #6277591a 25px 26px, transparent 27px 46px) right top / 38% 36% no-repeat,
    repeating-radial-gradient(ellipse at -18% 110%, transparent 0 26px, #63795525 27px 28px, transparent 29px 49px) left bottom / 38% 32% no-repeat;
  mask-image: radial-gradient(ellipse at 50% 47%, transparent 37%, #000 84%);
}

#farm-canvas { position: relative; }
.engagement-app .vignette { box-shadow: inset 0 0 105px #41573c19; }

.engagement-app .brand-mark {
  border: 1px solid #2f4b37;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 24%, #54745a, #294638 74%);
  color: #f5e7b9;
  box-shadow: inset 0 0 0 3px #c9bb7f32, 0 4px 8px #3145332d;
}

.engagement-app .brand-mark .farm-ui-icon { width: 29px; height: 29px; }
.engagement-app .brand h1 {
  color: var(--farm-forest);
  font-family: var(--farm-serif);
  letter-spacing: .11em;
}

.engagement-app .brand .eyebrow { color: #5e6f52; letter-spacing: .18em; }

.farm-title-art {
  display: block;
  width: 220px;
  height: auto;
}

@media (max-width: 650px) {
  .farm-title-art { width: clamp(128px, calc(100vw - 226px), 180px); }
}

@media (max-width: 350px) {
  .farm-title-art { width: min(142px, calc(100vw - 178px)); }
}

.engagement-app .objective,
.engagement-app :is(.notice-button, .wallet, .camera-tools) {
  border: 1px solid #a99c7777;
  background: linear-gradient(146deg, #fbf5e8, #f3ebd7);
  box-shadow: inset 0 1px #fffaf1, 0 2px 4px #454e3724, 0 9px 24px #46583c15;
}

.engagement-app .objective {
  border-radius: 13px;
  backdrop-filter: none;
}

.engagement-app .objective-top,
.engagement-app #farm-summary,
.engagement-app .starter-guide p { color: #465942; }

.engagement-app .starter-guide { border-color: #b9ac8880; }
.engagement-app .starter-guide button {
  border: 1px solid #304b37;
  border-radius: 7px;
  background: linear-gradient(150deg, #537359, #35543e);
  box-shadow: inset 0 1px #bdcd8d55, 0 2px #2b453335;
  font-weight: 720;
}
.engagement-app .starter-guide button:is(:hover, :focus-visible) { background: #294a37; }

.engagement-app .farm-guide-links a { color: #455d49; text-underline-offset: 5px; }
.engagement-app :is(.notice-button, .wallet) { border-radius: 12px; }

.engagement-app .dock {
  border: 1px solid #a38f65;
  border-radius: 16px;
  background: linear-gradient(164deg, #f8f0db, #e8d9b9 78%);
  box-shadow: inset 0 0 0 2px #fff7e380, 0 3px #90714b85, 0 10px 24px #364f3740;
  backdrop-filter: none;
}

.engagement-app .dock :is(button, .dock-outings) { border-radius: 9px; gap: 2px; }
.engagement-app .dock :is(button, .dock-outings):not(.active):is(:hover, :focus-visible) {
  background: #fcf5e3;
  outline-color: #547257;
  color: #294436;
}
.engagement-app .dock button.active {
  background: linear-gradient(155deg, #4c6b50, #2f4c3b);
  box-shadow: inset 0 0 0 1px #314c39, inset 0 2px #d3e2ab35;
  color: #fff6de;
}
.engagement-app .dock button.active:focus-visible { outline-color: #f2deb0; }
.engagement-app .dock button.active::after { background: #e7bd75; bottom: 2px; }
.engagement-app .control-hint { color: #495e49; }

.engagement-app .panel {
  border-color: #ad9e76;
  background: #f9f2e3;
}
.engagement-app .panel h2 {
  font-family: var(--farm-serif);
  color: #294436;
}

.farm-icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.farm-ui-icon {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.engagement-app :is(.dock button, .dock-outings) { color: #334a38; }

.dock-illustration {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  background-image: url("/assets/mitian/farm-dock-art-a87fc84a0f70.webp");
  background-size: 400% 200%;
  background-repeat: no-repeat;
  background-position: var(--dock-art-x, 0%) var(--dock-art-y, 0%);
}

.dock [data-tab="ranch"], .dock [data-tab="market"] { --dock-art-x: 33.3333%; }
.dock [data-tab="workshop"], .dock [data-tab="neighbors"] { --dock-art-x: 66.6667%; }
.dock [data-tab="orders"], .dock .dock-outings { --dock-art-x: 100%; }
.dock :is([data-tab="inventory"], [data-tab="market"], [data-tab="neighbors"], .dock-outings) { --dock-art-y: 100%; }
.engagement-app :is(.dock button, .dock-outings, .camera-tools button, .notice-button, .wallet):focus-visible {
  outline: 2px solid #325e48;
  outline-offset: -3px;
}

.engagement-app .notice-button { color: #315940; }
.engagement-app .notice-button .farm-ui-icon { width: 21px; height: 21px; }
.engagement-app .public-chat-button .farm-ui-icon { width: 18px; height: 18px; }
.engagement-app .wallet .coin-icon {
  background: #ead3a3;
  border-color: #c7a764;
  color: #664816;
}
.engagement-app .wallet .coin-icon .farm-ui-icon { width: 22px; height: 22px; }
.engagement-app .camera-tools .farm-ui-icon { width: 19px; height: 19px; }

.engagement-app .world-pin.building {
  padding: 3px 7px;
  min-height: 19px;
  border-radius: 7px;
  border-color: #ae9c75;
  background: #f8efd9f2;
  box-shadow: 0 1px 5px #30483332;
  color: #354f3f;
  transform: translate(-50%, calc(-100% - 5px));
}
.engagement-app .world-pin.building[hidden],
.engagement-app.panel-open .world-labels { display: none; }

@media (max-width: 650px) {
  #farm-app {
    background: radial-gradient(ellipse at 46% 39%, #f2eed1 0%, #dce0c6 52%, #b9c6a7 103%);
  }
  #farm-app::before {
    background-size: 67% 40%, 65% 45%;
  }
  .engagement-app .brand-mark .farm-ui-icon { width: 22px; height: 22px; }
  .engagement-app .world-labels { display: none; }
  .engagement-app .objective {
    top: max(68px, calc(env(safe-area-inset-top) + 54px));
    left: 12px;
    width: calc(100% - 24px);
    padding: 8px 10px 2px;
    border-radius: 12px;
  }
  .farm-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) fit-content(62%);
    align-items: baseline;
    gap: 7px;
  }
  .objective-top {
    min-width: 0;
    gap: 4px;
    letter-spacing: normal;
  }
  #player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #player-xp { white-space: nowrap; }
  #farm-summary { margin: 0; font-size: 10px; text-align: right; }
  .starter-guide {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    padding-top: 3px;
  }
  .starter-guide p { font-size: 11px; }
  .starter-guide button { min-height: 44px; padding: 3px 8px; font-size: 11px; max-width: 138px; }
  .farm-guide-links a { padding-inline: 7px; font-size: 11px; text-decoration: none; }
  .farm-guide-links a:is(:hover, :focus-visible) { text-decoration: underline; }
  .engagement-app .camera-tools {
    right: 12px;
    bottom: calc(max(26px, env(safe-area-inset-bottom) + 11px) + 78px);
    flex-direction: row;
    gap: 0;
    padding: 1px;
  }
  .engagement-app .camera-tools button { width: 44px; min-width: 44px; height: 44px; }
  .dock-illustration { width: 31px; height: 31px; }
}

@media (max-width: 385px) {
  .engagement-app:has(.dock-with-outings) .camera-tools {
    bottom: calc(max(26px, env(safe-area-inset-bottom) + 11px) + 119px);
  }
  .engagement-app .dock-with-outings::before {
    content: "";
    position: absolute;
    inset: calc(50% - 1px) 12px auto;
    height: 1px;
    pointer-events: none;
    background: #a38f6564;
  }
}

@media (max-width: 900px) and (hover: none) and (pointer: coarse) {
  .engagement-app .world-labels { display: none; }
}

.farm-entry-grid {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px;
  margin-top: 7px;
}

#farm-cover-open {
  position: relative;
  overflow: hidden;
  min-height: 85px;
  padding: 0;
  border: 1px solid #a69269;
  border-radius: 8px;
  background: #dfd7bd;
}

#farm-cover-open img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 47% 52%;
}

#farm-cover-open:focus-visible {
  outline-offset: 2px;
}

.farm-cover-expand {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  padding: 2px;
  border-radius: 5px;
  color: #fbf0dc;
  background: #263f31df;
}

.farm-entry-actions .starter-guide {
  margin: 0;
  padding: 0;
  border: 0;
}

.farm-entry-actions .farm-guide-links {
  gap: 0 8px;
}

.farm-entry-actions .farm-guide-links a {
  padding-inline: 0;
  overflow-wrap: normal;
  white-space: nowrap;
}

#farm-cover-dialog {
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 20px);
  overflow: hidden;
  padding: 0;
  border: 1px solid #ab9466;
  border-radius: 15px;
  background: #f8f1df;
  box-shadow: 0 18px 50px #182b21a0;
}

#farm-cover-dialog::backdrop { background: #24382ace; }

#farm-cover-dialog img {
  display: block;
  width: min(82dvh, calc(100vw - 22px));
  height: auto;
  max-height: calc(100dvh - 22px);
  object-fit: contain;
}

#farm-cover-dialog form {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
}

#farm-cover-dialog button {
  min-width: 52px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid #b09b71;
  border-radius: 9px;
  color: #243e32;
  background: #faf3e1;
  font-weight: 750;
}

@media (min-width: 1100px) and (min-height: 720px) {
  .engagement-app .objective { width: 253px; }
  .farm-entry-grid { grid-template-columns: 1fr; }
  #farm-cover-open { height: min(21vh, 185px); }
  .farm-entry-actions .farm-guide-links { gap: 0 14px; }
}

@media (max-width: 650px) {
  .farm-entry-grid {
    grid-template-columns: clamp(72px, 25vw, 105px) minmax(0, 1fr);
    gap: 8px;
    margin-top: 5px;
  }
  .farm-entry-actions .starter-guide {
    grid-template-columns: 1fr;
    gap: 1px;
  }
  .farm-entry-actions .starter-guide p {
    font-size: 10px;
    line-height: 1.25;
  }
  .farm-entry-actions .starter-guide button { max-width: 100%; }
  .farm-entry-actions .farm-guide-links a { font-size: 11px; }
}

@media (max-width: 385px) and (max-height: 600px) {
  .objective:has(.starter-guide:not([hidden])) .farm-entry-grid {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .objective:has(.starter-guide:not([hidden])) #farm-cover-open {
    min-height: 62px;
  }

  .objective:has(.starter-guide:not([hidden])) .farm-guide-links {
    position: fixed;
    z-index: 5;
    left: 12px;
    bottom: calc(max(26px, env(safe-area-inset-bottom) + 11px) + 119px);
    gap: 6px;
    padding: 0 6px;
    border: 1px solid #a99c7777;
    border-radius: 12px;
    background: #f8f1df;
  }
}

/* Oil-finished timber, linen and glazed pottery sit under the same warm light. */
#processing-dialog {
  --workshop-paper: #f8f1df;
  --workshop-forest: #253d31;
  --workshop-moss: #6c8059;
  --workshop-brass: #ae7d4b;
  --workshop-river: #648991;
  width: min(1050px, calc(100% - 24px));
  border-color: #a49672;
  background: var(--workshop-paper);
  box-shadow: 0 20px 60px #14291e6e, 0 2px 0 #e6d9b9;
}

#processing-dialog .processing-header {
  color: var(--workshop-paper);
  background: linear-gradient(110deg, #334e3e, var(--workshop-forest) 67%);
  border-bottom: 2px solid #b38a5d;
  box-shadow: 0 2px 7px #62452e25;
}

#processing-dialog .processing-header h2 {
  color: inherit;
  font-family: "Noto Serif TC", "Noto Serif CJK TC", "PMingLiU", serif;
  font-weight: 800;
  letter-spacing: .075em;
}

#processing-dialog #processing-back {
  color: #fff4dc;
  background: #344f40;
  border: 1px solid #7b8971;
  border-radius: 7px;
}

#processing-dialog .frg-polished {
  --frg-ink: var(--workshop-forest);
  --frg-green: #355542;
  --frg-muted: #5d6653;
  --frg-line: #bcaa83;
  background: linear-gradient(145deg, #fbf6e8, #f8f1df 70%, #efe3c8);
  margin: 10px;
  padding: 14px;
  border: 1px solid #ded0ab;
  border-radius: 11px;
  box-shadow: none;
}

#processing-dialog .frg-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 0 0 8px;
  margin: 0 0 8px;
  border-bottom: 1px solid #bdab85;
}

#processing-dialog .frg-heading h2 {
  color: var(--frg-ink);
  font-size: clamp(17px, 3vw, 23px);
  margin: 0;
  font-family: "Noto Serif TC", "Noto Serif CJK TC", "PMingLiU", serif;
  font-weight: 800;
  letter-spacing: .065em;
}

#processing-dialog .frg-batch {
  padding: 0;
  margin-inline-start: auto;
  max-width: none;
  align-self: center;
  color: #515a44;
  font-size: 12px;
  white-space: nowrap;
}

#processing-dialog .frg-layout {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 285px);
  gap: 14px;
}

#processing-dialog .frg-stage {
  max-width: none;
  border-radius: 11px;
  border: 1px solid #77533b;
  background: #926140;
  box-shadow: 0 3px 0 #6b4938, 0 7px 15px #674b392b;
}

#processing-dialog .frg-board {
  max-height: none;
}

#processing-dialog .frg-board text,
#processing-dialog .frg-reference-canvas text {
  paint-order: stroke fill;
  stroke: #f6ead0;
  stroke-width: 2.5px;
  stroke-linejoin: round;
  font-weight: 750;
  filter: none;
}

#processing-dialog .frg-board .frg-food-label {
  stroke-width: 4px !important;
}

#processing-dialog .frg-raster-object {
  filter: saturate(.84) drop-shadow(2px 4px 3px #3e302f57);
}

#processing-dialog .frg-art-solid {
  filter: drop-shadow(0 3px 2px #47392430);
}

#processing-dialog .frg-controls {
  display: flex;
  gap: 8px;
}

#processing-dialog .frg-control-group {
  gap: 6px;
}

#processing-dialog .frg-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #eee4cd;
  padding: 5px;
  border: 1px solid #d0bf99;
  border-radius: 7px;
  box-shadow: none;
}

#processing-dialog .frg-button {
  min-height: 44px;
  padding: 5px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 #fff9e7, 0 1px 0 #a7895c26;
  border-color: #c7b28a;
  background: #f5ecd8;
  color: var(--frg-ink);
}

#processing-dialog .frg-button.frg-primary {
  background: linear-gradient(156deg, #456651, #2a4738);
  color: #fff8e1;
  border-color: #274234;
  box-shadow: inset 0 1px 0 #90a6846b, 0 1px 0 #223d30;
}

#processing-dialog .frg-button.is-selected {
  background: #e5e9d6;
  color: #2b4838;
  border-color: #66805d;
  box-shadow: inset 0 0 0 1px #87957355;
}

#processing-dialog .frg-button:hover:not(:disabled) {
  box-shadow: 0 2px 4px #523d2924;
}

#processing-dialog .frg-button:disabled {
  opacity: .64;
}

#processing-dialog .frg-main-tools {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#processing-dialog .frg-selection,
#processing-dialog .frg-feedback {
  color: #465e4b;
}

#processing-dialog .frg-feedback {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

#processing-dialog .frg-check {
  padding: 3px 7px;
  border-radius: 6px;
  line-height: 1.4;
  background: #f1ebdd;
  color: #545745;
}

#processing-dialog .frg-check.is-passed {
  background: #e3ead9;
  color: #315641;
}

#processing-dialog .frg-check.has-advice {
  grid-column: 1 / -1;
}

#processing-dialog .frg-status {
  min-height: 0;
  padding: 6px 8px;
  background: #e6e9d8;
  border-left-color: var(--workshop-moss);
}

#processing-dialog .frg-status.is-waiting {
  color: #694c25;
  background: #f4e8ca;
  border-left-color: #b58946;
}

#processing-dialog .frg-help summary {
  min-height: 44px;
  display: list-item;
  padding: 10px 4px;
}

#processing-dialog .frg-help .frg-hint {
  margin: 0 0 8px;
}

#processing-dialog .frg-reference-toggle {
  min-height: 44px;
  margin: 0;
  padding-inline: 8px;
}

#processing-dialog .frg-surface.frg-with-reference {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(104px, 1fr);
  align-items: start;
  gap: 6px;
  min-width: 0;
}

#processing-dialog .frg-reference-panel {
  min-width: 0;
  padding: 4px;
  background: linear-gradient(145deg, #f8f2df, #e8dbbb);
  border: 1px solid #ba9e70;
  border-radius: 8px;
  box-shadow: 0 2px 4px #5c402326;
  margin: 0;
}

#processing-dialog .frg-reference-panel p {
  margin: 3px;
  color: #435340;
  font-size: 12px;
  line-height: 1.4;
}

#processing-dialog .frg-reference-canvas svg {
  border-radius: 6px;
  background: #eddfbf;
}

@media (min-width: 821px) {
  #processing-dialog .frg-controls {
    padding: 8px 10px 4px;
    border-left: 1px solid #cdbb95;
    background: linear-gradient(90deg, #e7dbc031, transparent 80%);
  }
}

@media (max-width: 820px) {
  #processing-dialog .frg-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 540px;
    margin-inline: auto;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  #processing-dialog {
    width: calc(100% - 8px);
    max-height: calc(100dvh - 8px);
    border-radius: 13px;
  }

  #processing-dialog .processing-header {
    min-height: 52px;
    padding: 3px 8px;
  }

  #processing-dialog .frg-polished {
    margin: 4px;
    padding: 7px;
    border-radius: 9px;
  }

  #processing-dialog .frg-header {
    gap: 2px 6px;
    padding-block-end: 5px;
    margin-block-end: 5px;
  }

  #processing-dialog .frg-heading h2 {
    font-size: 16px;
  }

  #processing-dialog .frg-batch {
    font-size: 11px;
  }

  #processing-dialog .frg-live-tools {
    top: 51px;
    padding: 2px 4px 0;
    gap: 3px;
    margin-bottom: 6px;
    box-shadow: none;
    background: #faf6eb;
    border: 1px solid #ded3b8;
    border-radius: 8px;
  }

  #processing-dialog .frg-live-status {
    min-height: 1.25em;
    font-size: 11px;
    line-height: 1.3;
    padding: 0 2px 2px;
  }

  #processing-dialog .frg-nudge {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #processing-dialog [data-frg-game="V05"] .frg-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #processing-dialog [data-frg-game="V05"] .frg-picker:has(> button:nth-child(5)) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 4px;
  }

  #processing-dialog [data-frg-game="V05"] .frg-picker:has(> button:nth-child(6)) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 3px;
    padding-inline: 2px;
  }

  #processing-dialog [data-frg-game="V05"] .frg-picker:has(> button:nth-child(6)) .frg-button {
    padding-inline: 2px;
    font-size: 12px;
  }
}

/* The public farm login and the four legacy player surfaces use the same paper and ink. */
:where(html[data-farm-runtime="production"] #boot.rehearsal-login, html.farm-player-pages #app > .binding:has(#bindingButton), html.farm-player-pages #app > .shell:has(#view :is(.fd-outings, .dc-heading, .onboarding-card, .fd-my-layout))) {
  --entry-paper: #fcf7e9;
  --entry-paper-deep: #efe3c8;
  --entry-ink: #263e30;
  --entry-moss: #34573c;
  --entry-rule: #cbb994;
  --entry-muted: #53604d;
  --entry-serif: "Noto Serif TC", "PMingLiU", "Songti TC", serif;
  --entry-cover: url("/assets/mitian/qinghe-farm-key-art-63b6995a0fb1.webp");
}

html[data-farm-runtime="production"] #farm-app > #boot.rehearsal-login:not([hidden]) {
  display: flex;
  overflow-y: auto;
  justify-content: flex-start;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 20% 8%, #f5efd9, transparent 61%), linear-gradient(145deg, #dbe3ca, #b6c5a5);
}
html[data-farm-runtime="production"] #farm-app #boot #login-form {
  position: relative;
  flex: none;
  width: min(100%, 420px);
  max-width: none;
  margin: auto 0;
  padding: clamp(16px, 4vw, 28px);
  gap: 9px;
  border: 1px solid var(--entry-rule);
  border-radius: 15px;
  background: var(--entry-paper);
  color: var(--entry-ink);
  box-shadow: inset 0 0 0 3px #fffaf066, 0 16px 42px #314b362e;
}
html[data-farm-runtime="production"] #farm-app #login-form::before {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 13px;
  right: 14px;
  width: clamp(72px, 23vw, 96px);
  height: 69px;
  border: 1px solid #ae986d;
  border-radius: 7px 13px 7px 7px;
  background: #d4c49d var(--entry-cover) 52% 41% / cover;
}
html[data-farm-runtime="production"] #farm-app #login-form :is(#login-edition, #login-title) { margin: 0 calc(clamp(72px, 23vw, 96px) + 10px) 0 0; }
html[data-farm-runtime="production"] #farm-app #login-form #login-edition { color: var(--entry-moss); line-height: 1.25; letter-spacing: .12em; }
html[data-farm-runtime="production"] #farm-app #login-form #login-title { color: var(--entry-ink); font: 700 clamp(21px, 5.6vw, 28px)/1.25 var(--entry-serif); letter-spacing: .025em; }
html[data-farm-runtime="production"] #farm-app #login-form #login-intro { margin-top: 12px; padding-top: 10px; border-top: 1px solid #d7c8a7; color: var(--entry-muted); font-size: 13px; line-height: 1.55; }
html[data-farm-runtime="production"] #farm-app #login-form label { gap: 3px; color: var(--entry-ink); font-weight: 650; }
html[data-farm-runtime="production"] #farm-app #login-form input { min-width: 0; min-height: 44px; border-color: #afab8f; border-radius: 7px; background: #fffdf5; font-size: 16px; font-weight: 400; color: var(--entry-ink); }
html[data-farm-runtime="production"] #farm-app #login-form button[type="submit"] { min-height: 44px; border: 1px solid #365439; border-radius: 7px; background: var(--entry-moss); color: #fff9e7; }
html[data-farm-runtime="production"] #farm-app #login-form #login-legacy-actions:not([hidden]) { align-items: stretch; gap: 5px 12px; }
html[data-farm-runtime="production"] #farm-app #login-form #login-legacy-actions a { min-height: 44px; padding-inline: 6px; color: var(--entry-moss); }
html[data-farm-runtime="production"] #farm-app #login-form #login-legacy-actions a:first-child { border-color: #c0c6a8; background: #edf0de; }
html[data-farm-runtime="production"] #farm-app #login-form #moderation-entry { display: inline-flex; justify-self: start; align-items: center; min-height: 44px; color: var(--entry-muted); }
html[data-farm-runtime="production"] #farm-app #login-form :is(a, input, button):focus-visible { outline: 3px solid #876631; outline-offset: 2px; }

@media (min-width: 740px) and (min-height: 510px) {
  html[data-farm-runtime="production"] #farm-app #boot #login-form { width: min(880px, 92vw); min-height: 483px; padding: 34px 34px 26px calc(min(880px, 92vw) * .43 + 31px); gap: 10px; }
  html[data-farm-runtime="production"] #farm-app #login-form::before { inset: 0 auto 0 0; width: 43%; height: auto; border: 0; border-right: 1px solid var(--entry-rule); border-radius: 14px 0 0 14px; background-position: 49% 51%; }
  html[data-farm-runtime="production"] #farm-app #login-form :is(#login-edition, #login-title) { margin-right: 0; }
  html[data-farm-runtime="production"] #farm-app #login-form #login-intro { margin-top: 0; }
}
@media (min-width: 360px) and (max-width: 739px) and (min-height: 690px) {
  html[data-farm-runtime="production"] #farm-app #boot #login-form { padding-top: 142px; }
  html[data-farm-runtime="production"] #farm-app #login-form::before { inset: 0 0 auto; width: auto; height: 126px; border: 0; border-bottom: 1px solid var(--entry-rule); border-radius: 14px 14px 0 0; background-position: 50% 42%; }
  html[data-farm-runtime="production"] #farm-app #login-form :is(#login-edition,#login-title) { margin-right: 0; }
  html[data-farm-runtime="production"] #farm-app #login-form #login-intro { margin-top: 0; }
}

/* The binding page keeps its existing dish illustration and action order. */
html.farm-player-pages #app > .binding:has(#bindingButton) { margin: 0 auto; padding: 12px max(12px, env(safe-area-inset-left)) max(26px, env(safe-area-inset-bottom)); }
html.farm-player-pages #app > .binding:has(#bindingButton) .binding-hero {
  width: min(100%, 690px); margin: 0 auto; padding: clamp(14px, 3vw, 27px);
  text-align: start; color: var(--entry-ink); border: 1px solid var(--entry-rule); border-radius: 14px;
  background: var(--entry-paper); box-shadow: 0 9px 28px #344b3018;
}
html.farm-player-pages #app .binding:has(#bindingButton) .farm-welcome-preview {
  /* Older renderers set sizing directly on this preview and its food photograph. */
  display: grid !important; grid-template-columns: 55px minmax(0,1fr); align-items: center; gap: 9px !important;
  margin: 0 0 12px; padding: 8px !important; border: 1px solid #d2c4a0; border-radius: 9px; background: #efe8d4; color: var(--entry-ink);
}
html.farm-player-pages #app .binding:has(#bindingButton) .farm-welcome-preview img { width: 55px !important; height: 46px !important; object-fit: contain; }
html.farm-player-pages #app .binding:has(#bindingButton) .farm-welcome-preview h2 { margin: 0; font: 700 16px/1.3 var(--entry-serif); color: var(--entry-ink); }
html.farm-player-pages #app .binding:has(#bindingButton) .farm-welcome-preview p { margin: 3px 0 0; color: var(--entry-muted); font-size: 13px; line-height: 1.45; }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-hero > .eyebrow { color: var(--entry-moss) !important; }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-hero > .brand { color: var(--entry-moss); margin: 1px 0 8px; font: 700 18px/1.4 var(--entry-serif); }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-heading { margin: 0 0 7px; color: var(--entry-ink); font: 700 clamp(22px, 4.5vw, 29px)/1.28 var(--entry-serif); }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-intro { margin: 0 0 9px; color: var(--entry-muted); line-height: 1.55; }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-intro strong { color: var(--entry-moss); }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-entry { margin: 0; padding: 11px; border: 1px solid #cabc99; border-radius: 8px; background: #f4eddb; color: var(--entry-ink); }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-entry b { color: var(--entry-ink) !important; }
html.farm-player-pages #app .binding:has(#bindingButton) #bindingButton { min-height: 44px; color: #fff9e9; background: var(--entry-moss); border: 1px solid #354f38; border-radius: 7px; }
html.farm-player-pages #app .binding:has(#bindingButton) .binding-troubleshoot > summary { min-height: 44px; align-content: center; color: var(--entry-muted); }
html.farm-player-pages #app .binding:has(#bindingButton) :is(.binding-remember,.binding-privacy,.binding-referral > summary) { color: var(--entry-muted); }

html.farm-player-pages #app > .shell > .topbar:has(> .farm-home-return) { flex-wrap: wrap; gap: 6px 10px; }
html.farm-player-pages #app > .shell > .topbar > .farm-home-return,
html.farm-player-pages #app > .binding .binding-hero > .farm-home-return {
  display: inline-flex; flex: none; align-items: center; justify-content: center; min-height: 44px;
  width: fit-content; max-width: 100%; padding: 5px 11px; border: 1px solid #b2b89b; border-radius: 7px;
  background: #eff1df; color: #2a4e35; font-size: 13px; font-weight: 700; line-height: 1.25; text-decoration: none;
}
html.farm-player-pages #app > .binding .binding-hero > .farm-home-return { margin-top: 10px; }
html.farm-player-pages #app :is(.topbar,.binding-hero) > .farm-home-return:is(:hover,:focus-visible) { background: #e1e8d1; text-decoration: underline; text-underline-offset: 3px; }
html.farm-player-pages #app :is(.topbar,.binding-hero) > .farm-home-return:focus-visible { outline: 3px solid #876631; outline-offset: 2px; }

/* Apply the legacy treatments only when these player views have been rendered. */
html.farm-player-pages #app > .shell:has(#view :is(.fd-outings,.dc-heading,.onboarding-card)) > .topbar { border-bottom: 1px solid #c7b99780; }
html.farm-player-pages #app > .shell:has(#view :is(.fd-outings,.dc-heading,.onboarding-card)) #view { color: var(--entry-ink); }
html.farm-player-pages #app #view .fd-outings .fd-page-heading,
html.farm-player-pages #app #view .fc-page:has(.dc-heading) > .fc-section-title,
html.farm-player-pages #app #view .onboarding-card {
  border: 1px solid var(--entry-rule); border-radius: 11px; background: var(--entry-paper); color: var(--entry-ink);
}
html.farm-player-pages #app #view .fd-outings .fd-page-heading { position: relative; padding: clamp(14px, 2.5vw, 24px); margin: 0 0 12px; }
html.farm-player-pages #app #view .fd-outings .fd-page-heading h1,
html.farm-player-pages #app #view .fc-page:has(.dc-heading) > .fc-section-title h1,
html.farm-player-pages #app #view .onboarding-card h2 { color: var(--entry-ink); font-family: var(--entry-serif); line-height: 1.25; }
html.farm-player-pages #app #view .fd-outings .fd-page-heading h1 { margin: 4px 0 6px; }
html.farm-player-pages #app #view .fd-outings .fd-page-heading p { margin: 5px 0 0; color: var(--entry-muted); }
html.farm-player-pages #app #view .fd-outings .fd-page-heading .fc-primary,
html.farm-player-pages #app #view .onboarding-card .ob-actions button:not(:disabled),
html.farm-player-pages #app #view .dc-section .dc-card .fc-primary:not(:disabled) { min-height: 44px; background: var(--entry-moss); border-color: #354f38; border-radius: 7px; color: #fff9e7; }
html.farm-player-pages #app #view .fd-outings .fd-entrance-grid { gap: 10px; }
html.farm-player-pages #app #view .fd-outings .fd-entrance-card { border-color: var(--entry-rule); border-radius: 11px; }
html.farm-player-pages #app #view .fc-page:has(.dc-heading) > .fc-section-title { gap: 10px; padding: 12px; }
html.farm-player-pages #app #view .dc-section .dc-heading h2 { outline: 0; border: 0; color: var(--entry-ink); font-family: var(--entry-serif); }
html.farm-player-pages #app #view .dc-section .dc-heading h2:focus-visible { outline: 2px solid #876631; outline-offset: 2px; }
html.farm-player-pages #app #view .dc-section .dc-card { border-color: var(--entry-rule); border-radius: 11px; background-color: var(--entry-paper); color: var(--entry-ink); }
html.farm-player-pages #app #view .onboarding-card { box-shadow: 0 4px 15px #3a513017; }
html.farm-player-pages #app #view .onboarding-card :is(.ob-kicker,.ob-reward) { color: var(--entry-moss); }
html.farm-player-pages #app #view :is(.fd-outings,.dc-section,.onboarding-card) :is(a,button,summary):focus-visible,
html.farm-player-pages #app .binding:has(#bindingButton) :is(a,button,summary,input):focus-visible { outline: 3px solid #876631; outline-offset: 2px; }

html.farm-player-pages #app #view .fc-page:has(> .fd-my-layout) > .fd-page-heading { padding: 14px; border: 1px solid var(--entry-rule); border-radius: 11px; background: var(--entry-paper); }
html.farm-player-pages #app #view .fc-page:has(> .fd-my-layout) > .fd-page-heading h1 { margin: 3px 0; color: var(--entry-ink); font-family: var(--entry-serif); }
html.farm-player-pages #app #view .fd-my-layout :is(.fd-character-corner,.fn-section,.fd-tool) { border-color: var(--entry-rule); border-radius: 10px; }
html.farm-player-pages dialog.pl-dialog:has(form:is([data-pl-form="login"],[data-pl-form="recover"],[data-pl-form="password"],[data-pl-form="switch"])) {
  width: min(430px,calc(100% - 20px)); max-height: calc(100dvh - 24px); border: 1px solid #bbae88; border-radius: 12px;
  background: #fcf7e9; color: #263e30; box-shadow: 0 14px 40px #263e3040;
}
html.farm-player-pages dialog.pl-dialog:has(form:is([data-pl-form="login"],[data-pl-form="recover"],[data-pl-form="password"],[data-pl-form="switch"])) .pl-header { padding: 12px 15px; background: #e7ead7; border-bottom: 1px solid #cbb994; }
html.farm-player-pages dialog.pl-dialog:has(form:is([data-pl-form="login"],[data-pl-form="recover"],[data-pl-form="password"],[data-pl-form="switch"])) .pl-body { padding: 12px 15px; }
html.farm-player-pages dialog.pl-dialog form:is([data-pl-form="login"],[data-pl-form="recover"],[data-pl-form="password"],[data-pl-form="switch"]) :is(input,button) { min-height: 44px; border-radius: 7px; }
html.farm-player-pages dialog.pl-dialog form:is([data-pl-form="login"],[data-pl-form="recover"],[data-pl-form="password"]) input { background: #fffef7; color: #263e30; border-color: #afab8f; font-size: 16px; }
html.farm-player-pages dialog.pl-dialog form:is([data-pl-form="login"],[data-pl-form="recover"],[data-pl-form="password"],[data-pl-form="switch"]) .pl-primary { background: #34573c; border-color: #34573c; color: #fff9e7; }

@media (max-width: 650px) {
  html.farm-player-pages #app > .shell > header.topbar.farm-header-ready:has(> .farm-home-return) {
    display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand tools" "return status"; align-items: center;
  }
  html.farm-player-pages #app > .shell > header.topbar:has(> .farm-home-return) > div:first-child { grid-area: brand; min-width: 0; }
  html.farm-player-pages #app > .shell > header.topbar:has(> .farm-home-return) > .farm-header-controls { grid-area: tools; }
  html.farm-player-pages #app > .shell > header.topbar:has(> .farm-home-return) > .live { grid-area: status; justify-self: end; }
  html.farm-player-pages #app > .shell > header.topbar > .farm-home-return { grid-area: return; justify-self: start; }
  html.farm-player-pages #app #view .fd-outings .fd-entrance-card { min-height: 174px; height: auto; }
  html.farm-player-pages #app #view .fd-outings .fd-entrance-copy { width: 65%; min-width: min(154px,72%); padding: 13px; gap: 5px; }
  html.farm-player-pages #app #view .fd-outings .fd-entrance-title { font-size: clamp(18px, 4.3vw, 22px); line-height: 1.25; }
  html.farm-player-pages #app #view .fd-outings .fd-entrance-detail { line-height: 1.45; }
  html.farm-player-pages #app #view .dc-section .dc-heading { gap: 8px; }
  html.farm-player-pages #app #view .dc-section .dc-intro { margin-block: 8px; }
}
