/* LUPO contract panel. All public interface copy is English. */
:root { --contract-height: 132px; }
.contract-dock {
  position: relative; z-index: 110; padding: 11px 28px 15px;
  background: #dce6d5; border-bottom: 1px solid #a7bca2;
  color: var(--ink); font-family: var(--mono);
}
.contract-frame { border: 1.5px solid var(--ink); border-radius: 5px; background: #fafbf1; box-shadow: 3px 3px 0 #b1c5ac; overflow: hidden; }
.contract-titlebar { min-height: 27px; padding: 4px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #e9eddc; border-bottom: 1px solid #b2c0a4; }
.contract-titlebar h2 { margin: 0; font: 600 10px/1.4 var(--mono); display: flex; align-items: center; gap: 7px; }
.contract-titlebar h2 svg { width: 14px; height: 14px; }
.contract-status { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.contract-status > span { width: 6px; height: 6px; border: 1px solid #8b7440; border-radius: 50%; background: #d4b975; }
.contract-status b { font: 600 8px/1.4 var(--mono); color: #665637; letter-spacing: .7px; }
.contract-main { display: grid; grid-template-columns: 155px minmax(0, 1fr) 126px 126px; gap: 12px; padding: 10px 12px 6px; align-items: center; }
.contract-brand { display: flex; align-items: center; gap: 12px; }
.contract-brand strong { font: 900 29px/.95 var(--sans); letter-spacing: -2px; }
.contract-brand > span { max-width: 63px; font: 8px/1.65 var(--mono); letter-spacing: .9px; }
.contract-field { min-width: 0; min-height: 44px; padding: 7px 12px 6px; border: 1px solid #b5c4a9; border-radius: 3px; background: #f0f4e6; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.contract-field-label { font: 7px/1.15 var(--mono); letter-spacing: 1px; color: #506449; }
.contract-placeholder { font: 12px/1.35 var(--mono); color: #596c50; }
.contract-cursor { margin-left: 3px; color: #4b7451; }
.contract-address { display: block; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--ink); font: 600 clamp(10px, .92vw, 14px)/1.4 var(--mono); text-overflow: ellipsis; cursor: copy; }
.contract-address[hidden], .contract-placeholder[hidden] { display: none !important; }
.contract-field:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.contract-action { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; margin: 0; padding: 9px 10px; border: 1.5px solid var(--ink); border-radius: 3px; color: var(--ink); font: 700 11px/1.2 var(--mono); white-space: nowrap; box-shadow: 2px 2px 0 var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; }
.contract-action svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; }
.contract-copy { background: var(--green); }
.contract-buy { background: var(--ink); color: #f1f7e7; }
.contract-copy:disabled { background: #c7e7c8; color: #61785d; border-color: #92ad89; box-shadow: 2px 2px 0 #c1d3b9; cursor: not-allowed; }
.contract-buy[aria-disabled="true"] { background: #e4e9da; color: #7a8970; border-color: #acb9a0; box-shadow: 2px 2px 0 #d0d8c5; cursor: not-allowed; }
.contract-copy:not(:disabled):hover { background: #3ee59e; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.contract-buy[aria-disabled="false"]:hover { background: #295b42; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.contract-action:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.contract-action:not(:disabled):not([aria-disabled="true"]):active { transform: translate(2px,2px); box-shadow: none; }
.contract-footer { display: flex; justify-content: space-between; gap: 12px; padding: 0 13px 7px; min-height: 19px; }
.contract-footer p { margin: 0; font: 8px/1.5 var(--mono); color: #637459; }
.contract-footer a { white-space: nowrap; font: 8px/1.5 var(--mono); text-underline-offset: 3px; }
.contract-footer a:hover { text-decoration: underline; }
.contract-dock[data-state="announced"] .contract-status > span { border-color: #128959; background: #13cd85; }
.contract-dock[data-state="announced"] .contract-status b { color: #236245; }
.contract-dock[data-state="announced"] .contract-field { background: #f2f9e9; border-color: #7aac83; }
.contract-dock[data-state="announced"] .contract-field-label { color: #2c6441; }
.contract-dock[data-state="error"] .contract-status b { color: #844e39; }
.contract-announcer { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes contract-intro { from { box-shadow: 0 0 0 3px #13cd8560, 3px 3px 0 #b1c5ac; } to { box-shadow: 3px 3px 0 #b1c5ac; } }
@media (prefers-reduced-motion: no-preference) { .contract-frame { animation: contract-intro 1.1s ease-out 1; } }
@media (min-width: 761px) {
  .desktop { height: calc(100dvh - var(--task-height) - var(--top-height) - var(--contract-height)); min-height: 0; }
  .welcome-window { top: 10%; max-height: calc(100% - 76px); display: flex; flex-direction: column; }
  .welcome-window .window-bar, .welcome-window .window-menubar, .welcome-window .window-footer { flex-shrink: 0; }
  .welcome-content { overflow-y: auto; min-height: 0; }
  .desktop-note { top: 20px; }
  .desktop-icons { top: 17px; gap: 8px; }
  .desktop-bottom-note { bottom: 16px; }
}
@media (min-width: 761px) and (max-height: 840px) {
  .welcome-window { top: 39px; max-height: calc(100% - 75px); }
  .welcome-content { padding-top: 20px; padding-bottom: 20px; }
  .welcome-text h1 { margin-top: 19px; margin-bottom: 20px; }
  .welcome-text p { margin-bottom: 20px; }
  .tiny-caption { margin-top: 20px; }
  .desktop-icon { min-height: 68px; gap: 3px; }
  .desktop-icon svg { height: 39px; width: 44px; }
  .bin-icon { margin-top: 1px; }
}
@media (min-width: 761px) and (max-width: 1080px) {
  .contract-main { grid-template-columns: 125px minmax(0,1fr) 103px 103px; gap: 9px; }
  .contract-brand { gap: 9px; }
  .contract-brand strong { font-size: 26px; }
  .contract-brand > span { font-size: 7px; }
  .contract-placeholder { font-size: 11px; }
  .contract-dock { padding-left: 20px; padding-right: 20px; }
  .contract-action { font-size: 10px; gap: 6px; }
}
@media (max-width: 760px) {
  :root { --contract-height: 137px; }
  body { padding-bottom: calc(var(--task-height) + var(--contract-height) + env(safe-area-inset-bottom, 0px)); }
  .contract-dock { position: fixed; left: 0; right: 0; bottom: calc(var(--task-height) + env(safe-area-inset-bottom, 0px)); z-index: 510; padding: 6px 9px 8px; border-top: 1px solid #a7bca2; border-bottom: 0; }
  .contract-titlebar { min-height: 23px; padding: 3px 9px; }
  .contract-titlebar h2 { font-size: 9px; }
  .contract-titlebar h2 svg { width: 12px; height: 12px; }
  .contract-status b { font-size: 7px; letter-spacing: .5px; }
  .contract-status > span { width: 5px; height: 5px; }
  .contract-main { grid-template-columns: 1fr 1fr; gap: 6px 8px; padding: 7px 9px 8px; }
  .contract-brand { display: none; }
  .contract-field { grid-column: 1 / -1; min-height: 24px; padding: 0; gap: 0; border: 0; background: transparent; }
  .contract-field-label { display: none; }
  .contract-placeholder { font-size: 11px; line-height: 1.6; }
  .contract-address { font-size: clamp(9px, 2.4vw, 12px); line-height: 24px; }
  .contract-field:focus-within { outline-offset: 1px; }
  .contract-action { min-height: 44px; font-size: 10px; padding: 9px; }
  .contract-footer { display: none; }
  .contract-dock[data-state="announced"] .contract-field { background: transparent; }
  .taskbar { height: calc(var(--task-height) + env(safe-area-inset-bottom, 0px)); padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .start-menu { bottom: calc(var(--task-height) + var(--contract-height) + env(safe-area-inset-bottom, 0px) + 6px); max-height: calc(100dvh - var(--task-height) - var(--contract-height) - env(safe-area-inset-bottom, 0px) - 20px); }
  .toast { bottom: calc(var(--task-height) + var(--contract-height) + env(safe-area-inset-bottom, 0px) + 12px); }
  .app-window, .app-window.maximized { max-height: calc(100dvh - var(--task-height) - var(--contract-height) - env(safe-area-inset-bottom, 0px) - 25px) !important; }
  .app-window.maximized { height: calc(100dvh - var(--task-height) - var(--contract-height) - env(safe-area-inset-bottom, 0px) - 25px) !important; }
  .app-window { overflow-y: auto; }
  .app-window .window-bar, .app-window .window-footer { flex-shrink: 0; }
}
@media (min-width: 761px) and (max-height: 650px) {
  .desktop-icons { gap: 3px; }
  .desktop-icon { min-height: 58px; }
  .desktop-icon svg { width: 34px; height: 30px; }
  .desktop-icon span { font-size: 9px; }
  .sticky-note { top: 8%; }
  .mini-player { top: auto; bottom: 45px; }
}
