/* Paper desk, original Czech-money drawings and large touch targets. */
dialog[data-layout=investment]{width:min(940px,96vw)}
dialog[data-layout=investment] #dialogTitle{padding:15px 60px 0 26px;margin:0;font:700 clamp(1.7rem,3.3vw,2.55rem)/1.1 Georgia,serif;letter-spacing:-.035em}
.investment-lab{padding:0 26px 20px}
.invest-intro{display:grid;grid-template-columns:1fr 150px;align-items:center;gap:20px;margin:4px 0 12px}
.invest-intro p{line-height:1.5;margin:8px 0}.invest-art{width:100%;height:126px;object-fit:contain}
.invest-board{display:grid;grid-template-columns:1.15fr 1fr;background:#efe0ba;border:1px solid #a38d68;border-radius:5px 9px 4px 7px;box-shadow:2px 3px 0 #7d653124;overflow:hidden}
.invest-purse{padding:15px 18px;background:repeating-linear-gradient(0deg,transparent 0 7px,#8a694007 7px 8px),#f9efd6}
.invest-purse>span{display:block;font:italic 1rem Georgia,serif}.invest-cash{font:700 2.3rem Georgia,serif;color:#263650;font-variant-numeric:tabular-nums}
.invest-money{display:flex;flex-wrap:wrap;align-items:center;gap:7px 14px;margin-top:8px;min-height:53px}
.invest-pile{display:flex;flex-direction:column;align-items:center;gap:3px}.invest-pile img{width:57px;height:40px;object-fit:contain;filter:drop-shadow(1px 2px 1px #77604355)}
.invest-pile span{font:600 .73rem system-ui,sans-serif}.invest-account{display:flex;flex-direction:column;justify-content:center;gap:9px;padding:13px 18px;border-left:1px dashed #a48e65;line-height:1.35}
.invest-account p{margin:0;font-size:.9rem}.invest-reserve{display:grid;gap:5px}.invest-reserve span{font-size:.85rem}
.invest-reserve meter{width:100%;height:17px;accent-color:#467260}
.invest-warning{color:#923e2c}.invest-ok{color:#365c45}
.invest-controls{margin:18px 0}#sheet .invest-controls h3,#sheet .invest-receipt h3{font:700 1.2rem Georgia,serif;margin:0 0 10px}
.invest-plans,.invest-events{display:flex;flex-wrap:wrap;gap:8px}.invest-plans button,.invest-events button{flex:1 1 140px;min-height:52px;font-size:.94rem;background:#faf3e1;border:1px solid #a18c68;border-bottom-width:3px;border-radius:3px 5px 3px 4px}
.invest-plans button[aria-pressed=true],.invest-events button[aria-pressed=true]{background:#d7e1cf;border-color:#426351;box-shadow:inset 0 0 0 1px #426351;color:#213c2c}
.invest-preview,.invest-choice{font-size:.93rem}.invest-controls .primary{min-height:48px}
.invest-receipt{border:1px solid #b4a280;background:#fff9e9;padding:14px 17px;box-shadow:2px 3px 0 #9b875722}
.invest-receipt>div{display:flex;align-items:baseline;justify-content:space-between;gap:15px;border-bottom:1px dotted #c2b391;padding:5px 0;font-size:.9rem;line-height:1.3}
.invest-receipt b{white-space:nowrap;font-variant-numeric:tabular-nums}.invest-receipt>div:last-child{border-top:2px solid #a18c68;border-bottom:0;font-weight:700;margin-top:5px;padding-top:8px}
.invest-status{font-size:.95rem;line-height:1.45}.invest-status:empty{display:none}
.invest-lesson,.invest-compare{background:#e3e7d4;border-left:3px solid #5b7758;padding:12px 15px;line-height:1.5}
.invest-compare{background:#ece2ca;border-color:#967641}.invest-compare p{margin:6px 0;font-size:.9rem}
.invest-small{font:italic .82rem/1.4 Georgia,serif;color:#62563e;margin:9px 0}
.entry-foot{flex-wrap:wrap}
@media(max-width:590px){
 .investment-lab{padding:0 15px 16px}dialog[data-layout=investment] #dialogTitle{padding-left:15px;font-size:1.8rem}
 .invest-intro{grid-template-columns:1fr 76px;gap:8px}.invest-art{height:92px}.invest-intro p{font-size:.95rem}
 .invest-board{grid-template-columns:1fr}.invest-account{border-left:0;border-top:1px dashed #a48e65}.invest-purse{padding:12px 15px}
 .invest-cash{font-size:2rem}.invest-plans button,.invest-events button{flex-basis:130px}.invest-receipt{padding:12px}
 .investment-lab .work-foot{gap:8px;flex-wrap:wrap}
}
@media(prefers-reduced-motion:no-preference){
 .invest-money{animation:money-arrives .22s ease-out}
 @keyframes money-arrives{from{transform:translateY(-5px);opacity:.6}to{transform:translateY(0);opacity:1}}
}
.quiet .invest-money{animation:none}

.invest-receipt summary{font:700 1rem Georgia,serif;cursor:pointer;min-height:30px;display:list-item;align-content:center}
.invest-receipt[open] summary{margin-bottom:9px}
.invest-events button:disabled{opacity:1;cursor:default}

/* Coins live in separate paper pockets. The reserved pile is still cash. */
.money-table-host{position:relative;margin:8px 0 16px;isolation:isolate}
.money-caption{font:italic 1rem/1.4 Georgia,serif;margin:4px 0 10px}
.money-table{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch}
.money-table:has(.money-bills),.money-table:has(.money-tomatoes){grid-template-columns:repeat(4,minmax(0,1fr))}
.money-pocket{min-width:0;position:relative;padding:13px 11px 11px;border:1px solid #9f8960;border-bottom:5px double #9f8960;border-radius:5px 4px 15px 9px;background:linear-gradient(162deg,#fff9e9,#eddbb2);box-shadow:2px 3px 0 #92744320}
.money-pocket.money-reserve{background:linear-gradient(162deg,#f4f4dc,#d4dfc2);border-color:#788864}
.money-pocket.money-invest,.money-pocket.money-tomatoes,.money-pocket.money-herbs{background:linear-gradient(162deg,#f2eadc,#d4dfe0);border-color:#7c9397}
#sheet .money-pocket h3{font:700 1.03rem/1.15 Georgia,serif;margin:0 0 5px;min-height:2.3em}
.money-amount{font:700 clamp(1.4rem,3vw,2rem)/1.2 Georgia,serif;font-variant-numeric:tabular-nums}
.money-scatter{display:flex;align-items:center;align-content:center;flex-wrap:wrap;min-height:74px;gap:0 2px;padding:10px 0;pointer-events:none}
.money-piece{position:relative;display:inline-grid;place-items:center;width:36px;height:39px;margin-right:-4px;transform:rotate(var(--turn));filter:drop-shadow(1px 3px 1px #68543d40)}
.money-piece img{width:100%;height:100%;object-fit:contain}.money-piece small,.money-flying small{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#f5e4bcdf;font:700 10px Georgia;color:#243250;border-radius:4px;padding:0 2px}.money-note{width:55px;height:38px;margin-right:-10px}
.money-empty{color:#756751;font:italic .8rem Georgia,serif}
.money-transfer{width:100%;display:flex;align-items:center;gap:5px;min-height:52px;text-align:left;padding:7px 5px;margin-top:7px;font:650 .78rem/1.25 system-ui,sans-serif;background:#fff9eb;border:1px solid #8d7b5c;border-bottom-width:3px;border-radius:5px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
.money-transfer:active{cursor:grabbing}.money-bundle{display:flex;flex:none;max-width:55px;padding-right:8px;pointer-events:none}.money-bundle img{width:27px;height:30px;object-fit:contain;margin-right:-12px;filter:drop-shadow(1px 1px 1px #72583655)}
.money-outside{border-bottom:1px dashed #aa9471;color:#675b47;font:italic .84rem Georgia,serif;text-align:center;padding:9px 8px;margin:5px auto 0;max-width:230px}.money-loss{color:#963d31;border-color:#b76650;background:#ebcdbf55}
.money-announcement{font:600 .85rem/1.4 system-ui,sans-serif;color:#315f71;min-height:1.4em;margin:7px 0 0}.money-announcement:empty{display:none}
.money-planning{font:italic .8rem Georgia,serif;color:#685c48;margin:7px 0 0}
.money-flight-layer{position:absolute;inset:0;pointer-events:none;z-index:10;overflow:visible}.money-flying{position:absolute;top:-24px;left:-25px;width:50px;height:48px;filter:drop-shadow(2px 4px 2px #51412c60)}.money-flying img{width:100%;height:100%;object-fit:contain}
.money-drag-ghost{position:absolute;left:-36px;top:-55px;width:72px;padding:3px;text-align:center;border:1px solid #8e7653;border-radius:9px;background:#fff3ce;font:700 .85rem Georgia;box-shadow:3px 5px 5px #65523d44}.money-drag-ghost img{display:block;width:55px;height:40px;margin:auto;object-fit:contain}
.money-drop{outline:3px dashed #477c70;outline-offset:2px}.money-over{outline-style:solid;box-shadow:0 0 0 5px #5a938742;background:#e2eed2!important}
@media(max-width:600px){.money-table,.money-table:has(.money-bills),.money-table:has(.money-tomatoes){grid-template-columns:repeat(2,minmax(0,1fr))}.money-table>.money-invest:last-child{grid-column:1/-1}.money-pocket{padding:10px}.money-scatter{min-height:53px}.money-table>.money-invest:last-child h3{min-height:0}.money-table>.money-invest:last-child .money-transfer{width:auto;min-width:170px}.money-table>.money-invest:last-child .money-scatter{min-height:45px}#sheet .money-pocket h3{font-size:1rem}.money-transfer{font-size:.8rem}}

/* One choice at a time, taught on a small paper practice desk. */
.money-table[data-columns="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.money-transfer{font-size:.86rem;padding:9px 8px;min-height:60px}
.money-transfer[aria-pressed=true]{background:#e8d795;border-color:#4f705a;box-shadow:0 0 0 2px #4f705a}
.money-bundle{max-width:70px}.money-bundle img{width:34px;height:38px}
.money-deposit{width:100%;margin-top:9px;background:#315f50;color:#fff8de;border:2px solid #244839;min-height:58px;font-size:1rem;padding:9px 5px}
.money-deposit:hover{background:#3f7462}.money-selection-actions:empty{display:none}
.money-selection-actions{display:flex;justify-content:flex-end}.money-selection-actions button{padding:6px}
.money-coach{display:grid;grid-template-columns:90px 1fr;gap:18px;align-items:center;margin:14px 0 20px}
.money-coach-art{width:85px;height:130px;object-fit:contain;object-position:top}
#sheet .money-coach h3{font:700 clamp(1.4rem,3vw,2rem)/1.1 Georgia,serif;margin:0 0 10px;letter-spacing:-.025em}
.money-coach p{font-size:1.04rem;line-height:1.5;margin:0;max-width:57ch}
.money-coach-result{background:#e0e8d3;border-left:4px solid #4a735c;padding:14px 16px;font-size:1.05rem;line-height:1.5}
.money-lesson-actions{display:flex;gap:18px;align-items:center;margin:16px 0}.money-lesson-actions .primary{min-height:52px}
.money-lesson .money-planning{display:none}.money-lesson>.invest-small{margin-top:18px}
.invest-briefing{padding:10px 0 24px}.invest-briefing .invest-art{height:160px;width:160px;float:right;margin:0 0 12px 20px}
.invest-goal{padding:13px 16px;background:#e7e9d5;border-left:4px solid #667f5c;line-height:1.5;margin:14px 0}
.invest-briefing-actions{clear:both;display:flex;flex-wrap:wrap;gap:16px;align-items:center;padding-top:15px}
.invest-briefing .primary{min-height:52px}
.invest-alternatives{margin:12px 0}.invest-alternatives summary{font-size:.9rem}.invest-alternatives .invest-plans{margin:5px 0 12px}
.invest-help-link{margin-left:auto}.money-context{font:600 1rem/1.5 Georgia,serif;margin:12px 0}
@media(max-width:600px){.money-coach{grid-template-columns:52px 1fr;gap:10px}.money-coach-art{width:50px;height:90px}.money-coach p{font-size:.96rem}.money-transfer{font-size:.8rem;flex-wrap:wrap}.money-bundle{max-width:80px}.money-lesson-actions{flex-wrap:wrap;gap:9px}.invest-briefing .invest-art{width:100px;height:120px;margin-left:10px}.money-lesson .money-pocket{padding:10px}.money-deposit{font-size:.9rem}}
