.desktop-leaf-status { list-style: none; padding: 0; margin: 12px 0; }
.desktop-leaf-status li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.desktop-leaf-status li span { background: #eceee2; border-radius: 8px; padding: 3px 7px; font-size: 11px; }
.desktop-leaf-status li small { min-width: 44px; text-align: right; }

html.desktop-game-view,
html.desktop-game-view body { height: 100dvh; overflow: hidden; }
.desktop-game-view body {
  --desktop-gutter: clamp(22px, 4vw, 68px);
  --desktop-rail: clamp(278px, 25vw, 392px);
  --desktop-gap: clamp(18px, 2.5vw, 38px);
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
}
.desktop-game-view body > header { height: 68px; width: 100%; max-width: none; padding-inline: var(--desktop-gutter); margin: 0; }
.desktop-game-view header .brand b { font-size: clamp(17px, 1.45vw, 24px); }
.desktop-game-view header .header-actions { gap: 8px; }
.desktop-game-view header .header-actions :is(button, select) { min-height: 38px; }
.desktop-game-view body > main {
  width: min(100%, calc((100dvh - 193px) * 1.43 + var(--desktop-rail) + var(--desktop-gap) + 2 * var(--desktop-gutter)));
  min-height: 0;
  max-width: none;
  margin: 0;
  justify-self: center;
  padding: 0 var(--desktop-gutter) 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.desktop-game-view .intro { margin: 0; padding-block: 14px 12px; min-height: 0; }
.desktop-game-view .intro h1 { margin: 0; font-size: clamp(25px, 2.35vw, 37px); line-height: 1.16; }
.desktop-game-view .intro .eyebrow,
.desktop-game-view #fullscreen { display: none; }
.desktop-game-view .home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--desktop-rail);
  gap: var(--desktop-gap);
  align-items: stretch;
  min-height: 0;
}
.desktop-game-view .room-section {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}
.desktop-game-view .intro .room-sync-bar { min-width: 0; min-height: 0; margin: 0; }
.desktop-game-view .room-sync-bar:empty { display: none; }
.desktop-game-view .desktop-room-slot { container-type: size; min-height: 0; min-width: 0; }
.desktop-game-view .desktop-room-fit { width: min(100cqw, calc((100cqh - 45px) * 1.43)); }
.desktop-game-view #room {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1.43;
  border-radius: 18px;
}
.desktop-game-view .room-footer {
  min-height: 45px;
  justify-content: center;
  text-align: center;
  padding: 4px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.35;
}
.desktop-game-view #save-status { display: none; }
.desktop-game-view .home-sidebar {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 3px 2px 2px 0;
  margin-bottom: 42px;
}
.desktop-game-view .home-sidebar #journey-panel { margin: 0; padding: 0; border: 0; }
.desktop-game-view .home-sidebar .journey-heading { display: block; }
.desktop-game-view .journey-heading .eyebrow,
.desktop-game-view .game-premise,
.desktop-game-view #notebook-preview { display: none; }
.desktop-game-view #journey-title { margin: 0 0 7px; font-size: clamp(25px, 2.5vw, 38px); line-height: 1.15; }
.desktop-game-view #journey-copy { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.desktop-game-view #first-trip-hint {
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.desktop-game-view #first-trip-hint p { margin: 0 0 9px; font-size: 14px; line-height: 1.4; }
.desktop-game-view #first-trip-action,
.desktop-game-view #travel-action { width: 100%; min-height: 43px; font-size: 14px; }
.desktop-game-view .home-sidebar .journey-actions { display: block; margin: 0; }
.desktop-game-view .journey-heading:has(#first-trip-hint:not([hidden])) :is(#journey-copy,.journey-actions) { display: none; }
.desktop-game-view :is(.desktop-travel-links,.desktop-reward-links) {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin-top: 9px;
}
.desktop-game-view .desktop-travel-links button { min-height: 41px; font-size: 14px; padding: 5px; }
.desktop-game-view .desktop-reward-links button { min-height: 35px; font-size: 13px; padding: 5px; }
.desktop-game-view .journey-footer { display: grid; gap: 4px; padding: 7px 0 0; font-size: 11px; }
.desktop-game-view .leaf-actions { margin: 0; padding: 0; }
.desktop-game-view #open-practice,
.desktop-game-view #claim-daily:not(.tour-target),
.desktop-game-view #claim-starter:not(.tour-target) { display: none; }
.desktop-game-view .leaf-actions:not(:has(.tour-target)) { display: none; }
.desktop-game-view .home-sidebar #living {
  order: 1;
  margin: auto 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #edeee2;
}
.desktop-game-view #living .eyebrow { font-size: 10px; }
.desktop-game-view #living #daily-title { font-size: clamp(19px, 1.7vw, 26px); margin: 5px 0; line-height: 1.2; }
.desktop-game-view #living .living-copy { margin: 0; font-size: 13px; line-height: 1.45; }
.desktop-game-view #living .diary { display: none; }
.desktop-game-view .opening-actions { margin: 0; }
.desktop-game-view #travel-progress { margin-block: 8px 0; }
@media (max-height: 650px) and (min-width: 1000px) {
  .desktop-game-view body { grid-template-rows: 61px minmax(0, 1fr); }
  .desktop-game-view body > header { height: 61px; }
  .desktop-game-view .intro { padding-block: 9px; }
  .desktop-game-view #journey-title { font-size: 27px; }
  .desktop-game-view .home-sidebar #living { padding: 8px 12px; }
}

