@import url('../ui/tokens.css');
@import url('../ui/controls.css');

html[data-embed="1"] #inspect-section .stage-bar,
html[data-embed="1"] #inspect-section .layers-sidebar,
html[data-embed="1"] #inspect-section #tabs,
html[data-embed="1"] #inspect-section #stage-hint { display: none !important; }
html[data-embed="1"] #inspect-section > .inspect {
  width: 100%; height: 100dvh; min-height: 0;
  grid-template-columns: minmax(0, 1fr) clamp(230px, 36%, 310px);
  grid-template-rows: minmax(0, 1fr);
}
html[data-embed="1"] #inspect-section .stage { grid-column: 1; grid-row: 1; min-width: 0; min-height: 0; }
html[data-embed="1"] #inspect-section .board-wrap { height: 100%; padding: var(--ui-space-24) var(--ui-space-12) 64px; }
html[data-embed="1"] #inspect-section .panel {
  grid-column: 2; grid-row: 1; min-width: 0; min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) !important;
}
html[data-embed="1"] #inspect-section .tabbody { min-width: 0; overflow: auto; }
/* 仅事件指定且通过画板权限检查的评论点可见。 */
html[data-embed="1"] #inspect-section .pin[data-event-comment-pin] { display: grid !important; }
html[data-embed="1"] #inspect-section [data-inspect-slice],
html[data-embed="1"] #inspect-section [data-inspect-nav] { display: none !important; }
html[data-embed="1"] body > .board-context-menu[data-inspect-menu]:not([hidden]) { display: block !important; }
html[data-embed="1"] body > dialog.detail-settings[open] { display: block !important; }
html[data-embed="1"]:not([data-embed-state="ready"]) #inspect-section > .inspect { display: none !important; }
html[data-embed="1"][data-embed-state="ready"] .embed-status { display: none; }
.embed-status { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: var(--ui-space-12); padding: var(--ui-space-24); background: var(--ui-bg); color: var(--ui-text-primary); text-align: center; }
.embed-status p { max-width: 360px; margin: 0; }
.embed-login { width: min(100%, 320px); display: grid; gap: var(--ui-space-12); }
.embed-login input, .embed-login button { width: 100%; }
.embed-login button:disabled { opacity: .5; cursor: wait; }
.embed-login [role="alert"] { color: var(--ui-danger); }
