img:not([data-allow-image-interaction]) {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

:is(.dashboard-top-control-bar, .fdc-top-control-bar) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1110;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 3.25rem;
  border: 0;
  border-bottom: 1px solid var(--fdc-border);
  border-radius: 0;
  padding: 0.42rem clamp(0.8rem, 3vw, 1.4rem);
  background: color-mix(in srgb, var(--fdc-bg) 86%, #000 14%);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--fdc-shadow) 72%, transparent);
  backdrop-filter: blur(12px);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  overflow: visible;
}

:is(.dashboard-top-status, .fdc-top-status) {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  white-space: nowrap;
}

:is(.dashboard-top-status, .fdc-top-status) :is(strong, h1) {
  margin: 0;
  color: var(--fdc-text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.1;
}

:is(.dashboard-top-status, .fdc-top-status) span {
  display: block;
  overflow: hidden;
  color: var(--fdc-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}


:is(.dashboard-top-tabs, .fdc-top-tabs),
:is(.dashboard-top-actions, .fdc-top-actions) {
  display: inline-flex;
  align-items: center;
}

:is(.dashboard-top-tabs, .fdc-top-tabs) {
  grid-column: 2;
  justify-content: center;
  gap: 0.22rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
}

:is(.dashboard-top-tabs, .fdc-top-tabs)::-webkit-scrollbar {
  display: none;
}

:is(.dashboard-top-tabs, .fdc-top-tabs):has(.topbar-global-menu[open]) {
  overflow: visible;
}

:is(.dashboard-top-actions, .fdc-top-actions) {
  grid-column: 3;
  justify-content: flex-end;
  gap: 0.32rem;
  min-width: max-content;
  white-space: nowrap;
}

:is(.dashboard-top-control-bar, .fdc-top-control-bar) button,
:is(.dashboard-top-control-bar, .fdc-top-control-bar) a,
:is(.dashboard-top-control-bar, .fdc-top-control-bar) .topbar-global-menu > summary {
  display: inline-grid;
  place-items: center;
  min-width: 3.85rem;
  min-height: 2.35rem;
  border: 1px solid var(--fdc-border);
  border-radius: 0.72rem;
  padding: 0.32rem 0.54rem;
  color: var(--fdc-text) !important;
  background: var(--fdc-panel) !important;
  box-shadow: 0 8px 20px var(--fdc-shadow);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}

.topbar-global-menu {
  display: inline-grid;
  position: relative;
}

.topbar-global-menu > summary {
  list-style: none;
}

.topbar-global-menu > summary::-webkit-details-marker {
  display: none;
}

.topbar-global-popover {
  position: absolute;
  top: calc(100% + 0.42rem);
  left: 50%;
  z-index: 1125;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.38rem;
  padding: 0.55rem;
  border: 1px solid var(--fdc-border);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--fdc-panel) 94%, var(--fdc-bg));
  box-shadow: 0 18px 42px color-mix(in srgb, var(--fdc-shadow) 78%, transparent);
  transform: translateX(-50%);
}

.topbar-global-popover :is(button, a) {
  min-width: 5.15rem !important;
  min-height: 2.05rem !important;
  border-radius: 0.6rem !important;
  padding: 0.28rem 0.52rem !important;
  box-shadow: none !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
}

.topbar-label {
  display: block;
  line-height: 1.02;
}

:root[data-theme="light"] .dashboard-top-control-bar,
body.theme-light .fdc-top-control-bar {
  border-bottom-color: var(--fdc-border);
  background: color-mix(in srgb, var(--fdc-bg) 86%, #000 14%);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--fdc-shadow) 72%, transparent);
}

:root[data-theme="dark"] .dashboard-top-control-bar,
body.theme-dark .fdc-top-control-bar {
  border-bottom-color: var(--fdc-border);
  background: color-mix(in srgb, var(--fdc-bg) 86%, #000 14%);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--fdc-shadow) 72%, transparent);
}

:is(.dashboard-top-tabs, .fdc-top-tabs) button,
:is(.dashboard-top-tabs, .fdc-top-tabs) a,
:is(.dashboard-top-tabs, .fdc-top-tabs) .topbar-global-menu > summary {
  box-shadow: none;
}

:is(.dashboard-top-tabs, .fdc-top-tabs) button.is-active,
:is(.dashboard-top-tabs, .fdc-top-tabs) a.is-active,
:is(.dashboard-top-tabs, .fdc-top-tabs) .topbar-global-menu.is-active > summary {
  border-color: color-mix(in srgb, var(--fdc-primary) 58%, var(--fdc-border));
  color: var(--fdc-text) !important;
  background: var(--fdc-primary-soft) !important;
}

:is(.dashboard-top-control-bar, .fdc-top-control-bar) button:hover,
:is(.dashboard-top-control-bar, .fdc-top-control-bar) a:hover,
:is(.dashboard-top-control-bar, .fdc-top-control-bar) .topbar-global-menu > summary:hover {
  color: var(--fdc-text) !important;
  background: color-mix(in srgb, var(--fdc-primary) 16%, var(--fdc-panel)) !important;
}

:root[data-theme="dark"] .dashboard-top-control-bar button,
:root[data-theme="dark"] .dashboard-top-control-bar a,
:root[data-theme="dark"] .dashboard-top-control-bar .topbar-global-menu > summary,
body.theme-dark .fdc-top-control-bar button,
body.theme-dark .fdc-top-control-bar a,
body.theme-dark .fdc-top-control-bar .topbar-global-menu > summary {
  color: var(--fdc-text) !important;
  border-color: var(--fdc-border);
  background: var(--fdc-panel) !important;
}

:root[data-theme="dark"] .dashboard-top-tabs button.is-active,
:root[data-theme="dark"] .dashboard-top-tabs a.is-active,
:root[data-theme="dark"] .dashboard-top-tabs .topbar-global-menu.is-active > summary,
body.theme-dark .fdc-top-tabs button.is-active,
body.theme-dark .fdc-top-tabs a.is-active,
body.theme-dark .fdc-top-tabs .topbar-global-menu.is-active > summary {
  color: var(--fdc-text) !important;
  border-color: color-mix(in srgb, #f472b6 64%, var(--fdc-border));
  background:
    linear-gradient(135deg,
      color-mix(in srgb, #d946ef 38%, var(--fdc-primary-soft)),
      color-mix(in srgb, #ec4899 30%, var(--fdc-primary-soft))) !important;
}

:root[data-theme="dark"] .dashboard-top-control-bar .topbar-global-popover,
body.theme-dark .fdc-top-control-bar .topbar-global-popover {
  background: color-mix(in srgb, var(--fdc-panel) 92%, #020617 8%);
}

.ui-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

:is(.dashboard-top-theme-toggle, .fdc-theme-toggle, .topbar-reload-button) {
  display: inline-grid;
  place-items: center;
}

.ui-theme-icon-moon { display: none; }
[aria-pressed="true"] > .ui-theme-icon-sun { display: none; }
[aria-pressed="true"] > .ui-theme-icon-moon { display: block; }

:is(.dashboard-top-theme-toggle, .fdc-theme-toggle) {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem !important;
  padding: 0 !important;
  color: #f39a22 !important;
  font-size: 1.45rem !important;
  font-weight: 950;
  line-height: 1 !important;
}

.topbar-note-link,
:is(.dashboard-top-control-bar, .fdc-top-control-bar) .topbar-note-link {
  display: block;
  width: 16px;
  min-width: 0;
  height: 16px;
  min-height: 0;
  flex: 0 0 auto;
  margin-right: 0.28rem;
  transform: translateY(0.42rem);
  border: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  opacity: 0.62;
  transition: opacity 0.16s ease;
}

:is(.dashboard-top-control-bar, .fdc-top-control-bar) .topbar-note-link:hover,
:is(.dashboard-top-control-bar, .fdc-top-control-bar) .topbar-note-link:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.topbar-note-link img {
  display: block;
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}
.topbar-reload-button {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem !important;
  padding: 0 !important;
  font-size: 1.32rem !important;
  font-weight: 950;
  line-height: 1 !important;
}

.topbar-reload-button .ui-icon {
  width: 1.32rem;
  height: 1.32rem;
  stroke-width: 2.25;
}

body.theme-dark .fdc-theme-toggle,
:root[data-theme="dark"] .dashboard-top-theme-toggle {
  color: #f5c94e !important;
}

.site-footer-note-link {
  display: none;
}

:is(.dashboard-top-control-bar, .fdc-top-control-bar) :is(.dashboard-top-theme-toggle, .fdc-theme-toggle) {
  color: #f39a22 !important;
}

:root[data-theme="dark"] .dashboard-top-control-bar .dashboard-top-theme-toggle,
body.theme-dark .fdc-top-control-bar .fdc-theme-toggle {
  color: #f5c94e !important;
}

@media (max-width: 980px) {
  :is(.dashboard-top-control-bar, .fdc-top-control-bar) {
    grid-template-columns: minmax(0, 1fr) max-content;
    min-height: 3.25rem;
  }

  :is(.dashboard-top-status, .fdc-top-status) {
    display: none;
  }

  :is(.dashboard-top-tabs, .fdc-top-tabs) {
    order: 0;
    grid-column: 1;
    justify-content: flex-start;
  }

  :is(.dashboard-top-actions, .fdc-top-actions) {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  :is(.dashboard-top-control-bar, .fdc-top-control-bar) {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.28rem;
    min-height: 3rem;
    padding: 0.34rem 0.32rem;
  }

  :is(.dashboard-top-tabs, .fdc-top-tabs) {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.12rem;
    width: 100%;
    max-width: 27rem;
  }

  :is(.dashboard-top-tabs, .fdc-top-tabs) > :is(button, a, .topbar-global-menu) {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  :is(.dashboard-top-tabs, .fdc-top-tabs) > .topbar-global-menu > summary {
    box-sizing: border-box;
    width: 100%;
  }

  :is(.dashboard-top-tabs, .fdc-top-tabs) button,
  :is(.dashboard-top-tabs, .fdc-top-tabs) a,
  :is(.dashboard-top-tabs, .fdc-top-tabs) .topbar-global-menu > summary {
    min-width: 0;
    min-height: 2.14rem;
    border-radius: 0.46rem;
    padding: 0.18rem 0.32rem;
    font-size: clamp(0.58rem, 2.7vw, 0.68rem);
    line-height: 1.02;
    white-space: nowrap;
  }

  :is(.dashboard-top-tabs, .fdc-top-tabs) .topbar-label {
    line-height: 0.95;
    white-space: normal;
  }

  :is(.dashboard-top-tabs, .fdc-top-tabs) {
    grid-column: 1;
  }

  :is(.dashboard-top-actions, .fdc-top-actions) button:not(:is(.dashboard-top-theme-toggle, .fdc-theme-toggle)) {
    padding-inline: 0.62rem;
  }

  :is(.dashboard-top-actions, .fdc-top-actions) {
    grid-column: 2;
    gap: 0.14rem;
  }

  :is(.dashboard-top-theme-toggle, .fdc-theme-toggle),
  .topbar-reload-button {
    width: 2.08rem;
    height: 2.08rem;
    min-width: 2.08rem !important;
    font-size: 1.12rem !important;
  }

  :is(.dashboard-top-control-bar, .fdc-top-control-bar) :is(.topbar-note-link, .topbar-reload-button) {
    display: none;
  }

  .site-footer-note-link {
    display: inline-grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    margin: 0 auto 0.34rem;
    border: 1px solid color-mix(in srgb, var(--fdc-border) 68%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--fdc-panel) 70%, transparent);
    opacity: 0.72;
  }

  .site-footer-note-link:hover,
  .site-footer-note-link:focus-visible {
    opacity: 1;
  }

  .site-footer-note-link img {
    display: block;
    width: 14px;
    height: 14px;
  }

  .topbar-global-popover {
    right: 0;
    left: auto;
    transform: none;
  }
}

@media (max-width: 360px) {
  :is(.dashboard-top-tabs, .fdc-top-tabs) > button,
  :is(.dashboard-top-tabs, .fdc-top-tabs) > a,
  :is(.dashboard-top-tabs, .fdc-top-tabs) > .topbar-global-menu > summary {
    padding-inline: 0.1rem;
  }
}

.site-rights-footer {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.8rem;
  color: color-mix(in srgb, var(--fdc-muted) 76%, transparent);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.site-rights-summary {
  opacity: 0.9;
}

.site-rights-details {
  margin-top: 0.22rem;
}

.site-rights-details summary {
  width: max-content;
  margin: 0 auto;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.16rem;
}

.site-rights-details > div {
  width: min(52rem, 100%);
  margin: 0.45rem auto 0;
  border: 1px solid color-mix(in srgb, var(--fdc-border) 70%, transparent);
  border-radius: 0.65rem;
  padding: 0.6rem 0.72rem;
  background: color-mix(in srgb, var(--fdc-panel) 72%, transparent);
  font-size: 0.62rem;
  line-height: 1.55;
  text-align: left;
}

.site-rights-details p {
  margin: 0;
}

.site-rights-details p + p {
  margin-top: 0.35rem;
}
