.create { letter-spacing: 0.02em; }
.deck-list { gap: 0.7rem; }
.deck-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; border: 2px solid var(--panel-line); border-radius: 1rem; background: var(--panel); box-shadow: 0 2px 0 rgb(58 38 22 / 0.25); text-align: left; }
.deck-row.is-bad { border-style: dashed; }
.deck-main { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; padding: 0.7rem 0.8rem; min-height: 4.5rem; }
.deck-row.strategy { padding: 0.7rem 0.8rem; }
.deck-sym { flex: none; width: 3.4rem; height: 3.4rem; border-radius: 0.8rem; overflow: hidden; border: 2px dashed var(--panel-line); background: #d9c8a4; display: grid; place-items: center; }
.deck-sym img { width: 100%; height: 100%; object-fit: cover; }
.deck-name { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.deck-sub { display: block; font-size: 0.9rem; line-height: 1.3; }
.deck-count { font-family: var(--font-display); font-size: 1.25rem; padding-right: 0.2rem; }
.deck-head { gap: 0.5rem; margin-bottom: 0.1rem; }
.deck-row .bar { margin-top: 0.4rem; }
.ready { padding: 0.15rem 0.8rem; border-radius: 999px; background: var(--green); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 0.9rem; }
.star { flex: none; width: 3rem; height: 3rem; margin-right: 0.4rem; border-radius: 50%; font-size: 1.6rem; color: #b9a07a; }
.star.is-on { color: var(--gold); text-shadow: 0 1px 0 #8a5d0e; }
.star:disabled { opacity: 0.3; }
.slot { padding-block: 0.9rem; }
.strategy-box { width: min(100%, 28rem); }
.strategy-box h3 { font-family: var(--font-display); font-size: 1rem; margin: 0.6rem 0 0.4rem; }
.strategy-box h3.good { color: var(--green-deep); }
.strategy-box h3.bad { color: var(--danger); }
.grid3.mini { gap: 0.8rem 0.5rem; margin-bottom: 0.6rem; }
.strategy-box .stack { margin-top: 0.8rem; }

/* Trình sửa bộ bài: cố định theo chiều cao màn hình, hai vùng cuộn riêng */
.screen.deck-edit { display: flex; flex-direction: column; gap: 0.55rem; background: var(--screen-bg); padding-top: calc(0.6rem + var(--safe-top)); overflow: hidden; }
.edit-top { display: flex; align-items: center; gap: 0.5rem; max-width: 34rem; width: 100%; margin-inline: auto; flex: none; }
.edit-top .back { width: 3rem; height: 3rem; }
.deck-name-input { flex: 1; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.deck-counter { font-size: 1.3rem; padding-inline: 0.9rem; }
.deck-counter.ok { background: var(--green); border-color: var(--green-deep); color: #fff; }
.histo { display: flex; align-items: flex-end; gap: 0.35rem; max-width: 34rem; width: 100%; margin-inline: auto; flex: none; height: 5.2rem; padding: 1.35rem 0.7rem 0.25rem; position: relative; border: 2px solid var(--panel-line); border-radius: 1rem; background: var(--panel); }
.histo-title { position: absolute; left: 0.8rem; top: 0.2rem; font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); }
.histo-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: 0.7rem; font-weight: 800; line-height: 1.1; }
.histo-col i { display: block; width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; background: var(--green); }
.histo-col b { font-size: 0.7rem; }
.edit-body { --split: 0.42; flex: 1; min-height: 0; max-width: 34rem; width: 100%; margin-inline: auto; display: flex; flex-direction: column; }
.zone { position: relative; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem 0.7rem; align-content: start; padding: 1.2rem 0.55rem 0.7rem; border: 2px solid var(--panel-line); border-radius: 1rem; background: var(--panel); overscroll-behavior: contain; }
.zone-in { flex: var(--split) 1 0; border-color: var(--green); }
.zone-label { position: sticky; top: -1rem; grid-column: 1 / -1; justify-self: start; z-index: 3; margin: -1.5rem 0 -0.4rem -0.3rem; padding: 0 0.6rem; border-radius: 0.6rem; background: var(--green); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; }
.zone-label.alt { background: #8d6a43; }
.edit-lower { flex: calc(1 - var(--split)) 1 0; min-height: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.edit-lower .zone { flex: 1; min-height: 0; }
.filter-toggle { min-height: 2.75rem; padding-block: 0.3rem; }
.filters-wrap { max-height: 7.5rem; overflow-y: auto; }
.splitter { flex: none; display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2rem; cursor: row-resize; touch-action: none; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.splitter i { width: 5rem; height: 0.55rem; border-radius: 999px; background: var(--panel-line); }
.edit-foot { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; max-width: 34rem; width: 100%; margin-inline: auto; padding-bottom: calc(0.3rem + var(--safe-bottom)); }
.pick-actions { position: absolute; inset: auto 0 0.3rem 0; z-index: 4; display: flex; gap: 0.3rem; justify-content: center; padding-inline: 0.2rem; }
.pick-actions .btn { min-height: 2.75rem; padding: 0.2rem 0.55rem; font-size: 0.9rem; box-shadow: 0 2px 6px rgb(0 0 0 / 0.4); }
@media (min-aspect-ratio: 4/5) and (min-width: 600px) { .screen.deck-edit { padding-inline: 1rem; } }

.deck-manage { display: flex; gap: 0.5rem; }
.deck-manage .btn { flex: 1; min-height: 2.75rem; }
.deck-pick { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; font: inherit; }
.deck-pick.is-picked { border-color: #d3382a; background: #f9e1db; }
.pick-box-mark { flex: none; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 3px solid var(--panel-line); border-radius: 0.4rem; background: #fff; color: #d3382a; font-weight: 900; }
