/* つめこめ！持ち出し袋。縦：情報→袋→トレイ／横：袋を左・情報とトレイを右／PC：3列 */
.ts{flex:1;min-width:0;min-height:0;display:grid;gap:6px;grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"info" "bag" "side"}
.ts-info{grid-area:info;display:grid;gap:5px;min-width:0}
.ts-fam{display:flex;align-items:baseline;gap:8px;font-family:var(--t-display);line-height:1.2}
.ts-fam span{font-size:11px;font-weight:700;color:var(--t-sub);white-space:nowrap}
.ts-fam b{font-size:16px;font-weight:900;color:var(--g-ink)}
.ts-need{display:flex;gap:4px;padding:0;list-style:none;min-width:0}
.ts-need li{flex:1 1 0;min-width:0;display:flex;align-items:center;gap:3px;min-height:30px;padding:2px 6px 2px 2px;border-radius:999px;background:var(--t-card);box-shadow:0 0 0 1.500px var(--t-line) inset;font-size:10.500px;line-height:1.15;font-weight:700;color:var(--t-sub)}
.ts-need li i{flex:none;width:24px;height:24px;display:block}
.ts-need li svg{display:block;width:100%;height:100%}
.ts-need li.on{background:var(--g-soft);box-shadow:0 0 0 2px var(--g) inset;color:var(--g-ink)}
.ts-cats{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;padding:0;list-style:none}
.ts-cats li{aspect-ratio:1;max-height:32px;display:grid;place-items:center;justify-self:center;width:100%;max-width:32px;border-radius:9px;background:#EADFC9;transition:background .15s}
.ts-cats i{display:block;width:78%;height:78%;filter:grayscale(1) opacity(.45);transition:filter .15s}
.ts-cats svg{display:block;width:100%;height:100%}
.ts-cats li.on{background:var(--t-yellow)}
.ts-cats li.on i{filter:none}
.ts-w{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px;align-items:center;font-size:11px;font-weight:700;color:var(--t-sub);font-variant-numeric:tabular-nums}
.ts-w b{font-weight:700}
.ts-wbar{height:8px;border-radius:4px;background:#EADFC9;overflow:hidden}
.ts-wbar i{display:block;height:100%;width:0;background:var(--t-teal-2);transition:width .15s}
.ts-w.over{color:#B23A2E}.ts-w.over .ts-wbar i{background:#D2503F}
.ts-bagbox{grid-area:bag;position:relative;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;padding-top:12px}
.ts-strap{position:absolute;left:50%;top:0;width:96px;height:26px;margin-left:-48px;border:6px solid #B85C05;border-bottom:0;border-radius:40px 40px 0 0}
.ts-bag{position:relative;background-color:#FFF8EE;background-image:linear-gradient(rgba(184,92,5,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(184,92,5,.13) 1px,transparent 1px);background-size:var(--cell) var(--cell);border-radius:6px;outline:7px solid var(--t-orange);box-shadow:0 0 0 10px #D66C0B,0 8px 18px 10px rgba(60,40,20,.14)}
.ts-bag:focus-visible{outline-color:var(--t-teal-2)}
.ts-placed{position:absolute;padding:0;border:0;background:transparent;cursor:pointer;touch-action:manipulation}
.ts-placed.ts-in{animation:tsIn .24s cubic-bezier(.2,1.6,.3,1) both}
@keyframes tsIn{from{transform:scale(1.25);opacity:.4}to{transform:none;opacity:1}}
.ts-placed.ts-bad{background:rgba(210,80,63,.22);border-radius:8px}
.ts-art svg,.ts-fly svg{display:block;width:100%;height:100%;filter:drop-shadow(0 1px 0 rgba(0,0,0,.18))}
.ts-ghost{position:absolute;border-radius:8px;pointer-events:none;z-index:2}
.ts-ghost[hidden]{display:none}
.ts-ghost.ok{background:rgba(14,127,134,.28);box-shadow:0 0 0 2.500px var(--t-teal-2) inset}
.ts-ghost.ng{background:rgba(210,80,63,.22);box-shadow:0 0 0 2.500px #D2503F inset}
.ts-fly{position:fixed;left:0;top:0;z-index:70;pointer-events:none;filter:drop-shadow(0 8px 10px rgba(0,0,0,.28))}
.ts-side{grid-area:side;display:grid;gap:5px;min-width:0}
.ts-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-width:0}
.ts-slot{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;justify-items:center;min-width:0;height:96px;padding:3px 3px 2px;border-radius:14px;background:var(--t-card);box-shadow:var(--t-shadow-s)}
.ts-p{position:relative;width:100%;height:100%;min-height:0;padding:0;border:0;background:transparent;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.ts-lab{font-size:10.500px;font-weight:700;line-height:1.2;text-align:center;overflow-wrap:anywhere;max-width:100%}
.ts-toss{position:absolute;right:-3px;top:-3px;width:26px;height:26px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:var(--t-ink);color:#fff;cursor:pointer;z-index:2}
.ts-toss::after{content:'';position:absolute;inset:-8px}
.ts-toss svg{width:12px;height:12px}
.ts-hint{font-size:11px;line-height:1.3;text-align:center;color:var(--t-sub)}
.ts-go{min-height:46px;font-size:16px}
/* 小さいスマホ */
@media (max-width:359px){
  .ts{gap:4px}
  .ts-fam b{font-size:14px}
  .ts-need li{font-size:9.500px;min-height:26px;padding-right:3px}
  .ts-need li i{width:20px;height:20px}
  .ts-cats li{max-width:24px}
  .ts-slot{height:78px}
  .ts-go{min-height:40px;font-size:14px}
  .ts-hint{display:none}
  .ts-strap{width:70px;height:16px;margin-left:-35px;border-width:5px}
  .ts-bagbox{padding-top:12px}
}
/* 背の低い 縦 */
@media (orientation:portrait) and (max-height:700px) and (min-width:360px){
  .ts-slot{height:82px}
  .ts-hint{display:none}
}
/* スマホの 縦：マスを 1辺 44px 以上に（幅 360〜375px、画面の 高さ 550px くらいから）。
   トレイは 袋の 右に 縦に 並べ、出発は 下の 帯に。袋の 取っ手と 説明の 一行は 出さず、縁を 細く する */
@media (orientation:portrait) and (max-width:599px){
  .ts{grid-template-columns:minmax(0,1fr) 58px;grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"info info" "bag tray" "go go";gap:6px}
  .ts-info{gap:3px}
  .ts-fam{line-height:1.15}
  .ts-need li{min-height:28px}
  .ts-cats li{max-width:22px;max-height:22px}
  .ts-w{line-height:1.3}
  .ts-side{display:contents}
  .ts-tray{grid-area:tray;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));gap:6px;min-height:0}
  .ts-slot{height:auto;min-height:0}
  .ts-hint{display:none}
  .ts-go{grid-area:go;min-height:44px;font-size:16px}
  .ts-strap{display:none}
  .ts-bagbox{--ring:12px;--ring-y:12px;padding:6px 0}
  .ts-bag{outline-width:4px;box-shadow:0 0 0 6px #D66C0B,0 5px 10px 5px rgba(60,40,20,.14)}
}
/* スマホ・タブレットの 横：袋を左、残りを右 */
@media (orientation:landscape) and (max-width:1023px),(orientation:landscape) and (max-height:500px){
  .ts{grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"bag info" "bag side";gap:4px 18px}
  .ts-bagbox{padding:14px 8px 8px}
  .ts-strap{display:none}
  .ts-info{gap:3px}
  .ts-fam b{font-size:14px}
  .ts-need li{min-height:24px;font-size:9.500px}
  .ts-need li i{width:18px;height:18px}
  .ts-cats li{max-width:22px}
  .ts-side{align-content:end;gap:4px}
  .ts-slot{height:82px}
  .ts-hint{display:none}
  .ts-go{min-height:38px;font-size:14px}
}
/* PC：3列 */
@media (min-width:1024px) and (min-height:501px){
  .ts{grid-template-columns:300px minmax(0,1fr) 320px;grid-template-rows:minmax(0,1fr);grid-template-areas:"info bag side";gap:24px;align-items:center}
  .ts-info{gap:12px;align-self:center}
  .ts-fam{display:grid;gap:2px}
  .ts-fam span{font-size:13px}
  .ts-fam b{font-size:24px}
  .ts-need{display:grid}
  .ts-need li{min-height:44px;font-size:14px;gap:8px}
  .ts-need li i{width:36px;height:36px}
  .ts-cats{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .ts-cats li{max-width:56px;max-height:56px}
  .ts-w{font-size:13px}
  .ts-bagbox{height:100%}
  .ts-tray{grid-template-columns:1fr;gap:10px}
  .ts-slot{height:136px}
  .ts-lab{font-size:13px}
  .ts-side{gap:10px}
  .ts-hint{font-size:13px}
}
@media (prefers-reduced-motion:reduce){.ts-placed.ts-in{animation:none}}
