/* STUDIO ROBSE 文書の編集：Robse Doc の画面（style.css）にスタジオの帯・状態・ダイアログを足す */
.sd-back { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; font-weight: 600; white-space: nowrap; padding: 4px 6px; border-radius: 6px; }
.sd-back:hover { background: #2e2e32; }
.sd-back img { border-radius: 4px; background: #fff; }
#filename { min-width: 8em; }
#savestate.sd-state { font-size: 12px; }
.sd-state { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 36em; }
.sd-state-ok { color: #8fd8a6; }
.sd-state-busy, .sd-state-dirty, .sd-state-guest { color: #c7c7cc; }
.sd-state-warn { color: #ffcf70; font-weight: 600; }
.sd-state-err { color: #ff9b91; font-weight: 600; }
#sd-state-actions { display: inline-flex; gap: 4px; }
.pill.sd-mini { padding: 2px 8px; font-size: 12px; }
a.pill { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.sd-row { justify-content: flex-start; flex-direction: row; }
.sd-history-list { max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.sd-history-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--grid); }
.sd-history-row:last-child { border-bottom: 0; }
/* その他メニュー */
.sd-more { position: relative; }
.sd-more summary { list-style: none; cursor: pointer; }
.sd-more summary::-webkit-details-marker { display: none; }
.sd-more-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 13em; background: #fff; color: var(--fg); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 4px; display: flex; flex-direction: column; }
.sd-more-panel button, .sd-more-panel a { text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: 5px; color: inherit; text-decoration: none; cursor: pointer; font: inherit; }
.sd-more-panel button:hover, .sd-more-panel a:hover { background: var(--chrome-2); }
.sd-more-panel [hidden] { display: none; }
.sd-show-sm { display: none; }
/* 記入のヒント：右側のパネル */
dialog.sd-panel { position: fixed; inset: 124px 16px auto auto; margin: 0; width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 170px); overflow: auto; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); background: #fff; color: var(--fg); z-index: 20; }
.sd-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sd-panel h2 { font-size: 15px; margin: 0; }
.sd-panel .pill { border-color: var(--border); color: var(--fg); }
.sd-brand-list { list-style: none; padding: 0; margin: 8px 0; }
.sd-brand-list li { display: grid; grid-template-columns: 7em 1fr; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.sd-brand-list .sd-skip { color: var(--muted); }
.sd-kit-table { max-height: 50vh; overflow: auto; margin: 8px 0; }
.sd-kit-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sd-kit-table th, .sd-kit-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--grid); overflow-wrap: anywhere; }
.sd-kit-table td:last-child { font-weight: 700; }
.sd-hint { border-top: 1px solid var(--grid); padding: 8px 0; }
.sd-hint h3 { font-size: 13px; margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.sd-hint p { margin: 0; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; }
.sd-hint p.sd-blank { height: .6em; }
@media (max-width: 760px) {
  dialog.sd-panel { inset: auto 0 0 0; width: 100%; max-height: 55dvh; border-radius: 12px 12px 0 0; }
  .sd-hide-sm { display: none !important; }
  .sd-more-panel .sd-show-sm { display: block; }
  #sd-hints-btn { padding: 3px 8px; }
  .sd-back span { display: none; }
  #appbar { gap: 6px; padding: 0 8px; }
  #filename { width: 7em; min-width: 5em; flex: 0 1 auto; }
  /* 単体版はスマホで保存状態を隠すが、スタジオ版は会員保存の状態が大事なので出す */
  #savestate.sd-state { display: inline-block; flex: 1 1 auto; min-width: 4em; }
  /* 状態は短く1行で（ボタンの説明は省く）。「保存中」「保存済み」が見えることを優先する */
  #savestate.sd-state { max-width: 9em; font-size: 11px; }
  #sd-state-actions { display: none; }
}
@media print {
  #appbar, #sd-state-actions { display: none !important; }
}
/* Doc 0.8.0 の「分割した画面」：単体版の style.css は #splitview に display:flex を指定していて、hidden でも出たままになる（2026-10-15）。閉じているときは出さない */
#splitview[hidden] { display: none; }
/* 見本の値の残り（2026-10-20 総合改善 E） */
.sd-leftover-list { margin: 8px 0; padding-left: 1.2em; }
.sd-leftover-list li { margin: 4px 0; }
.sd-leftover-list .linklike { text-align: left; color: #b42318; text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
