/* Full-screen trade chart (public/js/prochart.js). */
.pc { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: rgba(7, 7, 9, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); opacity: 0; transform: scale(.985); transition: opacity .2s, transform .25s var(--ease); }
.pc.in { opacity: 1; transform: none; }
body.pc-open { overflow: hidden; }
.pc-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.pc-title { display: flex; align-items: center; gap: 9px; flex: none; font-size: 14px; }
.pc-title b:first-child { font-size: 16px; letter-spacing: -.01em; }
.pc-title .dim { font-size: 12.5px; }
.pc-tools { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pc-tools::-webkit-scrollbar { display: none; }
.pc-seg { display: flex; flex: none; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line-2); }
.pc-seg button { display: grid; place-items: center; min-width: 30px; height: 28px; padding: 0 8px; border-radius: 8px; font-size: 12px; color: var(--text-2); transition: background .2s, color .2s; }
.pc-seg button:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, .06); }
.pc-seg button.on { color: #0a0a0b; background: #f1f1f4; }
.pc-seg button:disabled { opacity: .3; }
.pc-draw button { padding: 0 6px; }
.pc-draw button.on:not([data-tool=cursor]) { color: #1a1300; background: #fbbf24; }
.pc-btn { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 11px; font-size: 12.5px; color: var(--text-2); background: rgba(255, 255, 255, .045); border: 1px solid var(--line-2); transition: color .2s, background .2s; }
.pc-btn:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.pc-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); background: rgba(255, 255, 255, .06); }
.pc-x:hover { color: var(--text); background: rgba(255, 255, 255, .12); }

.pc-body { position: relative; flex: 1; min-height: 0; }
.pc-chart { position: absolute; inset: 0 0 env(safe-area-inset-bottom); }
.pc-chart.drawing { cursor: crosshair; }
.pc-chart .bars-state { height: 100%; }
.pc-legend { position: absolute; top: 10px; left: 14px; z-index: 3; display: grid; gap: 3px; pointer-events: none; font-size: 11.5px; color: var(--text-3); }
.pc-legend > div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pc-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-legend span[style] b { color: inherit; }
.pc-hint { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 4; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; color: #1a1300; background: #fbbf24; box-shadow: 0 10px 30px -10px rgba(251, 191, 36, .6); }
.pc-hint button { font: inherit; font-weight: 700; text-decoration: underline; color: inherit; }

.pc-menu { position: absolute; top: 8px; z-index: 6; width: 300px; max-height: calc(100% - 16px); overflow-y: auto; padding: 8px 12px 12px; border-radius: 16px; background: rgba(18, 18, 21, .97); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
.pc-mh { margin: 10px 2px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.pc-list { display: grid; gap: 2px; }
.pc-list button { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: var(--text-2); text-align: left; }
.pc-list button:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.pc-list button.on { color: var(--text); background: rgba(255, 255, 255, .08); }
.pc-chk { display: flex; align-items: center; gap: 9px; padding: 6px 4px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.pc-chk:hover { color: var(--text); }
.pc-chk input[type=checkbox] { width: 15px; height: 15px; accent-color: #fbbf24; }
.pc-chk .pc-len { flex: none; max-width: 64px; width: 64px; margin-left: auto; padding: 3px 6px; font-size: 12.5px; border-radius: 7px; }
.pc-note { margin: 6px 2px 10px; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.pc-link { font: inherit; color: #f87171; text-decoration: underline; }
.pc-pals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pc-pals button { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 4px; padding: 10px 4px 8px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid transparent; }
.pc-pals button.on { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .08); }
.pc-pals i { width: 14px; height: 22px; border-radius: 3px; }
.pc-pals span { grid-column: 1 / -1; font-size: 11px; color: var(--text-2); }
.pc-custom { display: flex; gap: 14px; }
.pc-custom label, .pc-row label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.pc-custom input[type=color] { width: 40px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: none; cursor: pointer; }
.pc-paste { width: 100%; min-height: 84px; margin: 8px 0; font: 12px/1.4 var(--mono, monospace); resize: vertical; }
.pc-row { display: flex; gap: 10px; margin-bottom: 8px; }
.pc-row label { flex: 1; min-width: 0; }
.pc-row input { width: 100%; min-width: 0; padding: 5px 8px; font-size: 12.5px; }
.pc-menu .btn { width: 100%; justify-content: center; }

@media (max-width: 760px) {
  .pc-top { flex-wrap: wrap; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
  .pc-title { flex: 1; }
  .pc-tools { order: 3; flex-basis: 100%; flex-wrap: wrap; overflow: visible; }
  .pc-seg button { min-width: 28px; padding: 0 6px; }
  .pc-btn span { display: none; }
  .pc-btn { padding: 0 10px; }
  .pc-menu { left: 8px !important; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 70%; border-radius: 20px; }
  .pc-legend { left: 10px; font-size: 10.5px; }
  .pc-paste, .pc-row input, .pc-len { font-size: 16px; }
}
