/* «Umumiy fizika» bo'limi */
.ph-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px 1fr 360px; }
.ph-side { background: var(--panel); border-right: 1px solid var(--line); padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ph-homelink { color: var(--accent2); text-decoration: none; font-weight: 700; font-size: 13px; }
#ph-search { background: #0c1324; border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 8px 11px; font: inherit; }
#ph-search:focus { outline: 2px solid var(--accent2); }
.ph-sec { margin-bottom: 4px; }
.ph-sec > summary { cursor: pointer; font-weight: 800; padding: 6px 4px; color: var(--text); user-select: none; }
.ph-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--accent2); margin: 8px 4px 3px; }
.ph-topic { display: flex; width: 100%; align-items: flex-start; gap: 6px; justify-content: space-between; background: none; border: 1px solid transparent; border-radius: 9px; color: var(--text); font: inherit; font-size: 13px; text-align: left; padding: 6px 7px; cursor: pointer; }
.ph-topic:hover { background: var(--panel2); }
.ph-topic.active { background: #2e2a12; border-color: var(--accent); }
.ph-topic.soon { color: var(--muted); cursor: default; }
.ph-topic.soon:hover { background: none; }
.ph-tt { flex: 1; }
.ph-meta { display: flex; gap: 4px; flex: none; align-items: center; }
.ph-gb { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: #1b2540; color: var(--accent2); font-size: 11px; font-weight: 700; text-align: center; }
.ph-gb.big { font-size: 12px; padding: 2px 9px; margin-left: 4px; }
.ph-gb:empty { display: none; }
.ph-soon { font-size: 10px; color: var(--muted); border: 1px dashed var(--line); border-radius: 99px; padding: 0 6px; white-space: nowrap; }

.ph-center { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 12px 14px; gap: 10px; }
.ph-overview h2 { margin: 4px 0; }
.ph-ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.ph-ov-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ph-ov-card h3 { margin: 0 0 4px; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ph-sim { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
.ph-sim[hidden], .ph-overview[hidden] { display: none; }
.ph-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-head h2 { display: inline; margin: 0; font-size: 19px; }
.ph-ctl { display: flex; gap: 8px; align-items: center; }
.ph-ctl label { display: flex; gap: 6px; align-items: center; margin: 0; }
.ph-ctl select { padding: 5px 8px; }
.ph-stage { user-select: none; -webkit-user-select: none; position: relative; flex: 1 1 auto; min-height: 300px; height: 46vh; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
#ph-cv { position: absolute; inset: 0; display: block; touch-action: none; }
.ph-hint { position: absolute; right: 10px; top: 10px; background: rgba(18, 26, 46, .9); border: 1px solid var(--accent2); color: var(--text); border-radius: 10px; padding: 5px 10px; font-size: 12px; display: none; max-width: 70%; }
.ph-plot-wrap { height: 150px; flex: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ph-plot-wrap[hidden] { display: none; }
#ph-plot { width: 100%; height: 100%; display: block; }
.ph-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.ph-param { display: grid; grid-template-columns: 1fr; gap: 3px; margin: 0; }
.ph-param .ph-pname { font-size: 12px; color: var(--muted); }
.ph-param input[type=range] { width: 100%; accent-color: var(--accent); }
.ph-param.chk { grid-template-columns: auto 1fr; align-items: center; }
.ph-param:not(.chk) { grid-template-columns: 1fr auto; }
.ph-param:not(.chk) .ph-pname { grid-column: 1 / -1; }
.ph-pval { color: var(--accent); font-size: 13px; min-width: 70px; text-align: right; }
.ph-param select { padding: 5px 8px; font-size: 13px; }

body.phys:not(.ph-has-sim) .ph-right { display: none; }
body.phys:not(.ph-has-sim) .ph-layout { grid-template-columns: 290px 1fr; }
.ph-right { background: var(--panel); border-left: 1px solid var(--line); padding: 12px; overflow-y: auto; }
.ph-right .card { margin: 0 0 10px; }
.ph-f { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ph-f:last-child { border-bottom: 0; }
.ph-fn { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.ph-fx { font: 600 15px Cambria, 'Times New Roman', serif; color: var(--accent); }
.ph-fc { font: 13px Consolas, 'Courier New', monospace; color: var(--accent2); margin-top: 2px; word-break: break-word; }
.ph-text p { margin: 0 0 8px; }
.ph-robot { border-color: #3a5a2a; background: #142316; }
.ph-robot h4 { color: var(--ok); }
.ph-robot[hidden] { display: none; }

/* kichik ekranlarda sahifa pastga aylantiriladi, tajriba maydoni siqilmaydi */
@media (max-width: 1150px), (max-height: 640px) {
  body.phys { height: auto; min-height: 100%; }
  .phys .ph-layout { flex: none; grid-template-columns: 240px 1fr; }
  .ph-side { max-height: 85vh; position: sticky; top: 0; }
  .ph-center { overflow: visible; }
  .ph-stage { height: 60vh; min-height: 280px; }
  .ph-right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
  .ph-right .card { margin: 0; }
}
@media (max-width: 760px) {
  .phys .ph-layout { grid-template-columns: 1fr; }
  .ph-side { max-height: 40vh; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
}
