/* The game world stays in world units. Its chrome is sized for the screen. */
body:has(.polished) { background: #14201e; color: #e9dec6; }
.tavern-app.polished { max-width: 1600px; min-width: 0; padding: 16px 28px 8px; }
.tavern-app.polished .masthead { margin-bottom: 14px; }
.tavern-app.polished .wordmark { gap: 12px; }
.tavern-app.polished .wordmark h1 { font: 600 25px/1.1 Georgia, serif; letter-spacing: -.7px; color: #f4e7ca; }
.tavern-app.polished .wordmark .eyebrow { font: 600 8px/1.8 var(--sans); letter-spacing: 2.6px; color: #c5a976; }
.tavern-app.polished .wordmark h1 span { display: none; }
.tavern-app.polished .brand-seal { width: 37px; height: 43px; border: 1px solid #b79a5b; border-radius: 5px 5px 15px 15px; background: #284238; color: #e2bc70; box-shadow: inset 0 0 0 3px #14251f; transform: none; }
.tavern-app.polished .header-actions .icon-button { background: transparent; color: #d8d5c4; border: 1px solid #4b5548; border-radius: 6px; padding: 8px 12px; }
.tavern-app.polished .header-actions .icon-button:hover { background: #2a3e35; border-color: #a78d5d; }
.tavern-app.polished .header-actions .save-label { color: #8d9e91; font-size: 8px; letter-spacing: .8px; }
.tavern-app.polished .status-bar { min-height: 66px; padding: 10px 20px; background: #f3ead3; border: 1px solid #c9b387; border-radius: 8px 8px 0 0; color: #33443b; gap: 20px; box-shadow: none; }
.tavern-app.polished .day-tag { min-width: 90px; padding-right: 20px; }
.tavern-app.polished .day-tag strong { font: 600 24px Georgia, serif; }
.tavern-app.polished .day-tag span { color: #8a795c; }
.tavern-app.polished .resource strong { font: 600 22px Georgia, serif; }
.tavern-app.polished .resource small { font-size: 9px; }
.tavern-app.polished .phase-status { padding-left: 18px; }
.tavern-app.polished .phase-status strong { font-size: 12px; }
.tavern-app.polished .countdown { font: 600 27px Georgia, serif; min-width: 58px; font-variant-numeric: tabular-nums; }
.tavern-app.polished .status-bar button { border-radius: 5px; padding: 10px 13px; }
.tavern-app.polished .pause-button { background: #365f4b; min-width: 85px; }
.tavern-app.polished .ingredient-hud { gap: 12px; }
.tavern-app.polished .ingredient-hud strong { font: 600 16px var(--sans); }
.inn-overview { min-height: 40px; display: flex; align-items: center; gap: 24px; padding: 5px 18px; background: #24392e; border-inline: 1px solid #52604a; color: #d0cfb5; font-size: 11px; }
.inn-chapter { font-family: Georgia, serif; font-style: italic; font-size: 13px; }
.inn-chapter i { color: #e1b765; font-style: normal; margin-right: 7px; }
.room-counts { color: #aab8a2; white-space: nowrap; }
.room-counts i { margin: 0 8px; color: #6e7e67; }
.tavern-app.polished .next-milestone { margin-left: auto; border: 0; padding: 5px 0 5px 10px; border-radius: 0; color: #ddc58f; background: transparent; font-size: 11px; }
.next-milestone b { margin-left: 12px; color: #f1ddb5; }
.tavern-app.polished .next-milestone:hover { color: #fff0bd; }
.tavern-app.polished .next-milestone.complete { color: #b4ddaa; }
.tavern-app.polished .workplace { border: 1px solid #52604a; border-top: 0; background: #17271f; box-shadow: 0 16px 50px #0004; border-radius: 0 0 8px 8px; }
.tavern-app.polished .room-shell { width: min(100%, calc((100dvh - 310px) * 1.5652174)); margin: auto; border-inline: 1px solid #6e5537; }
.tavern-app.polished .scene-viewport { background: #443728; }
.tavern-app.polished .scene .room-art { filter: brightness(.97) saturate(.9); }
.tavern-app.polished .scene.is-closed .room-art { filter: brightness(.53) saturate(.7); }
.tavern-app.polished .scene.is-last-round .room-art { filter: brightness(.79) saturate(.85); }
.tavern-app.polished .scene.is-preparing .room-art { filter: brightness(.94) saturate(.85); }
.room-decor { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.room-decor > svg { width: 100%; height: 100%; }
.tavern-app.polished .scene-caption { display: none; }
.tavern-app.polished .scene .station-sign,
.tavern-app.polished .scene .room-pantry > b,
.tavern-app.polished .scene .room-workbench > b { font: 500 14px/1.2 var(--sans); color: #f3d8a7; background: #26342ce6; border: 1px solid #b69b6155; padding: 5px 9px; border-radius: 5px; box-shadow: 0 2px 5px #0003; }
.tavern-app.polished .scene .station-sign { bottom: -7px; }
.tavern-app.polished .scene .station-state { opacity: 0; pointer-events: none; bottom: -34px; border-radius: 5px; transition: opacity .15s; font: 12px var(--sans); }
.tavern-app.polished .scene .station:is(:hover,:focus-visible) .station-state { opacity: 1; }
.tavern-app.polished .scene .station.locked { opacity: .4; }
.tavern-app.polished .scene .station.locked:hover { opacity: .8; }
.tavern-app.polished .scene .resident > b,
.tavern-app.polished .scene .resident > small,
.tavern-app.polished .scene .dragon > span,
.tavern-app.polished .scene .room-mailbox > b,
.tavern-app.polished .scene .room-mailbox > small,
.tavern-app.polished .scene .slime-closet > b,
.tavern-app.polished .scene .slime-closet > small,
.tavern-app.polished .scene .room-workbench > small,
.tavern-app.polished .scene .welcome-lectern > b,
.tavern-app.polished .scene .welcome-lectern > small { display: none; }
.tavern-app.polished .scene :is(.resident,.dragon,.room-mailbox,.slime-closet):is(:hover,:focus-visible) > b,
.tavern-app.polished .scene .dragon:is(:hover,:focus-visible) > span { display: block; position: absolute; white-space: nowrap; bottom: -24px; left: 50%; transform: translateX(-50%); background: #25382f; color: #f2deaf; font: 13px var(--sans); padding: 5px 9px; border: 1px solid #a28a5c; border-radius: 4px; z-index: 10; }
.tavern-app.polished .scene .table:not(.dirty):not(:hover):not(:focus-visible) .table-label { opacity: 0; }
.tavern-app.polished .scene .table .table-label { border-radius: 4px; background: #273c30dd; border: 1px solid #ac956356; font: 13px var(--sans); padding: 4px 8px; bottom: -8px; }
.tavern-app.polished .scene .table { width: 176px; height: 120px; }
.tavern-app.polished .scene .table-slot { border: 2px dashed #eed4a77a; background: #21382f55; border-radius: 8px; color: #f5e6c4; }
.tavern-app.polished .scene .table-slot:hover { border-color: #ffe0a2; background: #43624caa; }
.tavern-app.polished .scene .table-slot span { font: 14px var(--sans); }
.tavern-app.polished .scene .table-slot small { font: 11px var(--sans); color: #d7cdb3; }
.tavern-app.polished .scene .table-slot b { color: #ebc77f; }
.tavern-app.polished .scene .table-slot:disabled { opacity: .25; }
.tavern-app.polished .scene .agent.pixie { width: 78px; height: 80px; }
.tavern-app.polished .scene .agent.selected .character-body { filter: drop-shadow(0 3px 2px #151d2144); }
.tavern-app.polished .scene .agent.selected:after { content: ''; position: absolute; width: 36px; height: 9px; bottom: -6px; left: 50%; transform: translateX(-50%); border: 2px solid #d3d59c; border-radius: 50%; opacity: .7; pointer-events: none; }
.tavern-app.polished .scene .agent-name { font: 12px var(--sans); border-radius: 4px; box-shadow: none; background: #20342bdb; padding: 3px 6px; bottom: -25px; }
.tavern-app.polished .scene .agent:not(:hover):not(:focus-visible) .agent-name { opacity: 0; }
.tavern-app.polished .scene .stored-stock span { font: 14px var(--sans); padding: 5px 10px; border: 1px solid #bfa66a70; border-radius: 4px; background: #24382edb; color: #f1dcae; box-shadow: none; }
.tavern-app.polished .scene .stored-stock span b { font: 600 17px var(--sans); margin-left: 6px; }
.tavern-app.polished .scene .station-action { border: 1px solid #d0b478; border-radius: 6px; box-shadow: 0 4px 8px #0004; background: #f2e5c7; padding: 7px 10px; min-width: 145px; max-width: 190px; color: #344337; }
.tavern-app.polished .scene .station-action strong { font: 600 15px var(--sans); }
.tavern-app.polished .scene .station-action span { font: 12px var(--sans); }
.tavern-app.polished .scene .station-action small { display: none; }
.tavern-app.polished .scene .station-action .meter { height: 5px; border: 0; margin-top: 5px; background: #c9ba92; }
.tavern-app.polished .scene .station-action.ready { background: #e3d597; border-color: #ffe8a4; }
.tavern-app.polished .scene .station-action.urgent-stew { background: #b9553d; color: #fff1cd; border: 2px solid #ffd481; box-shadow: 0 0 15px #e67a3044; }
.tavern-app.polished .scene .order-bubble { border-radius: 7px; border: 2px solid #a58a59; background: #f3e5c4; box-shadow: 0 3px 6px #0003; }
.tavern-app.polished .scene .order-bubble .meter { height: 5px; }
.tavern-app.polished .scene .order-bubble.assigned { background: #c6d5ad; }
.tavern-app.polished .scene .construction { border-radius: 6px; background: #253a30ee; border-color: #ddba6d; }
.tavern-app.polished .alert-strip { background: #283c30; color: #d6d6bc; min-height: 32px; border: 0; border-top: 1px solid #66714b66; padding: 6px 18px; font: 11px var(--sans); }
.tavern-app.polished .alert-strip .ink-star { color: #d0ab60; }
.tavern-app.polished .command-tray { min-height: 60px; padding: 9px 14px; background: #e9dfc4; color: #334539; border: 0; gap: 18px; flex-wrap: wrap; }
.room-toolbar { display: flex; align-items: center; gap: 5px; }
.tavern-app.polished .room-toolbar button { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: #f6edda; border: 1px solid #c5b68f; border-radius: 5px; color: #46604c; font-size: 18px; }
.room-toolbar button span { font: 600 11px var(--sans); }
.tavern-app.polished .room-toolbar button:hover, .tavern-app.polished .room-toolbar button.active { background: #365640; color: #fff0c6; border-color: #365640; }
.tavern-app.polished .room-controls-hint { text-align: right; margin-left: auto; padding: 0; border: 0; }
.tavern-app.polished .room-controls-hint b { color: #445d46; font: 600 11px var(--sans); }
.tavern-app.polished .room-controls-hint span { color: #82765a; font: 10px var(--sans); display: block; margin-top: 4px; }
.build-choices { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tavern-app.polished .build-choices button { border-radius: 4px; padding: 7px 10px; font-size: 11px; background: #f8efda; border-color: #c5b58b; }
.tavern-app.polished .build-choices button.active { background: #3e6048; border-color: #3e6048; color: #ffedbb; }
.build-choices small { margin-left: 6px; color: #827152; }
.tavern-app.polished .ledger { top: 94px; right: 24px; width: min(410px, calc(100vw - 32px)); border: 1px solid #b8a272; border-radius: 10px; background: #f6ecd6; color: #334337; box-shadow: 0 18px 70px #08170fb3; max-height: calc(100dvh - 120px); }
.tavern-app.polished .ledger-tabs { background: #2b4435; border-bottom: 1px solid #a59164; }
.tavern-app.polished .ledger-tabs .close-notebook { color: #e7d8b5; font-size: 12px; }
.tavern-app.polished .ledger-content { padding: 25px; }
.tavern-app.polished .ledger :is(h2,h3), .tavern-app.polished .pause-card h2, .tavern-app.polished .results-card h2 { font-family: Georgia, serif; letter-spacing: -.5px; }
.tavern-app.polished .ledger h2 { font-size: 28px; line-height: 1.15; }
.tavern-app.polished .ledger .eyebrow, .tavern-app.polished .pause-card .eyebrow { font: 600 9px var(--sans); letter-spacing: 1.5px; color: #98733e; }
.tavern-app.polished .ledger button { border-radius: 5px; }
.tavern-app.polished .ledger-card { border-radius: 7px; background: #efe2c5; }
.tavern-app.polished .primary { background: #365e47; border: 1px solid #294937; color: #fff0ce; border-radius: 5px; }
.tavern-app.polished .pause-overlay { background: #12231e80; backdrop-filter: blur(3px); }
.tavern-app.polished .pause-card, .tavern-app.polished .results-card { border: 1px solid #b9a16b; border-radius: 10px; background: #f3e7c9; color: #314736; box-shadow: 0 16px 60px #06140e80; transform: none; padding: 30px; }
.tavern-app.polished .pause-card h2 { font-size: 34px; }
.tavern-app.polished .pause-card:before { color: #b78d43; }
.tavern-app.polished .phase-notice { border-radius: 6px; background: #293d30ed; border: 1px solid #b3a067; color: #eed6a6; font: 600 12px var(--sans); padding: 10px 18px; }
.milestone-card { display: flex; gap: 14px; padding: 20px 0; border-top: 1px solid #d9c9a4; }
.milestone-number { color: #ad8b4f; font: 22px Georgia, serif; }
.milestone-card > div { flex: 1; }
.milestone-card h3 { font-size: 18px; }
.milestone-card p { font-size: 12px; margin: 5px 0 12px; }
.milestone-card small { display: block; line-height: 1.6; margin: 8px 0; color: #897754; }
.milestone-card .meter { height: 5px; background: #d9cfb4; border: 0; }
.milestone-card .meter i { background: #75916b; }
.milestone-earned { color: #53794e; font-size: 11px; }
.tavern-app.polished .page-footer { padding: 9px 2px 0; color: #869787; font-size: 8px; }
.tavern-app.polished kbd { background: #28382e; color: #bfc4aa; border-color: #4c5844; }
@media (max-width: 1100px) {
  .tavern-app.polished { padding: 10px 14px; }
  .tavern-app.polished .status-bar { gap: 13px; padding: 10px 12px; }
  .tavern-app.polished .ingredient-hud { gap: 6px; padding-left: 8px; }
  .tavern-app.polished .save-label, .tavern-app.polished .room-counts { display: none; }
  .tavern-app.polished .room-toolbar button { padding: 8px; }
  .tavern-app.polished .room-controls-hint span { max-width: 230px; }
}
@media (max-width: 760px) {
  .tavern-app.polished { padding: 8px; }
  .tavern-app.polished .masthead { flex-wrap: wrap; gap: 12px; }
  .tavern-app.polished .wordmark h1 { font-size: 23px; }
  .tavern-app.polished .header-actions { flex-wrap: wrap; }
  .tavern-app.polished .header-actions .icon-button { padding: 7px 9px; }
  .tavern-app.polished .status-bar { gap: 12px; }
  .tavern-app.polished .ingredient-hud { border-left: 0; }
  .tavern-app.polished .phase-status { border-left: 0; padding-left: 0; margin-left: 0; }
  .tavern-app.polished .room-shell { width: 100%; }
  .inn-overview { flex-wrap: wrap; padding: 9px 12px; gap: 7px; }
  .tavern-app.polished .next-milestone { margin-left: 0; padding-left: 0; text-align: left; }
  .tavern-app.polished .command-tray { gap: 10px; padding: 9px; }
  .room-toolbar { width: 100%; justify-content: space-between; }
  .tavern-app.polished .room-toolbar button { flex-direction: column; gap: 3px; flex: 1; }
  .tavern-app.polished .room-controls-hint { text-align: left; margin-left: 0; }
  .tavern-app.polished .room-controls-hint span { max-width: none; }
  .tavern-app.polished .page-footer span:last-child { display: none; }
  .tavern-app.polished .ledger { right: 12px; top: 72px; max-height: calc(100dvh - 90px); }
}
@media (max-height: 700px) and (min-width: 761px) {
  .tavern-app.polished .room-shell { width: min(100%, 850px); }
}

.tavern-app.polished .scene .room-door { z-index: 2; }
.tavern-app.polished .visitor-link { color: #e4d3a2; background: #3d5943; border: 1px solid #829269; border-radius: 4px; padding: 5px 9px; font-size: 11px; }
.notebook-links { display: flex; gap: 6px; flex-wrap: wrap; margin: 15px 0; }
.notebook-links button { font-size: 11px; padding: 8px; }
.recipe-page { padding: 20px 0; border-top: 1px solid #d4c6a3; }
.recipe-heading { display: flex; gap: 10px; align-items: center; }
.recipe-heading .sprite { width: 38px; height: 38px; }
.recipe-heading small, .visitor-card small { color: #8c794f; font-size: 9px; line-height: 1.6; }
.recipe-page h3 { font-size: 18px; }
.recipe-page p { font-size: 12px; margin: 10px 0 6px; }
.recipe-page > small { display: block; color: #887956; font-size: 11px; margin-bottom: 10px; }
.recipe-arrow { padding: 0 9px; color: #426448; }
.locked-recipe { opacity: .65; }
.recipe-lock { color: #957346; font-style: italic; font-size: 11px; }
.tavern-app.polished .recipe-selected { background: #d9e2c6; color: #466747; border-color: #aaba90; opacity: 1; padding: 7px 11px; font-size: 11px; }
.visitor-card { display: flex; gap: 14px; border-top: 1px solid #d4c6a3; padding: 22px 0; }
.visitor-card > div:last-child { min-width: 0; flex: 1; }
.visitor-portrait { width: 55px; flex-shrink: 0; padding-top: 8px; }
.visitor-portrait .sprite { width: 55px; height: 70px; }
.visitor-card h3 { font-size: 20px; margin: 5px 0; }
.visitor-card b { font-size: 10px; color: #657859; }
.visitor-card p { font: italic 13px/1.6 Georgia, serif; }
.visitor-order { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.visitor-order span { display: flex; align-items: center; gap: 3px; font-size: 11px; color: #826f4e; }
.visitor-order .sprite { width: 24px; height: 24px; }
.visitor-order i { color: #96886d; font-size: 10px; }
.visitor-order .finished { color: #487142; }
@media (max-width: 760px) {
  .room-toolbar { display: grid; grid-template-columns: repeat(3, 1fr); }
  .tavern-app.polished .room-toolbar button { flex-direction: row; justify-content: center; }
  .inn-overview { align-items: flex-start; }
}
