/* Cozy Campus v2.6 — Real-Time Multiplayer Cozy Pastel UI */
:root {
  --cream: #FFF8EE;
  --paper: #FFFDF8;
  --ink: #3E2F26;
  --muted: #847061;
  --terracotta: #D97652;
  --sage: #5E9C76;
  --sakura: #E58CA4;
  --border: #E8D9C5;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #231C18;
  font-family: 'Plus Jakarta Sans', 'Nunito', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
}

.hidden { display: none !important; }

.viewport-host {
  width: 100vw;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #3C2F28 0%, #1C1613 100%);
}

#app-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  background: #EFE4D2;
}

#app-stage.ratio-framed {
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 248, 238, 0.18);
}

#map-pane {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

#world-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

#side-menu {
  width: 318px;
  max-width: 88vw;
  height: 100%;
  flex-shrink: 0;
  background: #FFFDF8;
  border-left: 2px solid #E5D4BE;
  box-shadow: -8px 0 28px rgba(48, 34, 24, 0.14);
  display: flex;
  flex-direction: column;
  z-index: 25;
  transition: transform 0.25s ease, width 0.25s ease, opacity 0.2s ease;
}

#app-stage.menu-collapsed #side-menu {
  width: 0;
  border-left-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.side-close-btn {
  display: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #EFE3D2;
  color: #5B4638;
  font-size: 12px;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#app-stage.narrow-mode .side-close-btn {
  display: inline-flex;
}

#app-stage.narrow-mode #side-menu {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 88%;
  z-index: 35;
}

#app-stage.narrow-mode.menu-collapsed #side-menu {
  transform: translateX(105%);
  width: 300px;
}

/* Clean, non-colliding HUD for 9:16 / narrow portrait screens */
#app-stage.narrow-mode .map-top-bar {
  top: 8px;
  left: 8px;
  right: 8px;
  gap: 5px;
  flex-wrap: nowrap;
}
#app-stage.narrow-mode .map-switch-btn {
  padding: 4px 8px;
  font-size: 10.5px;
}
#app-stage.narrow-mode .map-top-right {
  gap: 4px;
}
#app-stage.narrow-mode .hud-icon-btn {
  padding: 4px 7px;
  font-size: 11px;
}
#app-stage.narrow-mode .diamond-hud-btn {
  padding: 5px 9px;
  font-size: 10.5px;
}
#app-stage.narrow-mode .menu-toggle-btn {
  padding: 5px 9px;
  font-size: 10.5px;
}
#app-stage.narrow-mode .map-bottom-bar {
  left: 8px;
  right: 8px;
  bottom: 8px;
  gap: 5px;
}
#app-stage.narrow-mode .quick-emote-group {
  display: none;
}
#app-stage.narrow-mode .chat-form-pill {
  max-width: none;
  padding: 4px 5px;
  gap: 4px;
}
#app-stage.narrow-mode .chat-form-pill input {
  font-size: 11px;
}
#app-stage.narrow-mode .chat-send-btn {
  padding: 4px 9px;
  font-size: 10.5px;
}
#app-stage.narrow-mode .floating-chat-box {
  left: 8px;
  bottom: 52px;
  width: min(290px, calc(100% - 16px));
}
#app-stage.narrow-mode .floating-chat-list {
  max-height: 132px;
}
#app-stage.narrow-mode .guest-cta-bar {
  bottom: 52px;
  gap: 5px;
}
#app-stage.narrow-mode .guest-timer-pill,
#app-stage.narrow-mode .guest-cta-btn {
  padding: 5px 10px;
  font-size: 10.5px;
}

#app-stage.hidden-ui .hud-hideable {
  opacity: 0 !important;
  pointer-events: none !important;
}

#app-stage.hidden-ui #side-menu {
  width: 0 !important;
  border-left-width: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Full-screen Screenshot Mode inside Balai BEM & All Outlet Simulators */
#app-stage.hidden-ui .unica-sim-hud,
#app-stage.hidden-ui .unica-panel-left,
#app-stage.hidden-ui .unica-panel-right,
#app-stage.hidden-ui .unica-sim-dock,
#app-stage.hidden-ui .unica-dialogue-bar {
  display: none !important;
}
#app-stage.hidden-ui .unica-stage-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-bottom: none !important;
}
#clean-mode-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 76;
  opacity: 0.48;
  transition: opacity 0.2s ease;
}
#clean-mode-badge:hover {
  opacity: 1;
}

/* Glass & Cards */
.glass-pill {
  background: rgba(255, 252, 245, 0.94);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(226, 206, 181, 0.95);
  box-shadow: 0 4px 14px rgba(62, 47, 38, 0.15);
}

.cozy-card {
  background: #FFFDF8;
  border: 2px solid #E8D9C5;
  box-shadow: 0 18px 48px rgba(45, 31, 22, 0.34);
}

.btn-cozy {
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background-color 0.15s ease;
}
.btn-cozy:active { transform: scale(0.96); }
.btn-cozy:hover { filter: brightness(1.04); }

/* Top Overlay HUD inside Map */
.map-top-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-switcher {
  border-radius: 999px;
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
  pointer-events: auto;
  flex-shrink: 0;
}

.map-switch-btn {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #6B5647;
  white-space: nowrap;
}
.map-switch-btn:hover { background: #F3E7D7; }
.map-switch-btn.active-campus { background: #D97652; color: #FFFFFF; }
.map-switch-btn.active-residence { background: #5E9C76; color: #FFFFFF; }

.map-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  flex-shrink: 0;
}

.hud-icon-btn {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #5B4638;
  white-space: nowrap;
}
.hud-icon-btn.music-on {
  border-color: #D97652;
  background: #FFF3E8;
}

.diamond-hud-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  background: linear-gradient(135deg, #38BDF8 0%, #818CF8 50%, #C084FC 100%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85), 0 0 22px rgba(192, 132, 252, 0.55);
  animation: diamondPulse 2s ease-in-out infinite;
  overflow: hidden;
}
.diamond-hud-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 45%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: rotate(25deg);
  animation: diamondShine 2.6s ease-in-out infinite;
}
@keyframes diamondPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.85), 0 0 20px rgba(168, 85, 247, 0.5); }
  50% { box-shadow: 0 0 18px rgba(56, 189, 248, 1), 0 0 32px rgba(192, 132, 252, 0.85); }
}
@keyframes diamondShine {
  0%, 60% { left: -70%; }
  100% { left: 135%; }
}

.menu-toggle-btn {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  background: #3E2F26;
  color: #FFF8EE;
  box-shadow: 0 4px 12px rgba(35, 24, 18, 0.25);
  white-space: nowrap;
}