.desktop-game-view #prepare-trip[open] {
  position: fixed;
  inset: var(--desktop-planner-top) auto 14px var(--desktop-planner-left);
  width: var(--desktop-planner-width);
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border-radius: 14px;
}
.desktop-game-view #prepare-trip::backdrop { background: transparent; }
.desktop-game-view #prepare-trip .trip-banner { height: clamp(70px, 12dvh, 102px); }
.desktop-game-view #prepare-trip > .close { top: 7px; margin: 7px 7px -44px -44px; }
.desktop-game-view #prepare-trip .dialog-copy { padding: 10px 12px 14px; }
.desktop-game-view #prepare-trip h2 { font-size: 19px; line-height: 1.2; margin: 0 0 7px; }
.desktop-game-view #prepare-trip .trip-step { margin-block: 0 7px; padding-block: 7px; }
.desktop-game-view #prepare-trip .trip-step h3 { font-size: 14px; margin-block: 0 5px; }
.desktop-game-view #prepare-trip :is(#trip-mode-options, .trip-food-cards) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.desktop-game-view #prepare-trip .trip-mode { min-height: 0; padding: 6px; }
.desktop-game-view #prepare-trip .trip-food-cards button { padding: 4px; min-width: 0; }
.desktop-game-view #prepare-trip .trip-food-cards img { height: 31px; }
.desktop-game-view #prepare-trip .trip-step-footer,
.desktop-game-view #prepare-trip .trip-depart {
  position: sticky;
  bottom: -1px;
  z-index: 2;
  background: var(--paper);
  padding-block: 7px 2px;
}
.desktop-game-view #prepare-trip .trip-depart small { display: none; }

