/* Management belongs to the tablet; the cafe keeps the main viewport. */
.play { display: block; min-width: 0; }
.stage-col { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.stage-frame { position: relative; width: 100%; min-width: 0; }
.stage { flex: none; margin-inline: auto; aspect-ratio: auto; overflow: auto; scrollbar-width: none; }
.stage::-webkit-scrollbar { display: none; }
.camera-surface { position: relative; }
.camera-controls { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 5px; z-index: 30; }
.camera-controls button { width: 40px; height: 40px; border: 2px solid #FFFFFFCC; border-radius: 12px; background: #1F2240E8; color: white; font-size: 23px; cursor: pointer; }
.fullscreen-button { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--panel-2); color: var(--ink); cursor: pointer; }
.fullscreen-button svg { width: 23px; height: 23px; }
.app.game-immersive { position: fixed; inset: 0; max-width: none; width: 100vw; height: 100dvh; padding: 8px; overflow: hidden; background: var(--page); border-radius: 0; z-index: 10000; }
.game-immersive .hud { box-shadow: none; }
.hud { gap: 10px; border-radius: 20px; padding: 8px 12px; }
.brand { gap: 0; }
.brand > svg { display: none; }
.brand h1 { font-size: 25px; }
.brand p { font-size: 12px; }
.level { min-width: 150px; max-width: 240px; flex: 1; }
.view-toggle { position: static; align-self: center; flex-wrap: wrap; max-width: 100%; }
.tablet-launcher { position: relative; display: grid; justify-items: center; gap: 1px; width: 58px; padding: 3px; border: 0; border-radius: 12px; color: var(--ink); background: var(--panel-2); cursor: pointer; }
.tablet-launcher svg { width: 38px; height: 38px; }
.tablet-launcher span { font-size: 11px; font-weight: 900; }
.tablet-launcher b { position: absolute; top: -3px; right: -2px; min-width: 21px; padding: 2px 5px; border: 2px solid white; border-radius: 99px; background: #C64431; color: white; font-size: 12px; }
.operation-alert { border: 0; padding: 9px 12px; border-radius: 12px; background: #FFE4C3; color: #833418; cursor: pointer; font-size: 13px; font-weight: 900; }
.management-tablet { box-sizing: border-box; width: min(900px, calc(100vw - 24px)); height: min(720px, calc(100dvh - 24px)); max-width: none; max-height: none; padding: 0; border: 9px solid var(--ink); border-radius: 30px; background: #F1F6F5; color: var(--ink); box-shadow: 0 24px 100px #11172F66; }
.management-tablet[open] { display: flex; flex-direction: column; }
.management-tablet::backdrop { background: #14203177; backdrop-filter: blur(3px); }
.tablet-header { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: white; border-bottom: 1px solid var(--line); }
.tablet-header > div { margin-right: auto; }
.tablet-os { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: #217973; }
.tablet-header h2 { margin: 2px 0; font: 400 24px var(--f-display); }
.tablet-header p { margin: 0; font-size: 13px; color: var(--ink-soft); }
#tabletBalance { font-size: 16px; font-weight: 900; white-space: nowrap; }
.tablet-close { flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; color: var(--ink); background: var(--panel-2); font-size: 28px; cursor: pointer; }
.tablet-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 10px 16px; background: white; }
.tablet-nav button { min-width: 0; min-height: 42px; padding: 8px 4px; border: 0; border-radius: 12px; background: var(--panel-2); font-size: 14px; font-weight: 900; cursor: pointer; }
.tablet-nav button[aria-selected="true"] { background: var(--ink); color: white; }
.tablet-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 16px; }
.tablet-content > h3 { margin: 0 0 12px; font-size: 17px; }
.tablet-content .card { box-shadow: none; padding: 12px; }
.tablet-content .card-head h2 { display: none; }
.tablet-content .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.tablet-content .offer { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 9px; }
.tablet-content .offer-icon { width: 44px; height: 44px; }
.tablet-content .tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.management-tablet[data-section="branches"] .tabs { display: none; }
.module-info { font-size: 13px; color: var(--ink-soft); }
.module-info summary { width: fit-content; padding: 5px 0; cursor: pointer; font-weight: 800; color: #276F70; }
.module-info p { margin: 0 0 8px; line-height: 1.45; }
.tablet-summary { display: flex; gap: 16px; padding: 10px; border-radius: 14px; background: white; }
.tablet-content .incident-panel, .tablet-content .advisor, .tablet-content .city-panel { position: static; margin-top: 12px; max-height: none; }
.tablet-content .metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.tablet-content .advisor { grid-template-columns: 40px minmax(0, 1fr); }
.tablet-content .advisor-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.tablet-content .advisor-body p { display: block; font-size: 14px; }
.tablet-content .advisor-icon { width: 40px; height: 40px; }
.tablet-status { flex: none; padding: 10px 16px; min-height: 36px; background: white; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }
.coach { align-self: center; font-size: 13px; padding: 8px 12px; }
.coach li[hidden] { display: none; }
@media (min-width: 621px) and (max-width: 800px) {
  .hud { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto 40px; }
  .tablet-launcher { grid-row: 1 / 3; }
  .brand { margin: 0; }
  .level { grid-column: 2 / 5; max-width: none; }
  .stats { grid-column: 3; grid-row: 1; }
  .fullscreen-button { grid-column: 4; grid-row: 1; }
  .operation-alert { grid-column: 1 / -1; padding: 6px; }
}
/* Quiet gameplay HUD; company details stay inside the tablet. */
body { padding: 0; }
.app { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); max-width: none; gap: 0; }
.app > .hud { position: absolute; z-index: 45; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: flex-start; padding: 0; border: 0; background: none; box-shadow: none; pointer-events: none; }
.app > .hud button { pointer-events: auto; }
.game-tools { display: flex; gap: 7px; }
.notification-button { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: #FFFFFFF0; color: var(--ink); cursor: pointer; }
.notification-button svg { width: 23px; height: 23px; }
.notification-button b { position: absolute; right: -3px; top: -4px; min-width: 19px; padding: 2px 4px; border-radius: 99px; background: #C64431; color: white; font-size: 11px; }
.app .tablet-launcher, .app .fullscreen-button { background: #FFFFFFF0; box-shadow: 0 3px 10px #1F224022; }
.app .stage-col { gap: 0; }
.app .stage { border-radius: 0; box-shadow: none; }
.app .view-toggle { position: absolute; z-index: 40; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 190px); margin: 0; padding: 4px; background: #FFFFFFF0; box-shadow: 0 3px 10px #1F224022; }
.app .view-toggle button { padding: 7px 12px; }
.tablet-content .event-bar { position: relative; margin-bottom: 12px; }
.app .coach { position: absolute; z-index: 35; left: 12px; bottom: 12px; max-width: calc(100% - 160px); margin: 0; background: #FFFFFFE8; }
.app .toast { position: absolute; top: auto; bottom: 66px; left: 50%; width: max-content; max-width: min(480px, calc(100% - 30px)); max-height: 88px; overflow: hidden; white-space: normal; font-size: 14px; pointer-events: none; }
.app.game-immersive { padding: 0; }
.company-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.company-overview .brand, .company-overview .level, .company-overview .operation-alert { grid-column: 1 / -1; }
.company-overview .level { max-width: none; width: 100%; }
.company-overview .stats { grid-column: auto; grid-row: auto; }
.company-overview .stat b { font-size: 32px; }
.tablet-nav { display: flex; overflow-x: auto; scrollbar-width: thin; }
.tablet-nav button { flex: 1; min-width: 72px; }
.notification-center { width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 16px; border: 5px solid var(--ink); border-radius: 24px; color: var(--ink); background: #F1F6F5; }
.notification-center::backdrop { background: #14203177; }
.notification-center > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-center h2 { margin: 0; font: 400 24px var(--f-display); }
.notification-center ol { display: grid; gap: 8px; padding: 0; list-style: none; max-height: 55dvh; overflow: auto; }
.notification-center li { padding: 12px; border-radius: 14px; background: white; }
.notification-center li small { color: var(--ink-soft); font-size: 12px; }
.notification-center li p { margin: 5px 0 0; font-size: 14px; line-height: 1.4; }
@media (max-width: 560px) {
  .app .view-toggle { max-width: calc(100% - 160px); padding: 3px; }
  .app .view-toggle button { font-size: 11px; padding: 5px; min-width: 44px; min-height: 44px; }
  .app .view-toggle .vt-lock { width: 10px; }
  .app > .hud { left: 8px; right: 8px; }
  .game-tools { gap: 4px; }
  .notification-button, .app .fullscreen-button { width: 44px; height: 44px; }
}
@media (max-width: 620px) {
  .hud { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 36px; }
  .tablet-launcher { width: 44px; grid-row: 1 / 3; }
  .tablet-launcher svg { width: 32px; height: 32px; }
  .brand { margin: 0; }
  .level { grid-column: 2 / 5; max-width: none; }
  .stats { grid-column: 3; grid-row: 1; }
  .fullscreen-button { grid-column: 4; grid-row: 1; width: 36px; height: 36px; }
  .operation-alert { grid-column: 1 / -1; }
  .tablet-header { padding: 12px; gap: 8px; }
  .tablet-header h2 { font-size: 20px; }
  .tablet-nav { padding: 8px; gap: 3px; }
  .tablet-nav button { font-size: 12px; }
  .tablet-content { padding: 10px; }
  .tablet-content .offers { grid-template-columns: minmax(0, 1fr); }
  #tabletBalance { font-size: 13px; }
  .brand h1 { font-size: 21px; }
  .level { min-width: 110px; }
  .stat { padding: 6px 9px; }
  .operation-alert { flex-basis: 100%; padding: 6px; }
}
@media (orientation: landscape) and (max-height: 600px) {
  body { padding: 6px 10px; }
  .hud { padding: 4px 8px; gap: 8px; }
  .tablet-launcher { width: 44px; grid-template-columns: 1fr; }
  .tablet-launcher svg { width: 30px; height: 30px; }
  .tablet-launcher span { display: none; }
  .view-toggle { position: static; margin-bottom: 4px; }
  .stage-col { gap: 0; }
  .tablet-header { padding: 6px 14px; }
  .tablet-header h2 { font-size: 19px; }
  .tablet-os { display: none; }
  .tablet-close { width: 36px; height: 36px; }
  .tablet-nav { padding-block: 5px; }
  .tablet-nav button { min-height: 34px; }
  .tablet-content { padding: 10px 14px; }
  .tablet-content .maestro-impact { display: block; }
  .tablet-content .cp-meta { font-size: 14px; }
  .operation-alert { padding: 5px 8px; }
}
body { padding: 0; margin: 0; }
