/* /predict page + the predict picker (also used in the stock page panel). Needs home.css (es-* atoms). */
.es-pd { max-width: 960px; margin: 0 auto; padding: 24px 24px 48px; }
.es-pd-card { background: var(--es-surface); border: 1px solid var(--es-border); border-radius: var(--es-r-lg); padding: 20px 24px 24px; box-shadow: var(--shadow-1); }
.es-pd-h { margin-bottom: 16px; }
.es-pd-name { text-decoration: none; font-size: 20px; }
.es-pd-p { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.es-pd-p .es-price { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.es-pd-p .es-chg { font-size: 17px; }
.es-pd-h .es-sub { margin: 4px 0 0; font-size: 14px; }

.es-pd-form { margin-top: 16px; display: grid; gap: 8px; }
.es-pd-form textarea, .es-cm-form textarea, .es-in { width: 100%; box-sizing: border-box; resize: none; border: 0; border-radius: 8px;
  padding: 11px 14px; font: inherit; font-size: 17px; background: var(--es-subtle); color: var(--es-ink); min-height: 44px; }
.es-pd-form textarea:focus, .es-cm-form textarea:focus, .es-in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); background: var(--surface); }

.es-pd-other { margin-top: 32px; }
.es-pd-other .es-h { margin-bottom: 12px; }
.es-pd-tools { display: flex; align-items: center; gap: 12px; }
.es-pd-tools .es-tabs { flex: 1; min-width: 0; padding-bottom: 0; }
.es-search { display: flex; align-items: center; gap: 8px; width: 280px; height: 40px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--btn2); color: var(--es-muted); box-sizing: border-box; }
.es-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 17px; background: transparent; color: var(--es-ink); }
.es-list { list-style: none; margin: 12px 0 0; padding: 8px; background: var(--es-surface); border: 1px solid var(--es-border); border-radius: var(--es-r); box-shadow: var(--shadow-1); }
.es-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px 20px; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 8px; text-decoration: none; color: inherit; }
.es-list a:hover { background: var(--hover); }
.es-list li.on a { background: var(--btn2); }
.es-list-p { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 17px; }
.es-list .es-chg { text-align: right; }
.es-list-ck { color: var(--es-good); font-weight: 700; }

