/* Discover-specific floating controls, map controls, and overlays. */
.dm-activation-btn.primary{
  background: var(--sotido-web-secondary-control-fill);
  color: var(--sotido-theme-text-primary);
}
.dm-activation-btn.secondary{
  background: var(--sotido-theme-surface-soft);
  color: var(--sotido-theme-text-primary);
}
.calendar-view-toggle-btn{
  position: fixed;
  left: 6px;
  bottom: 200px;
  z-index: 360;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 22px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sotido-theme-accent);
  color: var(--sotido-theme-primary-accent-text);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
@keyframes dm-sec-float{
  0%{ transform: translateY(0px); }
  50%{ transform: translateY(-6px); }
  100%{ transform: translateY(0px); }
}
body.discover-mode .calendar-view-toggle-btn{
  display: none !important;
}
.discover-map-fullscreen-view{
  position: relative;
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  flex: 1 1 auto;
  border-radius: 0;
  overflow: hidden;
  background: var(--map-picker-space-color, var(--sotido-theme-background));
}
body.discover-mode .discover-map-fullscreen-view{
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-height: none;
  min-height: 0;
  flex: 0 0 auto;
  z-index: 24;
}
.discover-mode.discover-map-mode .discover-map-fullscreen-view{
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-height: none;
  min-height: 0;
  flex: 0 0 auto;
  z-index: 24;
}
.discover-map-fullscreen-view.map-picker-body{
  min-height: 0;
  height: 100%;
  background: var(--map-picker-space-color, var(--sotido-theme-background));
}
.discover-map-fullscreen-view .map-picker-map{
  min-height: 0;
  height: 100%;
}
.native-discover-inline #calendarTopbar,
.native-discover-inline #calendarThemeBanner,
.native-discover-inline #modePanel,
.native-discover-inline #modePanelLegal,
.native-discover-inline #calendarStoryControlsHost,
.native-discover-inline #calendarStoryStrip,
.native-discover-inline #calendarFilterToggle,
.native-discover-inline #discoverLocationOverlay,
.native-discover-inline #discoverFilterOverlay,
.native-discover-inline #discoverHeaderControls,
.native-discover-inline .discover-header-controls,
.native-discover-inline #workspaceOverlayHead,
.native-discover-inline #topRightOverlayActions{
  display: none !important;
}
.native-discover-inline #rootContent{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}
@supports (height: 100dvh){
  .native-discover-inline #rootContent{
    height: 100dvh !important;
  }
}
.native-discover-inline .discover-map-fullscreen-view{
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  border-radius: 0 !important;
}
.discover-map-fullscreen-map{
  position: absolute;
  inset: 0;
  background: var(--map-picker-space-color, var(--sotido-theme-background));
}
.discover-webgpu-dev-host{
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  background: rgba(4, 8, 18, 0.98);
}
.discover-webgpu-dev-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.discover-webgpu-dev-canvas.is-dragging{
  cursor: grabbing;
}
.discover-globe-startup{
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
  color: var(--sotido-theme-text-inverse);
  background:
    radial-gradient(circle at 50% 46%, rgba(29, 78, 100, 0.34), transparent 31%),
    linear-gradient(180deg, rgba(3, 8, 20, 0.72), rgba(3, 8, 20, 0.94));
  opacity: 1;
  visibility: visible;
  transition: opacity 240ms ease, visibility 0s linear 0s;
}
.discover-globe-startup[data-state="ready"]{
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}
.discover-globe-startup-card{
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid rgba(178, 220, 236, 0.18);
  border-radius: 30px;
  background: rgba(8, 18, 32, 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.discover-globe-startup-progress{
  position: relative;
  width: var(--sotido-recipe-five-petal-progress-globe-startup-size, 60px);
  height: var(--sotido-recipe-five-petal-progress-globe-startup-size, 60px);
  display: grid;
  place-items: center;
}
.discover-globe-startup-progress-logo{
  --sotido-five-petal-progress-size: 100%;
  --sotido-five-petal-progress-active: var(--sotido-theme-accent);
  position: absolute;
  inset: 0;
}
@media (prefers-reduced-motion: reduce){
  .discover-globe-startup,
  .sotido-five-petal-progress-petal{ transition: none; }
}
.discover-webgpu-dev-status-chip{
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: calc(14px + env(safe-area-inset-left, 0px));
  z-index: 6;
  max-width: min(62vw, 248px);
  padding: 7px 10px;
  border-radius: 999px;
  font: 600 11px/1.15 "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  color: var(--sotido-theme-text-inverse);
  background: rgba(11, 17, 37, 0.76);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.discover-webgpu-dev-status-chip[data-renderer-state="gpu"]{
  background: rgba(22, 74, 58, 0.76);
  border-color: rgba(102, 255, 194, 0.22);
}
.discover-webgpu-dev-status-chip[data-renderer-state="fallback"]{
  background: rgba(92, 47, 24, 0.82);
  border-color: rgba(255, 184, 120, 0.24);
}
.discover-globe-marker-preview{
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 12px;
  width: min(420px, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--sotido-theme-border) 72%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--sotido-theme-surface-raised) 90%, transparent),
      color-mix(in srgb, var(--sotido-theme-surface) 82%, transparent));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  transform: none;
  color: var(--sotido-theme-text-primary);
}
.discover-globe-marker-preview[hidden]{
  display: none;
}
.discover-globe-marker-preview[data-has-image="true"]{
  grid-template-columns: 88px minmax(0, 1fr);
}
.discover-globe-marker-preview-media{
  min-height: 88px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--sotido-theme-border) 64%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--sotido-theme-surface) 84%, transparent);
}
.discover-globe-marker-preview-media[hidden]{
  display: none;
}
.discover-globe-marker-preview-media img{
  display: block;
  width: 100%;
  height: 100%;
  min-height: 88px;
  object-fit: cover;
}
.discover-globe-marker-preview-media img[data-media-kind="avatar"]{
  padding: 12px;
  object-fit: contain;
}
.discover-globe-marker-preview-copy{
  display: grid;
  gap: 4px;
  min-width: 0;
}
.discover-globe-marker-preview-copy strong{
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-globe-marker-preview-copy span{
  overflow: hidden;
  color: var(--sotido-theme-text-muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-globe-marker-preview-context{
  display: grid;
  gap: 2px;
}
.discover-globe-marker-preview-context time{
  overflow: hidden;
  color: var(--sotido-theme-text-secondary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-globe-marker-preview-level{
  display: none;
  width: fit-content;
  color: var(--sotido-theme-text-muted);
  font-size: 10px;
  line-height: 1.2;
}
html[data-sotido-dev-mode="1"] .discover-globe-marker-preview-level:not([hidden]){
  display: inline-flex;
}
.discover-globe-marker-preview-copy p{
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--sotido-theme-text-secondary);
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.discover-globe-marker-preview-copy p[hidden]{
  display: none;
}
.discover-globe-marker-preview-copy a{
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--sotido-theme-accent);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-globe-marker-preview-copy a:hover{
  text-decoration: underline;
}
.discover-globe-marker-preview-actions{
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.discover-globe-marker-preview-actions button{
  min-height: 34px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 750;
}
@media (max-width: 640px){
  .discover-globe-marker-preview{
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    max-height: min(44dvh, 340px);
    padding: 10px;
    overflow-y: auto;
  }

  .discover-globe-marker-preview[data-has-image="true"]{
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .discover-globe-marker-preview-media,
  .discover-globe-marker-preview-media img{
    min-height: 64px;
  }

  .discover-globe-marker-preview-actions{
    gap: 6px;
    margin-top: 6px;
  }

  .discover-globe-marker-preview-actions button{
    min-height: 32px;
    padding-inline: 9px;
  }
}
.discover-webgpu-dev-diagnostics{
  position: absolute;
  left: 12px;
  top: calc(52px + env(safe-area-inset-top, 0px));
  z-index: 5;
  width: min(88vw, 360px);
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(6, 10, 18, 0.72);
  box-shadow: 0 10px 40px rgba(0,0,0,0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease;
  display: none;
}
.discover-webgpu-dev-host[data-debug-panels="collapsed"] .discover-webgpu-dev-diagnostics{
  opacity: 0;
  transform: translateY(-10px);
}
.discover-webgpu-dev-diagnostics-row{
  color: var(--sotido-theme-text-inverse);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
}
.discover-location-overlay{
  position: fixed;
  inset: 0;
  z-index: 260100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: color-mix(in srgb, var(--sotido-theme-background) 62%, transparent);
}
.discover-location-overlay.is-open{
  display: flex;
}
.discover-location-box,
.discover-filter-box{
  width: min(560px, 94vw);
  border-radius: 14px;
  border: 1px solid var(--sotido-theme-border);
  background: var(--sotido-theme-surface);
  box-shadow: var(--sotido-shadow-surface);
  color: var(--sotido-theme-text-primary);
  padding: 12px;
}
.discover-filter-box{
  align-self: center;
  flex: 0 0 auto;
  height: auto;
}

.discover-location-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.discover-location-sub{
  margin-top: 6px;
  color: var(--sotido-theme-text-primary);
}
.discover-filter-list{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.discover-filter-item{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}
.discover-filter-item:hover{
  background: color-mix(in srgb, var(--sotido-theme-surface-soft) 72%, transparent);
}
.discover-filter-check{
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  background:
    linear-gradient(
      145deg,
      var(--sotido-theme-surface-highest),
      var(--sotido-theme-surface-soft)
    ) padding-box,
    linear-gradient(
      320deg,
      var(--discover-cat-color, color-mix(in srgb, var(--sotido-theme-text-primary) 35%, transparent)) 0%,
      transparent 100%
    ) border-box;
  box-sizing: border-box;
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease;
}
.discover-filter-text{
  color: var(--sotido-theme-text-primary);
}
body.calendar-settings-screen-open .calendar-view-toggle-btn,
body.event-compose-screen-open .calendar-view-toggle-btn,
body.participants-modal-open .calendar-view-toggle-btn,
body.snapshot-mode .calendar-view-toggle-btn{
  display: none !important;
}
.dm-activation-banner{
  position: relative;
  order: 1;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, var(--sotido-theme-warning-surface), var(--sotido-theme-warning-accent));
  color: var(--sotido-theme-text-on-accent);
  box-shadow: var(--sotido-shadow-surface);
  cursor: pointer;
}
.dm-activation-banner.is-blocked{
  background: linear-gradient(135deg, var(--sotido-theme-danger-surface), var(--sotido-theme-destructive-accent));
  color: var(--sotido-theme-text-on-accent);
}
.dm-activation-overlay{
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--sotido-theme-background) 58%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.dm-activation-open{
  overflow: hidden;
}
.dm-activation-box{
  width: min(560px, 92vw);
  border-radius: 18px;
  background: var(--sotido-theme-surface);
  color: var(--sotido-theme-text-primary);
  box-shadow: var(--sotido-shadow-surface);
  border: 1px solid var(--sotido-theme-border);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dm-activation-sec{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-activation-sec svg{
  width: min(240px, 70vw);
  height: auto;
  animation: dm-sec-float 5s ease-in-out infinite;
}
.dm-activation-title{
  font-weight: 800;
  font-size: 16px;
}
.dm-activation-message{
  font-size: 13px;
  color: var(--sotido-theme-text-primary);
  line-height: 1.35;
}
.dm-activation-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Shared product Fun Mode launcher used by WebApp and Model Studio. */
.studio-globe-fun-mode{
  position: absolute;
  inset: 0;
  z-index: 34;
  pointer-events: none;
  color: #f8fafc;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
}
.studio-globe-fun-mode__launcher{
  position: absolute;
  right: 18px;
  bottom: 278px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}
.studio-globe-fun-mode__trigger,
.studio-globe-fun-mode__play{
  border: 1px solid rgba(148, 213, 255, .34);
  border-radius: 999px;
  color: #effaff;
  background: rgba(8, 20, 31, .82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}
.studio-globe-fun-mode__trigger{
  padding: 7px 12px;
  font: 800 11px/1 "Avenir Next", "Trebuchet MS", sans-serif;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.studio-globe-fun-mode__trigger[aria-pressed="true"]{
  border-color: rgba(123, 222, 255, .82);
  color: #042536;
  background: #79dcf7;
  box-shadow: 0 8px 28px rgba(46, 183, 225, .34);
}
.studio-globe-fun-mode__play{
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
}
.studio-globe-fun-mode__play svg{
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.studio-globe-fun-mode__play:disabled{
  cursor: progress;
  opacity: .55;
}
.studio-globe-fun-mode__play[hidden],
.studio-globe-character-controls[hidden],
.studio-globe-vehicle-controls[hidden],
.studio-globe-minimap[hidden]{
  display: none;
}
.studio-globe-character-controls{
  display: none;
  position: absolute;
  right: 22px;
  bottom: 24px;
  z-index: 4;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.studio-globe-character-controls button{
  border: 1px solid rgba(152, 224, 255, .34);
  color: #eafaff;
  background: rgba(5, 22, 32, .76);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 900 11px/1 "Avenir Next", "Trebuchet MS", sans-serif;
  cursor: pointer;
  touch-action: none;
}
.studio-globe-character-controls button:active{
  color: #062532;
  background: #79ddf7;
  transform: translateY(1px);
}
.studio-globe-character-controls__free-look{
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
}
.studio-globe-character-controls__free-look svg{
  width: 25px;
  height: 25px;
  fill: currentColor;
}
.studio-globe-character-controls__free-look[aria-pressed="true"]{
  border-color: rgba(121, 221, 247, .92);
  color: #062532;
  background: #79ddf7;
  box-shadow: 0 8px 28px rgba(46, 183, 225, .34);
}
.studio-globe-character-controls__jump{
  width: 58px;
  height: 58px;
  border-radius: 50%;
}
.studio-globe-vehicle-controls{
  position: absolute;
  right: 20px;
  bottom: 92px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(152, 224, 255, .24);
  border-radius: 999px;
  background: rgba(5, 22, 32, .78);
  box-shadow: 0 9px 28px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
}
.studio-globe-vehicle-controls select,
.studio-globe-vehicle-controls button{
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: #eafaff;
  background: rgba(130, 211, 239, .11);
  font: 800 10px/1 "Avenir Next", "Trebuchet MS", sans-serif;
}
.studio-globe-vehicle-controls select{
  max-width: 116px;
  padding: 0 24px 0 10px;
}
.studio-globe-vehicle-controls button{
  padding: 0 11px;
  cursor: pointer;
}
.studio-globe-vehicle-controls button:active{
  color: #062532;
  background: #79ddf7;
}
.studio-globe-vehicle-controls :disabled{
  cursor: progress;
  opacity: .48;
}
.studio-globe-minimap{
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  width: 142px;
  padding: 7px;
  border: 1px solid rgba(157, 226, 255, .25);
  border-radius: 16px;
  background: rgba(5, 17, 25, .82);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .32);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  pointer-events: none;
}
.studio-globe-minimap svg{
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 10px;
}
.studio-globe-minimap__ground{
  fill: #18372f;
}
.studio-globe-minimap__buildings polygon{
  fill: rgba(210, 230, 224, .48);
  stroke: rgba(240, 252, 255, .42);
  stroke-width: .28;
  vector-effect: non-scaling-stroke;
}
.studio-globe-minimap__character-halo{
  fill: rgba(75, 214, 244, .18);
  stroke: rgba(111, 225, 248, .44);
  stroke-width: .55;
}
.studio-globe-minimap__heading{
  stroke: #d9fbff;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.studio-globe-minimap__character{
  fill: #45d6f4;
  stroke: #f0fdff;
  stroke-width: .7;
}
.studio-globe-minimap span{
  display: block;
  padding: 6px 3px 1px;
  overflow: hidden;
  color: rgba(219, 244, 249, .7);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (pointer: coarse){
  .studio-globe-character-controls:not([hidden]){
    display: block;
  }
  .studio-globe-minimap{
    width: 112px;
  }
}