/* Conditional Floating Bars inside Map */
.interior-hud-bar {
  position: absolute;
  top: 52px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.interior-pill {
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.interior-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.pill-btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(45, 31, 22, 0.16);
}
.pill-btn.terracotta { background: #D97652; color: #FFFFFF; }
.pill-btn.dark { background: #3E2F26; color: #FFFFFF; }
.pill-btn.outline-coral { background: #FFFFFF; border: 2px solid #D97652; color: #B85432; }
.pill-btn.sage { background: #4F9A76; color: #FFFFFF; }
.pill-btn.sky { background: #2F80B8; color: #FFFFFF; }

.interior-furn-tray {
  position: absolute;
  bottom: 54px;
  left: 10px;
  right: 10px;
  z-index: 22;
  pointer-events: auto;
}
.furn-tray-inner {
  border-radius: 16px;
  padding: 10px;
  border: 2px solid #E2C9A8;
}
.furn-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
}
.furn-tray-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.furn-chip {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 12px;
  border: 2px solid #EADAC5;
  background: #FFFFFF;
  text-align: left;
  font-size: 11.5px;
}
.furn-chip.selected { background: #FFF1E3; border-color: #D97652; }
.furn-chip.locked { opacity: 0.6; }

.fishing-hud-bar {
  position: absolute;
  bottom: 58px;
  right: 10px;
  z-index: 21;
  max-width: 280px;
  pointer-events: auto;
}
.fishing-dock-card {
  border-radius: 16px;
  padding: 10px 12px;
  border: 2px solid #7EC4E8;
  background: rgba(242, 250, 255, 0.96);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11.5px;
}
.fishing-bucket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid #C6E4F5;
  border-radius: 10px;
  padding: 6px 9px;
  font-weight: 800;
}

.flash-event-pill {
  position: absolute;
  top: 52px;
  left: 10px;
  z-index: 20;
  pointer-events: auto;
}
.flash-event-inner {
  border-radius: 16px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #D96B8A, #E58A52);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(185, 80, 100, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}

.broadcast-banner {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  max-width: 440px;
  width: 90%;
  pointer-events: none;
}
.broadcast-inner {
  border-radius: 16px;
  padding: 8px 14px;
  text-align: center;
  border: 2px solid #E58CA4;
  background: rgba(255, 245, 248, 0.96);
  font-size: 12px;
  font-weight: 800;
  color: #5B2E3E;
}

.guest-cta-bar {
  position: absolute;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 95%;
}
.guest-timer-pill {
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 900;
  color: #8A5316;
  background: linear-gradient(135deg, rgba(255, 245, 224, 0.96), rgba(255, 234, 198, 0.96));
  border: 2px solid rgba(236, 186, 108, 0.92);
  white-space: nowrap;
  flex-shrink: 0;
}
.guest-timer-pill.urgent {
  color: #9E2136;
  background: #FFE8EC;
  border-color: #E87B90;
  animation: pulseWarn 1.1s infinite;
}
.guest-cta-btn {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, #D97652, #E2839B);
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgba(217, 118, 82, 0.38);
  border: 2px solid rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

/* Persistent Global Floating Live Chat Window (Above Overworld, All 4 Outlets & Modals!) */
.floating-chat-box {
  position: absolute;
  left: 10px;
  bottom: 56px;
  z-index: 68;
  width: min(300px, calc(100% - 20px));
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.92);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-chat-inline-form {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-top: 1px solid #E6D4BC;
  background: rgba(255, 248, 238, 0.96);
}
.floating-chat-inline-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #E2CBB0;
  border-radius: 999px;
  background: #FFFFFF;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.global-chat-fab {
  position: absolute;
  left: 10px;
  bottom: 56px;
  z-index: 68;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  color: #5B4638;
  pointer-events: auto;
}

/* When inside any Outlet Simulator (Unica Cafe, Study Hub, Lambe Press, Balai BEM) or Modal */
#app-stage.sim-open .floating-chat-inline-form,
#app-stage.modal-open .floating-chat-inline-form {
  display: flex;
}
#app-stage.wide-mode.sim-open .floating-chat-box,
#app-stage.wide-mode.sim-open .global-chat-fab {
  left: clamp(244px, 24.5%, 294px);
  bottom: 58px;
}
#app-stage.wide-mode.sim-open .floating-chat-box {
  width: 262px;
}
#app-stage.wide-mode.sim-open .floating-chat-list {
  max-height: 120px;
}
#app-stage.modal-open:not(.sim-open) .floating-chat-box,
#app-stage.modal-open:not(.sim-open) .global-chat-fab {
  left: 12px;
  bottom: 12px;
}
#app-stage.narrow-mode.sim-open .floating-chat-box,
#app-stage.narrow-mode.sim-open .global-chat-fab {
  left: 8px;
  bottom: 48px;
}
#app-stage.narrow-mode.sim-open .floating-chat-box {
  width: min(260px, calc(100% - 16px));
}
#app-stage.narrow-mode.sim-open .floating-chat-list {
  max-height: 98px;
}

.floating-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(246, 237, 224, 0.92);
  border-bottom: 1px solid #E6D4BC;
  font-size: 11px;
  font-weight: 900;
  color: #5B4638;
}

.chat-hide-btn {
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #DFC7A9;
  font-size: 10px;
  font-weight: 800;
  color: #6B5647;
}

.floating-chat-list {
  max-height: 164px;
  overflow-y: auto;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
}

.floating-chat-msg {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #EFE0CC;
  border-radius: 10px;
  padding: 5px 8px;
  line-height: 1.38;
  word-break: break-word;
}

.floating-chat-msg .chat-author {
  font-weight: 900;
  color: #3E2F26;
}

.floating-chat-msg .chat-time {
  font-size: 9.5px;
  color: #9A8573;
  margin-left: 5px;
  font-weight: 700;
}

.chat-toggle-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F6EDE0;
  border: 1px solid #E5D4BE;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.chat-toggle-btn.active {
  background: #FFEFE2;
  border-color: #D97652;
}

