/* 계정 시세 화면 */
/* 위쪽 요약 4칸 + 시세 추정(2칸 몫): 칸 사이 1px 선은 배경색으로 */
.ac-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.ac-cards { display: contents; }
.ac-card { padding: 15px 18px; background: var(--surface); min-width: 0; }
.ac-card .l { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-card .v { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-card .s { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-card.masked .v { color: var(--faint); display: flex; align-items: center; gap: 6px; }
.ac-card.masked .v svg { width: 18px; height: 18px; }
.ac-calc { grid-column: span 2; background: linear-gradient(180deg, var(--accent-soft), transparent 85%), var(--surface); }
.ac-calc .l { color: var(--accent-strong); }
.ac-calc-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.ac-calc-row label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ac-calc-counts { display: inline-flex; gap: 14px; }
.ac-calc-row input { width: 76px; min-height: 34px; padding: 4px 9px; font-size: 15px; font-weight: 650; }
.ac-calc-row input:is(#acCalcMythic, #acCalcAncient) { width: 56px; }
.ac-calc-out { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.ac-calc-out:empty { display: none; }
.ac-calc-out b { font-size: 21px; font-weight: 750; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.ac-calc-out .rng { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ac-calc-out .done { font-size: 13px; font-weight: 650; color: var(--blue); white-space: nowrap; }
.ac-calc-out .na { font-size: 15px; font-weight: 700; color: var(--muted); }
.ac-calc .s { white-space: normal; overflow: visible; margin-top: 4px; line-height: 1.55; color: var(--muted); }
.ac-calc .s .how { display: block; color: var(--faint); }
.ac-calc .s button { background: none; border: 0; padding: 0 2px; color: var(--accent-strong); font-weight: 650; cursor: pointer; font-size: 12px; }
.ac-calc .s button:hover { text-decoration: underline; }

/* 거르기 */
.ac-filters { margin-top: 16px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ac-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.ac-frow label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ac-frow input[type=number] { width: 78px; min-height: 34px; padding: 4px 8px; }
.ac-frow select { width: auto; min-height: 34px; padding: 4px 28px 4px 9px; font-size: 13.5px; }
.ac-frow input[type=search] { flex: 1 1 200px; min-width: 0; min-height: 34px; padding: 5px 10px; font-size: 13.5px; }
.ac-seg { display: inline-flex; gap: 2px; padding: 3px; flex-shrink: 0; border-radius: calc(var(--radius-sm) + 3px); background: var(--surface-2); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ac-seg::-webkit-scrollbar { display: none; }
.ac-seg button { flex: 0 0 auto; min-height: 28px; padding: 0 11px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ac-seg button:hover { color: var(--text); }
.ac-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(24, 22, 16, .08), 0 0 0 1px var(--border); }
[data-theme="dark"] .ac-seg button.on { background: var(--surface-3); box-shadow: none; }
.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; font-size: 13px; font-weight: 550; white-space: nowrap; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.ac-chip:hover { border-color: var(--border-strong); color: var(--text); }
.ac-chip.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; }

/* 방금 팔린 · 시세보다 싼 · 가격 내린 매물 */
.ac-feeds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch; }
.ac-feed { display: flex; flex-direction: column; min-width: 0; }
.ac-feed .card-head h2 { display: inline-flex; align-items: center; gap: 7px; }
.ac-feed .card-head h2 svg { width: 17px; height: 17px; }
.ac-feed-list { display: grid; padding: 4px 0 6px; align-content: start; }
.ac-feed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who price" "pw badge" "note note";
  column-gap: 10px; row-gap: 2px; padding: 10px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); transition: background .1s; }
.ac-feed-row:last-child { border-bottom: 0; }
.ac-feed-row:hover { background: var(--surface-2); color: var(--text); }
.ac-feed-row .who { grid-area: who; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-feed-row .who .sub { color: var(--muted); }
.ac-feed-row .price { grid-area: price; font-weight: 750; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.ac-feed-row .pw { grid-area: pw; font-size: 13px; font-weight: 650; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.ac-feed-row .badge { grid-area: badge; text-align: right; }
.ac-feed-row .note { grid-area: note; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-feed-empty { margin: 0; padding: 28px 16px; text-align: center; font-size: 13px; color: var(--faint); line-height: 1.6; }
.ac-diff { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 0 7px; border-radius: 99px; line-height: 1.75; white-space: nowrap; }
.ac-diff.cheap { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }
.ac-diff.dear { background: color-mix(in srgb, var(--red) 11%, transparent); color: var(--red); }
.ac-diff.cut { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.ac-link { min-height: 28px; background: none; border: 0; padding: 0 8px; border-radius: 6px; color: var(--accent-strong); font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.ac-link:hover { background: var(--accent-soft); }
.ac-groupcard { margin-top: 16px; }
.ac-groupcard .card-head, .ac-listcard .card-head { gap: 10px; flex-wrap: wrap; }

.ac-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.ac-grid > .card { min-width: 0; }
.ac-sub { font-size: 12.5px; font-weight: 400; }
.ac-chart { position: relative; height: 340px; margin: 12px 16px 14px; }

.ac-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ac-table th, .ac-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ac-table th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.ac-table tbody tr:last-child td { border-bottom: 0; }
.ac-table .l { text-align: left; }
.ac-table td.p { font-weight: 750; }
.ac-table td.p.done { color: var(--blue); }
.ac-table td.sub, .ac-table .sub { color: var(--muted); font-weight: 400; }
.ac-table td.empty { text-align: center; color: var(--faint); padding: 32px; white-space: normal; }
.ac-table tr.click { cursor: pointer; }
.ac-table tr.click:hover td { background: var(--surface-2); }
.ac-table tr.sel td { background: var(--accent-soft); }
.ac-table tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.ac-listcard { margin-top: 16px; }
.ac-list { table-layout: fixed; min-width: 1040px; }
.ac-list td.c-per .ac-diff { margin-top: 2px; }
.ac-list td { vertical-align: middle; }
.ac-list td.pw { font-weight: 650; }
.ac-list .ac-title { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.ac-login { font-size: 11.5px; color: var(--faint); font-weight: 400; }
.ac-mcell { white-space: normal !important; line-height: 1.9; }
.ac-m { display: inline-block; margin-right: 3px; font-size: 11.5px; font-weight: 650; padding: 0 6px; border-radius: 5px; background: color-mix(in srgb, var(--violet) 11%, transparent); color: var(--violet); line-height: 1.65; }
.ac-m.tot { background: var(--violet); color: #fff; }
.ac-m.anc { background: color-mix(in srgb, var(--red) 85%, var(--accent)); color: #fff; }
.ac-st { display: inline-block; font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.ac-st.s-trading, .ac-st.s-reserved { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.ac-st.s-cancelling { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.ac-st.s-done { background: var(--surface-2); color: var(--muted); }
.ac-tag { display: inline-block; margin-right: 6px; font-size: 11px; font-weight: 650; padding: 0 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-strong); }
.ac-list a.go { display: inline-flex; padding: 6px; border-radius: var(--radius-sm); color: var(--muted); }
.ac-list a.go:hover { background: var(--accent); color: var(--on-accent); }
.ac-list a.go svg { width: 15px; height: 15px; }
.ac-more { display: flex; justify-content: center; padding: 14px; }
.ac-more:empty { display: none; }
.ac-listcard > .table-wrap:has(+ .ac-more:empty) { border-bottom: 0; }
.ac-foot { margin: 16px 2px 0; font-size: 12.5px; color: var(--faint); line-height: 1.65; }
.ac-hint { color: var(--faint); text-align: center; padding: 64px 20px; font-size: 14px; }

/* 로그인 전 미리보기 */
.ac-preview .ac-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ac-preview-list { position: relative; margin-top: 16px; overflow: hidden; }
.ac-preview-list > .table-wrap { border-bottom: 0; }
.ac-preview-list tr.blurred td { filter: blur(5px); user-select: none; color: var(--muted); }
.ac-preview-list td svg { width: 14px; height: 14px; vertical-align: -2px; }
.ac-unlock { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px;
  background: linear-gradient(to bottom, transparent, var(--surface) 38%); }
.ac-unlock p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.ac-unlock p b { color: var(--text); font-size: 15.5px; }
.ac-unlock-actions { display: flex; gap: 8px; }

/* 콘텐츠 폭(화면 − 왼쪽 메뉴 248px − 여백)에 맞춘다 */
@media (max-width: 1439px) {
  .ac-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ac-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1199px) {
  /* 세 번째 카드는 아래 줄 전체에, 안의 목록은 두 칸으로 */
  .ac-feeds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-feed:nth-child(3) { grid-column: 1 / -1; }
  .ac-feed:nth-child(3) .ac-feed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-feed:nth-child(3) .ac-feed-row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .ac-feed:nth-child(3) .ac-feed-row:nth-child(odd) { border-right: 1px solid var(--border); }
  .ac-feed:nth-child(3) .ac-feed-empty { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .ac-summary, .ac-preview .ac-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-card { padding: 12px 14px; }
  .ac-card .v { font-size: 19px; }
  .ac-filters { padding: 12px; }
  .ac-frow { gap: 8px 10px; }
  .ac-frow > .ac-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .ac-frow > .ac-chips::-webkit-scrollbar { display: none; }
  .ac-chip { min-height: 36px; padding: 0 13px; }
  .ac-seg button { min-height: 32px; }
  .ac-frow select, .ac-frow input[type=number], .ac-frow input[type=search] { min-height: 38px; }
  .ac-frow input[type=search] { flex-basis: 100%; }
  .ac-feeds { grid-template-columns: minmax(0, 1fr); }
  .ac-feed:nth-child(3) .ac-feed-list { grid-template-columns: minmax(0, 1fr); }
  .ac-feed:nth-child(3) .ac-feed-row:nth-child(odd) { border-right: 0; }
  .ac-feed:nth-child(3) .ac-feed-row:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--border); }
  .ac-chart { height: 280px; margin: 10px 8px 10px; }
  .ac-listcard .card-head .ac-seg { width: 100%; }
  .ac-unlock-actions .btn { min-height: 40px; }
}