.desktop-game-view :is(#trip-notebook, #postcard-dialog, #travel-album)[open] { max-height: calc(100dvh - 36px); }

/* Give the existing furniture editor its own column while the room stays fitted. */
.desktop-game-view body.editing main { padding-inline-end: min(370px, 32vw); }
.desktop-game-view body.editing .home-layout { grid-template-columns: minmax(0, 1fr); }
.desktop-game-view body.editing .home-sidebar { display: none; }

/* The original packing controller already tracks three steps on every device. */
.desktop-game-view #prepare-trip #trip-step-nav {
  display: flex;
  gap: 4px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
}
.desktop-game-view #trip-step-nav button {
  flex: 1;
  min-width: 0;
  min-height: 35px;
  padding: 4px;
  font-size: 11px;
}
.desktop-game-view #trip-step-nav button[aria-current="step"] { background: #e7eddd; border-color: #a7b59d; }
.desktop-game-view #prepare-trip[data-pack-step] [data-pack-panel] { display: none; }
.desktop-game-view #prepare-trip[data-pack-step="0"] [data-pack-panel="0"],
.desktop-game-view #prepare-trip[data-pack-step="1"] [data-pack-panel="1"],
.desktop-game-view #prepare-trip[data-pack-step="2"] [data-pack-panel="2"] { display: block; }
.desktop-game-view #prepare-trip:not([data-pack-step="2"]) :is(.trip-depart, #trip-extras, .trip-rule-details) { display: none; }
.desktop-game-view #prepare-trip .trip-step-footer {
  display: flex;
  gap: 6px;
  margin-block: 5px 0;
}
.desktop-game-view #prepare-trip[data-pack-step="2"] .trip-step-footer { position: static; }
.desktop-game-view #trip-step-next { flex: 1; }
.desktop-game-view #trip-step-next[hidden] { display: none; }
.desktop-game-view #trip-mode-options:has([data-mode="first"]) .trip-mode[disabled] { display: none; }
.desktop-game-view #trip-mode-options:has([data-mode="first"]) { grid-template-columns: 1fr; }
.desktop-game-view #prepare-trip .trip-food-cards {
  display: flex;
  overflow-x: auto;
  padding: 3px 2px 6px;
  scroll-snap-type: x proximity;
}
.desktop-game-view #prepare-trip .packing-food-row {
  flex: 0 0 102px;
  scroll-snap-align: start;
}
.desktop-game-view #prepare-trip .food-picture { height: 37px; margin-bottom: 3px; }
.desktop-game-view #prepare-trip .food-picture img { width: 100%; height: 100%; object-fit: contain; }
.desktop-game-view #prepare-trip .food-choice-copy small { line-height: 1.3; }
.desktop-game-view #prepare-trip .backpack { margin-block: 6px 0; padding: 7px; }
.desktop-game-view #prepare-trip .water-supply { margin-block: 5px; }
.desktop-game-view #prepare-trip[data-pack-step="2"] .trip-banner { height: 62px; }
.desktop-game-view #prepare-trip .food-choice {
  flex: 1;
  min-height: 0;
  font-size: 12px;
}
.desktop-game-view #prepare-trip .food-choice-copy small:not(.food-price) { display: none; }
.desktop-game-view #prepare-trip .food-choice-copy .food-price { margin: 2px 0 0; }
.desktop-game-view #prepare-trip .packing-food-buy { min-height: 28px; padding: 3px 5px; }
.desktop-game-view #prepare-trip #backpack-preview img,
.desktop-game-view #prepare-trip #backpack-preview svg { width: 31px; height: 35px; }
.desktop-game-view #prepare-trip :is(.trip-extras, .trip-rule-details) { padding: 5px 0; margin: 0; }
.desktop-game-view #prepare-trip .trip-step-footer button { min-height: 35px; padding-block: 5px; font-size: 12px; }
.desktop-game-view #prepare-trip .trip-depart > p { margin-block: 0 4px; }
.desktop-game-view #prepare-trip .trip-depart > button { padding-block: 7px; min-height: 38px; }

#wolf-desktop-loading { display: none; }

@media (min-width: 640px) and (min-height: 520px) {
  .desktop-view-pending body > :is(header, main) { visibility: hidden; }
  .desktop-view-pending #wolf-desktop-loading {
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--paper, #f5f2e8);
  }
  .desktop-view-pending #wolf-desktop-loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid #d3dcc9;
    border-top-color: #526b51;
    border-radius: 50%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .desktop-view-pending #wolf-desktop-loading::after { animation: wolf-desktop-loading 800ms linear infinite; }
}
@keyframes wolf-desktop-loading { to { transform: rotate(360deg); } }

.desktop-game-view:lang(zh) #journey-title { font-size: clamp(24px, 2.15vw, 34px); line-height: 1.25; }
.desktop-game-view:lang(zh) :is(#journey-copy, #first-trip-hint p, #living .living-copy) {
  line-height: 1.55;
  text-wrap: pretty;
}
.desktop-game-view:lang(zh) :is(.desktop-travel-links, .desktop-reward-links) button {
  min-height: 40px;
  font-size: 14px;
}
.desktop-game-view:lang(zh) .journey-footer {
  gap: 5px;
  padding-top: 9px;
  font-size: 12px;
  line-height: 1.45;
}
@media (min-height: 720px) {
  .desktop-game-view:lang(zh) #journey-title { margin-bottom: 10px; }
  .desktop-game-view:lang(zh) :is(#journey-copy, #first-trip-hint p) { margin-bottom: 12px; }
  .desktop-game-view:lang(zh) :is(.desktop-travel-links, .desktop-reward-links) { margin-top: 12px; gap: 10px; }
  .desktop-game-view:lang(zh) .home-sidebar #living {
    padding: 15px 16px;
  }
}

.desktop-game-view:is(:lang(zh), :lang(en)) .home-sidebar {
  max-height: var(--desktop-room-height, calc(100% - 45px));
  margin-bottom: 0;
  padding-bottom: 0;
}
.desktop-game-view:is(:lang(zh), :lang(en)) .home-sidebar #living {
  flex-shrink: 0;
}
.desktop-game-view:is(:lang(zh), :lang(en)) .home-sidebar #journey-panel {
  margin-bottom: 8px;
}

