/* ページ編集（実物のまま直す）— 暖簾AI の画面側。左に部品の一覧・中央に実物・右に設定。
   ★見た目の見本は 2026-10-06 に持ち主と詰めた見本（実物のまま直すページ編集）に合わせている。 */
.le-app {
  --le-bg: #eceff3; --le-surface: #ffffff; --le-surface2: #f6f7f9; --le-ink: #1b2130; --le-muted: #5b6474; --le-line: #d4d9e1;
  --le-accent: #1f4c9e; --le-accent-ink: #ffffff; --le-sel: #e2580b; --le-ok: #1d7a4c; --le-warn: #a15c00;
  --le-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  display: flex; flex-direction: column; min-height: 480px; background: var(--le-surface); color: var(--le-ink);
  border: 1px solid var(--le-line); border-radius: 10px; overflow: hidden; font-size: 14px; line-height: 1.6;
}
.le-app * { box-sizing: border-box; }
.le-app button, .le-app select, .le-app input, .le-app textarea { font: inherit; color: inherit; }
.le-app button { cursor: pointer; }
.le-app button:disabled { cursor: default; opacity: .4; }
.le-app :focus-visible { outline: 2px solid #2f7de1; outline-offset: 2px; }
.le-loading { padding: 40px; color: var(--le-muted); }

.le-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 12px; border-bottom: 1px solid var(--le-line); }
.le-bar2 { background: var(--le-surface2); }
.le-brand { font-weight: 700; white-space: nowrap; }
.le-sel { border: 1px solid var(--le-line); background: var(--le-surface); border-radius: 6px; padding: 4px 8px; font-size: 13px; max-width: 260px; }
.le-live { display: inline-flex; align-items: center; gap: 6px; color: var(--le-ok); font-weight: 500; white-space: nowrap; font-size: 12px; }
.le-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.le-frz { font-size: 12px; color: var(--le-warn); white-space: nowrap; }
.le-status { font-size: 12px; color: var(--le-muted); white-space: nowrap; }
.le-status b { color: var(--le-ok); font-weight: 500; }
.le-err { color: #c2410c; }
.le-sp { flex: 1; }
.le-seg { display: inline-flex; border: 1px solid var(--le-line); border-radius: 6px; overflow: hidden; background: var(--le-surface); }
.le-seg button { border: 0; background: transparent; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.le-seg button[aria-pressed="true"] { background: var(--le-ink); color: var(--le-surface); }
.le-seg button + button { border-left: 1px solid var(--le-line); }
.le-btn { border: 1px solid var(--le-line); background: var(--le-surface); border-radius: 6px; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.le-btn[aria-pressed="true"] { background: var(--le-ink); color: var(--le-surface); }
.le-pri { border: 0; background: var(--le-accent); color: var(--le-accent-ink); border-radius: 6px; padding: 6px 14px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.le-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--le-accent-ink); color: var(--le-accent); font-size: 11px; text-align: center; }
.le-link { border: 0; background: transparent; color: var(--le-muted); font-size: 12px; text-decoration: underline; }
.le-zoom { display: inline-flex; border: 1px solid var(--le-line); border-radius: 6px; background: var(--le-surface); overflow: hidden; }
.le-zoom button { border: 0; background: transparent; padding: 4px 9px; font-size: 13px; }
.le-zoom button + button { border-left: 1px solid var(--le-line); }
.le-zoom #le-zval { min-width: 54px; font-variant-numeric: tabular-nums; }
.le-zoom #le-zfit[aria-pressed="true"] { background: var(--le-ink); color: var(--le-surface); }
.le-search { display: flex; align-items: center; gap: 4px; border: 1px solid var(--le-line); border-radius: 6px; background: var(--le-surface); padding: 0 4px 0 8px; min-width: 0; flex: 0 1 240px; }
.le-search input { border: 0; background: transparent; padding: 4px 0; min-width: 0; flex: 1; font-size: 13px; }
.le-search input:focus { outline: none; }
.le-search span { font-size: 12px; color: var(--le-muted); white-space: nowrap; }
.le-search button { border: 0; background: transparent; padding: 2px 5px; font-size: 12px; }
.le-banner { padding: 8px 14px; font-size: 12.5px; background: #f2f6fd; border-bottom: 1px solid var(--le-line); color: var(--le-ink); }
.le-banner.warn { background: #fff7e8; color: var(--le-warn); }
.le-banner.err { background: #fdeeee; color: #b42318; }

.le-work { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; }
.le-layers { border-right: 1px solid var(--le-line); overflow: auto; display: flex; flex-direction: column; min-height: 0; }
.le-layers h2 { margin: 0; font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--le-line); display: flex; justify-content: space-between; align-items: baseline; }
.le-layers h2 small { font-weight: 400; color: var(--le-muted); font-size: 11px; }
.le-layers ul, .le-tree2 { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.le-ly { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 5px; border: 1px solid transparent; cursor: pointer; position: relative; }
.le-ly:hover { background: var(--le-surface2); }
.le-ly.on { border-color: var(--le-sel); background: rgba(226, 88, 11, .08); }
.le-ly .gr { color: var(--le-muted); cursor: grab; text-align: center; font-size: 13px; user-select: none; }
.le-ly .gr.lock { cursor: default; font-size: 11px; }
.le-ly .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.le-ly.off .nm { opacity: .45; text-decoration: line-through; }
.le-ly .eye { border: 0; background: transparent; padding: 0 4px; color: var(--le-muted); font-size: 13px; }
.le-ly.drop-before::before, .le-ly.drop-after::after { content: ""; position: absolute; left: 4px; right: 4px; height: 2px; background: var(--le-sel); border-radius: 1px; }
.le-ly.drop-before::before { top: -2px; } .le-ly.drop-after::after { bottom: -2px; }
.le-ly.dragging { opacity: .4; }
.le-hint2 { font-size: 11px; color: var(--le-muted); padding: 6px 12px 12px; margin: auto 0 0; }

.le-wrap { position: relative; overflow: auto; min-height: 0; background: repeating-linear-gradient(45deg, var(--le-surface2) 0 10px, var(--le-bg) 10px 20px); }
.le-canvas { display: flex; justify-content: safe center; align-items: flex-start; padding: 24px; min-width: min-content; }
.le-canvas.cmp { display: grid; grid-template-columns: 1.55fr 1fr .62fr; gap: 16px; padding: 16px; min-width: 0; }
.le-pane { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.le-pane-h { border: 1px solid var(--le-line); background: var(--le-surface); border-radius: 6px; padding: 4px 8px; font-size: 12px; text-align: left; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 6px; }
.le-pane-h[aria-pressed="true"] { border-color: var(--le-sel); color: var(--le-sel); font-weight: 700; }
.le-box { position: relative; overflow: hidden; flex: none; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .13); }
.le-canvas.cmp .le-box { max-width: 100%; }
.le-pane.view .le-box { cursor: pointer; }
.le-frame { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; display: block; }
.le-pane.view .le-frame { pointer-events: none; }

.le-panel { border-left: 1px solid var(--le-line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.le-tabs { display: flex; border-bottom: 1px solid var(--le-line); }
.le-tabs button { flex: 1; border: 0; background: transparent; padding: 9px 4px; font-size: 13px; color: var(--le-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.le-tabs button[aria-selected="true"] { color: var(--le-ink); border-bottom-color: var(--le-accent); font-weight: 700; }
.le-tabs .le-t-layers { display: none; }
.le-pbody { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.le-pbody h3 { margin: 6px 0 4px; font-size: 15px; }
.le-pbody .kind { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: var(--le-surface2); border: 1px solid var(--le-line); color: var(--le-muted); }
.le-pbody .grp { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--le-line); }
.le-pbody .lab { font-size: 12px; color: var(--le-muted); letter-spacing: .04em; display: flex; justify-content: space-between; gap: 8px; }
.le-pbody .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.le-pbody .row > * { min-width: 0; }
.le-pbody .row > span:first-child { min-width: 56px; font-size: 13px; }
.le-pbody .row.end, .le-modal .row.end { justify-content: flex-end; }
.le-pbody textarea, .le-pbody input[type=text], .le-pbody select, .le-modal input[type=text] { width: 100%; border: 1px solid var(--le-line); background: var(--le-surface2); border-radius: 6px; padding: 6px 8px; }
.le-pbody .row select { flex: 1; width: auto; }
.le-pbody input[type=range] { flex: 1; }
.le-pbody input[type=color] { width: 30px; height: 28px; border: 1px solid var(--le-line); border-radius: 6px; background: none; padding: 2px; }
.le-pbody .le-seg button { padding: 3px 9px; font-size: 12px; }
.le-pbody .val { font-family: var(--le-mono); font-size: 12px; min-width: 44px; text-align: right; }
.le-pbody .mini { border: 1px solid var(--le-line); background: var(--le-surface); border-radius: 6px; padding: 4px 10px; font-size: 12px; }
.le-pbody .mini.danger { color: #c2410c; }
.le-pbody .mini.pri { background: var(--le-accent); color: var(--le-accent-ink); border-color: var(--le-accent); }
.le-app .note { font-size: 12px; color: var(--le-muted); background: var(--le-surface2); border-radius: 6px; padding: 8px 10px; margin: 0; }
.le-app .note.warn { color: var(--le-warn); }
.le-pbody .empty { color: var(--le-muted); display: flex; flex-direction: column; gap: 10px; }
.le-pbody .empty h3 { color: var(--le-ink); }
.le-pbody .empty p { margin: 0; }
.le-pbody .empty ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.le-pbody .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.le-pbody .chips button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--le-line); padding: 0; }
.le-pbody .folder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.le-pbody .folder button { aspect-ratio: 4/3; border: 1px solid var(--le-line); border-radius: 4px; cursor: grab; padding: 0; background-size: cover; background-position: center; }
.le-pbody .ai-c { border: 1px solid var(--le-line); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--le-surface2); }
.le-pbody .ai-c p { margin: 0; white-space: pre-wrap; }
.le-app .hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.le-app .hist li { border: 1px solid var(--le-line); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.le-app .hist li.ver { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.le-app .hist time { font-family: var(--le-mono); font-size: 11px; color: var(--le-muted); }
.le-pbody .cssbox { font-family: var(--le-mono); font-size: 12px; min-height: 220px; resize: vertical; }

.le-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10050; }
.le-modal .box { background: var(--le-surface); color: var(--le-ink); border-radius: 10px; max-width: 580px; width: 100%; max-height: 85vh; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.le-modal h2 { margin: 0; font-size: 18px; }
.le-modal .row { display: flex; gap: 8px; }

@media (max-width: 1180px) {
  .le-work { grid-template-columns: minmax(0, 1fr) 320px; }
  .le-layers { display: none; }
  .le-tabs .le-t-layers { display: block; }
}
@media (max-width: 820px) {
  .le-work { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(360px, 1fr) auto; }
  .le-panel { border-left: 0; border-top: 1px solid var(--le-line); max-height: 50vh; }
  .le-search { flex-basis: 100%; }
}

/* アプリ全体の入力欄の見た目（丸い枠・影）が検索欄の中に二重に出ないように */
.le-app .le-search input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: transparent !important; padding: 4px 0 !important; height: auto !important; }
.le-app .le-sel, .le-app .le-pbody select, .le-app .le-pbody input[type=text], .le-app .le-modal input[type=text] { box-shadow: none; height: auto; }
