/* 예산이 부족하세요? (inside the AI estimate result)
   A switch-motif bar opens a receipt-style panel: budget on the left, before → after on the right,
   then two tabs — ready plans (radio cards) or a team built for the budget. Reuses .pl-money, .pl-presets, .pl-items, .pl-bar from planner.css. */
.sv-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); width: 100%; padding: var(--s-4) var(--s-5); border: 1px solid var(--ink); border-radius: var(--r); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: box-shadow .15s, transform .15s, border-color .15s; }
.sv-bar:hover { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.sv-bar:focus-visible { outline: 2px solid var(--on); outline-offset: 3px; }
.sv-bar[aria-expanded="true"] { box-shadow: 4px 4px 0 var(--on); border-color: var(--on); transform: translate(-2px, -2px); }
.sv-bar-ic { position: relative; width: 40px; height: 22px; border-radius: var(--r-sm); background: var(--track); transition: background .2s; }
.sv-bar-ic i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: var(--r-sm); background: var(--ink); transition: transform .2s, background .2s; }
.sv-bar:hover .sv-bar-ic i, .sv-bar[aria-expanded="true"] .sv-bar-ic i { transform: translateX(18px); background: #fff; }
.sv-bar:hover .sv-bar-ic, .sv-bar[aria-expanded="true"] .sv-bar-ic { background: var(--on); }
.sv-bar-txt { display: grid; gap: 2px; min-width: 0; }
.sv-bar-txt b { font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.02em; }
.sv-bar-txt span { font-size: 14px; color: var(--muted); line-height: 1.45; }
.sv-bar-go { display: inline-flex; align-items: center; gap: var(--s-2); padding: 8px 12px; border-radius: var(--r-sm); background: var(--on-soft); color: var(--on); font-weight: 800; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sv-bar-go i { width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.sv-bar[aria-expanded="true"] .sv-bar-go i { transform: rotate(225deg) translate(-2px, -2px); }

.sv { display: grid; gap: var(--s-5); padding: var(--s-5); border: 1px solid var(--ink); border-radius: var(--r); background: var(--surface); box-shadow: 6px 6px 0 var(--ink); min-width: 0; animation: sv-in .22s ease-out; }
.sv[hidden] { display: none; }
@keyframes sv-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sv { animation: none; } .sv-bar, .sv-bar-ic, .sv-bar-ic i { transition: none; } }
.sv-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-5); align-items: end; }
.sv-ask { display: grid; gap: var(--s-3); min-width: 0; }
.sv-lbl { font-size: 14px; font-weight: 800; }
.sv-lbl small { font-weight: 600; color: var(--muted); margin-left: 4px; }
.sv .pl-money input { font-size: clamp(32px, 4vw, 44px); }
.sv .pl-presets .chip { background: var(--paper); }
.sv .pl-presets .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.sv-vs { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.2fr); align-items: end; gap: var(--s-2) var(--s-3); padding: var(--s-4); border-radius: var(--r); background: var(--paper); }
.sv-vs > div { display: grid; gap: 2px; min-width: 0; }
.sv-vs span { font-size: 12px; font-weight: 700; color: var(--muted); }
.sv-vs b { font-size: 18px; font-weight: 800; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; white-space: nowrap; }
.sv-vs small { font-size: 12px; color: var(--muted); }
.sv-vs .now span { color: var(--on); }
.sv-vs .now b { font-size: clamp(24px, 2.8vw, 32px); color: var(--ink); text-decoration: none; line-height: 1.05; }
.sv-vs > i { align-self: center; height: 2px; background: var(--ink); position: relative; }
.sv-vs > i::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border: solid var(--ink); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.sv-vs .pl-fit { grid-column: 1 / -1; justify-self: start; font-style: normal; }

