/* PicPlayer-style chrome, isolated from DynamicDiary's editor stylesheet. */
.app-shell.dd-shell {
  display: grid;
  grid-template-rows: 48px 42px minmax(0, 1fr);
  width: 100%; height: 100%; min-height: 0;
}
.dd-titlebar {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
  padding: 0 9px 0 0; background: #10141b; color: #edf1f7;
  border-bottom: 1px solid #252b35; position: relative; z-index: 40;
  user-select: none; font-size: 12px;
}
.dd-brand {
  display: flex; align-items: center; align-self: stretch; flex: 0 0 174px;
  gap: 10px; padding: 0 14px; border-right: 1px solid #2a3240;
}
.dd-brand-mark { display: block; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 8px; object-fit: cover; }
.dd-brand-copy { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; white-space: nowrap; }
.dd-brand-name { display: inline-flex; align-items: baseline; color: #f6f7fb; font-size: 13px; letter-spacing: -.02em; line-height: 1; }
.dd-brand-name strong { font-weight: 800; }
.dd-brand-name > span { font-weight: 400; }
.dd-brand-copy small { color: #939dac; font-size: 9px; font-weight: 600; line-height: 1; letter-spacing: .025em; }
.dd-page-controls { flex: 1; height: 100%; min-width: 0; }
.dd-titlebar .page-topbar {
  position: relative; inset: auto; height: 100%; width: 100%; padding: 0;
  background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  color: #edf1f7; gap: 6px; z-index: auto;
}
.dd-shell.sidebar-hidden .open-sidebar-button { display: inline-grid; }
.dd-titlebar .topbar-left { flex: 1; overflow: hidden; }
.dd-titlebar .topbar-right { flex: 0 0 auto; }
.dd-titlebar .icon-button, .dd-titlebar .breadcrumb-part button { color: #b2bece; }
.dd-titlebar .icon-button:hover, .dd-titlebar .breadcrumb-part button:hover { background: #2a313d; color: #edf1f7; }
.dd-titlebar .breadcrumb-current { color: #edf1f7; }
.dd-titlebar .save-saved, .dd-titlebar .save-state:not(.save-saving, .save-unsaved, .save-error) { color: #a7b5c5; }
.dd-titlebar .topbar-menu { color: var(--text); }
.dd-toolbar-fallback { display: flex; align-items: center; gap: 9px; height: 100%; color: #a7b5c5; }
.dd-page-controls:has(> .page-topbar) > .dd-toolbar-fallback { display: none; }
.dd-profile-button {
  display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px;
  border: 1px solid #414c5f; border-radius: 50%; background: #202938;
  color: #cfdbeb; cursor: pointer; padding: 0; transition: background .15s, border-color .15s;
}
.dd-profile-button:hover, .dd-profile-button.active { background: #33435a; border-color: #6e9bc7; }
.dd-profile-button.is-signed-in { border-color: #469b81; background: #153b32; color: #a1eed5; }
.dd-profile-button .profile-initials { font-size: 13px; font-weight: 750; line-height: 1; }
.dd-shell .hidden { display: none !important; }
.dd-network-row {
  display: flex; align-items: center; min-width: 0; width: 100%; padding: 0 9px;
  background: #fff; color: #303640; border-bottom: 1px solid #e4e2ea; z-index: 35;
  color-scheme: light;
}
.dd-network-row .menu-bar {
  display: flex; align-items: center; flex: 0 1 auto; min-width: 0; max-width: 100%;
  margin-left: auto; white-space: nowrap; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.dd-network-row .menu-bar::-webkit-scrollbar { display: none; }
.dd-network-row .menu-bar > button {
  flex: 0 0 auto; height: 30px; border-radius: 5px; border: 0; background: transparent;
  padding: 0 8px; cursor: pointer; color: #303640; white-space: nowrap; font-size: 12px;
}
.dd-network-row .menu-bar > button:hover, .dd-network-row .menu-bar > button.active { background: #eeedf5; }
.dd-network-row .menu-bar > button:focus-visible, .dd-profile-button:focus-visible { outline: 2px solid #6d5dfc; outline-offset: -2px; }
.dd-menu-popovers { position: fixed; inset: 0; pointer-events: none; z-index: 100; font-size: 12px; color: #edf1f7; }
.dd-menu-popovers .menu-popover {
  display: none; position: absolute; min-width: min(245px, calc(100vw - 16px)); max-width: calc(100vw - 16px);
  padding: 5px; background: #252b35; border: 1px solid #3a424f; border-radius: 7px;
  box-shadow: 0 18px 50px #000b; pointer-events: auto; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #566274 #252b35;
}
.dd-menu-popovers .menu-popover.open { display: block; }
.dd-menu-popovers .menu-popover button, .dd-menu-popovers .menu-popover a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%;
  border: 0; background: transparent; padding: 7px 9px; border-radius: 4px;
  text-align: left; cursor: pointer; color: inherit; text-decoration: none; white-space: nowrap; line-height: 1.35;
}
.dd-menu-popovers .menu-popover button:hover, .dd-menu-popovers .menu-popover a:hover,
.dd-menu-popovers .menu-popover button:focus-visible, .dd-menu-popovers .menu-popover a:focus-visible { background: #3a4656; outline: none; }
.dd-menu-popovers .menu-popover button:focus-visible, .dd-menu-popovers .menu-popover a:focus-visible { box-shadow: inset 0 0 0 1px #80b7e3; }
.dd-menu-popovers .menu-separator { height: 1px; background: #46505f; margin: 5px; }
.dd-menu-popovers .network-popover { min-width: min(215px, calc(100vw - 16px)); }
.dd-menu-popovers a[aria-current=page] { color: #b9b0ff; }
.dd-menu-popovers .profile-popover { width: 245px; }
.dd-menu-popovers .profile-summary { display: grid; gap: 5px; padding: 8px 9px 9px; overflow-wrap: anywhere; }
.dd-menu-popovers .profile-summary strong { font-size: 13px; font-weight: 650; }
.dd-menu-popovers .profile-summary > span { font-size: 11px; color: #a0adbf; }
.dd-menu-popovers .profile-popover .profile-join { color: #90ceff; }
.dd-menu-popovers .profile-popover .profile-legal-link { font-size: 11px; color: #adb9ca; }
.dd-workspace { display: flex; width: 100%; min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.dd-workspace > .app-main { flex: 1 1 0; }
.dd-workspace .page-scroll { padding-top: 0; }
.dd-workspace .backup-reminder, .dd-workspace .update-banner { top: 12px; }
.dd-ad-rail { display: none; flex: 0 0 316px; width: 316px; height: 100%; min-height: 0; overflow: hidden; }
.dd-ad-rail[hidden] { display: none !important; }
.dd-ad-unavailable { padding: 20px; background: #12171e; color: #9daab8; font-size: 12px; }
@media (min-width: 1280px) { .dd-ad-rail:not([hidden]) { display: block; } }
.dd-ad-preferences { width: min(560px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.dd-ad-preferences::backdrop { background: #12101c99; }
.dd-ad-preferences h2 { font-size: 20px; margin: 0 0 16px; }
.dd-ad-preferences p { font-size: 13px; line-height: 1.65; }
.dd-ad-preferences-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 12px; font-size: 12px; }
.dd-ad-preferences-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; font-size: 12px; }
.dd-ad-message { color: var(--muted); min-height: 1.5em; }
@media (max-width: 900px) {
  .dd-workspace > .sidebar { top: 90px; height: calc(100% - 90px); }
  .dd-workspace > .mobile-sidebar-backdrop { top: 90px; }
}
@media (max-width: 760px) {
  .dd-brand { flex-basis: 150px; padding: 0 10px; gap: 8px; }
  .dd-titlebar { gap: 5px; }
  .dd-network-row .menu-bar > button { padding: 0 7px; }
}
@media (max-width: 380px) {
  .dd-brand { flex-basis: 142px; padding: 0 8px; gap: 7px; }
  .dd-titlebar .icon-button { width: 27px; height: 29px; }
  .dd-titlebar .topbar-left { flex: 0 0 27px; }
  .dd-titlebar .breadcrumbs { display: none; }
  .dd-titlebar .page-topbar { gap: 1px; }
  .dd-titlebar .topbar-right { gap: 1px; }
  .dd-titlebar { padding-right: 6px; gap: 4px; }
}