.chat-unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #D94B64;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 900;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Bottom Bar inside Map */
.map-bottom-bar {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.chat-form-pill {
  border-radius: 999px;
  padding: 5px 6px 5px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 310px;
  pointer-events: auto;
}
.chat-form-pill input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}
.chat-form-pill input::placeholder { color: #9D8877; }
.chat-send-btn {
  padding: 5px 11px;
  border-radius: 999px;
  background: #D97652;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.bottom-right-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
  flex-shrink: 0;
}
.quick-emote-group {
  border-radius: 999px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.quick-emote-btn {
  padding: 4px;
  font-size: 13px;
  line-height: 1;
  transition: transform 0.14s ease;
}
.quick-emote-btn:hover { transform: scale(1.25); }

.zoom-group {
  border-radius: 999px;
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.zoom-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.zoom-btn:hover { background: #F3E7D7; }

.ratio-select {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #5B483A;
  outline: none;
  cursor: pointer;
}

.clean-mode-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 40;
}

/* ==================== RIGHT SIDEBAR ==================== */
.side-header {
  padding: 12px;
  background: linear-gradient(180deg, #FFF6EA 0%, #FFFDF8 100%);
  border-bottom: 1px solid #E9D9C4;
  flex-shrink: 0;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 2px solid #E7D4BC;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sprite-preview {
  width: 56px;
  height: 76px;
  background-image: url('/assets/characters-strip.webp');
  background-repeat: no-repeat;
  background-size: 448px 304px;
}

.profile-meta {
  min-width: 0;
  flex: 1;
}
.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.profile-name {
  font-weight: 900;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.online-pill {
  font-size: 10px;
  font-weight: 800;
  color: #4F8A66;
  background: #E7F6EE;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.profile-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.role-pill {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: #EFE3D2;
  color: #6B5647;
}
.rank-lv-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #9A6A28;
}
.permit-pill {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  background: #E5F7EA;
  color: #226638;
}

.currency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.currency-chip {
  border-radius: 11px;
  background: #FFFFFF;
  border: 1px solid #EADAC5;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
}
.coin-val { color: #B8711E; font-weight: 900; }
.fish-val { color: #1D6A9C; font-weight: 900; }
.timer-sub { font-size: 9.5px; color: #9A7AB8; font-weight: 800; }

.needs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.need-chip {
  border-radius: 11px;
  background: #FFFFFF;
  border: 1px solid #EFE0CC;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
}
.need-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(62, 47, 38, 0.12);
  overflow: hidden;
}
.need-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}
.fill-hunger { background: #E8854A; }
.fill-thirst { background: #56A3D9; }
.fill-stamina { background: #58A878; }
.fill-mood { background: #E27B9B; }
.need-val { width: 22px; text-align: right; }

.need-low {
  animation: pulseWarn 1.1s infinite;
  border-color: #E87B90;
}
@keyframes pulseWarn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 68, 68, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(225, 68, 68, 0); }
}

.side-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  background: #F6EDE0;
  border-bottom: 1px solid #E6D4BC;
  flex-shrink: 0;
}
.side-tab-btn {
  padding: 7px 6px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
  color: #6B5647;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.side-tab-btn:hover { background: rgba(255, 255, 255, 0.6); }
.side-tab-btn.active {
  background: #D97652;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(217, 118, 82, 0.28);
}

.side-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
}

/* Sidebar Cards & Items */
.side-card {
  border-radius: 16px;
  padding: 10px;
  border: 1.5px solid #EADAC5;
  background: #FFFFFF;
}
.side-card.blue { background: #EEF8FF; border-color: #BEE0F5; }
.side-card.cream { background: #FFF6EA; border-color: #EAD4B6; }
.side-card.green { background: #EEF8F2; border-color: #C4E4D1; }
.side-card.purple { background: #F6F0FA; border-color: #DEC9EE; }
.side-card.pink { background: #FFF4F7; border-color: #F0C4D3; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
}
.card-title { font-weight: 900; font-size: 12px; color: #3E2F26; }
.card-sub { font-size: 10.5px; color: #7D6859; font-weight: 700; }

.fishing-npc-row {
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #CBE4F5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
}

.outlet-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.outlet-btn {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid #EADAC5;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.outlet-btn:hover { border-color: #D97652; }
.outlet-btn.is-mine { border-color: #D97652; background: #FFF8F2; }
.outlet-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.outlet-ic { font-size: 18px; flex-shrink: 0; }
.outlet-name { font-weight: 800; font-size: 12px; }
.outlet-desc { font-size: 10px; color: #7D6859; margin-top: 1px; }
.count-pill {
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: #F3EAE0;
  color: #7D6859;
  flex-shrink: 0;
}
.count-pill.hot { background: #D97652; color: #FFFFFF; }
.count-pill.info { background: #E8F3FC; color: #3B74AD; }
.count-pill.green { background: #F2FBF5; color: #2B6842; }

.side-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.action-tile-btn {
  padding: 9px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
}
.action-tile-btn.role { background: #EAF3FA; border: 1.5px solid #C7DEF2; color: #2F628E; }
.action-tile-btn.couple { background: #FFF0F5; border: 1.5px solid #F0C4D3; color: #B83B64; }

.mini-btn {
  padding: 5px 9px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.mini-btn.blue { background: #2F80B8; color: #FFFFFF; }
.mini-btn.green { background: #4F9A76; color: #FFFFFF; }
.mini-btn.soft-green { background: #E7F6EE; color: #226638; border: 1px solid #BCE0CB; }
.mini-btn.coral { background: #D97652; color: #FFFFFF; }
.mini-btn.dark { background: #3E2F26; color: #FFFFFF; }

.full-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.full-btn.dark { background: #3E2F26; color: #FFFFFF; }
.full-btn.coral { background: #D97652; color: #FFFFFF; }
.full-btn.sage { background: #4F9A76; color: #FFFFFF; }
.full-btn.purple { background: #6E4499; color: #FFFFFF; }
.full-btn.pink { background: #D96B8A; color: #FFFFFF; }
.full-btn.sky { background: #4B88C7; color: #FFFFFF; }
.full-btn.diamond { background: linear-gradient(90deg, #5B8DEF, #8A56AC); color: #FFFFFF; }
.full-btn.wedding { background: linear-gradient(90deg, #D96B8A, #D97652); color: #FFFFFF; }

/* Social / Feed / Poll */
.poll-opt {
  width: 100%;
  text-align: left;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #C4E4D1;
  padding: 6px 8px;
  position: relative;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}
.poll-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: #D7F0E1;
  pointer-events: none;
}
.poll-opt-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.chat-mini-log {
  max-height: 128px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-mini-line {
  font-size: 11px;
  background: #FAF4EC;
  border-radius: 8px;
  padding: 5px 8px;
  line-height: 1.35;
}

.feed-item {
  border-radius: 12px;
  border: 1.5px solid #EADAC5;
  background: #FFFFFF;
  padding: 9px 10px;
  font-size: 11.5px;
}
.feed-item.breaking { border-color: #E89AB2; background: #FFF5F8; }
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  margin-bottom: 4px;
  gap: 6px;
}
.like-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: #FCEBF1;
  color: #C2476D;
  font-size: 10.5px;
  font-weight: 800;
}

/* Form inputs */
.cozy-input,
.cozy-select,
.cozy-textarea {
  width: 100%;
  border-radius: 11px;
  border: 1.8px solid #E3D1BC;
  background: #FFFFFF;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
}
.cozy-input:focus,
.cozy-select:focus,
.cozy-textarea:focus { border-color: #D97652; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(24, 16, 12, 0.54);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal-box {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: 24px;
  padding: 18px 20px;
}
.modal-box.wide { max-width: 780px; }
.modal-box.medium { max-width: 640px; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: #3E2F26;
}
.modal-head p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #7D6859;
  font-weight: 600;
}
.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F3E7D7;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

/* Grids inside Modals */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wb-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 12px; }
@media (max-width: 680px) {
  .grid-2, .wb-grid { grid-template-columns: 1fr; }
  .quick-emote-group { display: none; }
}

.social-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.social-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #E6C7A3;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.gender-btn,
.role-pick-btn {
  border-radius: 16px;
  border: 2px solid #E8D9C5;
  background: #FFFFFF;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.gender-btn.selected,
.role-pick-btn.selected {
  border-color: #D97652;
  background: #FFF2E8;
}

.wb-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.wb-tab-btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
  background: #F3EAE0;
  color: #6B5647;
}
.wb-tab-btn.active-coral { background: #D97652; color: #FFFFFF; box-shadow: 0 3px 10px rgba(217, 118, 82, 0.25); }
.wb-tab-btn.active-sage { background: #4F9A76; color: #FFFFFF; box-shadow: 0 3px 10px rgba(79, 154, 118, 0.25); }

.svc-card {
  border-radius: 16px;
  border: 2px solid #EADAC5;
  background: #FFFFFF;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.svc-card.self { border-color: #CFE6D8; }

.gauge-track {
  position: relative;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid #3E2F26;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #E88A8A 0%, #F2C97D 25%, #68C188 38%, #FFD859 46%, #FFD859 54%, #68C188 62%, #F2C97D 75%, #E88A8A 100%);
}
.gauge-needle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 6px;
  border-radius: 4px;
  background: #3E2F26;
  box-shadow: 0 0 0 2px #FFFDF8, 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.mem-card {
  height: 60px;
  border-radius: 12px;
  border: 2px solid #9EC3E8;
  background: #D7E8FA;
  font-size: 22px;
  font-weight: 900;
}
.mem-card.shown { background: #FFFFFF; border-color: #4B88C7; }
.mem-card.matched { background: #E6F7EC; border-color: #6CBE8E; }

.toast-host {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  max-width: 340px;
  width: 92%;
}
.toast-item {
  pointer-events: auto;
  border-radius: 14px;
  border: 2px solid #DFC7A9;
  background: #FFFDF8;
  color: #3E2F26;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 22px rgba(40, 26, 18, 0.22);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast-item.success { background: #ECF9F0; border-color: #7EC496; color: #225838; }
.toast-item.warn { background: #FFF5E5; border-color: #E6AE5B; color: #7A4B0C; }
.toast-item.error { background: #FFF0F2; border-color: #E88A9A; color: #8E263A; }

.custom-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
.custom-scroll::-webkit-scrollbar-thumb { background: #D7C2A8; border-radius: 999px; }

.badge-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: #FFF3E3;
  color: #A6631B;
}

/* ==================== UNICA CAFE BARISTA SIMULATOR (ILLUSTRATED FLOATING HUD + HP 9:16 RESPONSIVE) ==================== */
.unica-sim-overlay {
  position: absolute;
  inset: 0;
  z-index: 48;
  background: #F5E7D2;
  display: flex;
  flex-direction: column;
}

.unica-sim-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #F5E7D2;
}

/* Shared Illustrated 4x4 Sprite Sheet Helper */
.usim-ing-sprite,
.usim-tool-sprite,
.usim-dock-sprite {
  display: inline-block;
  background-image: url('/assets/unica-icons-4x4.webp');
  background-repeat: no-repeat;
  background-size: 400% 400%;
  flex-shrink: 0;
}
.usim-ing-sprite { width: 42px; height: 42px; }
.usim-tool-sprite { width: 46px; height: 46px; }
.usim-dock-sprite { width: 32px; height: 32px; }

/* Top Cozy HUD */
.unica-sim-hud {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: linear-gradient(180deg, rgba(96, 68, 50, 0.92), rgba(78, 55, 40, 0.88));
  color: #FFF8EE;
  border-bottom: 2px solid rgba(255, 232, 200, 0.28);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.unica-hud-left,
.unica-hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unica-clock-badge {
  font-size: 16px;
  font-weight: 900;
  color: #FFFDF8;
  text-shadow: 0 2px 4px rgba(45, 28, 18, 0.45);
  letter-spacing: 0.02em;
}

.unica-rep-box {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.unica-rep-label {
  font-size: 9px;
  font-weight: 900;
  color: #FFE4BD;
  letter-spacing: 0.05em;
}

.unica-stars {
  font-size: 10px;
  letter-spacing: 1px;
}

.unica-stamina-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unica-stamina-label {
  font-size: 9.5px;
  font-weight: 900;
  color: #FFF8EE;
}

.unica-stamina-track {
  width: 78px;
  height: 8px;
  border-radius: 999px;
  background: rgba(35, 22, 14, 0.45);
  border: 1px solid rgba(255, 248, 238, 0.35);
  overflow: hidden;
}

.unica-stamina-fill {
  height: 100%;
  background: linear-gradient(90deg, #56C271, #84E096);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.unica-coin-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(62, 42, 28, 0.78);
  border: 2px solid #F5C353;
  color: #FFE38D;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(45, 28, 16, 0.25);
}

/* Mobile / 9:16 Portrait Stacked Stage */
.unica-stage-wrap {
  position: relative;
  width: 100%;
  height: 41%;
  min-height: 210px;
  flex-shrink: 0;
  overflow: hidden;
  background: #F5E7D2;
  border-bottom: 2px solid #8A6446;
}

.unica-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.unica-dialogue-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 7px;
  padding: 5px 10px;
  border-radius: 11px;
  background: rgba(45, 31, 22, 0.85);
  border: 1.5px solid rgba(255, 228, 179, 0.65);
  color: #FFF8EE;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(4px);
}
.unica-dialogue-bar strong { color: #FFD573; }
.dlg-price {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #D97652;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 10px;
}

/* Panels (Mobile: left hidden, right is stacked touch deck) */
.unica-panel-left {
  display: none;
}

.unica-panel-right {
  flex: 1;
  min-height: 0;
  padding: 9px 10px;
  overflow-y: auto;
  background: #EEDEC8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Compact Yellow Pinned Sticky Note — ALWAYS on Right Side / Below Stage (NEVER on Cafe Roof!) */
.unica-sticky-card {
  position: relative;
  background: #FFF4B8;
  border: 2px solid #D9B754;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 6px 18px rgba(55, 38, 22, 0.2);
  color: #3E2F26;
  font-size: 11.5px;
}

.sticky-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed #D9B754;
  padding-bottom: 5px;
  margin-bottom: 6px;
}

.sticky-pin-inline {
  font-weight: 900;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: #7E5516;
}

.sticky-timer {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(126, 85, 22, 0.14);
  color: #7E5516;
}

.sticky-empty {
  text-align: center;
  font-weight: 800;
  color: #846A3C;
  font-size: 11px;
  line-height: 1.45;
  padding: 4px 0;
}

.sticky-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 6px;
}

.sticky-recipe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.sticky-ing {
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #DFC578;
  font-size: 10px;
  font-weight: 800;
}
.sticky-ing.done {
  background: #E2F7E9;
  border-color: #63B37F;
  color: #1F5B35;
}

.sticky-finish-hint {
  font-size: 10px;
  color: #7E5516;
  font-weight: 700;
  border-top: 1px dashed #E0C571;
  padding-top: 5px;
}

/* Translucent Warm-Espresso Glass Box matching User's Illustration */
.usim-glass-box {
  background: rgba(108, 78, 58, 0.88);
  backdrop-filter: blur(9px);
  border: 2px solid rgba(255, 236, 210, 0.42);
  border-radius: 16px;
  padding: 10px;
  color: #FFF8EE;
  box-shadow: 0 8px 22px rgba(45, 28, 16, 0.24);
}

.usim-box-title {
  text-align: center;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.07em;
  color: #FFF5E4;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(35, 20, 12, 0.45);
}

.usim-tool-hint {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #FFE4BD;
  margin-bottom: 8px;
  line-height: 1.35;
}

.usim-mobile-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.usim-mtab-btn {
  padding: 8px 10px;
  border-radius: 12px;
  background: #DECBB4;
  color: #5B4333;
  font-size: 11.5px;
  font-weight: 900;
}
.usim-mtab-btn.active {
  background: #6D4E3B;
  color: #FFF8EE;
  box-shadow: 0 3px 10px rgba(70, 48, 34, 0.25);
}

.hide-mobile { display: none; }
.show-mobile { display: block; }

.usim-ing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.usim-ing-card {
  position: relative;
  min-height: 68px;
  padding: 6px 4px 5px;
  border-radius: 12px;
  background: rgba(255, 248, 238, 0.13);
  border: 1.5px solid rgba(255, 235, 210, 0.24);
  color: #FFF8EE;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.usim-ing-card:hover:not(:disabled) {
  background: rgba(255, 248, 238, 0.25);
  border-color: #FFD996;
}
.usim-ing-card.needed {
  background: rgba(255, 218, 122, 0.25);
  border-color: #FFD166;
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.32);
}
.usim-ing-card.picked {
  background: rgba(88, 196, 120, 0.28);
  border-color: #7EE0AA;
  opacity: 0.72;
}
.usim-reset-card {
  background: rgba(45, 28, 18, 0.24);
  border-style: dashed;
}
.usim-reset-card:disabled {
  opacity: 0.42;
}
.usim-reset-ic {
  font-size: 24px;
  line-height: 36px;
  font-weight: 900;
  color: #FFE4BD;
}
.usim-ing-name {
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(35, 20, 12, 0.4);
}
.usim-ing-check {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 10px;
}

.usim-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.usim-tool-card {
  min-height: 82px;
  padding: 7px 6px;
  border-radius: 12px;
  background: rgba(255, 248, 238, 0.14);
  border: 1.5px solid rgba(255, 235, 210, 0.26);
  color: #FFF8EE;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.usim-tool-card:disabled {
  opacity: 0.55;
  cursor: default;
}
.usim-tool-card.highlight {
  background: rgba(255, 210, 108, 0.3);
  border-color: #FFD166;
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.55);
  opacity: 1;
}
.usim-tool-card.working {
  background: rgba(217, 118, 82, 0.42);
  border-color: #FFA67A;
  opacity: 1;
}
.usim-tool-card.serve-glow {
  background: rgba(79, 178, 120, 0.45);
  border-color: #84F0B2;
  box-shadow: 0 0 14px rgba(104, 224, 152, 0.65);
  opacity: 1;
}
.usim-tool-name {
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}
.usim-tool-tag {
  font-size: 8.5px;
  font-weight: 700;
  color: #F4DEC4;
  opacity: 0.9;
}

.usim-gauge-panel {
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(45, 28, 18, 0.45);
  border: 1.5px solid rgba(255, 224, 180, 0.35);
}

.usim-self-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.usim-self-card {
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255, 248, 238, 0.12);
  border: 1px solid rgba(255, 232, 200, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Clean Bottom Dock (UNIFIED HEIGHT across all buttons & dialogue pill) */
.unica-sim-dock {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  background: linear-gradient(180deg, rgba(78, 55, 40, 0.92), rgba(58, 40, 28, 0.96));
  border-top: 2px solid rgba(255, 232, 200, 0.25);
  flex-shrink: 0;
}

.unica-dock-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unica-img-dock-btn,
.unica-self-toggle-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 13px;
  background: rgba(255, 248, 238, 0.14);
  border: 1.5px solid rgba(255, 232, 200, 0.38);
  color: #FFF8EE;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.unica-img-dock-btn.promo {
  background: rgba(217, 118, 82, 0.92);
  border-color: #FFD5A8;
}
.usim-exit-map-ic { font-size: 17px; line-height: 1; }
.usim-dock-sprite { width: 24px; height: 24px; }

.unica-self-toggle-btn.active {
  background: #4F9A76;
  border-color: #A7F3C0;
  color: #FFFFFF;
}

/* Compact 9:16 / Narrow Portrait Polish inside Unica Cafe */
#app-stage.narrow-mode .unica-sim-hud {
  padding: 6px 10px;
  gap: 6px;
  flex-wrap: nowrap;
}
#app-stage.narrow-mode .unica-hud-left {
  gap: 7px;
  min-width: 0;
}
#app-stage.narrow-mode .unica-clock-badge { font-size: 13.5px; }
#app-stage.narrow-mode .unica-rep-box { display: none; }
#app-stage.narrow-mode .unica-stamina-track { width: 58px; }
#app-stage.narrow-mode .unica-coin-pill {
  padding: 4px 9px;
  font-size: 11.5px;
}
#app-stage.narrow-mode .unica-sim-dock {
  padding: 6px 8px;
  gap: 6px;
}
#app-stage.narrow-mode .unica-dock-right { gap: 5px; }
#app-stage.narrow-mode .unica-img-dock-btn,
#app-stage.narrow-mode .unica-self-toggle-btn {
  height: 36px;
  padding: 0 9px;
  font-size: 10.5px;
  border-radius: 11px;
}
#app-stage.narrow-mode .usim-ing-sprite { width: 34px; height: 34px; }
#app-stage.narrow-mode .usim-ing-card { min-height: 60px; padding: 4px 3px; }
#app-stage.narrow-mode .usim-reset-ic { font-size: 20px; line-height: 34px; }
#app-stage.narrow-mode .usim-tool-sprite { width: 38px; height: 38px; }
#app-stage.narrow-mode .usim-tool-card { min-height: 74px; }

/* ==================== WIDE / 16:9 DESKTOP FLOATING LAYOUT (CONTAINER-DRIVEN, NEVER COLLIDES!) ==================== */
#app-stage.wide-mode .unica-stage-wrap {
  position: absolute;
  inset: 0;
  height: 100%;
  border-bottom: none;
  z-index: 1;
}

#app-stage.wide-mode .unica-sim-hud {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  padding: 7px 14px;
  border-radius: 15px;
  background: rgba(96, 68, 50, 0.78);
  backdrop-filter: blur(9px);
  border: 1.5px solid rgba(255, 236, 210, 0.38);
  z-index: 10;
}

/* IDENTICAL FLUID WIDTH ON BOTH LEFT & RIGHT PANELS — NEVER COLLIDES EVEN ON COMPACT 16:9! */
#app-stage.wide-mode .unica-panel-left {
  display: block;
  position: absolute;
  top: 62px;
  left: 14px;
  bottom: 62px;
  width: clamp(222px, 22.5%, 268px);
  z-index: 10;
  overflow-y: auto;
}

#app-stage.wide-mode .unica-panel-right {
  position: absolute;
  top: 62px;
  right: 14px;
  bottom: 62px;
  width: clamp(222px, 22.5%, 268px);
  z-index: 10;
  padding: 0;
  background: transparent;
  justify-content: flex-start;
  gap: 8px;
}

#app-stage.wide-mode .unica-sim-dock {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  padding: 0;
  background: transparent;
  border-top: none;
  z-index: 10;
  pointer-events: none;
}

#app-stage.wide-mode .unica-sim-dock > * {
  pointer-events: auto;
}

#app-stage.wide-mode .unica-img-dock-btn,
#app-stage.wide-mode .unica-self-toggle-btn {
  height: 40px;
  background: rgba(74, 52, 38, 0.88);
  box-shadow: 0 6px 16px rgba(45, 28, 16, 0.25);
}
#app-stage.wide-mode .unica-img-dock-btn.promo {
  background: rgba(217, 118, 82, 0.94);
}
#app-stage.wide-mode .unica-self-toggle-btn.active {
  background: #4F9A76;
}

#app-stage.wide-mode .unica-dialogue-bar {
  left: clamp(248px, 25%, 294px);
  right: clamp(248px, 25%, 294px);
  bottom: 10px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 11.5px;
}

#app-stage.wide-mode .usim-mobile-tabs,
#app-stage.wide-mode .usim-mobile-only-ing {
  display: none !important;
}

#app-stage.wide-mode .usim-tools-wrap {
  display: block !important;
}

#app-stage.wide-mode .usim-ing-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

#app-stage.wide-mode .usim-ing-card {
  min-height: 70px;
}

#app-stage.wide-mode .usim-tool-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

#app-stage.wide-mode .usim-tool-card {
  min-height: 78px;
}

#app-stage.wide-mode .usim-ing-sprite { width: 36px; height: 36px; }
#app-stage.wide-mode .usim-tool-sprite { width: 38px; height: 38px; }

/* Extra-clean compact scaling when 16:9 stage height is shorter (< 640px) so everything fits without scrolling */
#app-stage.wide-mode.short-stage .unica-sim-hud { padding: 5px 12px; top: 8px; }
#app-stage.wide-mode.short-stage .unica-panel-left,
#app-stage.wide-mode.short-stage .unica-panel-right { top: 54px; bottom: 54px; gap: 6px; }
#app-stage.wide-mode.short-stage .usim-glass-box { padding: 7px; }
#app-stage.wide-mode.short-stage .usim-box-title { margin-bottom: 5px; font-size: 10.5px; }
#app-stage.wide-mode.short-stage .usim-ing-card { min-height: 54px; padding: 3px 2px; gap: 1px; }
#app-stage.wide-mode.short-stage .usim-ing-sprite { width: 30px; height: 30px; }
#app-stage.wide-mode.short-stage .usim-reset-ic { font-size: 18px; line-height: 30px; }
#app-stage.wide-mode.short-stage .usim-ing-name { font-size: 8.8px; }
#app-stage.wide-mode.short-stage .unica-sticky-card { padding: 7px 9px; font-size: 10.5px; }
#app-stage.wide-mode.short-stage .usim-tool-card { min-height: 62px; padding: 4px 4px; gap: 2px; }
#app-stage.wide-mode.short-stage .usim-tool-sprite { width: 32px; height: 32px; }
#app-stage.wide-mode.short-stage .usim-tool-name { font-size: 9.2px; }
#app-stage.wide-mode.short-stage .usim-tool-tag { font-size: 8px; }
#app-stage.wide-mode.short-stage .unica-img-dock-btn,
#app-stage.wide-mode.short-stage .unica-self-toggle-btn,
#app-stage.wide-mode.short-stage .unica-dialogue-bar { height: 36px; font-size: 10.5px; }

/* ==================== STUDY HUB / LAMBE PRESS / BALAI BEM SHARED SIMULATOR EXTRAS ==================== */
.osim-sheet-a {
  background-image: url('/assets/outlet-icons-a.webp') !important;
  background-size: 400% 400% !important;
}
.osim-sheet-b {
  background-image: url('/assets/outlet-icons-b.webp') !important;
  background-size: 400% 400% !important;
}

.osim-grid-3x3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* Lambe Press Viral News Quiz Card inside Simulator Left Panel */
.osim-quiz-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 10px 6px;
}
.osim-quiz-idle-ic {
  display: inline-block;
  width: 56px;
  height: 56px;
  background-repeat: no-repeat;
}
.osim-quiz-cat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 224, 166, 0.22);
  border: 1px solid rgba(255, 220, 148, 0.45);
  color: #FFE49E;
  font-size: 9.5px;
  font-weight: 900;
  margin-bottom: 4px;
}
.osim-quiz-headline {
  font-size: 11.5px;
  font-weight: 900;
  color: #FFFDF8;
  line-height: 1.25;
  margin-bottom: 4px;
}
.osim-quiz-q {
  font-size: 10.5px;
  font-weight: 600;
  color: #F4E2D0;
  line-height: 1.38;
  margin-bottom: 8px;
}
.osim-quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 7px;
}
.osim-quiz-opt {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 248, 238, 0.12);
  border: 1.5px solid rgba(255, 235, 210, 0.28);
  color: #FFF8EE;
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
  line-height: 1.3;
}
.osim-quiz-opt:hover:not(:disabled) {
  background: rgba(255, 248, 238, 0.24);
  border-color: #FFD996;
}
.osim-quiz-opt.selected {
  background: rgba(88, 196, 120, 0.34);
  border-color: #84F0B2;
  color: #FFFFFF;
}
.osim-quiz-letter {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 248, 238, 0.2);
  color: #FFE49E;
  font-size: 10px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.osim-quiz-opt.selected .osim-quiz-letter {
  background: #4F9A76;
  color: #FFFFFF;
}
.osim-quiz-rule {
  font-size: 9.5px;
  font-weight: 800;
  color: #FFE4BD;
  background: rgba(45, 28, 18, 0.38);
  border-radius: 9px;
  padding: 5px 8px;
  text-align: center;
  line-height: 1.35;
}

/* Balai BEM Kas & Voting Quick Panel inside Simulator */
.osim-bem-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(45, 28, 18, 0.36);
  font-size: 11px;
  color: #FFECC8;
  margin-bottom: 8px;
}
.osim-poll-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1.5px solid rgba(255, 232, 200, 0.35);
  background: rgba(255, 252, 245, 0.94);
  color: #3E2F26;
  font-size: 11px;
  font-weight: 700;
  outline: none;
}

#app-stage.wide-mode.short-stage .osim-quiz-q { font-size: 9.8px; margin-bottom: 5px; }
#app-stage.wide-mode.short-stage .osim-quiz-opt { padding: 5px 7px; font-size: 9.8px; }
#app-stage.wide-mode.short-stage .osim-quiz-rule { font-size: 8.8px; padding: 4px 6px; }

/* ==================== STUDY HUB MEMORY FLASHCARDS & SEQUENCE ORDERING ==================== */
.osim-mem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.osim-mem-card {
  min-height: 72px;
  padding: 6px 4px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 240, 210, 0.22), rgba(220, 180, 130, 0.16));
  border: 2px solid rgba(255, 232, 198, 0.35);
  color: #FFF8EE;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.osim-mem-card.flipped {
  background: rgba(255, 250, 238, 0.94);
  border-color: #FFD166;
  color: #3E2F26;
}
.osim-mem-card.matched {
  background: #E2F7E9;
  border-color: #58C478;
  color: #1F5B35;
  opacity: 0.92;
}
.osim-mem-back { font-size: 20px; line-height: 1; }
.osim-mem-q { font-size: 11px; font-weight: 900; color: #FFE49E; }
.osim-mem-ic { font-size: 22px; line-height: 1; }
.osim-mem-lbl { font-size: 9.5px; font-weight: 900; line-height: 1.15; }

.osim-seq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.osim-seq-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 248, 238, 0.15);
  border: 1.5px solid rgba(255, 235, 210, 0.3);
  color: #FFF8EE;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}
.osim-seq-card:hover:not(:disabled) {
  background: rgba(255, 248, 238, 0.26);
  border-color: #FFD996;
}
.osim-seq-card.done {
  background: rgba(88, 196, 120, 0.32);
  border-color: #84F0B2;
  color: #FFFFFF;
}
.osim-seq-card.shake {
  border-color: #FF7B8E;
  background: rgba(229, 83, 101, 0.35);
  animation: osimShake 0.35s ease;
}
@keyframes osimShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.osim-seq-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 248, 238, 0.22);
  color: #FFE49E;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.osim-seq-card.done .osim-seq-num {
  background: #4F9A76;
  color: #FFFFFF;
}

/* ==================== BALAI BEM — TWO POINT CAMPUS SIMULATOR UI ==================== */
.osim-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 7px;
}
.osim-kpi-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 4px;
  border-radius: 10px;
  background: rgba(45, 28, 18, 0.38);
  border: 1px solid rgba(255, 232, 200, 0.28);
  font-size: 11px;
  color: #FFF8EE;
}
.osim-kpi-chip.star {
  border-color: #F5C353;
  color: #FFE38D;
}

.osim-event-card {
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 244, 210, 0.14);
  border: 1.5px solid rgba(255, 216, 128, 0.55);
  margin-bottom: 8px;
}
.osim-event-tag {
  font-size: 9px;
  font-weight: 900;
  color: #FFE38D;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.osim-event-title {
  font-size: 11px;
  font-weight: 900;
  color: #FFFDF8;
  line-height: 1.25;
  margin-bottom: 3px;
}
.osim-event-desc {
  font-size: 9.8px;
  color: #F2DFC9;
  line-height: 1.3;
  margin-bottom: 6px;
}
.osim-event-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.osim-event-btn {
  width: 100%;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 248, 238, 0.16);
  border: 1px solid rgba(255, 232, 200, 0.38);
  color: #FFFDF8;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 10px;
  font-weight: 900;
}
.osim-event-btn:hover {
  background: rgba(255, 218, 122, 0.28);
  border-color: #FFD166;
}
.osim-event-btn small {
  font-size: 8.8px;
  font-weight: 700;
  color: #FFE49E;
}
.osim-event-done {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(88, 196, 120, 0.24);
  border: 1px solid rgba(132, 240, 178, 0.48);
  color: #D9FBE5;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}

.osim-rooms-title {
  font-size: 9.2px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #FFE4BD;
  margin-bottom: 5px;
  text-align: center;
}
.osim-room-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.osim-room-card {
  padding: 6px;
  border-radius: 11px;
  background: rgba(255, 248, 238, 0.12);
  border: 1.5px solid rgba(255, 235, 210, 0.25);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.osim-room-card.target-room {
  background: rgba(255, 210, 108, 0.22);
  border-color: #FFD166;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.4);
}
.osim-room-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #FFF8EE;
}
.osim-room-lv {
  font-size: 9px;
  font-weight: 900;
  color: #FFE38D;
}
.osim-room-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(35, 22, 14, 0.45);
  overflow: hidden;
}
.osim-room-bar > div {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.osim-room-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}
.osim-rm-btn {
  flex: 1;
  padding: 4px 3px;
  border-radius: 7px;
  background: rgba(255, 248, 238, 0.18);
  border: 1px solid rgba(255, 232, 200, 0.35);
  color: #FFFDF8;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.osim-rm-btn.up {
  background: rgba(245, 195, 83, 0.26);
  border-color: #F5C353;
  color: #FFE8A3;
}
.osim-rm-btn:disabled { opacity: 0.42; cursor: default; }
.osim-rm-max {
  font-size: 8.5px;
  font-weight: 900;
  color: #84F0B2;
  padding: 0 4px;
}

.osim-proc-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(35, 22, 14, 0.55);
  border: 1px solid rgba(255, 235, 200, 0.35);
  overflow: hidden;
  margin-bottom: 7px;
}
.osim-proc-fill {
  height: 100%;
  background: linear-gradient(90deg, #58C478, #F5C353);
  border-radius: 999px;
  transition: width 0.12s linear;
}

#app-stage.wide-mode.short-stage .osim-mem-card { min-height: 58px; }
#app-stage.wide-mode.short-stage .osim-seq-card { padding: 6px 8px; font-size: 10px; }
#app-stage.wide-mode.short-stage .osim-event-card { padding: 6px; margin-bottom: 6px; }
#app-stage.wide-mode.short-stage .osim-event-desc { display: none; }
#app-stage.wide-mode.short-stage .osim-room-card { padding: 5px; }

/* ==================== BALAI BEM — TWO POINT CAMPUS TYCOON (COZY PASTEL) ==================== */
.bcs-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.bcs-stars {
  color: #FFD166;
  font-size: 13px;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.bcs-campus-name {
  font-size: 13px;
  font-weight: 900;
  color: #FFFDF8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.bcs-icon-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 248, 238, 0.16);
  border: 1px solid rgba(255, 235, 210, 0.35);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bcs-term-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.15);
  border: 1px solid rgba(255, 235, 210, 0.3);
  font-size: 10.5px;
  font-weight: 800;
  color: #FFE4BD;
  white-space: nowrap;
}
.bcs-stat-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
  border: 1.5px solid rgba(255, 235, 210, 0.4);
  background: rgba(45, 28, 18, 0.65);
  color: #FFFDF8;
}
.bcs-stat-pill.budget { border-color: #7EE0AA; color: #C7F9D4; }
.bcs-stat-pill.kudos { border-color: #FFD166; color: #FFE8A3; }

.bcs-cancel-pill {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #D94B64;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.bcs-tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.bcs-tab-btn {
  padding: 6px 4px;
  border-radius: 9px;
  background: rgba(45, 28, 18, 0.35);
  border: 1px solid rgba(255, 232, 200, 0.22);
  color: #F2DEC8;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.bcs-tab-btn.active {
  background: #D97652;
  border-color: #FFD5A8;
  color: #FFFFFF;
}

.bcs-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 6px;
}
.bcs-sub-btn {
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(255, 248, 238, 0.10);
  border: 1px solid rgba(255, 232, 200, 0.24);
  color: #F4E0CA;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.bcs-sub-btn.active {
  background: rgba(255, 218, 122, 0.26);
  border-color: #FFD166;
  color: #FFFDF8;
}

.bcs-build-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.bcs-build-card {
  padding: 7px 5px;
  border-radius: 11px;
  background: rgba(255, 248, 238, 0.13);
  border: 1.5px solid rgba(255, 235, 210, 0.24);
  color: #FFF8EE;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.bcs-build-card:hover {
  background: rgba(255, 248, 238, 0.24);
  border-color: #FFD996;
}
.bcs-build-card.active {
  background: rgba(88, 196, 120, 0.34);
  border-color: #84F0B2;
  box-shadow: 0 0 10px rgba(104, 224, 152, 0.45);
}
.bcs-build-card.locked { opacity: 0.56; }
.bcs-thumb-img {
  width: 68px;
  height: 54px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(45, 28, 16, 0.25));
}
.bcs-bc-ic { font-size: 20px; line-height: 1.1; }
.bcs-bc-name { font-size: 10px; font-weight: 900; line-height: 1.15; }
.bcs-bc-cost { font-size: 9px; font-weight: 800; color: #C7F9D4; }
.bcs-bc-cycle { font-size: 8.5px; font-weight: 800; color: #FFE49E; }

.bcs-list-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bcs-item-row {
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 248, 238, 0.11);
  border: 1px solid rgba(255, 232, 200, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.bcs-item-row.owned {
  background: rgba(88, 196, 120, 0.18);
  border-color: rgba(132, 240, 178, 0.42);
}
.bcs-item-name { font-size: 10.5px; font-weight: 900; color: #FFFDF8; }
.bcs-item-desc { font-size: 9px; color: #E4CEB8; line-height: 1.25; }
.bcs-act-btn {
  padding: 5px 8px;
  border-radius: 8px;
  background: #D97652;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}
.bcs-act-btn.green { background: #4F9A76; }
.bcs-act-btn.red { background: #C84B5D; }
.bcs-owned-tag {
  font-size: 9.5px;
  font-weight: 900;
  color: #84F0B2;
  white-space: nowrap;
}

.bcs-rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 310px;
  overflow-y: auto;
}
.bcs-rank-row {
  padding: 7px 8px;
  border-radius: 11px;
  background: rgba(255, 248, 238, 0.12);
  border: 1.5px solid rgba(255, 235, 210, 0.24);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bcs-rank-row.viewing {
  background: rgba(255, 218, 122, 0.22);
  border-color: #FFD166;
}
.bcs-rank-top,
.bcs-rank-meta,
.bcs-rank-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.bcs-rank-top { font-size: 10.5px; color: #FFFDF8; }
.bcs-rank-stars { color: #FFD166; font-size: 11px; }
.bcs-rank-meta { font-size: 9.2px; color: #F0DAC4; }
.bcs-rank-foot { font-size: 9px; color: #E2CBB5; margin-top: 2px; }
.bcs-visit-btn {
  padding: 4px 8px;
  border-radius: 8px;
  background: #4F9A76;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
}

.bcs-visitor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px 4px;
}

.bcs-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.bcs-metric {
  padding: 5px 4px;
  border-radius: 9px;
  background: rgba(45, 28, 18, 0.36);
  border: 1px solid rgba(255, 232, 200, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.bcs-metric span { font-size: 8.8px; color: #E6D0BA; font-weight: 700; }
.bcs-metric b { font-size: 11px; color: #FFFDF8; }

.bcs-inspector {
  margin-top: 8px;
  padding: 8px;
  border-radius: 11px;
  background: rgba(255, 244, 210, 0.14);
  border: 1.5px solid rgba(255, 216, 128, 0.55);
}
.bcs-insp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #FFFDF8;
  margin-bottom: 3px;
}
.bcs-room-lv { font-size: 10px; font-weight: 900; color: #FFE38D; }
.bcs-insp-sub { font-size: 9.5px; color: #F0DAC4; margin-bottom: 4px; }
.bcs-insp-timer { font-size: 9.5px; color: #FFE49E; margin-bottom: 6px; font-weight: 700; }
.bcs-insp-btns { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

.bcs-auto-income-pill {
  height: 40px;
  padding: 0 12px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  background: rgba(74, 52, 38, 0.88);
  border: 1.5px solid rgba(255, 224, 158, 0.42);
  color: #FFE49E;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(45, 28, 16, 0.25);
}
#app-stage.narrow-mode .bcs-auto-income-pill { height: 36px; padding: 0 8px; font-size: 9.8px; border-radius: 11px; }
#app-stage.wide-mode.short-stage .bcs-auto-income-pill { height: 36px; font-size: 10px; }

.bcs-p2p-card {
  margin-top: 8px;
  padding: 8px;
  border-radius: 11px;
  background: rgba(79, 154, 118, 0.24);
  border: 1.5px solid rgba(132, 240, 178, 0.52);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bcs-p2p-title { font-size: 10px; font-weight: 900; color: #C7F9D4; }
.bcs-p2p-desc { font-size: 10px; color: #FFFDF8; }

.bcs-dock-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bcs-zoom-pill {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 5px;
  border-radius: 13px;
  background: rgba(74, 52, 38, 0.88);
  border: 1.5px solid rgba(255, 232, 200, 0.38);
  box-shadow: 0 6px 16px rgba(45, 28, 16, 0.25);
}
.bcs-zoom-btn {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 248, 238, 0.14);
  color: #FFFDF8;
  font-size: 15px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcs-zoom-btn:hover { background: rgba(255, 218, 122, 0.3); }
.bcs-zoom-val {
  min-width: 44px;
  height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  background: transparent;
  color: #FFE4BD;
  font-size: 10.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcs-zoom-val:hover { background: rgba(255, 248, 238, 0.12); }

#bcs-btn-semester:disabled {
  background: rgba(74, 52, 38, 0.72) !important;
  border-color: rgba(255, 232, 200, 0.25) !important;
  color: #DFCBB5 !important;
  opacity: 0.85;
  cursor: not-allowed;
}
#bcs-btn-semester.sem-ready {
  background: linear-gradient(135deg, #4F9A76, #3E8462) !important;
  border-color: #A7F3C0 !important;
  box-shadow: 0 0 14px rgba(104, 224, 152, 0.55) !important;
}

#app-stage.narrow-mode .bcs-dock-left { gap: 5px; }
#app-stage.narrow-mode .bcs-zoom-pill { height: 36px; padding: 0 3px; border-radius: 11px; }
#app-stage.narrow-mode .bcs-zoom-btn { width: 24px; height: 24px; font-size: 13px; }
#app-stage.narrow-mode .bcs-zoom-val { min-width: 34px; font-size: 9.5px; padding: 0 3px; }
#app-stage.wide-mode.short-stage .bcs-zoom-pill { height: 36px; }
#app-stage.narrow-mode .bcs-term-pill { display: none; }
#app-stage.narrow-mode .bcs-campus-name { max-width: 105px; font-size: 11.5px; }
#app-stage.narrow-mode .bcs-stat-pill { padding: 3px 7px; font-size: 10.5px; }
#app-stage.wide-mode.short-stage .bcs-build-card { padding: 4px 4px; }
#app-stage.wide-mode.short-stage .bcs-thumb-img { width: 54px; height: 42px; }
#app-stage.wide-mode.short-stage .bcs-bc-ic { font-size: 17px; }
#app-stage.wide-mode.short-stage .bcs-rank-list { max-height: 220px; }

/* ==================== COUPLE V2: QUICK PARTNER BAR, 2-WAY INVITE POPUP & MODAL ==================== */
.couple-quick-bar {
  position: absolute;
  top: 52px;
  right: 10px;
  z-index: 21;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 245, 249, 0.94);
  border: 2px solid #F0ACC3;
  box-shadow: 0 6px 18px rgba(184, 59, 100, 0.18);
  pointer-events: auto;
}
.cq-partner-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #FCEBF1;
  color: #8E2B4E;
  font-size: 11px;
  font-weight: 900;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cq-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid #F0C2D2;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cq-action-btn.active {
  background: #D96B8A;
  border-color: #B84266;
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(217, 107, 138, 0.5);
}
.cq-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#app-stage.narrow-mode .couple-quick-bar {
  top: 50px;
  right: 8px;
  padding: 3px 5px;
  gap: 3px;
}
#app-stage.narrow-mode .cq-partner-pill {
  max-width: 92px;
  font-size: 10px;
  padding: 3px 7px;
}
#app-stage.narrow-mode .cq-action-btn {
  width: 25px;
  height: 25px;
  font-size: 11.5px;
}

.couple-invite-popup {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 72;
  width: min(390px, calc(100% - 20px));
  padding: 10px 13px;
  border-radius: 18px;
  background: rgba(255, 246, 250, 0.97);
  border: 2.5px solid #E58CA8;
  box-shadow: 0 12px 28px rgba(184, 59, 100, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  pointer-events: auto;
}
.couple-invite-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
  flex: 1;
}
.couple-invite-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mini-btn.pink { background: #D96B8A; color: #FFFFFF; }
.mini-btn.outline-pink { background: #FFFFFF; color: #A63C60; border: 1.5px solid #E8AFC2; }

.couple-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.couple-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 2px solid #F0C2D2;
  background: #FFF9FB;
  color: #7D2B49;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.couple-action-card.active {
  background: linear-gradient(135deg, #D96B8A, #E88AA5);
  border-color: #B84266;
  color: #FFFFFF;
}
.couple-action-card:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.couple-online-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}
.couple-cand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid #EED5DF;
  background: #FFFFFF;
}

/* ==================== BALAI BEM ADJACENCY SYNERGY & ZONING UI ==================== */
.bcs-syn-strip {
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(45, 28, 18, 0.42);
  border: 1px solid rgba(255, 228, 182, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.bcs-syn-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #FFF6E8;
}
.bcs-syn-stats .warn { color: #FDA4AF; }
.bcs-syn-guide-btn {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 240, 200, 0.2);
  border: 1px solid rgba(255, 224, 150, 0.55);
  color: #FFE49E;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
}
.bcs-syn-pill {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}
.bcs-syn-pill.good { background: #2E8B57; color: #FFFFFF; }
.bcs-syn-pill.bad { background: #D94B64; color: #FFFFFF; }
.bcs-syn-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.bcs-syn-chip {
  padding: 2px 6px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}
.bcs-syn-chip.good { background: rgba(52, 199, 123, 0.22); color: #C7F9D4; border: 1px solid rgba(132, 240, 178, 0.45); }
.bcs-syn-chip.bad { background: rgba(239, 71, 111, 0.25); color: #FECDD3; border: 1px solid rgba(253, 164, 175, 0.55); }
.bcs-act-btn.blue { background: #3B82C4; color: #FFFFFF; }

.bcs-syn-guide-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.bcs-syn-sec-title {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.bcs-syn-sec-title.good { color: #A7F3C0; }
.bcs-syn-sec-title.bad { color: #FDA4AF; }
.bcs-syn-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 10px;
  color: #FFFDF8;
}
.bcs-syn-rule.good { background: rgba(52, 199, 123, 0.16); border: 1px solid rgba(132, 240, 178, 0.32); }
.bcs-syn-rule.bad { background: rgba(239, 71, 111, 0.18); border: 1px solid rgba(253, 164, 175, 0.36); }
.bcs-syn-val { font-weight: 900; white-space: nowrap; }
.bcs-syn-val.good { color: #86EFAC; }
.bcs-syn-val.bad { color: #FDA4AF; }

.bcs-path-swatch {
  width: 58px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #C7B49A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: inset 0 -3px 0 rgba(62, 47, 38, 0.16);
}
.bcs-st-lv {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 224, 150, 0.25);
  color: #FFE49E;
  font-size: 9px;
  font-weight: 900;
}
.bcs-research-active {
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(59, 130, 196, 0.26);
  border: 1.5px solid rgba(147, 197, 253, 0.55);
  margin-bottom: 6px;
}
.bcs-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.bcs-theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 5px;
  border-radius: 10px;
  background: rgba(45, 28, 18, 0.36);
  border: 1.5px solid rgba(255, 232, 200, 0.24);
  color: #FFFDF8;
  font-size: 9.5px;
  font-weight: 800;
}
.bcs-theme-btn.active {
  border-color: #FFE49E;
  background: rgba(255, 224, 150, 0.22);
}
.bcs-theme-swatch {
  width: 100%;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.bcs-theme-name { font-size: 9.5px; font-weight: 900; }
.bcs-theme-cost { font-size: 8.8px; color: #FFE49E; }
.bcs-hide-hud-btn {
  padding: 0 10px !important;
  gap: 4px !important;
  color: #FFF8EE;
  font-size: 11px;
  font-weight: 900;
}
#app-stage.narrow-mode .bcs-hide-hud-btn { padding: 0 8px !important; }
#app-stage.narrow-mode .bcs-hide-lbl { display: none; }

/* ==================== COZY PETSHOP & TAMAGOTCHI MODAL ==================== */
.pet-tama-stage {
  border-radius: 20px;
  border: 2.5px solid #F0BDD0;
  background: linear-gradient(155deg, #FFF9FB 0%, #FFF2E6 60%, #ECF9F1 100%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.pet-avatar-bubble {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #F0ACC3;
  box-shadow: 0 8px 20px rgba(217, 107, 138, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: petFloat 2.4s ease-in-out infinite;
}
.pet-avatar-bubble.sleeping {
  animation: none;
  filter: saturate(0.88);
}
.pet-sleep-zzz {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 20px;
}
.pet-avatar-bubble.adult-glow {
  border-color: #E8B84B;
  box-shadow: 0 0 0 4px rgba(255, 224, 140, 0.35), 0 8px 22px rgba(217, 107, 138, 0.25);
}
.pet-sprite-preview {
  background-image: url('/assets/pets-strip.webp');
  background-repeat: no-repeat;
  background-size: 600% 300%;
  flex-shrink: 0;
}
.pet-sprite-preview.lg {
  width: 76px;
  height: 76px;
}
.pet-sprite-preview.sm {
  width: 48px;
  height: 48px;
}
.pet-sprite-preview.xs {
  width: 40px;
  height: 40px;
}
.pet-sprite-preview.silhouette {
  filter: brightness(0.28) saturate(0.25) opacity(0.35);
}
.pet-evo-strip {
  width: 100%;
  max-width: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0;
}
.pet-evo-arrow {
  font-size: 13px;
  color: #C79A84;
  font-weight: 900;
}
.pet-evo-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 4px;
  border-radius: 12px;
  border: 1.8px solid #EADAC5;
  background: rgba(255, 255, 255, 0.85);
}
.pet-evo-node.current {
  border-color: #E58CA4;
  background: #FFF3F7;
  box-shadow: 0 3px 10px rgba(217, 107, 138, 0.16);
}
.pet-evo-node.locked {
  background: rgba(244, 236, 226, 0.7);
  border-style: dashed;
}
.pet-evo-lbl {
  font-size: 9.5px;
  font-weight: 900;
  color: #4E3B2F;
  line-height: 1.15;
}
.pet-evo-lv {
  font-size: 8.5px;
  font-weight: 800;
  color: #8E7463;
}
.pet-shop-thumb {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 2px solid #E5CBB0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.furn-sprite-preview {
  width: 34px;
  height: 34px;
  background-image: url('/assets/furniture-strip.webp');
  background-repeat: no-repeat;
  background-size: 800% 100%;
  flex-shrink: 0;
}
@keyframes petFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.pet-tama-bars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 4px;
}
.pet-bar-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid #EADAC5;
  border-radius: 12px;
  padding: 6px 9px;
  text-align: left;
}
.pet-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 900;
  color: #5B4638;
  margin-bottom: 4px;
}
.pet-bar-track {
  height: 7px;
  border-radius: 999px;
  background: #EFE4D4;
  overflow: hidden;
}
.pet-bar-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.pet-care-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
@media (max-width: 520px) {
  .pet-care-grid { grid-template-columns: repeat(3, 1fr); }
}
.pet-care-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 9px 4px;
  border-radius: 14px;
  border: 2px solid #EBD7C2;
  background: #FFFDF8;
  color: #3E2F26;
  font-size: 10.5px;
  font-weight: 900;
}
.pet-care-btn:hover { background: #FFF2E6; border-color: #D97652; }
.pet-care-btn.active { background: #E9E2FA; border-color: #8A56AC; color: #542F75; }
.pet-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 520px) {
  .pet-shop-grid { grid-template-columns: 1fr; }
}
.pet-shop-card {
  border-radius: 16px;
  border: 2px solid #EADAC5;
  background: #FFFFFF;
  padding: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.pet-shop-card.owned { border-color: #E88AA8; background: #FFF7FA; }