.sv-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }
.sv-modes [role="tab"] { display: grid; gap: 2px; padding: 10px 14px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; color: var(--ink-2); cursor: pointer; font: inherit; }
.sv-modes [role="tab"] b { font-size: 15px; font-weight: 800; }
.sv-modes [role="tab"] span { font-size: 13px; color: var(--muted); }
.sv-modes [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; }
.sv-modes [role="tab"][aria-selected="true"] span { color: #c8ccd4; }
.sv-modes [role="tab"]:disabled { opacity: .5; cursor: not-allowed; }
.sv-modes [role="tab"]:focus-visible { outline: 2px solid var(--on); outline-offset: 2px; }

.sv-body { display: grid; gap: var(--s-5); min-width: 0; }
.sv-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3); }
.sv-card { position: relative; display: block; }
.sv-card input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.sv-card-in { display: grid; gap: var(--s-2); height: 100%; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.sv-card:hover .sv-card-in { border-color: var(--ink-2); }
.sv-card input:checked + .sv-card-in { border-color: var(--on); background: var(--on-soft); box-shadow: inset 0 0 0 1px var(--on); }
.sv-card input:focus-visible + .sv-card-in { outline: 2px solid var(--on); outline-offset: 2px; }
.sv-card-top { display: flex; align-items: center; gap: var(--s-2); }
.sv-card-top i { font: 800 13px/1 var(--display); font-style: normal; color: var(--on); }
.sv-card-top b { font-size: 15px; font-weight: 800; }
.sv-card-top .pill { margin-left: auto; }
.sv-card-price { display: grid; }
.sv-card-price b { font-size: 24px; font-weight: 800; line-height: 1.15; }
.sv-card-price small { font-size: 12px; font-weight: 700; color: var(--ok); }
.sv-card-tag { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.sv-card-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; padding-top: var(--s-2); border-top: 1px solid var(--line-2); font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.sv-hint { font-size: 14px; color: var(--warn); font-weight: 600; }
.sv-hint .link { font: inherit; font-weight: 800; padding: 0; border: 0; background: none; color: var(--on); text-decoration: underline; cursor: pointer; }
.sv-lead { display: grid; gap: 4px; padding-left: var(--s-3); border-left: 3px solid var(--on); }
.sv-lead b { font-size: var(--t-lg); font-weight: 800; }
.sv-lead span { font-size: 14px; color: var(--ink-2); }

.sv-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.sv-col { display: grid; gap: var(--s-3); min-width: 0; }
.sv-col h3 { font-size: 13px; font-weight: 700; color: var(--muted); }
.sv-hand { display: grid; gap: var(--s-2); }
.sv-hand li { display: grid; gap: 4px; padding: var(--s-3); border-radius: var(--r); background: var(--paper); }
.sv-hand li div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sv-hand s { font-weight: 800; font-size: 14px; color: var(--muted); text-decoration-thickness: 2px; }
.sv-hand li div::before { content: ""; order: 1; width: 14px; height: 2px; background: var(--ink); }
.sv-hand i { order: 2; font-style: normal; font-size: 12px; font-weight: 800; padding: 3px 7px; border-radius: var(--r-sm); background: var(--line-2); color: var(--ink-2); }
.sv-hand li[data-by="pm"] i { background: var(--prod-pm); color: #fff; }
.sv-hand li[data-by="tycoon"] i { background: var(--prod-tycoon); color: var(--ink); }
.sv-hand li[data-by="later"] i { background: var(--warn-soft); color: var(--warn); }
.sv-hand p { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.sv-none { font-size: 14px; color: var(--muted); }
.sv-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line-2); }

@media (max-width: 860px) {
  .sv-top, .sv-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .sv-bar { grid-template-columns: auto minmax(0, 1fr); padding: var(--s-4); }
  .sv-bar-go { grid-column: 1 / -1; justify-content: space-between; }
  .sv { padding: var(--s-4); box-shadow: 4px 4px 0 var(--ink); }
  .sv-modes [role="tab"] { padding: 10px; }
  .sv-modes [role="tab"] b { font-size: 14px; }
  .sv-vs { grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1.3fr); padding: var(--s-3); }
  .sv-vs b { font-size: 15px; }
  .sv-acts .btn, .est-foot .sv-again { width: 100%; }
}
