/* web-ui-studio screens.css : 各画面固有の見た目 */

/* ホーム */
.hero { background: linear-gradient(135deg, rgba(255, 200, 87, .13), rgba(90, 209, 200, .11)), var(--surface); cursor: pointer; }
.hero-n { font-size: 1.3rem; font-weight: 800; margin: 8px 0 4px; }

/* 図鑑 */
.mc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
.mc { position: relative; background: var(--surface); border: .5px solid var(--line); border-radius: var(--radius-m); overflow: hidden; cursor: pointer; }
.mc-th { height: 196px; display: flex; align-items: center; justify-content: center; padding: 8px; background: radial-gradient(circle at 50% 30%, var(--surface-2), var(--surface)); }
.mc-i { padding: 10px 12px 12px; }
.mc-no { font-size: .7rem; color: var(--accent); font-weight: 800; font-family: var(--font-mono); }
.mc-n { font-weight: 700; font-size: .95rem; line-height: 1.3; margin-top: 2px; }
.mc-a { font-size: .78rem; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-f { position: absolute; top: 8px; right: 8px; color: var(--accent); }

/* プレビュー（デバイス枠） */
.pvx { position: relative; flex: none; }
.pvx-dev { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #000; overflow: hidden;
  box-shadow: 0 0 0 6px #1b2233, 0 0 0 7px rgba(255, 255, 255, .14), 0 18px 40px rgba(0, 0, 0, .45); }
.pvx.noframe .pvx-dev { box-shadow: none; }
.pvx-if { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.pvx.inert .pvx-if { pointer-events: none; }
.pvx-ov { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pvx-isl { position: absolute; top: 11px; left: 50%; width: 126px; height: 36px; margin-left: -63px; border-radius: 20px; background: #000; }
.pvx-notch { position: absolute; top: 0; left: 50%; width: 160px; height: 30px; margin-left: -80px; background: #000; border-radius: 0 0 20px 20px; }
.pvx-bar { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(255, 255, 255, .7); }
.pvx-sb { position: absolute; left: 0; right: 0; pointer-events: none; background: rgba(255, 69, 58, .28); z-index: 1; }
.pvx-sb.t { top: 0; } .pvx-sb.b { bottom: 0; }
.real-layer { position: fixed; inset: 0; z-index: 150; background: #000; }
.pvx-real { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.real-x { position: fixed; top: calc(var(--sat) + 6px); right: 8px; z-index: 3; min-height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; font-weight: 700;
  color: #fff; background: rgba(0, 0, 0, .6); border: .5px solid rgba(255, 255, 255, .3); }

/* 詳細 */
.dt { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dt-stage { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px 8px 6px; gap: 8px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, rgba(90, 209, 200, .07), transparent 60%); }
.dt-pv { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.dt-stage.cmp { align-items: stretch; }
.dt-half { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dt-half .dt-pv { flex: 1; min-height: 0; height: auto; }
.dt-lb { font-size: 11px; color: var(--text-dim); text-align: center; padding-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-dock { flex: none; height: 46%; display: flex; flex-direction: column; background: var(--surface); border-radius: 22px 22px 0 0; border-top: .5px solid var(--line); padding-top: 10px; }
.dt-tabs { margin: 0 12px 6px; flex: none; }
.dt-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 14px calc(var(--sab) + 16px); }
.dt.full .dt-dock { display: none; }
.dt-restore { display: none; position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(var(--sab) + 16px); z-index: 6; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.dt-restore.on { display: inline-flex; }

/* 調整パネル */
.prm-g { margin-bottom: 8px; }
.prm-gt { font-size: .75rem; font-weight: 800; color: var(--text-dim); margin: 14px 0 4px; letter-spacing: .03em; }
.prm { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: .5px solid var(--line); padding: 4px 0; }
.prm-gt + .prm { border-top: 0; }
.prm-l { flex: none; width: 36%; font-size: .88rem; font-weight: 600; }
.prm-c { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.prm-c.end { justify-content: flex-end; }
.prm-c input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); height: 36px; }
.prm-c input[type=color] { width: 44px; height: 34px; border: 0; background: none; padding: 0; }
.prm-c select.field, .prm-c input.field { min-height: 40px; padding: 6px 10px; }
.prm-c .seg { max-width: 100%; }
.pv-val { font-size: .76rem; color: var(--text-dim); min-width: 46px; text-align: right; font-family: var(--font-mono); }
.bl { padding-left: 20px; font-size: .9rem; line-height: 1.7; }
.bl li { margin: 2px 0; }
.kv span.ok { color: var(--ok); }
.kv span.ng { color: var(--text-dim); }

/* ラボ */
.code-ta { font-family: var(--font-mono); font-size: 13px !important; line-height: 1.5; min-height: 42vh; white-space: pre; overflow: auto; }
.lab-pv { height: 62vh; min-height: 340px; display: flex; align-items: center; justify-content: center; background: var(--surface); border-radius: 16px; margin-top: 6px; }

/* ビルダー */
.screen.bld { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.bld-stage { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: calc(var(--sat) + 8px) 8px 4px; overflow: hidden; }
.bld-panel { flex: none; height: 46%; display: flex; flex-direction: column; background: var(--surface); border-radius: 22px 22px 0 0; border-top: .5px solid var(--line); padding: 12px 14px; }
.bld-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.bld-name { font-weight: 800; font-size: 1rem; max-width: 36%; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; min-height: 44px; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px 4px; min-height: 86px; border-radius: 14px; background: var(--surface-2); font-size: .78rem; font-weight: 600; border: .5px solid var(--line); }
.pbtn small { color: var(--text-dim); font-size: .68rem; min-height: 1em; }
.bld-list > * { flex: none; }
.bld-list .li-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-list .li .grow { min-width: 0; }
