/* Luma Slab: quiet crystal surfaces, shared by personal-system windows. */
.character-creator-ear-tint-window { position: fixed; z-index: 1301; width: 220px; max-width: calc(100vw - 16px); padding: 10px; box-sizing: border-box; border: 1px solid #d8b5a0; border-radius: 12px; background: #fff8f1; color: #765043; box-shadow: 0 4px 16px #4b332833; font-size: 10px; }
.character-creator-ear-tint-window[hidden] { display: none; }
#characterCreatorHairTintWindow { width:260px; }
.character-creator-natural-hair-title { margin-top:9px; margin-bottom:5px; }
.character-creator-natural-hair-swatches { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:4px; }
.character-creator-natural-hair-swatches button { min-width:0; min-height:28px; height:28px; padding:0; border:1px solid #b69987; border-radius:6px; cursor:pointer; }
.character-creator-natural-hair-swatches button[aria-pressed="true"] { outline:2px solid #785146; outline-offset:1px; }
.character-creator-natural-hair-swatches button:focus-visible { outline:2px solid #9b6db6; outline-offset:2px; }
.character-creator-brow-toggles { display:flex; gap:4px 16px; flex-wrap:wrap; }
.character-creator-brow-match-note { margin:6px 0; line-height:1.5; }
.npc-dialogue-overlay.skelly-dialogue .npc-dialogue-art { --npc-dialogue-art-x:-30%; }
@media (max-width:700px), (pointer:coarse) and (max-width:900px) {
  .npc-dialogue-overlay.skelly-dialogue .npc-dialogue-art { --npc-dialogue-art-x:0px; }
}
.character-creator-ear-tint-title { font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.character-creator-ear-tint-window label { display: grid; grid-template-columns: 1fr auto; gap: 2px; margin-top: 4px; }
.character-creator-ear-tint-window input { grid-column: 1 / -1; width: 100%; height: 14px; min-height: 0; padding: 0; margin: 0; accent-color: #8c6c54; }
.top-hud-nav,
#settingsButton { display: none !important; }
.zoom-tool-stack #topHudMeButton { margin: 0; flex-shrink: 0; }
.slab-account-section .logout-button { display: inline-flex; margin-top: 8px; }
.luma-window-backdrop:not(:where(.character-creator-window)) { background: transparent !important; }
.luma-slab-frame.luma-slab-positioned {
  position: fixed !important;
  margin: 0 !important;
  transform: none;
  animation: none !important;
}
.luma-slab-drag-handle { cursor: grab; touch-action: none; user-select: none; }
.luma-slab-drag-handle:active { cursor: grabbing; }
.luma-slab-drag-handle button { cursor: pointer; }
.slab-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.luma-slab-home-header { margin: -12px -12px 18px; gap: 6px !important; }
.luma-slab-move-strip {
  flex: 1;
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #877590;
  font-size: 28px;
  letter-spacing: 4px;
  transition: background 120ms ease, color 120ms ease;
}
.luma-slab-move-strip:hover { background: #c7b8e15c; color: #5e4975; }
#lumaSlabClose { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
.luma-slab-travel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.luma-slab-travel-grid button {
  border: 1px solid #d5c5bb;
  border-radius: 14px;
  background: #fffaf0eb;
  color: #5a4652;
  min-height: 88px;
  display: grid;
  place-content: center;
  gap: 7px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.luma-slab-travel-grid button span { font-size: 26px; }
.luma-slab-travel-grid #lumaSlabGoHome { min-height: 64px; }
.luma-slab-travel-grid button:hover { background: #eee5f8; border-color: #ab95c7; }
.world-context-menu.labels-left .world-context-ribbon-label {
  left: auto;
  right: calc(100% + 8px);
}
.luma-window-backdrop:not(:where(.character-creator-window)),
.luma-window-backdrop:not(:where(.character-creator-window)) *,
[role="dialog"],
[role="dialog"] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.luma-slab-home {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px clamp(16px, 5vw, 80px);
  box-sizing: border-box;
}
.luma-slab-frame {
  position: relative;
  border: 3px solid #dab28c !important;
  border-radius: 26px !important;
  background: linear-gradient(145deg, #e7e4f5 0%, #f5edf3 45%, #d6e3ed 100%) !important;
  color: #514254;
  box-shadow: inset 0 0 0 3px #fff8e6, inset 0 0 0 6px #b9b4de,
    0 16px 42px #30293d45, 0 0 0 1px #956e58 !important;
  overflow: hidden;
}
.luma-slab-home-card {
  width: min(390px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
  animation: slab-arrive 180ms ease-out;
}
.luma-slab-home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.luma-slab-eyebrow { font-size: 10px; letter-spacing: .18em; color: #75667f; }
.luma-slab-home h2 { margin: 6px 0 0; font: 32px Georgia, serif; color: #514254; }
.luma-slab-home p { color: #706077; font-size: 13px; line-height: 1.5; }
.luma-slab-landscape {
  height: 155px;
  margin: 20px 0;
  border-radius: 18px;
  border: 1px solid #ffffffc9;
  background: linear-gradient(0deg, #beb4df55, #b8d9ed22), url('assets/login/background/farhills.png') center / cover;
  display: grid;
  place-items: center;
}
.luma-slab-landscape span { color: #fff4d8; font-size: 52px; text-shadow: 0 2px 12px #746492; }
.luma-slab-app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.luma-slab-app-grid button, .luma-slab-back {
  border: 1px solid #d5c5bb;
  border-radius: 14px;
  background: #fffaf0eb;
  color: #5a4652;
  cursor: pointer;
  font: inherit;
}
.luma-slab-app-grid button { min-height: 88px; display: grid; place-content: center; gap: 7px; font-size: 13px; }
.luma-slab-app-grid button span { font-size: 26px; }
.luma-slab-app-grid button .luma-slab-button-icon,
.luma-slab-travel-grid button .luma-slab-button-icon {
  display: block;
  width: 36px;
  height: 36px;
  margin-inline: auto;
  object-fit: contain;
  pointer-events: none;
}
.luma-slab-app-grid button:hover, .luma-slab-back:hover { background: #eee5f8; border-color: #ab95c7; }
.luma-slab-app-grid button:active { transform: scale(.97); }
.luma-slab-home button:focus-visible, .luma-slab-back:focus-visible { outline: 2px solid #7969a8; outline-offset: 3px; }
.luma-slab-back { padding: 8px 12px; flex-shrink: 0; font-size: 12px; }
.luma-slab-app-host .luma-window-header { gap: 12px; flex-wrap: wrap; background: #ffffff30; }
.luma-slab-app-host .luma-window-header > div { flex: 1; }
.luma-slab-app-host .luma-window-title { color: #514254; }
.luma-slab-home-footer { text-align: center; margin-top: 20px; font-size: 10px; letter-spacing: .12em; color: #786a80; }
@keyframes slab-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .luma-slab-home { justify-content: center; padding: 12px; }
  .luma-slab-home-card { max-height: calc(100dvh - 24px); padding: 20px; }
  .luma-slab-landscape { height: 110px; margin: 14px 0; }
  .luma-slab-back { padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .luma-slab-home-card { animation: none; }
  .luma-slab-app-grid button:active { transform: none; }
}

/* Phone-frame pass: local glass blur only, with lightweight static reflections. */
#lumaSlabWindow .luma-slab-home-card {
  width: min(310px, calc(100vw - 32px));
  min-height: min(550px, calc(100dvh - 48px));
  padding: 26px 22px 22px;
  border: 2px solid rgba(211, 221, 255, .88) !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, rgba(104, 45, 178, .55) 0%, rgba(81, 57, 193, .48) 48%, rgba(35, 84, 199, .55) 100%) !important;
  backdrop-filter: blur(7px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(7px) saturate(1.15) !important;
  box-shadow:
    inset 0 0 0 2px rgba(107, 127, 197, .9),
    inset 0 0 0 5px rgba(227, 224, 255, .65),
    inset 0 0 0 7px rgba(155, 189, 250, .42),
    inset 10px 0 13px -12px #fff,
    inset -10px 0 14px -11px #ffd2f3,
    0 0 0 1px rgba(139, 150, 222, .65),
    0 0 0 3px rgba(172, 183, 245, .3),
    -3px 0 12px rgba(133, 197, 255, .22),
    3px 0 12px rgba(245, 151, 213, .22),
    0 14px 32px rgba(37, 36, 65, .3) !important;
}
#lumaSlabWindow .luma-slab-home-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(241, 247, 255, .7);
  border-radius: 16px;
  background: linear-gradient(128deg,
    rgba(255, 255, 255, .19), transparent 17%,
    transparent 47%, rgba(239, 233, 255, .11) 48%, transparent 57%);
  pointer-events: none;
}
.luma-slab-corner {
  position: absolute;
  width: 42px;
  height: 42px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(135deg, #fff9e9 0%, #eecdad 15%, #9c6248 29%,
    #ffe8c2 43%, #d09d73 59%, #815444 76%, #f8dbc2 94%);
  clip-path: polygon(0 0, 100% 0, 83% 14%, 35% 14%, 15% 35%, 15% 83%, 0 100%);
}
.luma-slab-corner.top-left { top: -6px; left: -6px; }
.luma-slab-corner.top-right { top: -6px; right: -6px; transform: rotate(90deg); }
.luma-slab-corner.bottom-right { bottom: -6px; right: -6px; transform: rotate(180deg); }
.luma-slab-corner.bottom-left { bottom: -6px; left: -6px; transform: rotate(270deg); }
#lumaSlabWindow .luma-slab-move-strip { color: #f7f3ff; text-shadow: 0 1px 3px #586486; }
#lumaSlabWindow .luma-slab-move-strip:hover { background: rgba(224, 231, 255, .23); }
#lumaSlabWindow .luma-slab-home-footer { color: #f6f0ff; text-shadow: 0 1px 3px #596483; }


#lumaSlabWindow .luma-slab-home-card { overflow: visible !important; }
.luma-slab-phone-content { max-height: calc(100dvh - 104px); overflow-y: auto; }
#lumaSlabWindow .luma-slab-home-header { margin: 0 0 18px; }

/* Authored crystal frame: 150px source corners remain intact as edges stretch. */
#lumaSlabWindow .luma-slab-home-card {
  border: 0 !important;
  box-shadow: 0 14px 32px rgba(37, 36, 65, .3) !important;
}
#lumaSlabWindow .luma-slab-home-card::before { content: none; }
#lumaSlabWindow .luma-slab-home-card::after {
  content: "";
  position: absolute;
  inset: -16px -8px -16px -16px;
  z-index: 3;
  border: 62px solid transparent;
  border-image-source: url('assets/UI/ui-luna-slab-frame.png');
  border-image-slice: 150;
  border-image-width: 62px;
  border-image-repeat: stretch;
  pointer-events: none;
}
#lumaSlabWindow .luma-slab-corner { display: none; }

.showing-outfit .luma-slab-app-grid,
.showing-outfit .luma-slab-travel-grid { display: none; }
.luma-slab-outfit-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 22px; }
.luma-slab-home .luma-slab-outfit-heading h2 { color: #fff5ff; font-family: inherit; font-size: 22px; margin: 0; }
.luma-slab-outfit-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.luma-slab-outfit-slot {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 1;
  padding: 6px; border: 1px solid #ffffffad; border-radius: 16px;
  background: linear-gradient(135deg, #fff9eddb, #e5dcf4b3); color: #514254;
  text-align: center; font: inherit; cursor: pointer;
}
.luma-slab-outfit-slot:hover { background: #fff5eeeb; }
.luma-slab-outfit-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; font-size: 26px; }
.luma-slab-outfit-icon img { width: 100%; height: 100%; object-fit: contain; }
.luma-slab-outfit-slot strong, .luma-slab-outfit-slot > span > span { display: block; }
.luma-slab-outfit-slot strong { margin-bottom: 2px; font-size: 11px; }
.luma-slab-outfit-slot > span > span { font-size: 9px; line-height: 1.2; }

/* Match the existing Inventory window motion, including saved positions. */
#lumaSlabWindow:not(.hidden):not(.closing) .luma-slab-home-card {
  animation: luma-items-window-enter 220ms cubic-bezier(.22, 1, .36, 1) both !important;
}
#lumaSlabWindow.closing { pointer-events: none; }
#lumaSlabWindow.closing .luma-slab-home-card {
  animation: luma-items-window-exit 180ms ease-in both !important;
}
#lumaSlabWindow .luma-slab-home-card.luma-slab-dragging {
  animation: none !important;
}
#lumaSlabWindow:not(.closing) .luma-slab-home-card.luma-slab-motion-settled {
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  #lumaSlabWindow .luma-slab-home-card { animation: none !important; }
}

/* Shared in-game crystal surfaces; sizes, layout and motion stay with each window. */
:root {
  --slab-glass: linear-gradient(180deg, rgba(104,45,178,.55), rgba(81,57,193,.48) 48%, rgba(35,84,199,.55));
  --slab-button: linear-gradient(135deg, #fff9eddb, #e5dcf4b3);
  --slab-button-hover: #fff5eeeb;
}
:is(.luma-window-backdrop:not(:where(.character-creator-window)) .luma-panel, .shop-window .shop-card, .shop-purchase-card, .item-context-card) {
  background: var(--slab-glass) !important;
  border-color: #d3ddffe0 !important;
  backdrop-filter: blur(7px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(7px) saturate(1.15) !important;
  color: #fff5ff;
}
:is(.luma-window-backdrop:not(:where(.character-creator-window)), .shop-window, .shop-purchase-card, .item-context-card)
:is(.luma-window-title, .luma-window-subtitle, .shop-title, .shop-subtitle) {
  color: #fff5ff !important;
}
:is(.luma-window-backdrop:not(:where(.character-creator-window)), .shop-window, .shop-purchase-card, .item-context-card) button {
  background: var(--slab-button) !important;
  border: 1px solid #ffffffad;
  border-radius: 16px;
  color: #514254 !important;
}
:is(.luma-window-backdrop:not(:where(.character-creator-window)), .shop-window, .shop-purchase-card, .item-context-card)
button:hover:not(:disabled):not(.disabled) {
  background: var(--slab-button-hover) !important;
  border-color: #fff9ee;
}
:is(.luma-window-backdrop:not(:where(.character-creator-window)), .shop-window, .shop-purchase-card, .item-context-card)
button:is(.active, .selected, .equipped, [aria-selected="true"], [aria-pressed="true"]) {
  background: linear-gradient(135deg, #e3d2ffe8, #bcd5ffe8) !important;
  border-color: #fff5ff;
  box-shadow: inset 0 0 0 2px #8566b2;
}
:is(.luma-window-backdrop:not(:where(.character-creator-window)), .shop-window, .shop-purchase-card, .item-context-card)
button:is(:disabled, .disabled) { opacity: .45; }
:is(.luma-window-backdrop:not(:where(.character-creator-window)), .shop-window, .shop-purchase-card, .item-context-card)
button:focus-visible { outline: 2px solid #fff5ff; outline-offset: 3px; }

/* A transparent wrapper must not become a backdrop root through its fade. */
.luma-window-backdrop:not(:where(.character-creator-window)):not(#lumaSlabWindow) { animation: none !important; }
:is(.luma-window-backdrop:not(:where(.character-creator-window)) .luma-panel, .shop-window .shop-card, .shop-purchase-card, .item-context-card) {
  border-color: transparent !important;
  border-image-source: url('assets/UI/ui-luna-slab-frame.png') !important;
  border-image-slice: 150 !important;
  border-image-width: 62px !important;
  border-image-outset: 16px 8px 16px 16px !important;
  border-image-repeat: stretch !important;
  box-shadow: 0 14px 32px rgba(37,36,65,.3) !important;
  backdrop-filter: blur(7px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(7px) saturate(1.15) !important;
}

/* Inventory's wide panel needs less frame overhang on the left. */
#inventoryWindow .items-card {
  position: relative;
  isolation: isolate;
  border-image-outset: 16px 8px 16px 8px !important;
}

/* Repeat the inner crystal edge above the cream content. The panel's own
   border still paints the outer corners beyond its clipping boundary. */
#inventoryWindow .items-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 10;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-image-source: url('assets/UI/ui-luna-slab-frame.png');
  border-image-slice: 150;
  border-image-width: 62px;
  border-image-outset: 16px 8px 16px 8px;
  border-image-repeat: stretch;
  pointer-events: none;
}

/* Social: lavender header above a quiet cream address book. */
#socialWindow .social-card {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #fff7ef, #f4e9de) !important;
  color: #62473d;
}
#socialWindow .social-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 10;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-image-source: url('assets/UI/ui-luna-slab-frame.png');
  border-image-slice: 150;
  border-image-width: 62px;
  border-image-outset: 16px 8px 16px 16px;
  border-image-repeat: stretch;
  pointer-events: none;
}
#socialWindow .social-header {
  flex-wrap: nowrap;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #bca4e7e8, #8c79bce8 60%, #d0b3dce8);
}
#socialWindow .social-title {
  font-family: var(--luma-font-family);
  font-size: 25px;
  font-weight: 700;
}
#socialWindow .social-subtitle { font-size: 11px; }
#socialWindow :is(.luma-slab-back, #socialCloseButton) {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px #60493520;
}
#socialWindow .social-tabs { gap: 6px; padding: 10px 16px; background: #faeee4; }
#socialWindow .social-tab { min-height: 32px; padding: 6px 10px; font-size: 12px; }
#socialWindow .social-tab.active {
  background: linear-gradient(135deg, #d1b5ec, #b08dd3) !important;
  color: white !important;
  box-shadow: inset 0 0 0 1px #fff4e0, 0 0 0 1px #c69c59;
}
#socialWindow .social-tab-panel { padding: 10px 16px 18px; background: transparent; }
#socialWindow .social-list {
  gap: 8px;
  /* Let the companion enter the panel's existing left padding without moving rows. */
  padding-left: 16px;
  margin-left: -16px;
  width: calc(100% + 16px);
  /* Portraits extend 22px above their slot; keep the first hairstyle inside
     the scrolling list's clipping boundary. */
  padding-top: 24px;
  box-sizing: border-box;
}
#socialWindow .social-row {
  min-height: 58px;
  padding: 10px;
  gap: 8px;
  background: #fffaf2;
  border: 1px solid #eddbce;
  border-radius: 12px;
  box-shadow: 0 3px 8px #996d4310;
}
#socialWindow .social-row-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  background: linear-gradient(135deg, #ffe4e5, #efc8d3);
  border: 1px solid white;
  box-shadow: 0 0 0 1px #eeced0;
  color: #986978;
}
#socialWindow .social-row-name { font-family: var(--luma-font-family); font-size: 15px; color: #594234; }
#socialWindow .social-row-avatar.has-portrait {
  position: relative;
  overflow: visible;
  width: 64px;
  height: 48px;
  flex-basis: 64px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#socialWindow .social-portrait {
  position: absolute;
  width: 64px;
  height: 80px;
  left: 0;
  bottom: -10px;
  pointer-events: none;
}
#socialWindow .social-row-meta { font-size: 11px; }
#socialWindow .social-row-actions { gap: 6px; }
#socialWindow .social-action-button { min-height: 30px; padding: 6px 9px; border-radius: 8px; font-size: 11px; }
#socialWindow .social-action-primary { background: linear-gradient(135deg, #efe3fc, #d8c9ee) !important; color: #6e559b !important; }
#socialWindow .social-action-secondary { background: linear-gradient(135deg, #fff2e6, #efd6c5) !important; color: #85523d !important; }

/* Shared compact window navigation, including shops and nested dialogs. */
body :is(.luma-slab-back, .luma-icon-button, .shop-close-button) {
  display: grid;
  place-items: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  flex: 0 0 32px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  font-family: var(--luma-font-family);
  font-size: 18px !important;
  line-height: 1 !important;
  background: var(--slab-button) !important;
  border: 1px solid #ffffffad;
  color: #514254 !important;
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px #60493520 !important;
}
body :is(.luma-slab-back, .luma-icon-button, .shop-close-button):hover {
  background: var(--slab-button-hover) !important;
  border-color: #fff9ee;
}

/* Settings keeps navigation visible while its cream controls scroll. */
#settingsWindow .settings-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: min(580px, calc(100dvh - 96px));
  min-height: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--luma-font-family);
  background: linear-gradient(180deg, #fff7ef, #f4e9de) !important;
}
#settingsWindow .settings-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 10;
  border: 1px solid transparent;
  border-image: url('assets/UI/ui-luna-slab-frame.png') 150 / 62px / 16px 8px 16px 16px stretch;
  pointer-events: none;
}
#settingsWindow .settings-header {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #bca4e7e8, #8c79bce8 60%, #d0b3dce8);
}
#settingsWindow .settings-title { font-family: var(--luma-font-family); font-size: 24px; }
#settingsWindow .settings-subtitle { font-size: 12px; }
#settingsWindow .settings-scroll-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #bd91a7 #f3e3d9;
  padding: 16px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#settingsWindow .settings-scroll-content::-webkit-scrollbar { width: 7px; }
#settingsWindow .settings-scroll-content::-webkit-scrollbar-track { background: #f3e3d9; border-radius: 8px; }
#settingsWindow .settings-scroll-content::-webkit-scrollbar-thumb { background: #bd91a7; border-radius: 8px; }
#settingsWindow .settings-section {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #fffaf5, #fff2e5);
  border: 1px solid #e8cebb;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 white;
}
#settingsWindow .settings-section-heading { font-size: 18px; text-transform: none; letter-spacing: 0; color: #795144; }
#settingsWindow .settings-control-title { font-size: 15px; color: #725044; }
#settingsWindow .settings-control-description { font-weight: 400; color: #a07869; }
#settingsWindow .settings-control-value { padding: 6px 11px; background: #f5dcd0; color: #865644; }
#settingsWindow .settings-slider { appearance: none; height: 8px; border-radius: 8px; background: linear-gradient(90deg, #d798ad, #ead9d0); border: 1px solid #d7b8ad; cursor: pointer; }
#settingsWindow .settings-slider::-webkit-slider-thumb { appearance: none; width: 23px; height: 23px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffdf0, #f6d8a6); border: 1px solid #bd8b50; box-shadow: 0 2px 4px #81533c33, inset 0 0 0 2px #fff5da; }
#settingsWindow .settings-slider::-moz-range-thumb { width: 21px; height: 21px; border-radius: 50%; background: #f6dfb5; border: 1px solid #bd8b50; }
#settingsWindow .settings-slider:focus-visible { outline: 2px solid #9975bc; outline-offset: 5px; }
#settingsWindow .settings-toggle-row { font-weight: 500; color: #825749; }
#settingsWindow .settings-toggle-row input { width: 18px; height: 18px; accent-color: #d787a1; }
#settingsWindow .slab-account-section .logout-button { width: 100%; border-radius: 16px; min-height: 40px; }
#settingsWindow .settings-display-controls { display: grid; gap: 8px; margin-top: 10px; }
#settingsWindow .settings-display-controls .settings-toggle-row { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin: 0; padding: 6px 0; font-size: 12px; line-height: 1.4; cursor: pointer; }
#settingsWindow .settings-display-controls input { flex: 0 0 18px; margin: 0; accent-color: #725044; }
#settingsWindow .settings-diagnostics-footer { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px 18px 16px; border-top: 1px solid #e8cebb; background: #fbf0e5; border-radius: 0 0 22px 22px; }
#settingsWindow .settings-diagnostics-footer .diagnostics-copy { display: block; width: 100%; min-width: 0; min-height: 28px; margin: 0; padding: 5px 8px; border-radius: 9px; font: 500 10px/1.3 var(--luma-font-family); white-space: normal; }

/* Inventory: fixed-size collectible cards and a soft cream toolbar. */
#inventoryWindow .items-card { font-family: var(--luma-font-family); background: #fbf2e9 !important; }
#inventoryWindow .items-header { background: linear-gradient(135deg, #b7a8e8, #c6b9e6 60%, #ead2dd); padding: 20px 22px; }
#inventoryWindow .items-title { font-family: var(--luma-font-family); font-size: 25px; }
#inventoryWindow .items-main-tabs { background: #fbefe3; padding: 12px 22px; gap: 10px; }
#inventoryWindow .items-main-tab { min-height: 40px; padding: 9px 22px; font-size: 14px; }
#inventoryWindow .items-main-tab.active { background: linear-gradient(135deg, #ba9edb, #9175bc) !important; color: white !important; box-shadow: inset 0 0 0 1px #fff4dc, 0 0 0 1px #ba915a; }

#inventoryWindow :is(.items-search-input, .items-filter-select) { border: 1px solid #e6c9b5; border-radius: 16px; box-shadow: 0 3px 7px #8b59351a; }
#inventoryWindow .inventory-grid { grid-template-columns: repeat(auto-fill, 150px); justify-content: start; gap: 14px; background: #fbf2e9; }
#inventoryWindow .inventory-slot { width: 150px; height: 160px; aspect-ratio: auto; box-sizing: border-box; padding: 12px 10px 9px; background: linear-gradient(135deg, #fffdf8, #fff4e9); border: 1px solid #ead3c1; border-radius: 18px; box-shadow: 0 3px 8px #966b4312; }
#inventoryWindow .inventory-item-icon { width: 120px; height: 110px; flex: 0 0 110px; }
#inventoryWindow .inventory-item-image { max-width: 100%; max-height: 100%; object-fit: contain; }
#inventoryWindow .inventory-item-name { display: block; width: 100%; font: 600 12px var(--luma-font-family); text-align: center; color: #765043; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#inventoryWindow .inventory-quantity { top: 8px; right: 8px; padding: 4px 8px; border-radius: 12px; background: #f3dfd5; color: #865544; }
@media (max-width: 420px) { #inventoryWindow .inventory-grid { grid-template-columns: repeat(auto-fill, 130px); padding-inline: 12px; gap: 10px; } #inventoryWindow .inventory-slot { width: 130px; } #inventoryWindow .inventory-item-icon { width: 108px; } }

/* Discrete display transitions retain panels during closing without timers.
   Animate panels, not transparent backdrop opacity, to preserve local blur. */
:is(.luma-window-backdrop:not(#lumaSlabWindow), .shop-window) { transition: display 180ms allow-discrete; }
:is(.luma-window-backdrop:not(#lumaSlabWindow) .luma-panel, .shop-window .shop-card) {
  animation: none !important;
  opacity: 1;
  translate: 0 0;
  transition: opacity 180ms ease, translate 180ms ease;
}
:is(.luma-window-backdrop:not(#lumaSlabWindow), .shop-window):is(.hidden, .closing) :is(.luma-panel, .shop-card) { opacity: 0; translate: 0 12px; }
@starting-style {
  :is(.luma-window-backdrop:not(#lumaSlabWindow), .shop-window):not(.hidden):not(.closing) :is(.luma-panel, .shop-card) { opacity: 0; translate: 0 12px; }
}
:is(.luma-panel, .shop-card).luma-slab-dragging { transition: none !important; translate: 0 0 !important; }
@media (prefers-reduced-motion: reduce) {
  :is(.luma-window-backdrop:not(#lumaSlabWindow), .shop-window, .luma-window-backdrop:not(#lumaSlabWindow) .luma-panel, .shop-window .shop-card) { transition: none !important; translate: none !important; }
}

:is(.shop-purchase-card, .item-context-card) { opacity: 1; translate: 0 0; transition: opacity 180ms ease, translate 180ms ease, display 180ms allow-discrete; }
:is(.shop-purchase-card, .item-context-card):is(.hidden, .closing) { opacity: 0; translate: 0 12px; }
@starting-style { :is(.shop-purchase-card, .item-context-card):not(.hidden):not(.closing) { opacity: 0; translate: 0 12px; } }
@media (prefers-reduced-motion: reduce) { :is(.shop-purchase-card, .item-context-card) { transition: none !important; translate: none !important; } }

/* Inventory spacing correction: one inset scroll area and evenly sized cards. */
#inventoryWindow .items-card { height: min(660px, calc(100dvh - 96px)); }
#inventoryWindow :is(.items-header, .items-main-tabs, .items-toolbar) { flex-shrink: 0; }
#inventoryWindow .items-view { margin: 0 12px 12px; min-height: 0; flex: 1 1 auto; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #c58da5 #f4e6da; }
#inventoryWindow .items-view::-webkit-scrollbar { width: 7px; }
#inventoryWindow .items-view::-webkit-scrollbar-track { background: #f4e6da; border-radius: 8px; }
#inventoryWindow .items-view::-webkit-scrollbar-thumb { background: #c58da5; border-radius: 8px; }
#inventoryWindow :is(.inventory-grid, .wardrobe-grid) { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 14px 6px 20px; align-content: start; }
#inventoryWindow .inventory-slot { width: 100%; height: 150px; }
#inventoryWindow .inventory-item-icon { width: 100%; height: 100px; flex-basis: 100px; }
#inventoryWindow .inventory-slot.has-garden-colour { height:auto;min-height:176px;justify-content:flex-start; }
#inventoryWindow .has-garden-colour .inventory-item-name { white-space:normal;overflow:visible;text-overflow:clip;line-height:1.3;overflow-wrap:anywhere; }
#inventoryWindow .inventory-item-title { display:block; }
#inventoryWindow .inventory-item-colour { display:block;margin-top:3px;font-weight:400; }
#inventoryWindow .inventory-garden-diamond { position:absolute;top:14px;left:14px;pointer-events:none; }
#inventoryWindow .items-toolbar { background: #fbf0e5; padding: 8px 16px; gap: 10px; min-height: 0; }
#inventoryWindow .items-filter-wrap { gap: 8px; }
#inventoryWindow .inventory-sort-controls { display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));align-items:center;gap:5px;padding:4px 10px;background:#fbf0e5;flex-shrink:0;font-size:8px; }
#inventoryWindow .inventory-sort-controls.hidden { display:none; }
#inventoryWindow .inventory-sort-controls label { display:flex;min-width:0;color:#6b5148; }
#inventoryWindow .inventory-sort-controls select { width:100%;min-width:0;height:24px;min-height:24px;padding:2px 4px;font:inherit;font-size:8px;border:1px solid #d2b2a2;border-radius:8px;background:#fffaf4;color:#624d47;cursor:pointer; }
#inventoryWindow .inventory-sort-controls select:hover:not(:disabled) { background:#f0e5f7;border-color:#b99bdb; }
#inventoryWindow .inventory-sort-controls select:focus-visible { outline:2px solid #9475b9;outline-offset:2px; }
#inventoryWindow .inventory-sort-controls select:disabled { opacity:.5;cursor:default; }
#inventoryWindow .inventory-sort-label { white-space:nowrap;color:#6b5148; }
@media (max-width:700px) {
  #inventoryWindow .inventory-sort-controls { grid-template-columns:auto repeat(4,minmax(0,1fr));padding:3px 8px;gap:3px; }
}
@media (max-width:340px) {
  #inventoryWindow .inventory-sort-controls { grid-template-columns:auto repeat(2,minmax(0,1fr)); }
  #inventoryWindow .inventory-sort-label { grid-row:span 2; }
}
#inventoryWindow .items-filter-select { min-height: 32px; height: 32px; padding: 5px 12px; font-size: 12px; border-radius: 12px; }
#inventoryWindow .items-search-input { min-height: 32px; height: 32px; padding-block: 5px; font-size: 12px; border-radius: 12px; }
#inventoryWindow .items-filter-label { font-size: 11px; }
#inventoryWindow .items-filter-menu { width: 230px; max-width: calc(100vw - 64px); max-height: min(380px, calc(100dvh - 300px)); overflow-y: auto; padding: 8px; border: 1px solid #c39c65; border-radius: 18px; background: linear-gradient(135deg, #fffaf1, #f8eadf); box-shadow: inset 0 0 0 2px #fff7e7, 0 8px 20px #79513c30; scrollbar-width: thin; }
#inventoryWindow .items-filter-option { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 4px; padding: 7px 10px; font: 600 12px var(--luma-font-family); border-radius: 12px; background: #f5e8de !important; border: 1px solid transparent; }
#inventoryWindow .items-filter-option.selected { background: linear-gradient(135deg, #eadcf9, #d9c8f4) !important; border-color: #b99bdb; }
#inventoryWindow .items-filter-option.selected::after { content: '✓'; margin-left: auto; color: #765298; }
#inventoryWindow .items-filter-option:hover { background: #efe0f3 !important; }

@media (max-width: 700px), (pointer: coarse) and (max-width: 900px) {
  #inventoryWindow .items-card { width:min(440px,calc(100vw - 32px));max-width:calc(100vw - 32px); }
  #inventoryWindow .items-header { padding:8px 10px;gap:8px; }
  #inventoryWindow .items-title { font-size:20px; }
  #inventoryWindow .items-subtitle { font-size:9px; }
  #inventoryWindow .items-main-tabs { padding:6px 10px;gap:6px; }
  #inventoryWindow .items-main-tab { min-height:40px;padding:6px 10px;font-size:12px; }
  #inventoryWindow .items-toolbar { flex-direction:row;flex-wrap:nowrap;align-items:center;padding:6px 10px;gap:6px; }
  #inventoryWindow .items-filter-wrap { width:100px;flex:0 0 100px; }
  #inventoryWindow .items-filter-label { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
  #inventoryWindow .items-filter-select { height:40px;min-height:40px;padding:5px 8px; }
  #inventoryWindow .items-search-input { height:40px;min-height:40px;font-size:16px;padding-left:30px; }
  #inventoryWindow .items-search-icon { left:10px; }
  #inventoryWindow .items-view { margin:0 8px 8px; }
  #inventoryWindow :is(.inventory-grid,.wardrobe-grid) { grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:6px 2px 10px; }
  #inventoryWindow .inventory-slot { height:118px;min-width:0;padding:6px 3px;border-radius:12px;gap:4px; }
  #inventoryWindow .inventory-slot.has-garden-colour { min-height:118px;height:auto; }
  #inventoryWindow .inventory-item-icon { width:100%;height:48px;flex-basis:48px; }
  #inventoryWindow .inventory-item-name { font-size:10px;line-height:1.2; }
  #inventoryWindow .inventory-item-colour { margin-top:2px; }
  #inventoryWindow .inventory-quantity { top:5px;right:5px;padding:2px 5px;font-size:10px; }
  #inventoryWindow .inventory-garden-diamond { top:8px;left:8px;width:8px;height:8px; }
}
/* Inspect has its own flip; retain transform interpolation alongside pop-up motion. */
body .item-context-card { transition: transform 130ms ease, opacity 130ms ease, translate 180ms ease, display 180ms allow-discrete; }
body .item-context-card.flipping-out { opacity: .55; transform: perspective(900px) rotateY(90deg); }
body .item-context-card.flipping-in { opacity: 1; transform: perspective(900px) rotateY(0deg); }
@media (prefers-reduced-motion: reduce) { body .item-context-card { transition: none !important; } }

#visitHomeWindow .visit-home-card { display: flex; flex-direction: column; height: min(580px, calc(100dvh - 96px)); padding: 0; overflow: hidden; background: #fbf2e9 !important; font-family: var(--luma-font-family); }
#visitHomeWindow .visit-home-header { flex: 0 0 auto; padding: 18px; margin: 0; background: linear-gradient(135deg, #bca4e7, #a58bbc); }
#visitHomeWindow .visit-home-title { font-size: 23px; color: white; font-weight: 700; }
#visitHomeWindow .visit-home-tabs { display: flex; gap: 8px; padding: 10px 16px; background: #faeee4; flex: 0 0 auto; }
#visitHomeWindow .visit-home-tabs button { flex: 1; min-height: 34px; }
#visitHomeWindow .visit-home-tab-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 20px; scrollbar-width: thin; scrollbar-color: #bd91a7 #f3e3d9; }
#visitHomeWindow .visit-home-tab-panel.hidden { display: none; }
#visitHomeWindow .home-privacy-control { padding: 10px; border: 1px solid #e8d2c0; border-radius: 12px; margin-bottom: 12px; background: #fff8ef; }
#visitHomeWindow .home-privacy-description { margin: 0 0 6px; font-size: 11px; }
#visitHomeWindow .home-privacy-options { gap: 6px; }
#visitHomeWindow .home-privacy-button { min-height: 28px; padding: 4px 8px; font-size: 11px; }
#visitHomeWindow .home-discovery-list { padding-top: 24px; }
#visitHomeWindow .home-discovery-entry { background: #fffaf2; border: 1px solid #ead3c1; border-radius: 14px; }
#visitHomeWindow .home-discovery-icon.has-portrait { position: relative; width: 64px; height: 48px; flex: 0 0 64px; background: transparent; border: 0; box-shadow: none; overflow: visible; }
#visitHomeWindow .social-portrait { position: absolute; width: 64px; height: 80px; left: 0; bottom: -10px; pointer-events: none; }
#visitHomeWindow #visitUsernameInput { width: 100%; box-sizing: border-box; margin: 8px 0 12px; }
#visitHomeWindow #visitHomeSubmitButton { width: 100%; }

#lumaSlabWindow { transition: none !important; }
#lumaSlabWindow .luma-slab-home-card { transition: none !important; opacity: 1; translate: none; }
.home-name-label { display:block; font-size:11px; margin-bottom:5px; color:#825749; }
.home-name-form { display:flex; gap:6px; margin-bottom:6px; }
.home-name-form input { min-width:0; width:100%; flex:1; height:32px; box-sizing:border-box; }
.home-name-form button { padding:5px 10px; font-size:12px; }
.home-name-status { font-size:11px; color:#825749; margin-bottom:6px; }

/* Visit Homes polish: cream browsing, lavender tabs and clear privacy cards. */
#visitHomeWindow .visit-home-card { position: relative; isolation: isolate; }
#visitHomeWindow .visit-home-card::after { content: ''; position: absolute; inset: -1px; z-index: 10; border: 1px solid transparent; border-image: url('assets/UI/ui-luna-slab-frame.png') 150 / 62px / 16px 8px 16px 16px stretch; pointer-events: none; }
#visitHomeWindow .visit-home-header { background: linear-gradient(135deg, #aaa4df, #8e79bd 65%, #cba6d2); padding: 22px 18px; }
#visitHomeWindow .visit-home-tabs { gap: 6px; padding: 14px 12px; }
#visitHomeWindow .visit-home-tabs button { font-family: var(--luma-font-family); font-size: 12px; border-radius: 15px; }
#visitHomeWindow .visit-home-tabs button.active { background: linear-gradient(135deg, #b69bdf, #8469b6) !important; color: white !important; box-shadow: inset 0 0 0 1px #fff2d7, 0 0 0 1px #bd975e; }
#visitHomeWindow .home-discovery-entry { padding: 12px 10px; box-shadow: 0 3px 8px #936a4314; }
#visitHomeWindow :is(.home-discovery-visit-button, .visit-home-submit-button, #homeNameSave, #homeTagsSave) { background: linear-gradient(135deg, #f2e7ff, #d7c9f2) !important; border-color: #cbbbeb; color: #70529a !important; }
#visitHomeWindow .home-privacy-control { padding: 14px; background: #fffaf3; border-radius: 16px; }
#visitHomeWindow .home-name-label { font-size: 13px; font-weight: 700; }
#visitHomeWindow .home-name-form input { height: 36px; }
#visitHomeWindow .home-privacy-description { margin-top: 18px; font-size: 13px; font-weight: 600; }
#visitHomeWindow .home-privacy-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; padding: 8px 5px; border-radius: 14px; }
#visitHomeWindow .home-privacy-button::before { content: '🔒'; font-size: 20px; }
#visitHomeWindow .home-privacy-button[data-visibility='friends']::before { content: '👥'; }
#visitHomeWindow .home-privacy-button[data-visibility='public']::before { content: '🌐'; }
#visitHomeWindow .home-privacy-button.active { background: linear-gradient(135deg, #eee0ff, #d4c9f4) !important; box-shadow: inset 0 0 0 2px #9471bf; }
.home-tags-control { padding: 14px; border: 1px solid #ead2c0; border-radius: 16px; background: #fffaf3; display: flex; flex-direction: column; gap: 8px; }
.home-tags-control > label { font-size: 13px; font-weight: 700; }
#homeTagsToggle { min-height: 34px; text-align: left; padding: 7px 12px; }
#homeTagsMenu { padding: 8px; background: #f2e7f6; border-radius: 12px; }
#homeTagsMenu.hidden { display: none; }
#homeTagsMenu label { display: flex; gap: 8px; align-items: center; padding: 6px; font-size: 13px; }
#homeTagsMenu input { accent-color: #9774ba; }
.home-privacy-hint { margin-top: 12px; padding: 10px; background: #f1e8f3; border: 1px solid #dfcddf; border-radius: 12px; font-size: 12px; color: #795e75; }
.home-tag-badge { padding: 3px 7px; border-radius: 12px; background: #f8e0cd; color: #875b40; font-size: 10px; }
#visitHomeWindow .home-discovery-presence { flex-wrap: wrap; }
#homeTagsStatus { font-size: 11px; color: #795e75; }

/* Home Settings: separate cards and a single full-height browsing scrollbar. */
#visitHomeWindow .home-discovery-list { max-height: none; overflow: visible; }
#visitHomeWindow .home-name-control,
#visitHomeWindow .home-privacy-control,
#visitHomeWindow .home-tags-control { box-sizing: border-box; padding: 14px; margin-bottom: 12px; background: #fffaf3; border: 1px solid #ead2c0; border-radius: 16px; color: #715160; box-shadow: 0 2px 5px #936a430a; }
#visitHomeWindow .home-name-label,
#visitHomeWindow .home-privacy-description,
#visitHomeWindow .home-tags-control > label { color: #775148; font-family: var(--luma-font-family); font-size: 13px; font-weight: 700; }
#visitHomeWindow .home-privacy-description { margin: 0 0 4px; }
#visitHomeWindow .home-name-form { margin: 10px 0 4px; align-items: center; }
#visitHomeWindow .home-name-form button { min-height: 36px; border-radius: 13px; padding: 6px 13px; }
#visitHomeWindow .home-name-status:empty,
#visitHomeWindow #homeTagsStatus:empty { display: none; }
#visitHomeWindow .home-privacy-button { position: relative; min-width: 0; min-height: 90px; color: #69456d !important; border: 1px solid #ead2c7; background: #fbf2ec !important; overflow: visible; }
#visitHomeWindow .home-privacy-button small { font-family: inherit; font-size: 10px; font-weight: 400; color: #90758e; line-height: 1.3; }
#visitHomeWindow .home-privacy-button.active::after { content: '✓'; position: absolute; top: -6px; right: -4px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #9671c1; color: white; border: 2px solid #fffaf3; font-size: 13px; }
#visitHomeWindow .home-privacy-hint { margin-top: 8px; padding: 9px 10px; font-family: var(--luma-font-family); line-height: 1.45; }
#visitHomeWindow .home-privacy-hint::before { content: 'ⓘ'; color: #6b8fcb; margin-right: 6px; }
#visitHomeWindow #homeTagsToggle { width: 100%; color: #745285 !important; background: linear-gradient(135deg, #f3e7f7, #e9dff5) !important; border: 1px solid #dcccdf; border-radius: 13px; font-family: var(--luma-font-family); font-size: 12px; }
#visitHomeWindow #homeTagsToggle::before { content: '◆'; margin-right: 8px; color: #8860a4; }
#visitHomeWindow #homeTagsMenu { background: #f1e8f7; border: 1px solid #fffaf3; box-shadow: 0 2px 5px #9475821a; }
#visitHomeWindow #homeTagsMenu label { display: flex; justify-content: flex-start; text-align: left; gap: 10px; width: auto; color: #745285; font-family: var(--luma-font-family); padding: 7px 5px; }
#visitHomeWindow #homeTagsMenu input { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; padding: 0; }
#visitHomeWindow #homeTagsMenu label span { flex: 0 0 auto; }
#visitHomeWindow #homeTagsSave { min-height: 34px; border-radius: 13px; font-family: var(--luma-font-family); }
#visitHomeWindow .home-tags-help { font-size: 11px; color: #94798e; }

/* Tag choices float within the window instead of growing the settings card. */
#visitHomeWindow .home-tags-dropdown { position: relative; }
#visitHomeWindow #homeTagsMenu { position: absolute; z-index: 5; box-sizing: border-box; top: calc(100% + 6px); left: 0; right: 0; margin: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b795ce #f1e8f7; border: 1px solid #d4bddf; box-shadow: 0 5px 14px #674c7533; }
#visitHomeWindow #homeTagsMenu.opens-above { top: auto; bottom: calc(100% + 6px); }

/* Final main Slab polish; existing actions, drag handle and animations retained. */
#lumaSlabWindow .luma-slab-home-card { width: min(340px, calc(100vw - 40px)); min-height: 0; max-height: calc(100dvh - 64px); padding: 12px; background: linear-gradient(160deg, #a79ccfd9, #b8a4d3d9 40%, #efdbc9e8) !important; font-family: var(--luma-font-family); }
#lumaSlabWindow .luma-slab-phone-content { max-height: calc(100dvh - 88px); padding: 0 4px 8px; scrollbar-width: thin; scrollbar-color: #b18dae #e9dce9; }
#lumaSlabWindow .luma-slab-home-header { position: relative; min-height: 112px; margin: 0 -4px 12px; padding: 8px 10px; box-sizing: border-box; border-radius: 16px 16px 9px 9px; background: linear-gradient(180deg, #7162b86b, #b2a0d43b 58%, #f4d9cc82), url('assets/login/background/clouds-2.png') left bottom / 80% auto no-repeat, url('assets/login/background/farhills.png') center 65% / cover; }
#lumaSlabWindow .luma-slab-move-strip { min-height: 96px; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-radius: 12px; letter-spacing: normal; color: #fff9ee; }
#lumaSlabWindow .luma-slab-grip { font-size: 19px; letter-spacing: 5px; line-height: 10px; opacity: .85; }
#lumaSlabWindow .luma-slab-brand { font-family: var(--luma-font-family); font-size: 35px; font-weight: 700; line-height: 1.2; }
#lumaSlabWindow .luma-slab-brand-tagline { font-family: var(--luma-font-family); font-size: 8px; letter-spacing: .13em; line-height: 1.4; text-align: center; }
#lumaSlabWindow #lumaSlabClose { align-self: flex-start; width: 32px; height: 32px; min-width: 32px; min-height: 32px; margin-top: 4px; border: 1px solid #c49b70; background: linear-gradient(140deg, #fffaf0, #f1e0d4); color: #77544f; box-shadow: inset 0 0 0 1px #fff7e7, 0 2px 4px #67506c22; }
#lumaSlabWindow .luma-slab-app-grid,
#lumaSlabWindow .luma-slab-travel-grid { gap: 10px; }
#lumaSlabWindow .luma-slab-travel-grid { margin-top: 10px; }
#lumaSlabWindow .luma-slab-app-grid button,
#lumaSlabWindow .luma-slab-travel-grid button { min-height: 94px; padding: 10px 6px; gap: 5px; border-radius: 19px; border: 1px solid #ddbca1; background: linear-gradient(145deg, #fffdf4, #f6e8dc) !important; color: #78534e !important; font-family: var(--luma-font-family); font-size: 13px; box-shadow: inset 0 0 0 2px #fff9ef, 0 3px 5px #72516b1c; transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease; }
#lumaSlabWindow .luma-slab-app-grid button .luma-slab-button-icon,
#lumaSlabWindow .luma-slab-travel-grid button .luma-slab-button-icon { width: 52px; height: 52px; }
#lumaSlabWindow .luma-slab-travel-grid #lumaSlabGoHome { min-height: 86px; }
#lumaSlabWindow .luma-slab-app-grid button:hover,
#lumaSlabWindow .luma-slab-travel-grid button:hover,
#lumaSlabWindow .luma-slab-app-grid button:focus-visible,
#lumaSlabWindow .luma-slab-travel-grid button:focus-visible { background: linear-gradient(135deg, #f4e8fb, #decaed) !important; border-color: #b8915e; box-shadow: inset 0 0 0 2px #fff6df, 0 0 0 1px #caa779, 0 3px 6px #72516b1c; }
#lumaSlabWindow .luma-slab-home-footer { margin-top: 14px; padding: 10px 0 2px; border-top: 1px solid #eac7a9; color: #966e68; font-family: var(--luma-font-family); font-size: 8px; letter-spacing: .14em; text-shadow: none; }
#lumaSlabWindow .luma-slab-home-footer::before { content: '✧'; display: block; margin: -19px auto 5px; width: 26px; background: #ead7d3; color: #b88c57; font-size: 16px; }
@media (max-height: 620px) {
  #lumaSlabWindow .luma-slab-home-header { min-height: 90px; }
  #lumaSlabWindow .luma-slab-move-strip { min-height: 74px; }
  #lumaSlabWindow .luma-slab-app-grid button,
  #lumaSlabWindow .luma-slab-travel-grid button { min-height: 80px; }
  #lumaSlabWindow .luma-slab-button-icon { width: 42px !important; height: 42px !important; }
}

/* Compact main Slab heading without scenic art or footer. */
#lumaSlabWindow .luma-slab-home-header { min-height: 60px; padding: 6px 8px; margin-bottom: 10px; background: none; align-items: center; }
#lumaSlabWindow .luma-slab-move-strip { min-height: 48px; align-items: flex-start; gap: 4px; padding: 0; text-align: left; }
#lumaSlabWindow .luma-slab-brand { font-size: 24px; line-height: 1.2; }
#lumaSlabWindow .luma-slab-brand-tagline { font-size: 8px; letter-spacing: .06em; text-align: left; }
#lumaSlabWindow #lumaSlabClose { align-self: center; margin-top: 0; }

/* Everyday collecting-card front, with a separate action rail. */
.wall-inspection-card .item-context-icon { min-width: 0; min-height: 0; overflow: hidden; }
.wall-inspection-card .wall-inspection-preview { display: block; max-width: 100%; max-height: 100%; }
.item-collecting-quantity { display: none; }
body :is(#itemContextCard, .item-card-fade-copy).collecting-front { width: 332px; height: 420px; padding: 0; border: 0 !important; border-image: none !important; border-radius: 0; background: url('assets/UI/cards/everyday-front-blank.png') left top / 280px 420px no-repeat !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; overflow: visible; font-family: var(--luma-font-family); color: #654329; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-heading { display: contents; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-icon { position: absolute; left: 72px; top: 78px; width: 136px; height: 126px; border: 0; border-radius: 0; background: transparent !important; font-size: 60px; display: grid; place-items: center; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-image { width: 100%; height: 100%; object-fit: contain; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-title-group { position: absolute; top: 219px; left: 32px; width: 216px; text-align: center; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-name { color: #51351f; font-family: var(--luma-font-family); font-size: 16px; font-weight: 800; line-height: 1.2; max-height: 40px; overflow-y: auto; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-meta { font-size: 10px; line-height: 1.35; color: #906f51; margin-top: 4px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-description { position: absolute; left: 40px; top: 301px; width: 200px; height: 63px; margin: 0; color: #826344; font-size: 12px; line-height: 1.45; text-align: center; overflow-y: auto; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-ownership { display: none; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-close { position: absolute; left: 288px; top: 0; width: 44px; height: 36px; min-width: 44px; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions { position: absolute; left: 288px; top: 44px; width: 44px; max-height: 314px; display: flex; flex-direction: column; gap: 7px; margin: 0; overflow-y: auto; scrollbar-width: thin; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button { flex: 0 0 auto; width: 44px; min-height: 38px; padding: 4px 2px; font-size: 9px; line-height: 1.2; border-radius: 10px; background: #fff4de !important; color: #725037 !important; border: 1px solid #c7a578 !important; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button[data-action='inspect'] { order: -1; background: #e5effc !important; color: #416a9e !important; font-size: 24px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-collecting-quantity { position: absolute; right: 0; bottom: 4px; display: block; padding: 5px 7px; border-radius: 14px; background: #f6e3cf; color: #805433; font-size: 11px; font-weight: 700; white-space: nowrap; }
@media (max-width: 370px), (max-height: 460px) {
  body :is(#itemContextCard, .item-card-fade-copy).collecting-front { zoom: .8; }
}

/* Collecting front readability and world-style icon action ribbon. */
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-icon { left: 84px; top: 93px; width: 112px; height: 104px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-title-group { left: 32px; width: 216px; margin: 0; padding: 0; text-align: center; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-name { width: 100%; margin: 0; padding: 0; max-height: none; overflow: visible; white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.2; text-align: center; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-meta { width: 100%; margin: 3px 0 0; padding: 0; text-align: center; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-description { left: 40px; width: 200px; font-style: italic; text-align: center; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-collecting-quantity { right: 54px; bottom: 14px; padding: 3px 6px; font-size: 10px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-collecting-quantity[hidden] { display: none; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions { left: 285px; top: 43px; width: 44px; max-height: none; gap: 5px; padding: 4px 3px; box-sizing: border-box; overflow: visible; border-radius: 18px; background: #846b55aa; border: 1px solid #fff4df88; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; min-width: 0; min-height: 38px; padding: 0; border-radius: 14px; font-size: 19px; overflow: visible; background: #fff6ebd9 !important; box-shadow: inset 0 1px 0 #ffffffb3, 0 3px 8px #2a1a2220; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button[data-action='inspect'] { font-size: 19px; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button:disabled { opacity: .45; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .collecting-action-tooltip { position: absolute; z-index: 5; left: calc(100% + 8px); top: 50%; width: max-content; max-width: 160px; padding: 7px 11px; border-radius: 999px; background: #fffaf2f0; border: 1px solid #fff8efa3; color: #6b4437; font-family: var(--luma-font-family); font-size: 12px; font-weight: 800; opacity: 0; transform: translateY(-50%); pointer-events: none; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button:hover .collecting-action-tooltip,
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button:focus-visible .collecting-action-tooltip { opacity: 1; }

/* Airy collecting-card rail and larger full-count badge. */
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions { background: transparent; border: 0; box-shadow: none; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button,
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button[data-action='inspect'] { background: transparent !important; border: 0 !important; box-shadow: none !important; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button:hover,
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions button:focus-visible { background: transparent !important; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-close { top: 11px; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions { top: 53px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-collecting-quantity { font-size: 14px; padding: 5px 8px; }

/* Shared Luma Action Ribbon: used by world actions and collecting-card fronts. */
#worldContextMenu.action-ribbon { padding: 0; background: transparent; border: 0; box-shadow: none; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon { display: flex; flex-direction: column; width: 52px; padding: 4px; gap: 4px; box-sizing: border-box; overflow: visible; border-radius: 18px; background: linear-gradient(180deg, #fffaf2e0, #f6ebe0cc); border: 1px solid #69483747; box-shadow: 0 6px 18px #28191226, inset 0 1px #ffffffbf; backdrop-filter: none; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions.luma-action-ribbon { left: 280px; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 42px; width: 42px; height: 42px; min-height: 42px; padding: 0; box-sizing: border-box; border: 1px solid transparent !important; border-radius: 13px; background: transparent !important; box-shadow: none !important; color: #6d493b !important; font-family: var(--luma-font-family); cursor: pointer; overflow: visible; transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action__icon { position: relative; z-index: 2; font-size: 21px; line-height: 1; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action:not(:disabled):is(:hover, :focus-visible, .is-active, [aria-pressed='true']) { background: #fff9e9f7 !important; border-color: #cf9d48bf !important; box-shadow: 0 3px 9px #422b1826 !important; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action:focus-visible { outline: 2px solid #886396; outline-offset: 2px; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action:disabled { opacity: .45; cursor: not-allowed; transform: none; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action__label { position: absolute; z-index: 1; top: -1px; left: calc(100% - 5px); right: auto; height: 42px; width: max-content; min-width: 0; max-width: var(--luma-label-max, 180px); box-sizing: border-box; display: flex; align-items: center; padding: 0 15px 0 12px; border: 1px solid #cfac806b; border-radius: 0 14px 14px 0; background: #fff9edf5; color: #6b4437; font-family: var(--luma-font-family); font-size: 12px; font-weight: 700; box-shadow: 3px 3px 9px #2819121a; white-space: normal; line-height: 1.2; opacity: 0; transform: translateX(-4px); pointer-events: none; transition: opacity 140ms ease, transform 140ms ease; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon[data-label-side='left'] .luma-action__label { left: auto; right: calc(100% - 5px); padding: 0 12px 0 15px; border-radius: 14px 0 0 14px; transform: translateX(4px); }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action:not(:disabled):is(:hover, :focus-visible, .is-active, [aria-pressed='true']) .luma-action__label { opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .luma-action-ribbon .luma-action,
  .luma-action-ribbon .luma-action__label { transition: none !important; transform: none !important; }
}

/* Mocha pop-out labels, separate Inspect rail and selector close placement. */
#worldContextActions.luma-action-ribbon .luma-action__label { overflow-wrap:anywhere; }
#worldContextMenu #worldContextActions.luma-action-ribbon .luma-action__label { opacity:1;transform:translate(0,-50%); }
#worldContextMenu #worldContextActions.luma-action-ribbon .luma-action:disabled .luma-action__label { opacity:.55; }
@media (hover:hover) and (pointer:fine) {
  #worldContextMenu #worldContextActions.luma-action-ribbon .luma-action .luma-action__label { opacity:0; }
  #worldContextMenu #worldContextActions.luma-action-ribbon .luma-action:disabled .luma-action__label { opacity:0; }
  #worldContextMenu #worldContextActions.luma-action-ribbon .luma-action:not(:disabled):is(:hover,:focus-visible) .luma-action__label { opacity:1; }
}
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action__label { top: 50%; left: calc(100% + 8px); right: auto; height: auto; min-height: 30px; padding: 7px 11px; border-radius: 999px; background: #684b3df5; color: #fff6e8; border: 1px solid #b99c7b77; box-shadow: 0 4px 12px #28191226; transform: translate(-4px, -50%); }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon[data-label-side='left'] .luma-action__label { left: auto; right: calc(100% + 8px); padding: 7px 11px; border-radius: 999px; transform: translate(4px, -50%); }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action:not(:disabled):is(:hover, :focus-visible, .is-active, [aria-pressed='true']) .luma-action__label { transform: translate(0, -50%); }
#worldContextMenu.target-picker .world-context-close { display: flex; align-items: center; justify-content: center; top: -40px; right: 0; width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions.luma-action-ribbon { top: 113px; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions.luma-action-ribbon button[data-action='inspect'] { position: absolute; top: -60px; left: 4px; background: #fffaf2e0 !important; border: 1px solid #69483747 !important; box-shadow: 0 0 0 4px #f6ebe0cc, 0 4px 12px #28191226 !important; }
@media (prefers-reduced-motion: reduce) {
  :is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action__label { transition: none !important; transform: translate(0, -50%) !important; }
}

/* Solid cream/mocha action surfaces for readability over the world. */
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon { background: #fff7ec; border-color: #c6ac95; opacity: 1; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action:not(:disabled):is(:hover, :focus-visible, .is-active, [aria-pressed='true']) { background: #fff0d9 !important; border-color: #cf9d48 !important; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action__label { background: #684b3d; border-color: #98785d; color: #fff6e8; }
:is(#worldContextActions, :is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions).luma-action-ribbon .luma-action:disabled { opacity: 1; background: #e9dfd2 !important; color: #968677 !important; border-color: #d5c7b7 !important; box-shadow: none !important; }
:is(#itemContextCard, .item-card-fade-copy):is(.collecting-front, .collecting-back) .item-context-actions.luma-action-ribbon button[data-action='inspect'] { background: #fff7ec !important; border-color: #c6ac95 !important; box-shadow: 0 0 0 4px #fff7ec, 0 4px 12px #28191226 !important; }
:is(#itemContextCard, .item-card-fade-copy).collecting-front .item-context-close,
#worldContextMenu.target-picker .world-context-close { background: #fff7ec !important; border: 1px solid #c6ac95 !important; color: #684b3d !important; opacity: 1; }

/* Fading snapshots preserve card presentation without duplicate IDs or controls. */
body .item-card-fade-copy { position: fixed; pointer-events: none !important; transition: none !important; animation: none !important; z-index: 1099; }
.item-card-fade-copy .luma-action__label { display: none !important; }

.item-collecting-content { display: contents; }
.garden-card-colour { display:none; }
:is(#itemContextCard,.item-card-fade-copy).collecting-front .garden-card-colour { position:absolute;left:140px;bottom:-5px;transform:translateX(-50%);width:max-content;max-width:240px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;padding:4px 8px;border-radius:12px;background:#fff3df;border:1px solid #c6a581;color:#78553a;text-align:center;font-family:var(--luma-font-family);font-size:10px;line-height:normal;box-shadow:0 2px 5px #36241920; }
.garden-card-colour > span:last-child { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.garden-card-diamond { width:10px;height:10px;flex:0 0 10px;transform:rotate(45deg);border:1px solid #9e785b;background:#eee2cc;box-shadow:0 0 0 2px #fff4df; }
:is(#itemContextCard,.item-card-fade-copy).collecting-front .item-context-actions.luma-action-ribbon .luma-action[data-action='gardenMutationLock']:not(:hover):not(:focus-visible) .luma-action__label { opacity:0; }
body :is(#itemContextCard, .item-card-fade-copy).collecting-back { width: 332px; height: 420px; padding: 0; border: 0 !important; border-image: none !important; border-radius: 0; background: url('assets/UI/cards/everyday-back-blank.png') left top / 280px 420px no-repeat !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; overflow: visible; color: #654329; font-family: var(--luma-font-family); }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-collecting-content { display: block; position: absolute; left: 35px; top: 48px; width: 210px; height: 326px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b58c61 #f3ddbc; padding-right: 5px; box-sizing: border-box; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-heading { display: flex; align-items: center; gap: 8px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-icon { flex: 0 0 40px; width: 40px; height: 44px; background: transparent !important; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-name { font-size: 15px; line-height: 1.25; color: #654329; white-space: normal; overflow: visible; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-meta { font-size: 10px; color: #896846; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-description { font-size: 12px; font-style: italic; color: #896846; line-height: 1.4; margin: 12px 0; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-ownership { background: #fff4de; color: #654329; font-size: 11px; padding: 10px; border: 1px solid #d4b38a; border-radius: 10px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-actions.luma-action-ribbon { left: 280px; top: 53px; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-close { position: absolute; left: 288px; top: 11px; width: 32px; height: 32px; background: #fff7ec !important; color: #684b3d !important; border: 1px solid #c6ac95 !important; }
@media (max-width: 370px), (max-height: 460px) { body :is(#itemContextCard, .item-card-fade-copy).collecting-back { zoom: .8; } }

:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-heading,
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-description { display: none; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-context-ownership { background: transparent; border: 0; padding: 0; }
.item-story-section { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #d2b188; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.item-story-section h3 { margin: 0 0 5px; color: #694730; font-family: var(--luma-font-family); font-size: 14px; }
.item-drop-source { margin:8px 0; }
.item-drop-source h4 { margin:0 0 2px; font-size:11px; line-height:1.4; }
.item-drop-source p,.item-drop-guide > p { margin:3px 0 5px; font-size:10px; line-height:1.4; }
.item-drop-source ul { margin:4px 0 8px; padding-left:15px; }
.item-drop-source li { margin:4px 0; font-size:11px; }
:is(#itemContextCard,.item-card-fade-copy).collecting-front .item-drop-guide { display:none; }
.item-owner-entry { display: block; width: 100%; margin: 5px 0; padding: 7px 9px; border: 1px solid #cbb08d; border-radius: 10px; background: #fff3dd; color: #694730; font-family: var(--luma-font-family); text-align: left; cursor: pointer; }
.item-history-dialog { width: min(300px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-sizing: border-box; overflow-y: auto; padding: 16px; border: 1px solid #b79875; border-radius: 16px; background: #fff3df; color: #694730; font-family: var(--luma-font-family); box-shadow: 0 10px 30px #36241940; }
.item-history-dialog.expanded { width: min(420px, calc(100vw - 32px)); }
.item-history-dialog::backdrop { background: #3f2d2420; }
.item-history-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.item-history-dialog-header button { width: 32px; height: 32px; border: 1px solid #cbb08d; border-radius: 10px; background: #fff8ed; color: #694730; cursor: pointer; }
.item-history-dialog p { font-size: 12px; }

/* Align the back story to the artwork inner left guide. */
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-collecting-content { left: 48px; width: 190px; }

.item-instance-footer { display: none; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-instance-footer { display: block; position: absolute; left: 48px; bottom: 20px; width: 190px; text-align: center; color: #896846; font-family: var(--luma-font-family); font-size: 9px; }

/* Lift the instance label clear of the illustrated bottom border. */
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-instance-footer { bottom: 30px; }

/* Floating global instance badge beside the lower-left card edge. */
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-instance-footer { left: 12px; bottom: -5px; width: auto; padding: 4px 8px; border-radius: 12px; background: #fff3df; border: 1px solid #c6a581; color: #78553a; text-align: left; font-size: 10px; box-shadow: 0 2px 5px #36241920; }

/* Mint identity centered under the 280px artwork; instance remains in Origin. */
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-instance-footer { left: 140px; transform: translateX(-50%); text-align: center; white-space: nowrap; }
:is(#itemContextCard, .item-card-fade-copy).collecting-back .item-instance-footer:empty { display: none; }
/* Compact Slab headings and purchase presentation. */
body :is(.luma-window-title, .shop-title, .items-title, .visit-home-title, .social-title, .settings-title, .friend-confirm-title) {
  font-family: var(--luma-font-family);
  font-size: 24px !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: left;
}
body :is(.luma-window-subtitle, .shop-subtitle, .guest-upgrade-subtitle, .friend-confirm-subtitle) {
  font-family: var(--luma-font-family);
  font-size: 12px !important;
  line-height: 1.4;
  margin-top: 4px;
  text-align: left;
}
#shopPurchaseCard, #shopPurchaseConfirmWindow .shop-confirm-card {
  box-sizing: border-box;
  background: linear-gradient(145deg, #694977, #51406e 62%, #494675) !important;
  color: #fff6ee;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 24px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c4a3ce #51406e;
}
#shopPurchaseCard { width: 360px; max-width: calc(100vw - 24px); }
#shopPurchaseConfirmWindow .shop-confirm-card { width: min(440px, 100%); }
#shopPurchaseCard .shop-purchase-heading { gap: 14px; align-items: center; padding-right: 24px; }
#shopPurchaseCard .shop-purchase-preview {
  width: 84px; height: 84px; flex-basis: 84px;
  background: #fff1dc; border: 2px solid #d9b48e; border-radius: 18px;
  box-shadow: inset 0 0 0 3px #fff9ee;
}
#shopPurchaseCard .shop-purchase-title-group { min-width: 0; }
#shopPurchaseCard .shop-purchase-name {
  font-family: var(--luma-font-family); font-size: 24px; font-weight: 800;
  line-height: 1.2; color: #fff6ee; overflow-wrap: anywhere;
}
#shopPurchaseCard .shop-purchase-meta { font-size: 12px; color: #e7d5ec; margin-top: 5px; }
#shopPurchaseCard .shop-purchase-description { color: #efe1ed; line-height: 1.5; margin: 18px 0; }
#shopPurchaseCard :is(.shop-purchase-price-row, .shop-purchase-total-row),
#shopPurchaseConfirmWindow :is(.shop-confirm-item, .shop-confirm-color-options, .shop-confirm-price-row) {
  background: #fff3e3; color: #725044;
  border: 1px solid #dfb699; border-radius: 18px; padding: 14px;
  box-shadow: inset 0 0 0 3px #fffaf2;
}
#shopPurchaseCard :is(.shop-purchase-price-row, .shop-purchase-total-row) { gap: 8px; }
#shopPurchaseCard :is(.shop-purchase-price-row, .shop-purchase-total-row) strong {
  display: inline-flex; align-items: center; gap: 5px;
  color: #725044; font-size: 18px; flex-wrap: wrap; justify-content: flex-end;
}
#shopPurchaseCard .luma-inline-crown-icon,
#shopPurchaseConfirmWindow .luma-inline-crown-icon { width: 30px; height: 36px; object-fit: contain; vertical-align: middle; }
#shopPurchaseCard .shop-purchase-quantity-section { margin: 16px 0; gap: 10px; flex-wrap: wrap; }
#shopPurchaseCard .shop-purchase-quantity-label { color: #fff6ee; font-weight: 800; }
#shopPurchaseCard .shop-purchase-quantity-controls { gap: 8px; }
#shopPurchaseCard .shop-purchase-quantity-button {
  width: 40px; height: 40px; border-radius: 50%; font-size: 23px;
  background: linear-gradient(#e9dbfa, #c5addf) !important; border: 1px solid #f9edff;
}
#shopPurchaseCard .shop-purchase-quantity-input {
  width: 66px; height: 40px; padding: 4px; box-sizing: border-box;
  background: #fff3e3; color: #725044; border: 1px solid #dfb699;
  border-radius: 12px; font-size: 18px; font-weight: 800; text-align: center;
}
#shopPurchaseCard .shop-purchase-button,
#shopPurchaseConfirmWindow :is(.shop-confirm-cancel-button, .shop-confirm-purchase-button) {
  min-height: 44px; font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, #ecddff, #c6abe7) !important;
  border: 1px solid #fff1d7; box-shadow: inset 0 0 0 2px #ffffff60;
}
#shopPurchaseConfirmWindow .shop-confirm-purchase-button {
  background: linear-gradient(135deg, #dbb9f8, #b488d6) !important;
}
#shopPurchaseConfirmWindow .shop-confirm-item-name { color: #725044; font-size: 18px; font-weight: 800; line-height: 1.3; }
#shopPurchaseConfirmWindow .shop-confirm-item-meta { color: #937363; font-size: 12px; }
#shopPurchaseConfirmWindow .shop-confirm-image { width: 76px; height: 76px; flex: 0 0 76px; border-radius: 14px; background-color: #f4e5da; }
#shopPurchaseConfirmWindow .shop-confirm-color-label { color: #725044; font-size: 16px; }
#shopPurchaseConfirmWindow .shop-confirm-tint-preview-row { color: #937363; }
#shopPurchaseConfirmWindow .shop-confirm-tint-control { grid-template-columns: 76px minmax(0, 1fr) 38px; gap: 8px; color: #725044; }
#shopPurchaseConfirmWindow .shop-confirm-tint-control output {
  background: #fffaf2; border: 1px solid #dfb699; border-radius: 9px;
  padding: 5px 2px; text-align: center; color: #725044;
}
#shopPurchaseConfirmWindow .shop-confirm-tint-control input { min-width: 0; accent-color: #92628d; }
#shopPurchaseConfirmWindow .shop-confirm-price-row strong { color: #725044; display: inline-flex; align-items: center; gap: 8px; font-size: 22px; }
@media (max-width: 400px) {
  #shopPurchaseCard, #shopPurchaseConfirmWindow .shop-confirm-card { padding: 18px; }
  #shopPurchaseCard .shop-purchase-preview { width: 64px; height: 64px; flex-basis: 64px; }
  #shopPurchaseConfirmWindow .shop-confirm-tint-control { grid-template-columns: 64px minmax(0, 1fr) 32px; gap: 5px; }
}

/* Match the Slab's exact title/subtitle treatment. */
body :is(.luma-window-title, .shop-title, .items-title, .visit-home-title, .social-title, .settings-title, .friend-confirm-title) {
  margin: 0;
  font-size: 24px !important;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 3px #586486;
}
body :is(.luma-window-subtitle, .shop-subtitle, .items-subtitle, .guest-upgrade-subtitle, .friend-confirm-subtitle) {
  margin: 4px 0 0;
  font-family: var(--luma-font-family);
  font-size: 8px !important;
  letter-spacing: .06em;
  line-height: 1.4;
  text-align: left;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #586486;
}
:is(.player-name-tooltip, .item-name-tooltip).paired-hover-label {
  box-sizing: border-box;
  max-width: calc((100vw - 24px) / 2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Read-only world inspection shares collecting-card art without fade-copy input blocking. */
body .world-object-inspection-card {
  pointer-events: auto !important;
  z-index: 1161;
  opacity: 1;
}
body .world-object-inspection-card .item-context-actions { display: flex !important; }
body .world-object-inspection-card .luma-action__label { display: block !important; }

/* Compact owner/date rows and direct travel-history expansion. */
body :is(#itemContextCard, .world-object-inspection-card) .item-owner-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 6px; margin: 3px 0; min-height: 0;
  font-family: var(--luma-font-family); font-size: 11px; font-weight: 400; line-height: 1.5;
  border-radius: 7px; background: #fff3df !important; color: #694730 !important;
}
.item-owner-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.item-owner-date { flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; }
.item-history-heading { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.item-history-heading h3 { margin: 0; }
body :is(#itemContextCard, .world-object-inspection-card) .item-history-expand {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  min-height: 0; padding: 0; border: 1px solid #cbb08d; border-radius: 6px;
  background: #fff3df !important; color: #694730 !important; font: 18px/1 var(--luma-font-family);
}

/* Keep Close beside both the action rail and target selector. */
#worldContextMenu:is(.action-ribbon, .target-picker) .world-context-close {
  display: flex; align-items: center; justify-content: center;
  top: 0; left: calc(100% + 8px); right: auto;
  width: 32px; height: 32px; min-width: 32px; min-height: 32px;
  background: #fff7ec !important; border: 1px solid #c6ac95 !important;
  color: #684b3d !important; opacity: 1;
}

/* Clothing color entry before purchase confirmation. */
#shopPurchaseCard .shop-purchase-color-entry { margin: 14px 0; }
#shopPurchaseCard #shopPurchaseChangeColorButton { padding: 9px 14px; border: 1px solid #d6b58d; border-radius: 14px; background: #fff2dc !important; color: #694977 !important; font: 700 13px Nunito, sans-serif; cursor: pointer; }
#shopPurchaseCard #shopPurchaseChangeColorButton:hover { background: #f3e3fa !important; }
#shopPurchaseCard #shopPurchaseChangeColorButton:disabled { cursor: default; opacity: .6; }
#shopPurchaseCard .shop-purchase-color-entry p { margin: 6px 0 0; font-size: 12px; color: #fff2dc; }

/* Final purchase confirmation keeps only the question and decision. */
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-image,
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-item-meta,
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-price-row { display: none; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-item-name { font-size: 18px; line-height: 1.5; }

/* Cream shop purchase layout inspired by John's reference. */
#shopPurchaseCard {
  background: linear-gradient(135deg, #fff5e7, #f5dfc8) !important;
  color: #684632; padding: 20px; width: 360px;
  border-radius: 22px; scrollbar-color: #c7a3c9 #fff1dc;
}
#shopPurchaseCard .shop-purchase-heading {
  align-items: center; gap: 12px; padding: 10px 20px 10px 10px;
  border: 1px solid #e8c4ab; border-radius: 15px;
}
#shopPurchaseCard .shop-purchase-name { color: #583727; font-size: 21px; text-shadow: none; }
#shopPurchaseCard .shop-purchase-meta { color: #9b725c; font-size: 11px; }
#shopPurchaseCard .shop-purchase-preview {
  width: 84px; height: 94px; flex-basis: 84px; border-radius: 12px;
  background: #f9e5da; border: 1px solid #dcb299;
}
#shopPurchaseCard .shop-purchase-description { color: #9b725c; font-size: 12px; margin: 6px 0 0; line-height: 1.4; }
#shopPurchaseCard .shop-purchase-color-entry {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  background: #ecdcc9; border: 1px solid #e8c4ab; border-radius: 12px; margin: 12px 0;
}
#shopPurchaseCard .shop-purchase-color-entry.hidden { display: none; }
#shopPurchaseCard .shop-purchase-color-swatch {
  width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #b8acb1;
  border-radius: 50%; box-shadow: inset 0 0 0 2px #fff9f3;
}
#shopPurchaseCard .shop-purchase-color-hex { font-size: 11px; color: #684632; }
#shopPurchaseCard #shopPurchaseChangeColorButton {
  margin-left: auto; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(#eddbff, #cfadeb) !important;
  color: #59396b !important; border: 1px solid #b99acd;
  border-radius: 10px; box-shadow: inset 0 0 0 2px #f8edff;
}
#shopPurchaseCard .shop-purchase-price-row { display: none; }
#shopPurchaseCard .shop-purchase-quantity-section {
  margin: 0; padding: 12px 8px; border-top: 1px solid #dfbba0; border-bottom: 1px solid #dfbba0;
}
#shopPurchaseCard .shop-purchase-quantity-label { color: #684632; font-size: 14px; font-weight: 700; }
#shopPurchaseCard .shop-purchase-quantity-button { width: 34px; height: 34px; min-height: 34px; font-size: 22px; }
#shopPurchaseCard .shop-purchase-quantity-input { width: 58px; height: 34px; font-size: 16px; }
#shopPurchaseCard .shop-purchase-total-row {
  background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 12px 8px; margin: 0;
}
#shopPurchaseCard .shop-purchase-total-row > span { font-size: 15px; font-weight: 700; }
#shopPurchaseCard .shop-purchase-total-row strong { font-size: 21px; }
#shopPurchaseCard .luma-inline-crown-icon { width: 24px; height: 29px; }
#shopPurchaseCard #shopPurchaseButton {
  width: 100%; min-height: 46px; border-radius: 24px;
  background: linear-gradient(#d9a3fa, #9d65d6 60%, #bb8ee7) !important;
  color: #fff8ff !important; border: 1px solid #9b6dc0;
  box-shadow: inset 0 0 0 2px #ecd9ff, 0 2px 5px #b992ad;
  font-size: 18px; font-weight: 800; text-shadow: 0 1px 2px #785399;
}
@media (max-width: 400px) {
  #shopPurchaseCard { padding: 16px; }
  #shopPurchaseCard .shop-purchase-preview { width: 64px; height: 78px; flex-basis: 64px; }
  #shopPurchaseCard .shop-purchase-name { font-size: 18px; }
}

/* Compact purchase polish: larger art and smaller control rows. */
#shopPurchaseCard .shop-purchase-heading {
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  padding: 0 12px 8px 0; gap: 14px;
}
#shopPurchaseCard .shop-purchase-preview {
  width: 110px; height: 120px; flex: 0 0 110px;
}
#shopPurchaseCard .shop-purchase-color-entry { padding: 5px 8px; gap: 8px; margin: 8px 0; }
#shopPurchaseCard .shop-purchase-color-swatch { width: 28px; height: 28px; flex-basis: 28px; }
#shopPurchaseCard #shopPurchaseChangeColorButton {
  min-height: 28px; padding: 5px 10px; font-size: 11px; gap: 8px;
}
#shopPurchaseCard .shop-purchase-quantity-section { padding: 8px; gap: 8px; }
#shopPurchaseCard .shop-purchase-quantity-button {
  width: 28px; height: 28px; min-width: 28px; min-height: 28px; font-size: 18px; padding: 0;
}
#shopPurchaseCard .shop-purchase-quantity-input { width: 54px; height: 30px; font-size: 14px; }
@media (max-width: 400px) {
  #shopPurchaseCard .shop-purchase-preview { width: 100px; height: 110px; flex-basis: 100px; }
}
/* Hero item preview with details directly beneath it. */
#shopPurchaseCard .shop-purchase-heading {
  flex-direction: column; align-items: center; gap: 6px; padding: 0 0 4px;
}
#shopPurchaseCard .shop-purchase-preview {
  width: 110px; height: 120px; flex: 0 0 auto;
}
#shopPurchaseCard .shop-purchase-title-group { width: 100%; text-align: center; }
#shopPurchaseCard .shop-purchase-name { margin: 0; }
#shopPurchaseCard .shop-purchase-meta { margin-top: 3px; }
#shopPurchaseCard .shop-purchase-description { margin-top: 4px; }
#shopPurchaseCard .shop-purchase-color-entry { margin: 6px 0; }
#shopPurchaseCard #shopPurchaseCloseButton { top: 18px; right: 18px; z-index: 1; }
#shopPurchaseCard .shop-purchase-total-row .luma-inline-crown-icon {
  width: 30px; height: 36px; flex: 0 0 30px;
}

/* Narrow the shop menu to bring labels and controls closer together. */
#shopPurchaseCard { width: 300px; }

/* Further tighten the shop menu while preserving the hero preview. */
#shopPurchaseCard { width: 280px; padding-left: 18px; padding-right: 18px; }
/* Slab interaction feedback on the shop's primary and close buttons. */
#shopPurchaseCard :is(#shopPurchaseButton, #shopPurchaseCloseButton) {
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
#shopPurchaseCard :is(#shopPurchaseButton, #shopPurchaseCloseButton):is(:hover, :focus-visible):not(:disabled) {
  background: linear-gradient(135deg, #f4e8fb, #decaed) !important;
  color: #67477b !important; border-color: #b8915e;
  box-shadow: inset 0 0 0 2px #fff6df, 0 0 0 1px #caa779, 0 3px 6px #72516b1c;
  text-shadow: none;
}
#shopPurchaseCard :is(#shopPurchaseButton, #shopPurchaseCloseButton):active:not(:disabled) { transform: scale(.97); }
/* Minimal cream color palette beside the purchase card. */
#shopPurchaseConfirmWindow.shop-color-palette {
  background: transparent !important; backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important; pointer-events: none;
}
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-card {
  position: fixed; width: 300px; max-width: calc(100vw - 40px);
  padding: 18px; background: linear-gradient(135deg, #fff5e7, #f5dfc8) !important;
  color: #684632; pointer-events: auto;
}
#shopPurchaseConfirmWindow.shop-color-palette :is(.shop-confirm-item, .shop-confirm-price-row, .shop-confirm-subtitle, .shop-confirm-color-label, .shop-confirm-tint-preview-row, .shop-confirm-cancel-button) { display: none !important; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-title { color: #684632; text-shadow: none; font-size: 21px !important; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-header { margin-bottom: 12px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-color-options { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-tint-controls { gap: 14px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-tint-control { grid-template-columns: 66px minmax(0, 1fr) 32px; gap: 6px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-actions { display: flex; margin-top: 16px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-purchase-button { flex: 1; background: linear-gradient(#d9a3fa, #9d65d6 60%, #bb8ee7) !important; color: #fff8ff !important; border-radius: 22px; box-shadow: inset 0 0 0 2px #ecd9ff; }
#shopPurchaseConfirmWindow.shop-color-palette #shopPurchaseCard { pointer-events: auto; }
@media (max-width: 639px) {
  #shopPurchaseConfirmWindow.shop-color-palette {
    display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
    gap: 30px; overflow-y: auto; padding: 24px 20px; box-sizing: border-box; pointer-events: auto;
  }
  #shopPurchaseConfirmWindow.shop-color-palette #shopPurchaseCard,
  #shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-card {
    position: relative !important; top: auto !important; left: auto !important;
    flex: 0 0 auto; max-height: none; overflow: visible;
  }
}
@media (prefers-reduced-motion: reduce) {
  #shopPurchaseCard :is(#shopPurchaseButton, #shopPurchaseCloseButton) { transition: none; }
  #shopPurchaseCard :is(#shopPurchaseButton, #shopPurchaseCloseButton):active { transform: none; }
}
/* Mocha palette heading and tightly grouped sliders. */
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-title { color: #684632 !important; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-header { margin-bottom: 8px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-tint-controls { gap: 6px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-tint-control { margin: 0; padding: 0; min-height: 28px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-tint-control output { padding: 4px 6px; }
#shopPurchaseConfirmWindow.shop-color-palette .shop-confirm-actions { margin-top: 12px; }
/* Cream final confirmation matches the purchase card. */
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-card {
  background: linear-gradient(135deg, #fff5e7, #f5dfc8) !important;
  color: #684632; padding: 20px;
}
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-title { color: #684632 !important; text-shadow: none; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-subtitle { color: #9b725c !important; text-shadow: none; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-item { background: transparent; border: 0; box-shadow: none; padding: 8px 0; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-item-name { color: #684632; font-size: 18px; line-height: 1.7; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-prompt-crown { display: inline-flex; vertical-align: middle; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-prompt-crown .luma-inline-crown-icon { width: 28px; height: 34px; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-purchase-button {
  background: linear-gradient(#d9a3fa, #9d65d6 60%, #bb8ee7) !important;
  color: #fff8ff !important; box-shadow: inset 0 0 0 2px #ecd9ff;
}
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-cancel-button { background: linear-gradient(#eddbff, #cfadeb) !important; color: #59396b !important; }
/* Compact final decision and shared Buy interaction feedback. */
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-card { width: min(340px, 100%); padding: 16px; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-subtitle { display: none; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-header { margin-bottom: 6px; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-item { margin: 0; padding: 6px 0; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation .shop-confirm-actions { margin-top: 8px; gap: 8px; }
#shopPurchaseConfirmWindow.simple-purchase-confirmation :is(.shop-confirm-cancel-button, .shop-confirm-purchase-button) {
  min-height: 32px; padding: 6px 12px; font-size: 12px; border-radius: 14px;
}
#shopPurchaseConfirmWindow :is(#shopPurchaseCancelButton, #shopPurchaseConfirmButton) {
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
#shopPurchaseConfirmWindow :is(#shopPurchaseCancelButton, #shopPurchaseConfirmButton):is(:hover, :focus-visible):not(:disabled) {
  background: linear-gradient(135deg, #f4e8fb, #decaed) !important;
  color: #67477b !important; border-color: #b8915e;
  box-shadow: inset 0 0 0 2px #fff6df, 0 0 0 1px #caa779, 0 3px 6px #72516b1c;
  text-shadow: none;
}
#shopPurchaseConfirmWindow :is(#shopPurchaseCancelButton, #shopPurchaseConfirmButton):active:not(:disabled) { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  #shopPurchaseConfirmWindow :is(#shopPurchaseCancelButton, #shopPurchaseConfirmButton) { transition: none; }
  #shopPurchaseConfirmWindow :is(#shopPurchaseCancelButton, #shopPurchaseConfirmButton):active { transform: none; }
}
/* Purchase dialogs use the creator's plain surfaces, outside the Slab family. */
body #shopPurchaseCard,
body #shopPurchaseConfirmWindow:is(.simple-purchase-confirmation,.shop-color-palette) .shop-confirm-card {
  border:1px solid var(--luma-border-soft) !important; border-image:none !important;
  border-radius:18px; background:var(--luma-surface-cream) !important;
  box-shadow:var(--luma-shadow-soft) !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
  color:var(--luma-text-primary);
}
body #shopPurchaseCard .shop-purchase-heading { border:0; background:transparent; box-shadow:none; }
body #shopPurchaseCard #shopPurchaseButton,
body #shopPurchaseConfirmWindow #shopPurchaseConfirmButton {
  background:var(--luma-accent-deep) !important; color:var(--luma-surface-cream) !important;
  border:1px solid var(--luma-accent-deep); border-radius:9px; box-shadow:none !important; text-shadow:none;
}
body #shopPurchaseConfirmWindow #shopPurchaseCancelButton,
body #shopPurchaseCard #shopPurchaseChangeColorButton,
body #shopPurchaseCard .shop-purchase-quantity-button {
  background:var(--luma-surface-soft) !important; color:var(--luma-text-primary) !important;
  border:1px solid var(--luma-border-soft); border-radius:9px; box-shadow:none !important; text-shadow:none;
}
body #shopPurchaseCard #shopPurchaseButton:is(:hover,:focus-visible):not(:disabled),
body #shopPurchaseConfirmWindow #shopPurchaseConfirmButton:is(:hover,:focus-visible):not(:disabled) {
  background:var(--luma-accent-coral) !important; color:var(--luma-surface-cream) !important; box-shadow:none !important;
}
body #shopPurchaseConfirmWindow #shopPurchaseCancelButton:is(:hover,:focus-visible):not(:disabled) {
  background:var(--luma-surface-cream) !important; color:var(--luma-text-primary) !important; box-shadow:none !important;
}
body #shopPurchaseCard #shopPurchaseCloseButton,
body #shopPurchaseConfirmWindow #shopPurchaseConfirmCloseButton {
  background:var(--luma-surface-soft) !important; border:1px solid var(--luma-border-soft) !important;
  color:var(--luma-text-primary) !important; box-shadow:none !important;
}

/* Saved-color paint bucket selection for home walls. */
.wall-paint-window { position: fixed; inset: 0; z-index: 1250; display: grid; place-items: center; padding: 24px; box-sizing: border-box; background: #352a382b; }
.wall-paint-card { width: min(320px, 100%); box-sizing: border-box; padding: 20px; background: linear-gradient(135deg, #fff5e7, #f5dfc8) !important; color: #684632; max-height: calc(100dvh - 48px); overflow-y: auto; }
.wall-paint-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wall-paint-card h2 { font: 700 21px var(--luma-font-family); margin: 0; }
.wall-paint-card p { font-size: 12px; }
.wall-paint-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 12px 0; }
.wall-paint-options button { display: flex; flex-direction: column; align-items: center; padding: 6px; border: 1px solid #dfb699; border-radius: 12px; font-size: 10px; }
.wall-paint-options img { width: 64px; height: 64px; object-fit: contain; }
.wall-paint-options button.selected { outline: 2px solid #ad84cc; outline-offset: 1px; }
.wall-paint-card .wall-paint-apply { width: 100%; min-height: 36px; border-radius: 20px; background: linear-gradient(#d9a3fa, #9d65d6 60%, #bb8ee7) !important; color: #fff8ff !important; }

/* Reuse the seed confirmation pill and its button transitions. */
.wall-paint-confirm { z-index: 1250; }
.wall-paint-confirm button:disabled { opacity: .55; pointer-events: none; }
#gameCanvas.wall-paint-active, canvas.wall-paint-active { cursor: var(--wall-paint-cursor) !important; }
.wall-paint-cursor { position: fixed; pointer-events: none; white-space: nowrap; padding: 6px 12px; border-radius: 16px; background: #684632; color: #fff5e7; font-size: 12px; left: 0; top: 0; }

.diagnostics-copy { display: block; margin: 14px auto 0; border: 1px solid #d9b5a0; border-radius: 18px; padding: 8px 16px; background: #fff5e7; color: #684632; cursor: pointer; }
.diagnostics-report { position: fixed; inset: 10%; z-index: 2000; padding: 16px; border-radius: 18px; background: #fff5e7; }
.diagnostics-report textarea { width: 100%; height: 85%; font-family: monospace; }

/* Reserved headwear slots share Outfit's existing scroll area. */
.luma-slab-headwear-heading { grid-column: 1 / -1; margin: 4px 0 0; color: #fff5ff; font-size: 16px; }
.luma-slab-outfit-slot:disabled { cursor: default; opacity: .65; }

/* Builder-only headwear mask authoring. */
.headwear-mask-editor { position: fixed; z-index: 1300; width: min(410px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; box-sizing: border-box; padding: 10px; border: 1px solid #c39c83; border-radius: 18px; background: #fff5ed; color: #765043; box-shadow: 0 12px 32px #36252d55; font: 12px var(--luma-font-family); scrollbar-width: thin; }
.headwear-mask-editor header { position: sticky; top: -10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; background: #fff5ed; z-index: 1; cursor: move; touch-action: none; }
.headwear-mask-editor p { margin: 7px 0; font-size: 11px; line-height: 1.4; }
.headwear-mask-editor button, .headwear-mask-editor select, .headwear-mask-editor input { font: inherit; color: inherit; border: 1px solid #dec4b4; border-radius: 8px; padding: 6px; background: #fffaf5; min-width: 0; }
.headwear-mask-editor button { cursor: pointer; }
.headwear-mask-editor button:disabled { opacity: .55; cursor: default; }
.headwear-mask-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 6px 0; }
.headwear-mask-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.headwear-mask-editor canvas { display: block; width: 100%; aspect-ratio: 1; background: repeating-conic-gradient(#f3e4db 0% 25%, #fff8f2 0% 50%) 0 0 / 20px 20px; border-radius: 12px; touch-action: none; cursor: crosshair; }
.fountain-water-editor { width:min(660px,calc(100vw - 16px)); }
.fountain-water-editor canvas { aspect-ratio:768/600; }
.fountain-water-editor .headwear-mask-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.fountain-water-editor .headwear-mask-fields label { display:flex; flex-direction:column; gap:3px; }
.fountain-water-editor .fountain-water-animation-toggle { display:flex; align-items:center; gap:8px; margin:8px 0; }
.fountain-water-editor .fountain-water-animation-toggle input { width:auto; flex:0 0 auto; margin:0; }
.builder-npc-editor .builder-npc-toggle { display:flex; align-items:center; gap:8px; margin:8px 0; }
.builder-npc-editor .builder-npc-toggle input { width:auto; flex:0 0 auto; margin:0; }
.headwear-mask-editor .headwear-mask-save { width: 100%; background: #e6d3ef; font-weight: 600; }
.headwear-mask-status { min-height: 30px; }

.headwear-mask-back-toggle { display: flex; align-items: center; gap: 6px; margin: 8px 0; cursor: pointer; }
.headwear-mask-back-toggle input { accent-color: #765043; width: 14px; height: 14px; flex: 0 0 14px; margin: 0; padding: 0; }
.mannequin-outfit-window{position:fixed;z-index:1100;left:50%;top:50%;transform:translate(-50%,-50%);width:440px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);display:flex;flex-direction:column;border:1px solid #d8b8a8;border-radius:18px;background:#fff5eb;color:#624b43;box-shadow:0 14px 45px #0005;font-size:12px}
.mannequin-outfit-window header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#c2aace;border-radius:18px 18px 0 0;cursor:move;touch-action:none}
.mannequin-outfit-body{padding:12px;overflow:auto;display:grid;grid-template-columns:150px minmax(0,1fr);gap:10px}
.mannequin-outfit-body canvas{width:150px;max-width:100%;height:auto;background:#f3e8dd;border-radius:12px;align-self:center}
.mannequin-outfit-slots{display:grid;gap:8px;min-width:0}
.mannequin-outfit-slots section{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;padding:8px;border:1px solid #e1cbbc;border-radius:12px}
.mannequin-outfit-slots strong{grid-column:1/-1}.mannequin-outfit-slots select{min-width:0;width:100%}
.mannequin-outfit-window button,.mannequin-outfit-window select{font:inherit;color:inherit;padding:7px;border:1px solid #d6b8ab;border-radius:8px;background:#fffaf5}
.mannequin-outfit-window button:disabled{opacity:.45}.mannequin-outfit-body footer{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}.mannequin-outfit-body small{grid-column:1/-1;line-height:1.4}.mannequin-outfit-status{margin:0;padding:0 12px 12px}
@media(max-width:480px){.mannequin-outfit-body{grid-template-columns:100px minmax(0,1fr);gap:7px}.mannequin-outfit-body canvas{width:100px}.mannequin-outfit-slots section{padding:6px}}
.surface-offset-editor > label { display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin: 6px 0; }
.surface-offset-editor input[type="checkbox"] { width: 14px; height: 14px; padding: 0; margin: 0; accent-color: #765043; }
.surface-offset-editor .headwear-mask-fields label { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.character-creator-skin-tint { display:grid; grid-template-columns:64px minmax(0,1fr) 32px; align-items:center; gap:3px 8px; margin-top:6px; font-size:10px; color:#765043; }
.character-creator-skin-tint label, .character-creator-skin-tint output { margin:0; padding:0; font-size:10px; line-height:1.2; }
.character-creator-skin-tint output { text-align:right; }
.character-creator-skin-tint input[type="range"] { width:100%; min-width:0; height:24px; min-height:0; padding:0; margin:0; accent-color:#8c70b6; }
#characterCreatorBodyPanel { overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; touch-action:pan-y; }
#characterCreatorBodyPanel > .character-creator-section { flex-shrink:0; }
#characterCreatorWindow :is(.character-creator-title, .character-creator-subtitle) { text-shadow:none; }
.slab-tutorial-modal { position:fixed; inset:0; z-index:1400; background:#30243866; display:flex; align-items:center; justify-content:center; padding:16px; }
.slab-tutorial-coach { position:fixed; bottom:16px; left:16px; z-index:1400; width:max-content; max-width:calc(100vw - 32px); }
#slabTutorial[hidden] { display:none; }
.slab-tutorial-card { display:flex; gap:12px; width:370px; max-width:100%; box-sizing:border-box; padding:16px; border-radius:18px; border:1px solid #d3bdac; background:#fff8ed; color:#624a40; box-shadow:0 8px 28px #34233644; }
.slab-tutorial-portrait { position:relative; overflow:hidden; width:70px; height:90px; border-radius:12px; background:#e9ddef; flex-shrink:0; }
.slab-tutorial-portrait img { position:absolute; width:180px; max-width:none; height:auto; top:-4px; left:50%; transform:translateX(-50%); }
.slab-tutorial-copy { flex:1; min-width:0; }
.slab-tutorial-copy h2 { font-size:16px; margin:0 0 6px; }
.slab-tutorial-copy p { font-size:12px; line-height:1.45; margin:0 0 8px; }
.slab-tutorial-actions { display:flex; gap:6px; flex-wrap:wrap; }
.slab-tutorial-actions button, #slabTutorialGuideButton { padding:8px 10px; min-height:34px; border:1px solid #b99ea3; border-radius:10px; background:#eee3f3; color:#604458; font-size:12px; cursor:pointer; }
.slab-tutorial-actions [data-primary] { background:#845669; color:#fff; }
.slab-tutorial-actions [hidden] { display:none; }
.slab-tutorial-indicator { position:fixed; z-index:1401; pointer-events:none; box-sizing:border-box; border:3px solid #ddb950; box-shadow:0 0 0 5px #ffe59955; transform-origin:center; animation:slab-tutorial-indicator-enter .45s ease-out, slab-tutorial-indicator-pulse 1.4s .45s ease-in-out infinite; }
.slab-tutorial-indicator[hidden] { display:none; }
.slab-tutorial-flower-view .slab-tutorial-card { width:310px; padding:10px; gap:8px; }
.slab-tutorial-flower-view .slab-tutorial-portrait { width:48px; height:64px; }
.slab-tutorial-flower-view .slab-tutorial-portrait img { width:145px; }
.slab-tutorial-flower-view .slab-tutorial-copy h2 { font-size:14px; margin-bottom:4px; }
.slab-tutorial-flower-view .slab-tutorial-copy p { font-size:11px; margin-bottom:6px; }
.slab-tutorial-flower-view .slab-tutorial-actions button { min-height:28px; padding:5px 7px; font-size:10px; }
.slab-tutorial-coach.slim-world-coach .slab-tutorial-portrait { display:none; }
@keyframes slab-tutorial-indicator-enter { from { transform:scale(3); opacity:0; } 20% { opacity:1; } to { transform:scale(1); opacity:1; } }
@keyframes slab-tutorial-indicator-pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.06); } }
.slab-tutorial-stacked-panel { position:fixed !important; top:calc(var(--slab-guide-height) + 24px) !important; left:8px !important; width:calc(100vw - 16px) !important; max-width:calc(100vw - 16px) !important; max-height:calc(100dvh - var(--slab-guide-height) - 40px) !important; min-height:0 !important; overflow:auto !important; transform:none !important; translate:none !important; }
@media(prefers-reduced-motion:reduce) { .slab-tutorial-indicator { animation:none; } }
@media(max-width:480px) { .slab-tutorial-coach { left:8px; bottom:max(8px,env(safe-area-inset-bottom)); max-width:calc(100vw - 16px); } .slab-tutorial-card { width:344px; padding:12px; gap:8px; } .slab-tutorial-portrait { width:48px; height:68px; } .slab-tutorial-portrait img { width:145px; } }
.slab-tutorial-gift { display:block; width:58px; height:58px; object-fit:contain; margin:4px auto 10px; }
.slab-tutorial-gift[hidden] { display:none; }
.slab-tutorial-concealed { visibility:hidden !important; pointer-events:none !important; }
.slab-tutorial-flying { position:fixed; z-index:1600; object-fit:contain; pointer-events:none; margin:0; }
.slab-tutorial-gift-view .slab-tutorial-portrait { display:none; }
.slab-tutorial-gift-view .slab-tutorial-copy { text-align:center; }
.slab-tutorial-gift-view .slab-tutorial-gift { width:140px; height:140px; margin:16px auto; }
.slab-tutorial-gift-view .slab-tutorial-actions { justify-content:center; }
@media (max-width:700px), (pointer:coarse) and (max-width:900px) {
  #slabTutorial .slab-tutorial-card { width:min(360px,calc(100vw - 16px)); min-height:100px; padding:8px; gap:8px; }
  #slabTutorial .slab-tutorial-portrait { width:48px; height:48px; border-radius:10px; }
  #slabTutorial .slab-tutorial-portrait img { width:145px; }
  #slabTutorial .slab-tutorial-copy h2 { font-size:13px; line-height:1.2; margin:0 0 2px; }
  #slabTutorial .slab-tutorial-copy p { font-size:11px; line-height:1.3; margin:0 0 5px; }
  #slabTutorial [data-status]:empty { display:none; }
  #slabTutorial .slab-tutorial-actions { gap:4px; flex-wrap:nowrap; overflow-x:auto; }
  #slabTutorial .slab-tutorial-actions button { min-height:30px; padding:4px 7px; font-size:11px; line-height:1.2; white-space:nowrap; flex-shrink:0; }
  #slabTutorial.mobile-fixed-coach { max-height:calc(100dvh - var(--slab-guide-top) - 8px); overflow-y:auto; }
  #slabTutorial.slab-tutorial-coach .slab-tutorial-card { display:grid; grid-template-columns:44px minmax(0,1fr); width:min(180px,calc(100vw - 16px)); min-height:0; }
  #slabTutorial.slab-tutorial-coach .slab-tutorial-portrait { width:44px; height:44px; grid-column:1; grid-row:1 / span 2; }
  #slabTutorial.slab-tutorial-coach .slab-tutorial-copy { display:contents; }
  #slabTutorial.slab-tutorial-coach h2 { grid-column:2; grid-row:1; }
  #slabTutorial.slab-tutorial-coach [data-dialogue] { grid-column:2; grid-row:2; overflow-wrap:anywhere; }
  #slabTutorial.slab-tutorial-coach [data-status] { overflow-wrap:anywhere; }
  #slabTutorial.slab-tutorial-coach [data-status],
  #slabTutorial.slab-tutorial-coach .slab-tutorial-actions { grid-column:1 / -1; }
  #slabTutorial.slab-tutorial-coach .slab-tutorial-actions { flex-wrap:wrap; overflow:visible; }
  #slabTutorial.slab-tutorial-coach .slab-tutorial-actions button { padding:4px 6px; font-size:10px; }
  #slabTutorial.slab-tutorial-gift-view .slab-tutorial-copy { display:grid; grid-template-columns:48px minmax(0,1fr); column-gap:8px; row-gap:5px; text-align:left; }
  #slabTutorial.slab-tutorial-gift-view .slab-tutorial-gift { grid-column:1; grid-row:1 / span 2; width:48px; height:48px; margin:0; }
  #slabTutorial.slab-tutorial-gift-view h2 { grid-column:2; grid-row:1; }
  #slabTutorial.slab-tutorial-gift-view [data-dialogue] { grid-column:2; grid-row:2; }
  #slabTutorial.slab-tutorial-gift-view [data-status],
  #slabTutorial.slab-tutorial-gift-view .slab-tutorial-actions { grid-column:1 / -1; justify-content:flex-start; }
}
.slab-tutorial-arrival { animation:slab-tutorial-gold 1.4s ease-out; }
@keyframes slab-tutorial-gold { 0%,40% {filter:brightness(1.6);outline:4px solid #ffd55f;box-shadow:0 0 30px #ffd55f;} 100% {filter:brightness(1);outline:0 solid transparent;box-shadow:none;} }
/* Journal shares the Slab frame; settings remains available in its header. */
#lumaSlabWindow .luma-slab-move-strip { flex:1; min-width:0; }
#lumaSlabWindow #lumaSlabSettings { flex-shrink:0; width:32px; height:32px; min-width:32px; min-height:32px; padding:0; display:flex; align-items:center; justify-content:center; }
#lumaSlabSettings img { display:block; flex-shrink:0; width:36px; height:36px; object-fit:contain; }
/* Keep navigation with the gear/close controls instead of a second content row. */
#lumaSlabWindow :is(#lumaSlabOutfitBack,#lumaSlabJournalBack) { display:none !important; }
#lumaSlabWindow.showing-outfit #lumaSlabOutfitBack,
#lumaSlabWindow.showing-journal #lumaSlabJournalBack { display:grid !important; }
.luma-slab-app-host .luma-window-header { flex-wrap:nowrap; }
.luma-slab-app-host .luma-window-header > div { min-width:0; }
.showing-journal .luma-slab-app-grid, .showing-journal .luma-slab-travel-grid { display:none; }
.luma-slab-journal-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin-bottom:12px; }
.luma-slab-journal-tabs button { min-width:0; min-height:36px; padding:6px 3px; font-size:11px; border:1px solid #d5b9ad; border-radius:10px; color:#624b55; background:#fff8ed; }
.luma-slab-journal-tabs button[aria-selected="true"] { background:#e6d8f1; border-color:#9576b8; box-shadow:inset 0 0 0 1px #9576b8; }
.luma-slab-journal-panel { min-height:160px; padding:14px; border:1px solid #d5b9ad; border-radius:14px; background:#fff8ed; color:#624b55; }
.luma-slab-journal-panel[hidden] { display:none; }
.luma-slab-journal-panel h3 { margin:0 0 10px; font-size:14px; }
.luma-slab-journal-checklist { list-style:none; padding:0; margin:0; }
.luma-slab-journal-panel p { font-size:12px; }
.journal-task { display:flex; flex-direction:column; gap:8px; padding:10px; border:1px solid #dcc9b8; border-radius:10px; font-size:12px; overflow-wrap:anywhere; }
.journal-task strong { font-size:13px; }
.journal-task-reward { color:#806021; }
.journal-task-reward img { width:18px; height:18px; object-fit:contain; vertical-align:middle; }
.journal-task-progress { font-size:11px; line-height:1.5; }
.journal-task.completed { background:#eef2e3; border-color:#a6b58d; }
/* Compact cream sale window beside the original collecting card. */
.item-sale-panel { position:fixed; z-index:1200; width:260px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); box-sizing:border-box; overflow:auto; padding:14px; border:1px solid #e4d4c8; border-radius:16px; background:#fffaf4; color:#624a40; font-family:var(--luma-font-family); box-shadow:0 5px 20px #4b332833; }
.item-sale-panel[hidden] { display:none; }
.item-sale-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.item-sale-header h2 { margin:0; font-size:15px; line-height:1.3; text-shadow:none; overflow-wrap:anywhere; }
.item-sale-header button { width:28px; height:28px; min-width:28px; min-height:28px; padding:0; border:1px solid #dfc5b5; border-radius:9px; background:#fff7ee; color:#755449; }
.item-sale-summary { margin-bottom:10px; font-size:11px; line-height:1.4; }
.item-sale-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.item-sale-panel .sell-quantity-section { grid-column:1 / -1; width:100%; min-width:0; gap:8px; }
.item-sale-panel .shop-purchase-quantity-label { font-size:11px; }
.item-sale-panel .shop-purchase-quantity-controls { display:flex; align-items:center; gap:5px; flex-shrink:0; }
.item-sale-panel .shop-purchase-quantity-button { width:28px; min-width:28px; height:30px; min-height:30px; padding:0; border:1px solid #dfc5b5; border-radius:8px; background:#fff7ee; color:#755449; }
.item-sale-panel .shop-purchase-quantity-input { width:48px; min-width:0; height:30px; min-height:30px; padding:4px; box-sizing:border-box; text-align:center; border:1px solid #dfc5b5; border-radius:8px; background:#fffcf8; }
.item-sale-panel :is(#sellConfirmButton, #sellCancelButton) { width:100%; min-width:0; min-height:34px; padding:6px 8px; border:1px solid #d4b5a6; border-radius:9px; font-size:11px; line-height:1.3; background:#fff5ea; color:#755449; }
.item-sale-panel #sellConfirmButton { background:#845669; color:#fff; }

.character-creator-brow-layer { display:flex; align-items:center; gap:7px; font-size:12px; color:#755449; padding:6px 0; white-space:nowrap; flex-shrink:0; }
#characterCreatorBrowsAboveHair, #characterCreatorBrowsMatchHair { width:14px; min-width:14px; height:14px; min-height:14px; margin:0; flex:0 0 14px; }

/* Crafted instance cards retain the standard collecting-card actions and history. */
body :is(#itemContextCard, .item-card-fade-copy).crafted-card.collecting-front { background-image:url('assets/UI/cards/crafted-front-blank.png') !important; }
body :is(#itemContextCard, .item-card-fade-copy).limited-card.collecting-front { background-image:url('assets/UI/cards/limited-front-blank.png') !important; }
body :is(#itemContextCard, .item-card-fade-copy).limited-card.collecting-back { background-image:url('assets/UI/cards/limited-back-blank.png') !important; }
body :is(#itemContextCard, .item-card-fade-copy).crafted-card.collecting-back { background-image:url('assets/UI/cards/crafted-back-blank.png') !important; }
:is(#itemContextCard, .item-card-fade-copy).crafted-card.collecting-front .item-context-icon { left:74px; top:76px; width:132px; height:125px; }
:is(#itemContextCard, .item-card-fade-copy).crafted-card.collecting-back .item-collecting-content { top:48px; height:326px; }

/* The complete item catalogue and compact type filters share one bounded panel. */
.journal-collection { padding:10px; min-height:0; }
#journalDiscoveryToast { position:fixed; z-index:1300; top:max(18px,env(safe-area-inset-top)); left:50%; transform:translate(-50%,-8px); display:flex; flex-direction:column; gap:4px; width:max-content; max-width:calc(100vw - 32px); box-sizing:border-box; padding:12px 22px; border:1px solid #cbb4d5; border-radius:14px; background:#fff8edf5; box-shadow:0 5px 20px #44304d24; color:#624b55; text-align:center; pointer-events:none; opacity:0; visibility:hidden; transition:opacity 220ms,transform 220ms,visibility 220ms; overflow-wrap:anywhere; }
#journalDiscoveryToast.visible { opacity:1; visibility:visible; transform:translate(-50%,0); }
#journalDiscoveryToast strong { font-size:14px; }
#journalDiscoveryToast span { font-size:12px; color:#795d78; }
@media(prefers-reduced-motion:reduce){#journalDiscoveryToast{transition:none;transform:translateX(-50%)}}
.journal-collection-progress { display:flex; align-items:center; gap:9px; min-width:0; height:14px; margin-bottom:9px; }
.journal-collection-progress span { flex-shrink:0; font-size:10px; line-height:14px; color:#795d78; }
.journal-collection-progress progress { appearance:none; flex:1; width:0; min-width:0; height:8px; border:0; border-radius:6px; overflow:hidden; background:#e9dfed; accent-color:#a88bc8; }
.journal-collection-progress progress::-webkit-progress-bar { background:#e9dfed; border-radius:6px; }
.journal-collection-progress progress::-webkit-progress-value { background:linear-gradient(90deg,#bd9ed6,#9284c4); border-radius:6px; }
.journal-collection-progress progress::-moz-progress-bar { background:linear-gradient(90deg,#bd9ed6,#9284c4); border-radius:6px; }
.journal-collection-layout { display:grid; grid-template-columns:82px minmax(0,1fr); gap:9px; height:clamp(180px,35dvh,280px); min-width:0; }
.journal-collection-types { display:flex; flex-direction:column; gap:3px; min-height:0; overflow-y:auto; padding-right:4px; border-right:1px solid #e1d0bf; scrollbar-width:thin; }
.journal-collection-types button { flex-shrink:0; min-width:0; min-height:25px; padding:5px 4px; border:1px solid transparent; border-radius:7px; text-align:left; font:inherit; font-size:10px; line-height:1.2; background:transparent; color:#795d58; overflow-wrap:anywhere; }
.journal-collection-types button[aria-pressed='true'] { background:#e8dced; border-color:#cbb4d5; color:#59405e; }
.journal-collection-results { display:flex; flex-direction:column; min-width:0; min-height:0; }
.journal-collection-results h3 { flex-shrink:0; margin:2px 0 7px; font-size:12px; }
.journal-collection-list { list-style:none; padding:0 3px 0 0; margin:0; min-height:0; overflow-y:auto; scrollbar-width:thin; overscroll-behavior:contain; }
.journal-collection-item { display:flex; align-items:center; gap:7px; min-height:43px; padding:5px 0; border-bottom:1px solid #e9dcd0; }
.journal-collection-item:last-child { border-bottom:0; }
.journal-collection-icon { position:relative; display:grid; place-items:center; width:32px; height:32px; flex:0 0 32px; font-size:22px; }
.journal-collection-icon img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.journal-collection-icon img[hidden] { display:none; }
.journal-collection-name { min-width:0; font-size:11px; line-height:1.35; overflow-wrap:anywhere; }

/* Compact bag-style Collection tiles open the full collecting card on selection. */
#lumaSlabWindow.showing-journal .luma-slab-home-card { width:min(480px,calc(100vw - 32px)); }
.journal-collection-layout { height:clamp(207px,calc(43dvh - 23px),357px); }
.journal-collection-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); align-content:start; gap:9px; }
.journal-collection-item { display:block; min-width:0; min-height:0; padding:0; border:0; }
.journal-collection-card { position:relative; display:flex; flex-direction:column; align-items:center; gap:4px; box-sizing:border-box; width:100%; height:140px; border-radius:14px; font:inherit; color:#765043; cursor:pointer; transition:filter 180ms,opacity 180ms; }
.journal-collection-item:not(.seen) .journal-collection-card { filter:grayscale(1); opacity:.58; }
.journal-collection-card:focus-visible { outline:2px solid #8d5da3; outline-offset:1px; }
.journal-collection-card .journal-collection-icon { position:relative; width:100%; height:78px; flex:0 0 78px; font-size:32px; }
.journal-collection-card .journal-collection-name { width:100%; min-height:26px; font-size:11px; font-weight:600; line-height:13px; text-align:center; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.journal-collection-seen { width:100%; font-size:9px; line-height:11px; text-align:center; }
.journal-collection-item.seen .journal-collection-seen { color:#567344; }
#journalCollectionStatus { flex-shrink:0; font-size:10px; margin:0 0 6px; }
#journalCollectionStatus[hidden] { display:none; }
@media(max-width:420px){.journal-collection-layout{grid-template-columns:72px minmax(0,1fr);gap:7px}.journal-collection-list{gap:6px}.journal-collection-types button{font-size:9px}}
body .world-object-inspection-card[data-collection-preview="true"] { z-index:1201; }

/* Card handles stay clear of the action rail and body controls. */
.item-card-drag-handle { position:absolute; z-index:6; top:0; left:0; right:48px; height:28px; cursor:grab; touch-action:none; user-select:none; }
:is(#itemContextCard,.world-object-inspection-card):is(.collecting-front,.collecting-back) > .item-card-drag-handle { right:auto; width:280px; height:68px; }
.item-card-moving > .item-card-drag-handle { cursor:grabbing; }
.luma-action-ribbon .luma-action { touch-action:none; }
.luma-touch-action-input .luma-action-ribbon .luma-action .luma-action__label { opacity:0 !important; transform:translate(-4px,-50%) !important; }
.luma-touch-action-input .luma-action-ribbon[data-label-side='left'] .luma-action .luma-action__label { transform:translate(4px,-50%) !important; }
.luma-touch-action-input .luma-action-ribbon .luma-action.is-touch-target .luma-action__label { opacity:1 !important; transform:translate(0,-50%) !important; }

.journal-collection-item { min-height:auto; }
body #journalCollectionList .journal-collection-card { background:linear-gradient(135deg,#fffdf8,#fff4e9) !important; border:1px solid #ead3c1 !important; padding:7px 6px !important; box-shadow:0 3px 8px #966b4312 !important; }

/* Expanded Outfit grid; keep every equipment row inside the Slab frame. */
#lumaSlabWindow.showing-outfit .luma-slab-home-card { width:min(360px,calc(100vw - 40px)); }
#lumaSlabWindow.showing-outfit .luma-slab-phone-content { overflow-y:auto; overscroll-behavior:contain; }
#lumaSlabWindow.showing-outfit .luma-slab-outfit-slots { padding-bottom:4px; }
#lumaSlabWindow.showing-outfit .luma-slab-outfit-slot { box-sizing:border-box; }

/* Event trades share the crafting window; the editor remains usable on narrow screens. */
.event-trading-window .crafting-body:has(> fieldset), .event-trading-window .crafting-body:has(> input) { display:flex; flex-direction:column; gap:12px; }
.event-trading-window :is(input,select,fieldset) { min-width:0; max-width:100%; box-sizing:border-box; }
.event-trading-window select { width:100%; }
.event-trading-window input[type=number] { width:90px; }
.event-trading-window fieldset { display:flex; flex-direction:column; gap:10px; }
.event-trade-cost { display:flex; gap:8px; flex-wrap:wrap; }
.event-trade-cost select { flex:1 1 180px; }
.event-trading-window .crafting-grid button[aria-pressed=true] { outline:2px solid #b798cf; }
.event-trading-window .inventory-item-name { white-space:normal; overflow-wrap:anywhere; }
.event-trading-window .crafting-output-preview .inventory-item-image { width:100%; height:100%; object-fit:contain; }
.event-trading-window input:not([type=checkbox]), .event-trading-window select { background:#fffaf5; color:#654b3c; }

/* Match the compact phone Bag across item browsers; detail/action panels stay full width. */
@media (max-width:700px), (pointer:coarse) and (max-width:900px) {
  #inventoryWindow .wardrobe-item { min-width:0;aspect-ratio:auto;min-height:100px;padding:6px 3px;border-radius:12px; }
  #inventoryWindow .wardrobe-item-icon { width:48px;max-width:100%;height:48px;font-size:28px; }
  #inventoryWindow .wardrobe-item :is(.clothing-gender-badge,.wardrobe-item-name) { max-width:100%;font-size:9px;overflow-wrap:anywhere; }
  #inventoryWindow .wardrobe-item-checkmark { width:16px;height:16px;font-size:10px;top:4px;right:4px; }

  .shop-window .shop-content { grid-template-columns:minmax(0,1fr);gap:10px;padding:0 12px 12px; }
  .shop-window .shop-grid { grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-width:0;padding:2px; }
  .shop-window .shop-item { min-width:0;padding:6px 3px;gap:4px;border-radius:12px; }
  .shop-window .shop-item-preview { width:48px;max-width:100%;height:48px;flex:0 0 48px;border-radius:8px; }
  .shop-window .shop-item-name { font-size:10px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical; }
  .shop-window .shop-item :is(.shop-item-price,.shop-item-owned,.clothing-gender-badge) { max-width:100%;font-size:9px;line-height:1.2;white-space:normal;overflow-wrap:anywhere; }

  .crafting-shop .crafting-body { grid-template-columns:minmax(0,1fr);padding:10px;gap:10px; }
  .crafting-shop .crafting-detail { border-left:0;border-top:1px solid #e4d4c2;padding:10px 0 0; }
  .crafting-shop .crafting-grid { grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-width:0; }
  .crafting-shop .crafting-grid > p { grid-column:1/-1; }
  .crafting-shop .crafting-grid .inventory-slot { width:100%;min-width:0;min-height:106px;aspect-ratio:auto;padding:6px 3px;gap:4px;border-radius:12px; }
  .crafting-shop .crafting-grid .inventory-item-icon { width:48px;max-width:100%;height:48px;flex:0 0 48px;font-size:28px; }
  .crafting-shop .crafting-grid .inventory-item-name { font-size:10px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
  .crafting-shop .crafting-grid .inventory-quantity { top:4px;right:4px;font-size:9px;padding:2px 4px; }

  .journal-collection-layout { display:flex;flex-direction:column;gap:6px; }
  .journal-collection-types { flex-direction:row;flex-shrink:0;overflow-x:auto;padding:0 0 4px;border-right:0;border-bottom:1px solid #e1d0bf; }
  .journal-collection-results { flex:1; }
  .journal-collection-list { grid-template-columns:repeat(4,minmax(0,1fr));gap:4px; }
  body #journalCollectionList .journal-collection-card { height:108px;min-width:0;padding:5px 3px !important;border-radius:12px;gap:3px; }
  .journal-collection-card .journal-collection-icon { width:100%;height:48px;flex-basis:48px;font-size:28px; }
  .journal-collection-card .journal-collection-name { font-size:10px;line-height:12px;min-height:24px; }
  .journal-collection-card .journal-collection-seen { font-size:8px;line-height:10px; }
}

/* Game catalogues share the character creator's plain cream finish. */
body .shop-window > .shop-card {
  width: min(820px, calc(100vw - 32px));
  height: min(650px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--luma-border-soft) !important;
  border-image: none !important;
  border-radius: 18px !important;
  background: var(--luma-surface-cream) !important;
  color: var(--luma-text-primary) !important;
  box-shadow: 0 16px 44px rgba(55, 37, 30, .22) !important;
  backdrop-filter: none !important;
}
body .shop-window .shop-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--luma-border-soft);
  background: none;
}
body .shop-window .shop-header .shop-title { color: var(--luma-text-primary) !important; font-size: 23px; }
body .shop-window .shop-header .shop-subtitle { color: var(--luma-text-secondary) !important; font-size: 9px; }
body .shop-window .shop-header > div { min-width:0; }
body .shop-window .shop-header .shop-subtitle { overflow-wrap:anywhere; }
body :is(#furnitureShopWindow,#clothingShopWindow) .shop-header .shop-subtitle[hidden] { display:none !important; }
body .shop-window .shop-balance-row { margin: 12px 16px; padding: 9px 12px; background: var(--luma-surface-ivory); border: 1px solid var(--luma-border-soft); border-radius: 12px; color: var(--luma-text-primary); }
body .shop-window .shop-category-tabs { padding: 0 16px 10px; gap: 6px; }
body .shop-window .shop-content { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; padding: 0 16px 16px; overflow: hidden; }
body .shop-window .shop-grid { min-height: 0; max-height: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px 6px 2px 2px; align-content: start; overflow-y: auto; }
body .shop-window button { color: var(--luma-text-primary) !important; background: var(--luma-surface-ivory) !important; border: 1px solid #e5b6a3 !important; box-shadow: none !important; }
body .shop-window button:hover { background: var(--luma-surface-soft) !important; }
body .shop-window .shop-item { min-width: 0; padding: 10px 6px; gap: 6px; border-radius: 12px; }
body .shop-window .shop-item.selected { background: #f4d9d2 !important; border: 2px solid #65483d !important; padding: 9px 5px; }
body .shop-window .shop-item-preview { width: 76px; height: 76px; max-width: 100%; margin: 0 auto; border-radius: 10px; background: transparent; }
body .shop-window .shop-item-name { width: 100%; font-size: 11px; line-height: 1.3; min-height: 2.6em; white-space: normal; overflow-wrap: anywhere; color: var(--luma-text-primary); }
body .shop-window .shop-item-price { font-size: 11px; color: var(--luma-text-secondary); }
body .shop-window .shop-details { min-height: 0; padding: 14px; border-radius: 12px; border: 1px solid var(--luma-border-soft); background: var(--luma-surface-ivory); overflow-y: auto; color: var(--luma-text-primary); }
body .shop-window .shop-detail-preview { height: 112px; background: transparent; }
body .shop-window .shop-detail-name { font-size: 16px; color: var(--luma-text-primary); }
body .shop-window :is(.shop-detail-category, .shop-detail-description, .shop-detail-balance, .shop-details-empty) { color: var(--luma-text-secondary); font-size: 11px; line-height: 1.5; }
body .shop-window .shop-detail-price { color: var(--luma-text-primary); font-size: 15px; }
body .shop-window :is(.shop-buy-button, .shop-category-tab.active) { background: var(--luma-accent-deep) !important; color: #fffaf5 !important; border-color: var(--luma-accent-deep) !important; }
body .shop-window .shop-buy-button { width: 100%; min-height: 36px; border-radius: 9px; font-size: 12px; }
body .shop-window .shop-close { width: 32px; height: 32px; border-radius: 10px; }
body .shop-window button:focus-visible { outline: 2px solid var(--luma-accent-deep) !important; outline-offset: 2px; }
@media (max-width: 700px), (pointer: coarse) and (max-width: 900px) {
  body .shop-window { padding: 10px; }
  body .shop-window > .shop-card { width: calc(100vw - 20px); height: min(680px, calc(100dvh - 20px)); max-height: calc(100dvh - 20px); }
  body .shop-window .shop-header { padding: 10px 12px; }
  body .shop-window .shop-header .shop-title { font-size: 17px; }
  body .shop-window .shop-header .shop-subtitle { font-size: 8px; }
  body .shop-window .shop-balance-row { margin: 7px 10px; padding: 6px 9px; font-size: 10px; }
  body .shop-window .shop-category-tabs { padding: 0 10px 7px; }
  body .shop-window .shop-content { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(80px, 1fr) auto; gap: 7px; padding: 0 10px 10px; }
  body .shop-window .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  body .shop-window .shop-item { padding: 6px 4px; gap: 3px; }
  body .shop-window .shop-item.selected { padding: 5px 3px; }
  body .shop-window .shop-item-preview { width: 52px; height: 52px; }
  body .shop-window :is(.shop-item-name, .shop-item-price) { font-size: 9px; }
  body .shop-window .shop-details { max-height: 39dvh; padding: 8px; }
  body .shop-window .shop-detail-preview { display: none; }
  body .shop-window .shop-detail-name { font-size: 13px; }
  body .shop-window :is(.shop-detail-category, .shop-detail-description, .shop-detail-balance, .shop-detail-owned, .shop-detail-badge) { font-size: 9px; margin: 3px 0; }
  body .shop-window .shop-detail-price { margin: 5px 0; font-size: 12px; }
  body .shop-window .shop-buy-button { min-height: 28px; margin-top: 5px; font-size: 10px; }
  body .shop-window .shop-category-tab { min-height: 26px; padding: 5px 9px; font-size: 9px; }
}
@media (max-height: 450px) and (min-width: 520px) {
  body .shop-window .shop-content { grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: minmax(0, 1fr); }
  body .shop-window .shop-details { max-height: none; }
}
@media (max-width:700px), (pointer:coarse) and (max-width:900px) {
  #shopPurchaseConfirmWindow.shop-color-palette:has(#shopPurchaseCard[data-catalog-purchase="true"]) {
    display:flex; flex-direction:column; justify-content:flex-start; align-items:center;
    gap:16px; overflow-y:auto; padding:16px; box-sizing:border-box; pointer-events:auto;
  }
  #shopPurchaseConfirmWindow.shop-color-palette:has(#shopPurchaseCard[data-catalog-purchase="true"]) :is(#shopPurchaseCard, .shop-confirm-card) {
    position:relative !important; top:auto !important; left:auto !important; flex:0 0 auto;
  }
}
body .shop-window .shop-header :is(.shop-title, .shop-subtitle) { text-shadow:none; }
/* Preserve the creator's selected and hover colours over older Slab hover rules. */
body .shop-window button:hover:not(:disabled):not(.disabled) { background:var(--luma-surface-soft) !important; }
body .shop-window button.shop-item.selected:is(:hover, :focus-visible) { background:#f4d9d2 !important; }
body .shop-window button.shop-buy-button:hover:not(:disabled):not(.disabled) { background:#68404e !important; }
/* Keep the sprite's authored transparent canvas while framing the sprout itself. */
body .shop-window .shop-item-preview:has(.shop-item-preview-image-tree-sprout) { overflow:hidden; }
body .shop-window .shop-item-preview-image-tree-sprout {
  width:var(--shop-tree-sprout-preview-size); height:var(--shop-tree-sprout-preview-size); max-width:none; max-height:none;
  --shop-tree-sprout-preview-size:640px;
  --shop-tree-sprout-preview-offset-x:-19px;
  --shop-tree-sprout-preview-offset-y:-184px;
}
body .shop-window .shop-detail-preview:has(.shop-detail-tree-sprout) { position:relative; overflow:hidden; }
body .shop-window .shop-detail-tree-sprout { position:absolute; left:50%; top:50%; width:850px; height:850px; max-width:none; max-height:none; transform:translate(calc(-50% - 25px),calc(-50% - 245px)); }
body .shop-window .shop-details > .shop-buy-button { position:sticky; bottom:0; }
@media (max-width:700px), (pointer:coarse) and (max-width:900px) {
  body .shop-window .shop-detail-price { padding:4px 6px; }
  body .shop-window .shop-item-preview-image-tree-sprout {
    --shop-tree-sprout-preview-size:384px;
    --shop-tree-sprout-preview-offset-x:-11px;
    --shop-tree-sprout-preview-offset-y:-110px;
  }
}

/* Direct shop catalogue: balance at the left, full width item grid. */
body .shop-window .shop-balance-row { justify-content:flex-start; }
body .shop-window .shop-balance-row > strong { display:inline-flex; align-items:center; gap:6px; }
body .shop-window .shop-content { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); }
body .shop-window .shop-details { display:none; }
body .shop-window .shop-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
body .shop-window .shop-item-price { display:flex; align-items:center; justify-content:center; gap:4px; }
body .shop-window .shop-balance-row .luma-inline-crown-icon { width:20px; height:23px; object-fit:contain; }
body .shop-window .shop-item-price .luma-inline-crown-icon { width:14px; height:16px; object-fit:contain; }
@media (min-width:701px) and (pointer:fine) {
  body .shop-window .shop-item-price { font-size:14px; }
  body .shop-window .shop-item-price .luma-inline-crown-icon { width:18px; height:21px; flex-basis:18px; }
}
@media (max-width:700px), (pointer:coarse) and (max-width:900px) {
  body .shop-window .shop-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  body .shop-window .shop-balance-row .luma-inline-crown-icon { width:16px; height:18px; }
  body .shop-window .shop-item-price .luma-inline-crown-icon { width:11px; height:13px; }
}

/* Builder shop stock editor: same plain cream finish as character creation. */
#builderShopEditor { position:fixed; inset:0; z-index:1800; display:flex; align-items:center; justify-content:center; padding:16px; box-sizing:border-box; background:#33261e66; backdrop-filter:blur(4px); }
#builderShopEditor > section { box-sizing:border-box; width:min(760px,100%); max-height:calc(100dvh - 32px); display:flex; flex-direction:column; padding:18px; border:1px solid var(--luma-border-soft); border-radius:18px; background:var(--luma-surface-cream); color:var(--luma-text-primary); box-shadow:0 16px 44px #37251e38; }
#builderShopEditor header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
#builderShopEditor h2 { margin:0; font-size:22px; }
#builderShopEditor button { border:1px solid #e5b6a3; border-radius:9px; padding:7px 11px; background:var(--luma-surface-ivory); color:var(--luma-text-primary); cursor:pointer; font:inherit; }
#builderShopEditor [data-close] { width:32px; height:32px; padding:0; font-size:20px; }
#builderShopEditor :is(p,th) { font-size:11px; line-height:1.5; }
#builderShopEditor .builder-shop-hint { color:var(--luma-text-secondary); }
#builderShopEditor .builder-shop-body { overflow:auto; overscroll-behavior:contain; min-height:0; }
#builderShopEditor table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
#builderShopEditor th { text-align:left; }
#builderShopEditor :is(th,td) { padding:8px 5px; border-bottom:1px solid var(--luma-border-soft); overflow-wrap:anywhere; }
#builderShopEditor th:nth-child(1) { width:44%; }
#builderShopEditor th:nth-child(2) { width:23%; }
#builderShopEditor th:nth-child(3) { width:16%; }
#builderShopEditor th:nth-child(4) { width:17%; }
#builderShopEditor td button { width:100%; padding:6px 3px; }
#builderShopEditor :is(input:not([type=checkbox]),select) { box-sizing:border-box; width:100%; min-width:0; border:1px solid #dbc7bc; border-radius:8px; padding:7px; font:inherit; color:var(--luma-text-primary); background:#fffaf5; }
#builderShopEditor input[type=checkbox] { accent-color:var(--luma-accent-deep); width:18px; height:18px; }
#builderShopEditor .builder-shop-price > span { display:inline-block; vertical-align:middle; width:16px; }
#builderShopEditor .luma-inline-crown-icon { width:14px; height:18px; object-fit:contain; }
#builderShopEditor .builder-shop-price input { width:calc(100% - 20px); padding:7px 3px; }
#builderShopEditor .builder-shop-add { display:grid; grid-template-columns:1fr 1fr auto; gap:7px; margin-top:12px; }
#builderShopEditor footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:7px; padding-top:8px; }
#builderShopEditor [data-save] { background:var(--luma-accent-deep); color:#fffaf5; border-color:var(--luma-accent-deep); }
#builderShopEditor [role=status] { margin:8px 0 0; min-height:1.5em; }
#builderShopEditor :disabled { opacity:.5; cursor:default; }
#builderShopEditor :focus-visible { outline:2px solid var(--luma-accent-deep); outline-offset:2px; }
@media (max-width:700px) {
  #builderShopEditor { padding:10px; }
  #builderShopEditor > section { padding:12px; max-height:calc(100dvh - 20px); }
  #builderShopEditor h2 { font-size:17px; }
  #builderShopEditor :is(table,button,input,select) { font-size:10px; }
  #builderShopEditor :is(p,th) { font-size:9px; }
  #builderShopEditor :is(th,td) { padding:6px 2px; }
  #builderShopEditor th:nth-child(1) { width:35%; }
  #builderShopEditor th:nth-child(2) { width:26%; }
  #builderShopEditor th:nth-child(3) { width:18%; }
  #builderShopEditor th:nth-child(4) { width:21%; }
  #builderShopEditor .builder-shop-add { grid-template-columns:minmax(0,1fr) auto; }
  #builderShopEditor .builder-shop-add input { grid-column:1/-1; }
}
#builderShopEditor th { position:sticky; top:0; z-index:1; background:var(--luma-surface-cream); }
#builderShopEditor .builder-shop-lists { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-bottom:10px; }
#builderShopEditor .builder-shop-body > label { display:block; margin:8px 0; font-size:11px; color:var(--luma-text-secondary); }
#builderShopEditor .builder-shop-body > label > :is(input,select) { display:block; margin-top:4px; }
#woodSignEditor { position:fixed; inset:0; z-index:1800; display:grid; place-items:center; padding:12px; background:#33261e66; backdrop-filter:blur(4px); }
#woodSignEditor section { box-sizing:border-box; width:min(360px,100%); max-height:calc(100dvh - 24px); overflow:auto; border:1px solid var(--luma-border-soft); border-radius:18px; padding:16px; background:var(--luma-surface-cream); color:var(--luma-text-primary); font-size:12px; }
#woodSignEditor.home-sign-live-editor { background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; }
#woodSignEditor.home-sign-live-editor section { position:fixed; width:min(360px,calc(100vw - 24px)); }
#woodSignEditor.home-sign-live-editor footer { flex-wrap:wrap; }
#woodSignEditor h2 { margin:0 0 12px; font-size:20px; }
#woodSignEditor label { display:block; margin:7px 0; }
#woodSignEditor textarea { box-sizing:border-box; width:100%; margin-top:5px; padding:8px; resize:vertical; border:1px solid var(--luma-border-soft); border-radius:9px; background:var(--luma-surface-ivory); color:inherit; font:inherit; }
#woodSignEditor canvas { display:block; width:100%; max-width:100%; height:auto; margin:auto; touch-action:none; cursor:crosshair; border-radius:8px; background:#f7eee6; }
#woodSignEditor h3 { font-size:12px; margin:10px 0 3px; }
#woodSignEditor .sign-area-hint { font-size:10px; line-height:1.4; margin:0 0 6px; }
#woodSignEditor select { display:block; width:100%; box-sizing:border-box; margin-top:5px; padding:6px; border:1px solid var(--luma-border-soft); border-radius:8px; background:var(--luma-surface-ivory); color:inherit; font:inherit; }
#woodSignEditor .sign-area-tools { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
#woodSignEditor .sign-area-tools button { padding:6px 8px; font-size:10px; }
#woodSignEditor .sign-point-controls { display:flex; gap:8px; }
#woodSignEditor .sign-point-controls label { flex:1; min-width:0; font-size:10px; }
#woodSignEditor .sign-point-controls input { box-sizing:border-box; padding:5px; border:1px solid var(--luma-border-soft); border-radius:7px; color:inherit; background:var(--luma-surface-ivory); }
#woodSignEditor :disabled { opacity:.5; }
#woodSignEditor .sign-controls label { display:grid; grid-template-columns:70px minmax(0,1fr) 28px; align-items:center; gap:6px; }
#woodSignEditor .sign-controls .sign-angle-control { grid-template-columns:70px minmax(0,1fr) 58px; }
#woodSignEditor .sign-angle-control input[type=number] { box-sizing:border-box; padding:4px; border:1px solid var(--luma-border-soft); border-radius:6px; background:var(--luma-surface-ivory); color:inherit; font:inherit; }
#woodSignEditor input { min-width:0; width:100%; accent-color:var(--luma-accent-deep); }
#woodSignEditor footer { display:flex; justify-content:flex-end; gap:8px; }
#woodSignEditor button { padding:8px 12px; border:1px solid var(--luma-border-soft); border-radius:10px; background:var(--luma-surface-ivory); color:inherit; font:inherit; }
#woodSignEditor [data-save] { background:var(--luma-accent-deep); color:#fffaf5; }
/* Local OFL fonts for signs; faces are fetched only when selected or rendered. */
@font-face { font-family:'Luma Sign Nunito';src:url('/assets/fonts/signs/nunito-latin-wght-normal.woff2') format('woff2');font-weight:400 700;font-style:normal;font-display:block; }
@font-face { font-family:'Luma Sign Nunito';src:url('/assets/fonts/signs/nunito-latin-wght-italic.woff2') format('woff2');font-weight:400 700;font-style:italic;font-display:block; }
@font-face { font-family:'Luma Sign Lora';src:url('/assets/fonts/signs/lora-latin-wght-normal.woff2') format('woff2');font-weight:400 700;font-style:normal;font-display:block; }
@font-face { font-family:'Luma Sign Lora';src:url('/assets/fonts/signs/lora-latin-wght-italic.woff2') format('woff2');font-weight:400 700;font-style:italic;font-display:block; }
@font-face { font-family:'Luma Sign Roboto Mono';src:url('/assets/fonts/signs/roboto-mono-latin-wght-normal.woff2') format('woff2');font-weight:400 700;font-style:normal;font-display:block; }
@font-face { font-family:'Luma Sign Roboto Mono';src:url('/assets/fonts/signs/roboto-mono-latin-wght-italic.woff2') format('woff2');font-weight:400 700;font-style:italic;font-display:block; }
@font-face { font-family:'Luma Sign Caveat';src:url('/assets/fonts/signs/caveat-latin-wght-normal.woff2') format('woff2');font-weight:400 700;font-style:normal;font-display:block; }
@font-face { font-family:'Luma Sign Dancing Script';src:url('/assets/fonts/signs/dancing-script-latin-wght-normal.woff2') format('woff2');font-weight:400 700;font-style:normal;font-display:block; }
@font-face { font-family:'Luma Sign Cinzel';src:url('/assets/fonts/signs/cinzel-latin-wght-normal.woff2') format('woff2');font-weight:400 700;font-style:normal;font-display:block; }
.shop-mannequin-crown{width:18px;height:22px;object-fit:contain;vertical-align:middle}
.shop-mannequin-actions{display:flex;gap:5px;flex-wrap:wrap;grid-column:1/-1}
.shop-mannequin-window label{display:flex;align-items:center;gap:8px;grid-column:1/-1}
.shop-mannequin-window input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:#7b4c60}
.shop-mannequin-window .mannequin-outfit-slots{align-content:start}
.mill-window{position:fixed;z-index:1200;left:50%;top:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:340px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);overflow:auto;border:1px solid #dab7a9;border-radius:18px;background:#fffaf4;color:#654c42;font:14px var(--luma-font-family);box-shadow:0 12px 40px #0004}
.mill-window header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #ead9cc;cursor:move;touch-action:none}.mill-window header strong{font-size:20px}.mill-window button{font:inherit;color:inherit;border:1px solid #dfbdae;border-radius:10px;background:#fff5ea;padding:10px;cursor:pointer}.mill-window button:disabled{opacity:.5;cursor:default}.mill-window header button{padding:5px 10px}.mill-body{padding:16px;display:flex;flex-direction:column;gap:12px;text-align:center}.mill-hint{font-size:12px;line-height:1.5;margin:0;color:#99746e}.mill-input-slot{width:100px;height:100px;align-self:center;display:grid;place-items:center;border-style:dashed!important;background:#f6ece4!important;font-size:36px!important}.mill-input-slot img,.mill-output img{width:76px;height:76px;object-fit:contain}.mill-input-label,.mill-countdown,.mill-status{margin:0;line-height:1.5}.mill-output{display:flex;align-items:center;justify-content:center;gap:12px}.mill-body>button:not(.mill-input-slot):first-of-type,.mill-collect{background:#7b4c60;color:#fffaf4}.mill-picker-window{z-index:1201}.mill-material-option{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:5px 12px;text-align:left}.mill-material-option img{width:56px;height:56px;object-fit:contain;grid-row:1/3}.mill-status:empty{display:none}
.mill-main-window header{gap:8px}.mill-main-window header strong{margin-right:auto}.mill-main-window header .mill-finish{font-size:12px}
.mill-window{animation:processing-window-enter 220ms ease-out both;transform-origin:center}
.mill-window.closing{pointer-events:none;animation:processing-window-exit 170ms ease-in both}
.mill-window button{transition:background-color 120ms,border-color 120ms,box-shadow 120ms,translate 120ms}
.mill-window button:hover:not(:disabled){background:#f6e9dd;border-color:#bd8f85;box-shadow:0 2px 6px #654c4218}
.mill-window .mill-collect:hover:not(:disabled),.mill-body>button:not(.mill-input-slot):first-of-type:hover:not(:disabled){background:#6d4054;color:#fffaf4}
.mill-window button:active:not(:disabled){translate:0 1px}
.mill-window button:focus-visible,.mill-window select:focus-visible{outline:2px solid #ad7bac;outline-offset:2px}
.shop-purchase-quantity-section[hidden]{display:none!important}
@keyframes processing-window-enter{from{opacity:0;translate:0 5px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
@keyframes processing-window-exit{from{opacity:1;translate:0 0;scale:1}to{opacity:0;translate:0 6px;scale:.98}}
@media(prefers-reduced-motion:reduce){.mill-window,.mill-window.closing{animation:none}.mill-window button{transition:none}.mill-window button:active:not(:disabled){translate:none}}
.mill-colour-label{display:flex;flex-direction:column;gap:6px;text-align:left;font-size:12px;color:#99746e}.mill-colour-label select{width:100%;box-sizing:border-box;padding:10px;border:1px solid #dfbdae;border-radius:10px;background:#fff5ea;color:#654c42;font:inherit;min-height:40px}
.mill-recipe-card{position:fixed;z-index:1202;box-sizing:border-box;width:250px;max-width:calc(100vw - 20px);padding:12px;border:1px solid #dab7a9;border-radius:12px;background:#fff8ed;color:#654c42;box-shadow:0 5px 18px #0002;font:12px var(--luma-font-family);line-height:1.5;pointer-events:none;text-align:left}.mill-recipe-card strong{display:block}.mill-recipe-card img{display:block;width:48px;height:48px;object-fit:contain;margin:5px auto}.mill-recipe-summary{text-align:center}.mill-recipe-inline{position:static;width:100%;max-width:none;box-shadow:none}
/* Public Homes uses the same compact identity/action rhythm as Social. */
#visitHomeWindow .home-discovery-entry{min-height:70px;padding:10px;gap:8px;border-radius:12px;border-color:#eddbce;box-shadow:0 3px 8px #996d4310;flex:0 0 auto}
#visitHomeWindow .home-discovery-icon.has-portrait{min-width:64px;min-height:48px}
#visitHomeWindow .home-discovery-name{font-size:15px;line-height:1.3}
#visitHomeWindow .home-discovery-meta{display:flex;align-items:center;flex-wrap:wrap;gap:2px 4px;margin-top:3px;font-size:10px;line-height:1.3}
#visitHomeWindow .home-discovery-owner{margin:0;font-size:10px;overflow-wrap:anywhere}
#visitHomeWindow .home-discovery-presence{display:contents}
#visitHomeWindow :is(.home-owner-status,.home-player-count,.home-tag-badge){font-size:9px;line-height:11px;padding:0 4px;white-space:nowrap}
#visitHomeWindow .home-discovery-visit-button{min-height:30px;padding:6px 9px;border-radius:8px;font-size:11px}

/* Social privacy settings share the existing compact panel and button palette. */
#socialWindow .social-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
#socialWindow #socialSettingsPanel { min-height:0; overflow-y:auto; }
#socialWindow .social-settings-content { padding:8px 2px 16px; color:#6b5147; }
.social-setting-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:12px; background:#fffaf2; border:1px solid #eddbce; border-radius:12px; }
.social-setting-row strong,.social-setting-row small { display:block; }
.social-setting-row small,.social-setting-note,.social-profile-actions small { font-size:12px; line-height:1.5; color:#92746a; }
.social-setting-row input { width:22px; height:22px; flex:0 0 auto; accent-color:#80566f; }
.social-blocked-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid #eddbce; }
.social-profile-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.social-profile-actions small,.social-profile-actions p { flex-basis:100%; margin:0; }
#socialSettingsStatus { min-height:1.5em; font-size:12px; }
@media(max-width:600px){#socialWindow .social-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }#socialWindow .social-tab { padding:6px 2px;font-size:11px; }#socialWindow #socialSettingsPanel { overflow-y:auto; } }

#profileWindow .social-profile-actions .luma-button-primary{background:#80566f !important;color:#fff !important;}
#profileWindow .social-profile-actions :is(small,.social-setting-note){color:#f0e4fa;}
