/* デッキ編集。左がカード一覧、右がデッキ欄。ドラッグ中はドロップできる場所を光らせる。 */
.dk-page { display: flex; flex-direction: column; height: 100dvh; }
.dk-top { padding: 10px 14px 0; }
.dk-layout { flex: 1; min-height: 0; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 27vw, 420px); gap: 12px; padding: 8px 14px 12px; }
.dk-col { display: flex; flex-direction: column; min-height: 0; gap: 7px; }
.dk-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dk-filters select, .dk-filters input { background: #0f2420; color: var(--chalk); border: 1px solid var(--board-line); border-radius: 8px; padding: 6px 9px; min-height: 36px; }
.dk-filters input { flex: 1; min-width: 110px; }
.dk-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.dk-chip { border: 2px solid transparent; border-radius: 8px; padding: 3px 11px; min-height: 34px; font-size: 13px; font-weight: 700; color: #fff; background: #33424a; opacity: .72; }
.dk-chip:hover { opacity: 1; }
.dk-chip.on { opacity: 1; border-color: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .45); }
.dk-attr { border: 2px solid transparent; border-radius: 8px; background: none; padding: 3px; min-height: 34px; opacity: .72; }
.dk-attr .pc { min-height: 22px; font-size: 12px; }
.dk-attr:hover { opacity: 1; }
.dk-attr.on { opacity: 1; border-color: #fff; }
.dk-tip { font-size: 12px; }

.dk-grid-wrap { position: relative; flex: 1; min-height: 0; display: flex; border-radius: 10px; }
.dk-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 9px; align-content: start; padding: 4px; }
.dk-cell { position: relative; }
.dk-cell .card-hand { width: 100%; height: 178px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dk-count { position: absolute; right: 4px; top: 38px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 9px; font-size: 14px; font-weight: 700; pointer-events: none; box-shadow: 0 2px 5px rgba(0, 0, 0, .5); }
.dk-count[hidden] { display: none; }
.dk-remove-hint { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; background: rgba(160, 40, 50, .35); border: 3px dashed rgba(255, 150, 150, .8); border-radius: 10px; pointer-events: none; }
.dk-cards.remove-ready .dk-remove-hint { display: flex; }
.dk-cards.remove-over .dk-remove-hint { background: rgba(190, 40, 55, .6); }

.dk-deck { background: rgba(0, 0, 0, .25); border: 2px solid var(--board-line); border-radius: 12px; padding: 8px; transition: border-color .12s, box-shadow .12s; }
.dk-deck.drop-ready { border-color: var(--accent); }
.dk-deck.drop-over { box-shadow: 0 0 20px rgba(240, 180, 41, .7); }
.dk-leader { border-radius: 9px; border: 2px dashed var(--board-line); min-height: 58px; flex: none; }
.dk-leader.drop-over { border-color: var(--accent); background: rgba(240, 180, 41, .15); }
.dk-leader-in { display: flex; align-items: center; gap: 9px; width: 100%; padding: 4px; background: none; border: 0; text-align: left; color: var(--chalk); }
.dk-leader-art { position: relative; width: 48px; height: 48px; border-radius: 7px; overflow: hidden; background: #33424a; border: 2px solid var(--accent); flex: none; }
.dk-leader-tx { font-weight: 700; font-size: 15px; }
.dk-leader-tx small { display: block; font-size: 11px; color: var(--accent); }
.dk-leader-empty { display: grid; place-items: center; min-height: 54px; padding: 4px 8px; font-size: 12.5px; color: var(--chalk-dim); text-align: center; }
.dk-stats { display: flex; gap: 8px; flex: none; }
.dk-stats-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dk-meter { font-size: 13px; color: var(--chalk-dim); }
.dk-meter b { font-size: 21px; }
.dk-meter b.bad { color: #ffcfa8; } .dk-meter b.good { color: var(--ok); }
.dk-bar { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 2px; }
.dk-bar i { display: block; height: 100%; background: var(--accent); }
.dk-bar i.good { background: var(--ok); }
.dk-typesum { display: flex; flex-wrap: wrap; gap: 3px; }
.dk-ts { font-size: 11px; font-weight: 700; color: #fff; border-radius: 4px; padding: 0 5px; }
.dk-curve { display: flex; gap: 4px; align-items: flex-end; height: 70px; flex: none; padding: 0 2px; }
.dk-curve-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 24px; height: 100%; font-size: 10.5px; color: var(--chalk-dim); }
.dk-curve-col i { display: block; width: 100%; max-height: 36px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 1px; }
.dk-curve-n { font-weight: 700; color: var(--chalk); }

.dk-list-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.dk-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 2px; }
.dk-line { position: relative; display: flex; align-items: center; gap: 5px; flex: none; min-height: 38px; overflow: hidden; background: #1a3a35; border-radius: 7px; padding: 2px 4px; font-size: 13px; border: 0; border-left: 4px solid var(--c, #666); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dk-line:hover { background: #24493f; }
.dk-line.is-leader { box-shadow: inset 0 0 0 1px var(--accent); }
.dk-line-art { position: absolute; right: 0; top: 0; bottom: 0; width: 55%; opacity: .28; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.dk-line-art .art-img { object-position: 50% 22%; }
.dk-line-type { position: relative; flex: none; font-size: 10px; font-weight: 700; color: #fff; border-radius: 3px; padding: 0 4px; line-height: 1.5; }
.dk-line .nm { position: relative; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: 0; padding: 4px 0; text-align: left; color: inherit; font-weight: 700; cursor: inherit; }
.dk-line .n { position: relative; width: 20px; text-align: center; font-weight: 700; font-size: 15px; }
.dk-line button.step { position: relative; width: 28px; height: 28px; border-radius: 6px; background: #0f2420; border: 1px solid var(--board-line); font-weight: 700; flex: none; cursor: pointer; }
.dk-line .lead { position: relative; font-size: 10.5px; color: var(--accent-ink); background: var(--accent); border-radius: 99px; padding: 0 6px; flex: none; }
.dk-drop-hint { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 10px; font-size: 16px; font-weight: 700; color: var(--accent); background: rgba(10, 25, 21, .72); border: 3px dashed var(--accent); border-radius: 9px; pointer-events: none; }
.dk-deck.drop-ready .dk-drop-hint { display: flex; }
.dk-deck.drop-over .dk-drop-hint { background: rgba(120, 90, 10, .72); color: #fff; }
.dk-tabs { display: none; }

/* カードを大きく見せる */
.dk-layout { grid-template-columns: minmax(0, 1fr) clamp(290px, 23vw, 370px); }
.dk-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; padding: 6px; }
.dk-cell .card-hand { height: 268px; }
.dk-cell .card-hand .art { height: 47%; font-size: 40px; }
.dk-cell .card-hand .tband { font-size: 12.5px; padding: 2px 7px; }
.dk-cell .card-hand .nm { font-size: 16px; padding: 4px 7px 2px; }
.dk-cell .card-hand .sub { font-size: 12.5px; line-height: 1.35; padding: 0 7px; }
.dk-cell .card-hand .mini-stats { font-size: 16px; padding: 0 5px 5px; gap: 2px; }
.dk-cell .card-hand .ki-tag { font-size: 12px; padding: 1px 7px; }
.dk-cell .tok { width: 21px; height: 21px; font-size: 12px; }
.dk-cell .face-skill .tok { width: 15px; height: 15px; font-size: 9px; }
.dk-count { top: 96px; right: auto; left: 6px; padding: 1px 12px; font-size: 16px; color: #fff; box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0, 0, 0, .4); }
.dk-cell.full .card-hand { filter: saturate(.75) brightness(.96); opacity: .82; }

@media (max-width: 820px) {
  .dk-layout { grid-template-columns: minmax(0, 1fr); padding: 8px 10px; }
  .dk-tabs { display: flex; }
  .dk-col.hide { display: none; }
  .dk-tip { display: none; }
  .dk-cell .card-hand { height: 150px; }
  .dk-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .dk-cell .card-hand { height: 224px; }
  .dk-layout { grid-template-columns: minmax(0, 1fr); }
}