.es-dlg { border: 0; border-radius: 12px; padding: 20px; max-width: 380px; width: calc(100vw - 48px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.es-dlg::backdrop { background: rgba(20,24,32,.45); }
.es-dlg h3 { margin: 0 0 8px; font-size: 17px; }
.es-dlg p { margin: 0 0 16px; color: var(--es-sub); font-size: 17px; line-height: 1.5; }
.es-dlg-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

@media (max-width: 640px) {
  .es-pd { padding: 0 0 24px; }
  .es-pd-card { border-radius: 0; border: 0; box-shadow: none; padding: 16px 12px; }
  .es-pd-name { font-size: 18px; }
  .es-pd-p .es-price { font-size: 26px; }
  .es-pd-form .es-btn { height: 48px; }
  .es-pd-other { margin-top: 8px; padding: 16px 12px; background: var(--surface); }
  .es-pd-tools { flex-direction: column; align-items: stretch; gap: 8px; }
  .es-search { width: 100%; order: -1; }
  .es-list { margin: 8px -12px 0; padding: 0 4px; border-radius: 0; border: 0; box-shadow: none; }
  .es-list a { grid-template-columns: minmax(0, 1fr) auto 76px 16px; min-height: 52px; padding: 0 8px; font-size: 17px; }
}

/* ── predict picker (2026-11-21 쉬운 입력): 시가 / 고가 / 종가 세 줄 카드 ──
   row = label · [－] · big price (+% vs now) · [＋], slider (now ±10%) under it. Touch targets >= 44px, price >= 22px. */
.es-pp { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.es-pp-base { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0 2px 10px; font-size: 14px; color: var(--es-sub); }
.es-pp-base b { color: var(--es-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.es-pp-rows { display: grid; gap: 8px; }
.es-pp-row { direction: ltr; display: grid; grid-template-columns: 56px 44px minmax(0, 1fr) 44px; grid-template-areas: "lab m val p" "sl sl sl sl";
  align-items: center; gap: 4px 4px; padding: 10px 10px 6px; border: 1px solid var(--es-border); border-radius: 12px; background: var(--es-surface);
  transition: border-color .15s, box-shadow .15s; }
.es-pp-row.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.es-pp-row.fix { animation: es-pp-fix .7s ease-out; }
@keyframes es-pp-fix { 0%, 35% { background: #FFF4CC; border-color: #F0B429; } 100% { background: var(--es-surface); } }
.es-pp-lab { grid-area: lab; min-width: 0; line-height: 1.2; }
.es-pp-lab b { display: block; font-size: 17px; font-weight: 700; color: var(--es-ink); }
.es-pp-lab small { display: block; margin-top: 2px; font-size: 12px; color: var(--es-muted); word-break: keep-all; }
.es-pp-nb { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: var(--btn2); color: var(--text);
  font: inherit; font-size: 24px; font-weight: 600; line-height: 1; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.es-pp-nb.m { grid-area: m; } .es-pp-nb.p { grid-area: p; }
.es-pp-nb:hover { background: var(--btn2-h); }
.es-pp-nb:active { background: var(--btn2-h); transform: scale(.95); }
.es-pp-nb:focus-visible, .es-pp-val:focus-visible, .es-pp-qb button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.es-pp-val { grid-area: val; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 2px 4px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--es-ink); cursor: text; -webkit-tap-highlight-color: transparent; }
.es-pp-val:not(:disabled):hover { background: var(--hover); }
.es-pp-val b { max-width: 100%; font-size: 24px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px dashed var(--btn2-h); }
.es-pp-val b.long { font-size: 22px; }
.es-pp-val em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--es-sub); font-variant-numeric: tabular-nums; }
.es-pp-val em.up { color: var(--up); } .es-pp-val em.down { color: var(--down); }
.es-pp-in { width: 100%; min-width: 0; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--ink); background: transparent; padding: 0;
  font: inherit; font-size: 24px; font-weight: 800; text-align: center; color: var(--es-ink); outline: none; font-variant-numeric: tabular-nums; }
/* slider: grey track, coloured fill from "now" (centre mark) to the thumb — red up, blue down */
.es-pp-sl { grid-area: sl; -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; }
.es-pp-sl:focus { outline: none; }
.es-pp-sl:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.es-pp-sl::-webkit-slider-runnable-track { height: 6px; border-radius: 3px;
  background: linear-gradient(var(--es-sub), var(--es-sub)) no-repeat calc(var(--m, 50%) - 1px) 0 / 2px 100%,
              linear-gradient(to right, var(--btn2) 0 var(--a, 50%), var(--c, var(--up)) var(--a, 50%) var(--b, 50%), var(--btn2) var(--b, 50%) 100%); }
.es-pp-sl::-moz-range-track { height: 6px; border-radius: 3px;
  background: linear-gradient(var(--es-sub), var(--es-sub)) no-repeat calc(var(--m, 50%) - 1px) 0 / 2px 100%,
              linear-gradient(to right, var(--btn2) 0 var(--a, 50%), var(--c, var(--up)) var(--a, 50%) var(--b, 50%), var(--btn2) var(--b, 50%) 100%); }
.es-pp-sl::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%;
  background: #fff; border: 2px solid var(--c, var(--up)); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.es-pp-sl::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--c, var(--up)); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.es-pp-note { min-height: 18px; margin: 6px 2px 0; font-size: 13px; line-height: 18px; color: var(--es-sub); opacity: 0; transition: opacity .2s; }
.es-pp-note.on { opacity: 1; }
.es-pp-quick { margin-top: 4px; }
.es-pp-qt { display: block; margin: 0 2px 6px; font-size: 13px; font-weight: 600; color: var(--es-sub); }
.es-pp-qb { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.es-pp-qb button { height: 44px; padding: 0; border: 0; border-radius: 10px; background: var(--btn2); font: inherit; font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--es-ink); cursor: pointer; touch-action: manipulation; }
.es-pp-qb button.up { color: var(--up); } .es-pp-qb button.down { color: var(--down); }
.es-pp-qb button:hover { background: var(--btn2-h); }
.es-pp-qb button.on { background: var(--ink); color: #fff; }
/* read-only (already predicted / just saved): values only */
.es-pp.ro .es-pp-nb, .es-pp.ro .es-pp-sl, .es-pp.ro .es-pp-quick, .es-pp.ro .es-pp-note { display: none; }
.es-pp.ro .es-pp-row { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "lab val"; padding: 8px 10px; border-color: var(--es-border); box-shadow: none; }
.es-pp.ro .es-pp-val { cursor: default; align-items: flex-end; }
.es-pp.ro .es-pp-val b { border-bottom: 0; }

/* form under the picker: comment, points line, big full-width "예측 완료" (beats stock.css ≥1000px 2-column form) */
.es-pd-form.es-pp-form, .es-panel .es-pd-form.es-pp-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: stretch; margin-top: 12px; }
.es-panel .es-pd-form.es-pp-form .es-err { grid-column: auto; grid-row: auto; }
.es-pp-reward { margin: 4px 2px 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--es-sub); }
.es-btn.es-pp-go { height: 56px; font-size: 18px; font-weight: 700; border-radius: 12px; }
.es-btn.es-pp-share { height: 44px; font-size: 15px; }

/* wide screens: three cards side by side */
@media (min-width: 760px) {
  .es-pp-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .es-pp-row { grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "lab lab lab" "m val p" "sl sl sl"; padding: 12px 12px 6px; }
  .es-pp-lab { display: flex; align-items: baseline; gap: 6px; }
  .es-pp-lab small { margin: 0; }
  .es-pp.ro .es-pp-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lab" "val"; }
  .es-pp.ro .es-pp-val { align-items: flex-start; }
  .es-pp-quick { display: flex; align-items: center; gap: 12px; }
  .es-pp-qt { margin: 0; flex: none; }
  .es-pp-qb { flex: 1; max-width: 420px; }
  .es-pp-form .es-pp-go { max-width: 480px; width: 100%; justify-self: center; }
  .es-pp-form .es-pp-share { max-width: 480px; justify-self: center; }
}
@media (max-width: 360px) {
  .es-pp-row { grid-template-columns: 48px 44px minmax(0, 1fr) 44px; padding: 8px 8px 4px; }
  .es-pp-lab small { display: none; }
}

/* ── /predict: Flutter PredictPicker layout (2026-11-21 되돌림) — chart track left + value boxes right, height 300 (mobile) / 360 ──
   static/js/predict.js FPicker draws the track on the canvas. Corners 4px, thin borders. */
.es-pd-card { border-radius: 4px; }
.es-pd-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.es-pd-t .es-pd-name { font-size: 22px; font-weight: 800; color: var(--es-ink); }
.es-pd-t .es-price { font-size: 20px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.es-pd-t .es-chg { font-size: 15px; }
.es-pd-h { margin-bottom: 12px; }
.es-pd-h .es-sub { margin: 4px 0 0; font-size: 15px; color: var(--es-sub); }
.es-fp { display: grid; grid-template-columns: minmax(0, 1fr) 168px; column-gap: 14px; height: 360px; user-select: none; -webkit-user-select: none; }
.es-fp-track { position: relative; height: 100%; border-radius: 4px; cursor: ns-resize; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; }
.es-fp-track canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.es-fp-track:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.es-fp.ro .es-fp-track { cursor: default; touch-action: auto; }
.es-fp-ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.es-fp-v { display: flex; align-items: stretch; border: 1px solid var(--es-border); border-radius: 4px; background: var(--es-surface); overflow: hidden; }
.es-fp-v.on { border-color: var(--es-predict); box-shadow: inset 0 0 0 .4px var(--es-predict); background: var(--es-predict-soft); }
.es-fp-vb { flex: 1; min-width: 0; text-align: left; border: 0; background: none; font: inherit; padding: 8px 2px 8px 10px; cursor: text; color: var(--es-ink); }
.es-fp-vb:disabled { cursor: default; color: var(--es-ink); }
.es-fp-vl { display: block; font-size: 13px; line-height: 18px; color: var(--es-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-fp-vl em { font-style: normal; font-variant-numeric: tabular-nums; }
.es-fp-v.on .es-fp-vl { color: var(--es-predict); }
.es-fp-vb b { display: block; min-height: 24px; font-size: 18px; line-height: 24px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-fp-vb b.long { font-size: 15px; }
.es-fp-v.on .es-fp-vb b { color: var(--es-predict); }
.es-fp-in { width: 100%; min-width: 0; border: 0; background: transparent; padding: 0; font: inherit; font-size: 17px; font-weight: 700; color: var(--es-predict); outline: none; }
.es-fp-nd { display: flex; flex-direction: column; justify-content: center; padding-right: 2px; }
.es-fp-nd button { width: 32px; height: 26px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--es-sub); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.es-fp-nd button:hover { background: rgba(0,0,0,.05); }
.es-fp-nd button:active { background: rgba(0,0,0,.09); }
.es-fp-pct { margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.es-fp-pct button { height: 36px; padding: 0; border: 0; border-radius: 4px; background: var(--es-subtle, var(--subtle)); font: inherit; font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--es-ink); cursor: pointer; touch-action: manipulation; }
.es-fp-pct button:hover { background: var(--btn2-h); }
.es-pd-form { margin-top: 12px; }
.es-pd .es-pd-form textarea { border-radius: 4px; min-height: 48px; }
.es-btn.es-pd-save { height: 54px; font-size: 17px; border-radius: 4px; }
.es-pd .es-list, .es-pd .es-search, .es-pd .es-list a { border-radius: 4px; }
.es-pd .es-tab:not(.es-tab-dot) { border-radius: 4px; }
@media (max-width: 640px) {
  .es-pd-card { padding: 16px; }
  .es-pd-t .es-pd-name { font-size: 20px; }
  .es-pd-t .es-price { font-size: 19px; }
  .es-fp { height: 300px; }
}
@media (max-width: 480px) { .es-fp { grid-template-columns: minmax(0, 1fr) 138px; column-gap: 8px; } }

/* /stock/<code> panel: same chart picker as /predict (2026-11-21) — 4px corners, no gaps */
.es-st .es-panel.es-box { border-radius: 4px; }
.es-panel .es-fp { margin-top: 2px; }
.es-panel .es-pd-form.es-pp-form { margin-top: 10px; gap: 8px; }
.es-panel .es-pp-share { border-radius: 4px; }
.es-panel > .es-panel-btns .es-btn { border-radius: 4px; }
.es-panel .es-fp { height: 300px; }
.es-panel .es-pp-form .es-pp-share { max-width: none; width: 100%; justify-self: stretch; }

/* ── 2026-11-21 대표 (피그마) ── */
/* B: empty start — boxes show "–" until set; a box left empty at save turns red */
.es-fp-v.none .es-fp-vb b { color: var(--es-muted); font-weight: 600; }
.es-fp-v.bad { border-color: var(--es-predict); box-shadow: inset 0 0 0 1px var(--es-predict); background: #fff; }
.es-fp-v.bad .es-fp-vl { color: var(--es-predict); }
.es-fp-nd button:disabled, .es-fp-pct button:disabled { opacity: .35; cursor: default; background: none; }
.es-fp-pct button:disabled { background: var(--es-subtle, var(--subtle)); }
.es-fp-in::placeholder { color: var(--es-muted); font-weight: 500; }
.es-pd-top { display: flex; align-items: center; gap: 4px; min-width: 0; }
.es-pd-back { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-left: -10px; border-radius: 4px; color: var(--es-ink); }
.es-pd-back:hover { background: var(--hover); }
.es-pd-top .es-pd-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-size: 20px; font-weight: 800; color: var(--es-ink); }
.es-pd-top .es-pill { flex: none; margin-left: 4px; }
.es-pd-h .es-pd-t { margin-top: 2px; }
.es-pd-h .es-sub b { color: var(--es-ink); font-weight: 700; }
a.es-btn.es-pd-save { display: flex; }

/* A: "예측할 종목을 고르세요" list — compact 64px rows, thin dividers, 4px corners */
.es-pl { background: var(--es-surface); border: 1px solid var(--es-border); border-radius: 4px; padding: 16px 16px 8px; }
.es-pl-h { margin: 0 0 12px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; color: var(--es-ink); }
.es-pl .es-pl-q { width: 100%; height: 48px; border-radius: 4px; background: var(--es-subtle, var(--subtle)); }
.es-pl .es-pl-q input { font-size: 17px; }
.es-pl-tabs { margin: 12px 0 0; padding: 0 0 8px; }
.es-pl-list { list-style: none; margin: 0 -16px; padding: 0; border-top: 1px solid var(--divider, #E4E6EB); }
.es-pl-list li { border-bottom: 1px solid var(--divider, #E4E6EB); }
.es-pl-list li:last-child { border-bottom: 0; }
.es-pl-list a { display: grid; grid-template-columns: minmax(0, 1fr) 88px 92px; align-items: center; gap: 10px; min-height: 64px; padding: 6px 16px; text-decoration: none; color: inherit; }
.es-pl-list a:hover { background: var(--hover); }
.es-pl-a { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.es-pl-a .es-sn { font-size: 16px; font-weight: 700; }
.es-pl-a .es-flag img.flag { width: 16px; height: auto; }
.es-pl-p { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.es-pl-p b { font-size: 15px; font-weight: 600; color: var(--es-ink); }
.es-pl-p .es-chg { font-size: 13px; }
.es-pl-c { height: 40px; min-width: 0; }
.es-pl-c .spark { height: 40px; }
.es-pl-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; font-size: 13px; line-height: 1.3; }
.es-pl-r b { font-size: 14px; font-weight: 700; color: var(--es-ink); }
.es-pl-r em { font-style: normal; font-weight: 600; }
.es-pl-r em.es-muted { white-space: normal; font-weight: 500; font-size: 12px; }
.es-pl-mine { color: var(--es-good); display: inline-flex; align-items: center; gap: 2px; }
.es-pl-list li[hidden] { display: none; }
@media (max-width: 640px) {
  .es-pl { border-radius: 0; border-left: 0; border-right: 0; padding: 14px 12px 4px; }
  .es-pl-list { margin: 0 -12px; }
  .es-pl-list a { grid-template-columns: minmax(0, 1fr) 72px 84px; gap: 8px; padding: 6px 12px; }
  .es-pl-h { font-size: 19px; }
}
@media (min-width: 760px) { .es-pl-list a { grid-template-columns: minmax(0, 1fr) 160px 120px; } }

/* ── 2026-11-22 대표: one page — list + prediction panel (mobile: panel on top; ≥900px: list left, panel right & sticky) ── */
.es-pd.es-pd2 { max-width: 1200px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.es-pd-side { min-width: 0; }
.es-pd-side .es-pd-card { padding: 16px; }
.es-pd-card.loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.es-pd-ph { margin: 0; font-size: 19px; font-weight: 800; color: var(--es-ink); }
.es-pd-ph .w { display: none; }
.es-pd-card.blank .es-sub { margin-top: 4px; }
.es-fp-blank .es-fp-track { background: var(--es-subtle, var(--subtle)); cursor: default; touch-action: auto; }
.es-fp-blank .es-fp-vb { cursor: default; }
.es-pd-form textarea:disabled { opacity: .6; }
.es-btn.es-pd-save:disabled { opacity: 1; background: var(--btn2); color: var(--es-muted); }
.es-pl-list li.on a { background: var(--es-subtle, #F0F2F5); box-shadow: inset 3px 0 0 var(--ink); }
@media (min-width: 900px) {
  .es-pd.es-pd2 { grid-template-columns: minmax(0, 1fr) 440px; gap: 16px; padding-top: 16px; }
  .es-pd2 > .es-pl { grid-column: 1; grid-row: 1; }
  .es-pd2 > .es-pd-side { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--hd-h, 56px) + 12px); }
  .es-pd-ph .w { display: inline; } .es-pd-ph .m { display: none; }
  .es-pd-side .es-fp { height: 340px; grid-template-columns: minmax(0, 1fr) 150px; column-gap: 10px; }
  .es-pd2 .es-pl-list a { grid-template-columns: minmax(0, 1fr) 140px 112px; }
}
@media (max-width: 640px) {
  .es-pd.es-pd2 { gap: 8px; }
  .es-pd-side .es-pd-card { padding: 14px 12px; border-left: 0; border-right: 0; }
}
/* saved in place: values stay, the tools go */
.es-fp.ro .es-fp-nd, .es-fp.ro .es-fp-pct { display: none; }
.es-fp.ro .es-fp-vb { cursor: default; }

/* ── 2026-11-22 대표 정정: panel = the stock page's real chart + value boxes (no price-scale picker) ── */
.es-pd-card .es-pd-chart { padding: 0; margin: 8px 0 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.es-pd-card .es-pd-chart .es-ch-tools { border-radius: 4px; }
.es-pd-card .es-pd-chart .es-dc { --dc-h: 250px; --ax: 72px; }
.es-pd-card .es-pd-chart .es-dc-vol { height: 72px; }
.es-pd-card .es-pd-chart .es-dc-rise { height: 56px; }
.es-pd-days { margin: 10px 0 8px; }
.es-pd-days .es-seg { border-radius: 4px; }
.es-pd-days .es-seg button { border-radius: 4px; font-size: 14px; height: 32px; padding: 0 12px; }
/* value boxes without the price-scale track: 시가 / 고가 / 종가 side by side, ±% under them */
.es-fp.notrack { display: block; height: auto; }
.es-fp.notrack .es-fp-ctl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.es-fp.notrack .es-fp-pct { grid-column: 1 / -1; margin-top: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.es-fp.notrack .es-fp-vb { padding: 8px 2px 8px 8px; }
.es-fp.notrack .es-fp-vb b { font-size: 17px; }
.es-fp.notrack .es-fp-vb b.long { font-size: 14px; }
.es-fp.notrack .es-fp-nd button { width: 28px; height: 24px; }
/* no stock yet: an empty grey chart with only its axes */
.es-pd-blankchart { position: relative; height: 250px; margin: 8px 0 10px; border-radius: 4px; background: var(--es-subtle, #F0F2F5);
  background-image: repeating-linear-gradient(to bottom, transparent 0 49px, #E1E4EA 49px 50px); }
.es-pd-blankchart .ax-y { position: absolute; top: 0; bottom: 24px; right: 64px; border-left: 1px solid #D5D8DC; }
.es-pd-blankchart .ax-x { position: absolute; left: 0; right: 0; bottom: 24px; border-top: 1px solid #D5D8DC; }
.es-fp-blank.notrack .es-fp-vb b { color: var(--es-muted); }
@media (min-width: 900px) {
  .es-pd-card .es-pd-chart .es-dc { --dc-h: 280px; --ax: 76px; }
  .es-pd-blankchart { height: 300px; }
}
@media (max-width: 640px) {
  .es-pd-card .es-pd-chart { margin-left: -4px; margin-right: -4px; }
}
/* narrow panel: the chart's O/H/L/C line may wrap — let it grow instead of clipping under the tool bar */
.es-pd-card .es-pd-chart .es-dc-info { height: auto; min-height: 22px; max-height: none; overflow: visible; flex-wrap: wrap; align-content: flex-start; gap: 0 10px; line-height: 20px; }

/* ── 2026-11-22 기획서·피그마 44: stock page prediction panel right under the big chart — no price-scale canvas ── */
.es-st .es-panel2 { padding: 12px 16px 16px; }
.es-panel2 .es-panel-h { margin-bottom: 8px; }
.es-panel2 .es-panel-days { display: flex; width: max-content; max-width: 100%; margin: 0 0 10px; border-radius: 4px; }
.es-st .es-panel2 .es-panel-days button { border-radius: 4px; height: 34px; padding: 0 14px; font-size: 14px; }
.es-panel .es-fp.notrack { height: auto; margin-top: 0; }
.es-panel2 .es-pd-form.es-pp-form { margin-top: 10px; }
.es-panel2 .es-pd-form textarea { min-height: 44px; height: 44px; }
.es-panel2 .es-done { margin: 10px 0; }
@media (max-width: 640px) {
  .es-st .es-panel2 { padding: 12px; }
  .es-st .es-panel2 .es-panel-days { width: 100%; }
  .es-st .es-panel2 .es-panel-days button { flex: 1 1 0; padding: 0 6px; }
}
@media (max-width: 480px) {
  .es-fp.notrack .es-fp-ctl { gap: 4px; }
  .es-fp.notrack .es-fp-vb { padding: 6px 0 6px 7px; }
  .es-fp.notrack .es-fp-vb b { font-size: 16px; }
  .es-fp.notrack .es-fp-vb b.long { font-size: 13px; }
  .es-fp.notrack .es-fp-vl { font-size: 12px; }
  .es-fp.notrack .es-fp-nd { padding-right: 0; }
  .es-fp.notrack .es-fp-nd button { width: 24px; }
}

/* ══ 2026-11-22 고객 확정: /predict = one column — chosen stock (header · full-width chart · input row) on top, then the
   stocks as the home page's .es-card boxes (PC 4–5 columns, mobile 2). Row: [예측 이유][날짜 탭 · 시·고·종 · ±%][예측하기 / 공유] ══ */
.es-pd.es-pd3 { display: block; max-width: 1248px; padding: 16px 24px 48px; }
.es-pd3 .es-pd-side { position: static; }
.es-pd3 .es-pd-card { padding: 16px 16px 16px; border-radius: 4px; }
.es-pd3 .es-pd-top { flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.es-pd3 .es-pd-top .es-pd-name { font-size: 22px; }
.es-pd3 .es-pd-top .es-price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.es-pd3 .es-pd-top .es-chg { font-size: 15px; }
.es-pd3 .es-pd-h .es-sub { margin: 2px 0 0; font-size: 15px; }
.es-pd3 .es-pd-ph { font-size: 20px; }
.es-pd3 .es-pd-card .es-pd-chart { margin-top: 10px; }
.es-pd3 .es-pd-card .es-pd-chart .es-dc { --dc-h: 340px; --ax: 92px; }
.es-pd3 .es-pd-card .es-pd-chart .es-dc-vol { height: 80px; }
.es-pd3 .es-pd-blankchart { height: 440px; margin: 10px 0 0; }
.es-pd3 .es-pd-blankchart .ax-y { right: 92px; }
/* input row */
.es-pd-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 430px) 210px;
  grid-template-areas: "reason vals save" "reason vals share" "err err err"; gap: 8px 12px; margin-top: 12px; align-items: stretch; }
.es-pd-row .es-pd-form { display: contents; }
.es-pd-row .es-pd-vals { grid-area: vals; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.es-pd-row textarea { grid-area: reason; width: 100%; box-sizing: border-box; height: auto !important; min-height: 124px; margin: 0; resize: none;
  border: 1px solid var(--es-border); border-radius: 4px; background: var(--es-surface); font-size: 17px; line-height: 1.45; padding: 12px 14px; }
.es-pd-row textarea:focus { border-color: var(--ink); box-shadow: none; }
.es-pd-row .es-err { grid-area: err; margin: 0 2px; }
.es-pd-row .es-done { grid-area: reason; align-self: center; margin: 0; font-size: 15px; }
.es-pd-row .es-pd-save { grid-area: save; width: 100%; height: auto; min-height: 58px; border-radius: 4px; font-size: 18px; font-weight: 700; }
.es-pd-row .es-pd-share { grid-area: share; width: 100%; height: auto; min-height: 58px; border-radius: 4px; font-size: 14px; line-height: 1.3; white-space: normal; padding: 6px 10px; }
.es-pd-row .es-btn:disabled { opacity: 1; background: var(--btn2); color: var(--es-muted); }
.es-pd-row .es-pd-dtabs { align-self: flex-start; border-radius: 4px; padding: 2px; }
.es-pd-row .es-pd-dtabs button { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 3px; }
.es-pd-row .es-fp.notrack { margin: 0; }
.es-pd-row .es-fp-pct button { height: 32px; }
.es-pd-row.blank .es-pd-dtabs button:disabled { opacity: .55; }
/* stocks: the home page's card boxes */
.es-pd3 > .es-pl { margin-top: 20px; padding: 0; background: none; border: 0; }
.es-pl-top { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.es-pl-top .es-pl-h { margin: 0; flex: 1 1 auto; font-size: 20px; }
.es-pl-top .es-pl-q { width: 340px; max-width: 100%; height: 44px; border: 1px solid var(--es-border); background: var(--es-surface); }
.es-pd3 .es-pl-tabs { margin: 10px 0 4px; }
.es-pd3 .es-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; }
.es-pd3 .es-card { border-radius: 4px; }
.es-pd3 .es-card[hidden] { display: none; }
.es-pd3 .es-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.es-pd3 .es-card-btn { border-radius: 4px; }
@media (min-width: 1240px) { .es-pd3 .es-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 999px) { .es-pd3 .es-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .es-pd-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "vals vals" "reason reason" "err err" "save share"; gap: 8px; margin-top: 10px; }
  .es-pd-row textarea { min-height: 46px; field-sizing: content; }   /* phone: one line, grows as you type */
  .es-pd-row .es-pd-dtabs { align-self: stretch; display: flex; }
  .es-pd-row .es-pd-dtabs button { flex: 1 1 0; height: 34px; font-size: 14px; }
  .es-pd-row .es-pd-save, .es-pd-row .es-pd-share { min-height: 54px; }
  .es-pd3 .es-pd-card .es-pd-chart .es-dc { --dc-h: 250px; --ax: 72px; }
  .es-pd3 .es-pd-card .es-pd-chart .es-dc-vol { height: 72px; }
  .es-pd3 .es-pd-blankchart { height: 300px; }
  .es-pd3 .es-pd-blankchart .ax-y { right: 72px; }
}
@media (max-width: 699px) { .es-pd3 .es-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 640px) {
  .es-pd.es-pd3 { padding: 0 0 24px; }
  .es-pd3 .es-pd-card { padding: 14px 10px; border-left: 0; border-right: 0; }
  .es-pd3 .es-pd-top .es-pd-name, .es-pd3 .es-pd-top .es-price { font-size: 20px; }
  .es-pd3 > .es-pl { margin-top: 14px; padding: 0 10px; }
  .es-pl-top .es-pl-q { width: 100%; }
  .es-pd3 .es-grid { padding: 0; }
}
.es-pd3 .es-card-mine { display: inline-flex; align-items: center; gap: 3px; color: var(--es-good); font-weight: 700; font-size: 13px; }
@media (max-width: 640px) {
  .es-pl-top { flex-direction: column; align-items: stretch; gap: 8px; }
  .es-pl-top .es-pl-q { order: 0; }
}
/* after a save (picker turns read-only): no day tabs; the "saved" line sits where the reason box was */
.es-pd-row:has(.es-fp.ro) .es-pd-dtabs { display: none; }
@media (max-width: 899px) { .es-pd-row .es-done { grid-column: 1 / -1; } }
/* home popular-card look (copied from the end of static/css/home.css "11-21 popular cards", scoped to /predict so it
   holds whatever else is loaded): name line / price line / change line, "258명 ▲43% 예측" */
.es-pd3 .es-card .es-card-h { display: flex; min-width: 0; font-size: 17px; }
.es-pd3 .es-card .es-sn-t { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.es-pd3 .es-card .es-card-p { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; margin-top: 4px; font-size: 17px; }
.es-pd3 .es-card .es-card-p b, .es-pd3 .es-card .es-card-p .es-chg { font-size: 17px; white-space: nowrap; line-height: 1.2; }
.es-pd3 .es-card .es-card-p b { font-weight: 700; font-variant-numeric: tabular-nums; }
.es-pd3 .es-card .es-card-crowd { display: flex; flex-direction: column; gap: 6px; min-height: 0; height: auto; padding-top: 0; padding-bottom: 0; margin-top: 4px; color: var(--es-sub); }
.es-pd3 .es-card .es-card-crowd, .es-pd3 .es-card .es-card-crowd b, .es-pd3 .es-card .es-card-crowd span { font-size: 16px; }
.es-pd3 .es-card .es-card-crowd > span { white-space: nowrap; }
.es-pd3 .es-card .es-card-crowd b { color: var(--es-ink); font-weight: 700; }
.es-pd3 .es-card .es-card-crowd b.es-up { color: #E0283A; font-weight: 800; }
.es-pd3 .es-card .es-mini-bar, .es-pd3 .es-card .es-card-btn { display: none; }
.es-pd3 .es-card .es-card-mine, .es-pd3 .es-card .es-card-mine * { font-size: 13px; color: var(--es-good); }
/* 이름 잘림 방지: 홈처럼 넓게 — 최대 4열 */
@media (min-width: 1240px) { .es-pd3 .es-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (min-width: 900px) and (max-width: 1239px) { .es-pd3 .es-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
/* 2026-12-04 B1 포지션 (선택) - templates/pages/predict/_picker.html pos_fields */
.es-pd-form > .es-pos { grid-column: 1 / -1; min-width: 0; }
.es-pos { border: 1px solid var(--line, #e5e5e5); border-radius: 8px; padding: 0 12px; }
.es-pos > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 700; }
.es-pos > summary small { font-size: 14px; font-weight: 400; color: var(--ink-3, #777); }
.es-pos-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.es-pos-g label { display: grid; gap: 4px; font-size: 14px; min-width: 0; }
.es-pos-g .es-in { height: 44px; padding: 0 10px; font-size: 16px; }
.es-pos .es-note { font-size: 14px; line-height: 1.5; margin: 8px 0 12px; }
.es-pos-have { font-size: 14px; }
