@layer tallerChrome {
  #taller-dialog {
    --taller-bar: 44px;
    --taller-control: 32px;
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(1000px, calc(100vw - 28px));
    height: min(640px, calc(100dvh - 48px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #7c9ca2;
    border-radius: 12px;
    background: #f5f8f8 !important;
    color: #203a44;
    box-shadow: 0 24px 70px #112a4a49, 0 3px 12px #112a4a1f;
    font: 13px/1.4 "Segoe UI", system-ui, sans-serif;
  }
  #taller-dialog:popover-open { display: flex; flex-direction: column; }
  #taller-dialog::backdrop { background: #182d3a32; pointer-events: none; }
  #taller-dialog[data-maximized] {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
  }
  #taller-dialog.taller-window-positioned {
    inset: var(--taller-view-top) auto auto var(--taller-view-left) !important;
    width: var(--taller-view-width) !important;
    height: var(--taller-view-height) !important;
    margin: 0 !important;
  }
  #taller-dialog > .taller-chrome {
    display: flex !important;
    align-items: center;
    flex: 0 0 var(--taller-bar);
    box-sizing: border-box;
    height: var(--taller-bar);
    min-height: var(--taller-bar);
    gap: 9px;
    margin: 0;
    padding: 0 8px 0 12px !important;
    border: 0;
    border-bottom: 1px solid #477477;
    background: linear-gradient(112deg, #142832, #1c3b43 75%, #224851) !important;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }
  #taller-dialog > .taller-chrome:active { cursor: grabbing; }
  #taller-dialog #taller-window-title {
    flex: 1;
    min-width: 0;
    color: #f4fbfa !important;
    font-size: 15px;
    font-weight: 660;
    letter-spacing: .01em;
  }
  #taller-dialog .taller-emblem {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #a1ded526;
    color: #adede1;
  }
  #taller-dialog .taller-emblem svg, #taller-dialog .taller-window-controls svg {
    display: block;
    width: 16px;
    height: 16px;
    pointer-events: none;
  }
  #taller-dialog .taller-window-controls { display: flex; gap: 2px; }
  #taller-dialog .taller-window-controls button {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: var(--taller-control) !important;
    min-width: var(--taller-control) !important;
    height: var(--taller-control) !important;
    min-height: var(--taller-control) !important;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 6px;
    background: transparent !important;
    color: #eef7f7 !important;
    box-shadow: none !important;
    cursor: pointer;
  }
  #taller-dialog .taller-window-controls button:hover { background: #ffffff20 !important; }
  #taller-dialog .taller-window-controls .taller-window-close:hover { background: #a0434f !important; }
  #taller-dialog :is(.taller-chrome, .taller-window-controls button):focus-visible {
    outline: 2px solid #aee8df !important;
    outline-offset: -2px !important;
  }
  #taller-dialog .taller-window-content { flex: 1; min-height: 0; background: #f5f8f8; }
  #taller-dialog iframe { display: block; width: 100%; height: 100%; border: 0; }
  #taller-dock {
    position: fixed;
    inset: auto 12px max(12px, env(safe-area-inset-bottom)) auto;
    margin: 0;
    padding: 0 12px;
    min-height: 44px !important;
    border: 1px solid #507580;
    border-radius: 8px;
    background: #20444f !important;
    color: #fff !important;
    box-shadow: 0 4px 16px #112a4a3d;
    cursor: pointer;
  }
  @media (max-width: 767px), (pointer: coarse) {
    #taller-dialog {
      --taller-bar: 48px;
      --taller-control: 44px;
      width: calc(100vw - 16px);
      height: calc(100dvh - 36px);
      border-radius: 10px;
    }
    #taller-dialog > .taller-chrome { padding-inline: 8px 3px !important; }
  }
}