@media (min-height: 720px) {
  .desktop-game-view:is(:lang(zh), :lang(en)) .home-sidebar #journey-title {
    margin-bottom: 12px;
  }
  .desktop-game-view:is(:lang(zh), :lang(en)) .home-sidebar :is(#journey-copy, #first-trip-hint p) {
    margin-bottom: 16px;
  }
  .desktop-game-view:is(:lang(zh), :lang(en)) .home-sidebar :is(.desktop-travel-links, .desktop-reward-links) {
    margin-top: 13px;
    gap: 10px;
  }
  .desktop-game-view:is(:lang(zh), :lang(en)) .home-sidebar .journey-footer {
    padding-top: 12px;
  }
}

/* Tablet uses the same fitted room and existing controls as desktop. */
@media (min-width:640px) and (min-height:520px) {
 html.desktop-game-view,.desktop-game-view body{height:var(--home-view-height,100dvh)}
 .desktop-game-view dialog{max-height:min(92dvh,calc(var(--home-view-height,100dvh) - 24px))}
}
@media (min-width:640px) and (max-width:1100px) and (min-height:520px) {
 .desktop-game-view body{--desktop-gutter:18px;--desktop-rail:250px;--desktop-gap:18px;grid-template-rows:60px minmax(0,1fr)}
 .desktop-game-view body>header{height:60px;padding-inline:var(--desktop-gutter)}
 .desktop-game-view body>main{width:100%;height:auto;padding-bottom:14px}
 .desktop-game-view .intro{padding-block:12px 10px}
 .desktop-game-view .intro h1{font-size:27px}
 .desktop-game-view .room-section{max-width:none;width:100%;margin:0}
 .desktop-game-view .desktop-room-slot{display:grid;align-items:center;justify-items:center}
 .desktop-game-view .home-layout>.home-sidebar{height:100%;max-height:100%;margin:0;justify-content:center;gap:12px;padding:2px 0;overflow:auto}
 .desktop-game-view .home-layout>.home-sidebar #living{margin:0;padding:12px;flex-shrink:0}
 .desktop-game-view #journey-title{font-size:25px;margin-bottom:9px}
 .desktop-game-view :is(#journey-copy,#first-trip-hint p){font-size:13px;line-height:1.5;margin-bottom:10px}
 .desktop-game-view :is(.desktop-travel-links,.desktop-reward-links){margin-top:10px;gap:8px}
 .desktop-game-view :is(.desktop-travel-links,.desktop-reward-links) button,
 .desktop-game-view :is(#first-trip-action,#travel-action){min-height:44px;font-size:13px;padding:7px 5px;white-space:normal}
 .desktop-game-view .journey-footer{font-size:11px;line-height:1.4;padding-top:9px;gap:5px}
 .desktop-game-view #living #daily-title{font-size:20px;margin:4px 0}
 .desktop-game-view #living .living-copy{font-size:12px;line-height:1.5}
 .desktop-game-view .room-footer{font-size:15px}
 .desktop-game-view body.editing>main{height:auto;padding-bottom:14px;padding-inline-end:calc(var(--desktop-rail) + var(--desktop-gap) + var(--desktop-gutter))}
 .desktop-game-view body.editing .room-section{max-width:none}
 .desktop-game-view body.editing #editor{top:72px;right:var(--desktop-gutter);bottom:14px;width:var(--desktop-rail);height:auto;max-height:calc(var(--home-view-height,100dvh) - 86px);padding:12px;border-radius:16px}
 .desktop-game-view body.editing .editor-heading{align-items:flex-start;flex-wrap:wrap}
 .desktop-game-view body.editing .editor-heading>button{min-height:40px}
}
@media (min-width:640px) and (max-width:820px) and (min-height:520px) {
 .desktop-game-view body{--desktop-gutter:14px;--desktop-rail:240px;--desktop-gap:14px}
 .desktop-game-view header .header-actions{gap:5px}
 .desktop-game-view header .header-actions :is(button,select){padding-inline:8px}
}
@media (min-width:640px) and (max-width:1100px) and (min-height:520px) and (max-height:680px) {
 .desktop-game-view body{grid-template-rows:54px minmax(0,1fr)}
 .desktop-game-view body>header{height:54px}
 .desktop-game-view .intro{padding-block:8px}
 .desktop-game-view .intro h1{font-size:24px}
 .desktop-game-view .home-layout>.home-sidebar{justify-content:flex-start;gap:8px}
 .desktop-game-view .home-layout>.home-sidebar #living{padding:8px 10px}
 .desktop-game-view :is(#journey-copy,#first-trip-hint p){margin-bottom:7px}
 .desktop-game-view :is(.desktop-travel-links,.desktop-reward-links){margin-top:7px;gap:6px}
 .desktop-game-view #journey-title{font-size:23px;margin-bottom:6px}
}
