/* ============================================================
   LIV — ゲームデータ管理表
   ニューモーフィズム / オリジナルアイコン
   ============================================================ */

:root{
  --bg:          #e7ebf2;
  --sd:          #c3c9d8;   /* 影（暗） */
  --sl:          #ffffff;   /* 影（明） */
  --text:        #5b6684;
  --text-strong: #3c4763;
  --muted:       #96a0b8;
  --accent:      #6d7ee2;
  --island:      #2e9d90;
  --fashion:     #d2578f;
  --danger:      #dd6b6b;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;

  --ease: cubic-bezier(.22,.68,.35,1);
  --dur: .22s;
}

[data-theme="dark"]{
  --bg:          #2b2f39;
  --sd:          #1f222a;
  --sl:          #373d4a;
  --text:        #b3bcd2;
  --text-strong: #dfe5f2;
  --muted:       #7c86a0;
  --accent:      #8e9dfb;
  --island:      #4fc9b8;
  --fashion:     #f193bd;
  --danger:      #f08a8a;
}

*{ box-sizing:border-box; }

[hidden]{ display:none !important; }

html,body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
              "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  letter-spacing:.02em;
  transition:background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.icon-defs{ position:absolute; width:0; height:0; overflow:hidden; }

.ic{
  width:20px; height:20px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* ---------- ニューモーフィズム基礎 ---------- */
.neu-raised{
  background:var(--bg);
  box-shadow:6px 6px 13px var(--sd), -6px -6px 13px var(--sl);
}
.neu-inset{
  background:var(--bg);
  box-shadow:inset 5px 5px 10px var(--sd), inset -5px -5px 10px var(--sl);
}

/* ============================================================
   レイアウト
   ============================================================ */
.app{
  max-width:1360px;
  margin:0 auto;
  padding:26px 26px 34px;
  display:flex;
  flex-direction:column;
  gap:20px;
  min-height:100vh;
}

/* ---------- トップバー ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

.brand{ display:flex; align-items:center; gap:14px; }

.brand-mark{
  width:50px; height:50px;
  border-radius:16px;
  display:grid; place-items:center;
  color:var(--island);
}
.brand-mark .ic{ width:25px; height:25px; stroke-width:1.6; }

.brand-text h1{
  margin:0;
  font-size:17px;
  font-weight:700;
  letter-spacing:.06em;
  color:var(--text-strong);
}
.brand-text p{
  margin:1px 0 0;
  font-size:11.5px;
  color:var(--muted);
  letter-spacing:.08em;
}

.topbar-tools{ display:flex; align-items:center; gap:11px; }

.search{
  display:flex; align-items:center; gap:9px;
  padding:0 15px;
  height:44px;
  border-radius:14px;
  color:var(--muted);
  transition:box-shadow var(--dur) var(--ease);
}
.search:focus-within{ color:var(--accent); }
.search input{
  border:0; outline:0; background:transparent;
  font:inherit; color:var(--text-strong);
  width:210px;
  padding:0;
}
.search input::placeholder{ color:var(--muted); }
.search input::-webkit-search-cancel-button{ appearance:none; }

/* ---------- ボタン ---------- */
.btn-icon{
  width:44px; height:44px;
  border:0; border-radius:14px;
  color:var(--text);
  display:grid; place-items:center;
  cursor:pointer;
  transition:box-shadow var(--dur) var(--ease),
             transform var(--dur) var(--ease),
             color var(--dur) var(--ease);
}
.btn-icon.sm{ width:34px; height:34px; border-radius:11px; }
.btn-icon.sm .ic{ width:17px; height:17px; }

.btn-icon:hover{ color:var(--accent); }
.btn-icon:active{
  box-shadow:inset 4px 4px 8px var(--sd), inset -4px -4px 8px var(--sl);
  transform:scale(.95);
}

.btn{
  border:0;
  border-radius:15px;
  padding:0 20px;
  height:46px;
  display:inline-flex; align-items:center; gap:9px;
  color:var(--text-strong);
  font:inherit; font-weight:600;
  letter-spacing:.05em;
  cursor:pointer;
  transition:box-shadow var(--dur) var(--ease),
             transform var(--dur) var(--ease),
             color var(--dur) var(--ease);
}
.btn:hover{ color:var(--accent); }
.btn:active{
  box-shadow:inset 4px 4px 9px var(--sd), inset -4px -4px 9px var(--sl);
  transform:translateY(1px) scale(.985);
}

.btn-mini{
  border:0; border-radius:10px;
  padding:0 12px; height:32px;
  display:inline-flex; align-items:center; gap:6px;
  color:var(--text-strong);
  font:inherit; font-size:12.5px; font-weight:600;
  cursor:pointer;
  transition:box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-mini .ic{ width:15px; height:15px; }
.btn-mini:active{
  box-shadow:inset 3px 3px 6px var(--sd), inset -3px -3px 6px var(--sl);
  transform:scale(.96);
}

/* テーマ切替のアイコン出し分け */
.ic-dark{ display:none; }
[data-theme="dark"] .ic-light{ display:none; }
[data-theme="dark"] .ic-dark{ display:block; }

/* ============================================================
   表
   ============================================================ */
.board{
  border-radius:var(--r-lg);
  padding:14px;
  flex:1;
  min-height:340px;
  overflow:hidden;
}

.table-scroll{
  height:100%;
  max-height:calc(100vh - 250px);
  overflow:auto;
  padding:2px 4px 8px;
  scrollbar-width:thin;
  scrollbar-color:var(--sd) transparent;
}
.table-scroll::-webkit-scrollbar{ width:11px; height:11px; }
.table-scroll::-webkit-scrollbar-track{ background:transparent; }
.table-scroll::-webkit-scrollbar-thumb{
  background:var(--sd);
  border:3px solid var(--bg);
  border-radius:99px;
}

/* SRの数で表全体が横に伸びないよう、幅は固定側で決める
   （min-width:max-content にすると、SRが増えるほど右の列が画面外に出る） */
.table{ min-width:1124px; }

/* ---------- 見出し ---------- */
.thead{
  display:grid;
  grid-template-columns:var(--tpl);
  gap:10px;
  position:sticky;
  top:0;
  z-index:5;
  background:var(--bg);
  padding:6px 2px 10px;
}

.th{ position:relative; }

.th-btn{
  width:100%;
  height:42px;
  border:0;
  border-radius:13px;
  background:var(--bg);
  box-shadow:4px 4px 9px var(--sd), -4px -4px 9px var(--sl);
  color:var(--text-strong);
  font:inherit; font-weight:700; font-size:12.5px;
  letter-spacing:.09em;
  display:flex; align-items:center; justify-content:space-between;
  gap:6px;
  padding:0 8px 0 14px;
  cursor:pointer;
  transition:box-shadow var(--dur) var(--ease),
             color var(--dur) var(--ease),
             transform var(--dur) var(--ease);
}
.th-btn:hover{ color:var(--accent); }
.th-btn:active{ transform:scale(.985); }

.th-btn .label{
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.th-btn.is-active{
  box-shadow:inset 3px 3px 7px var(--sd), inset -3px -3px 7px var(--sl);
  color:var(--accent);
}

/* 静的な見出し（メモ・操作） */
.th-static{
  height:42px;
  display:flex; align-items:center;
  padding:0 14px;
  font-size:12.5px; font-weight:700;
  letter-spacing:.09em;
  color:var(--muted);
}
.th-static.center{ justify-content:center; padding:0; }

/* 並べ替えインジケータ */
.sort-ic{ width:17px; height:17px; opacity:.42; }
.sort-ic .s-up, .sort-ic .s-dn{ transition:opacity var(--dur) var(--ease); }
.th-btn.is-active .sort-ic{ opacity:1; }
.th-btn[data-dir="asc"] .sort-ic .s-dn{ opacity:.18; }
.th-btn[data-dir="desc"] .sort-ic .s-up{ opacity:.18; }

/* ---------- 本体 ---------- */
.tbody{ display:flex; flex-direction:column; gap:12px; padding-top:2px; }

.tr{
  display:grid;
  grid-template-columns:var(--tpl);
  gap:10px;
  align-items:stretch;
  border-radius:var(--r-md);
  background:var(--bg);
  box-shadow:5px 5px 11px var(--sd), -5px -5px 11px var(--sl);
  padding:9px;
  transition:box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tr:hover{
  box-shadow:7px 7px 16px var(--sd), -7px -7px 16px var(--sl);
  transform:translateY(-1px);
}
.tr.is-new{ animation:pop .38s var(--ease); }
@keyframes pop{
  0%{ opacity:0; transform:translateY(-8px) scale(.985); }
  100%{ opacity:1; transform:none; }
}
.tr.is-out{ animation:vanish .22s var(--ease) forwards; }
@keyframes vanish{
  to{ opacity:0; transform:scale(.97); }
}

.td{ display:flex; align-items:stretch; min-width:0; }
.td-srs{ min-width:0; }

/* セル入力 */
.cell{
  width:100%;
  border:0;
  border-radius:12px;
  background:transparent;
  box-shadow:inset 0 0 0 var(--sd), inset 0 0 0 var(--sl);
  padding:9px 13px;
  font:inherit;
  color:var(--text-strong);
  outline:0;
  resize:none;
  transition:box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.cell::placeholder{ color:var(--muted); opacity:.65; }
.cell:hover{
  box-shadow:inset 2px 2px 5px var(--sd), inset -2px -2px 5px var(--sl);
}
.cell:focus{
  box-shadow:inset 4px 4px 8px var(--sd), inset -4px -4px 8px var(--sl);
  color:var(--accent);
}

.cell-id{ font-weight:700; letter-spacing:.06em; }
.cell-num{ text-align:center; font-variant-numeric:tabular-nums; font-weight:600; }
.cell-memo{
  min-height:40px;
  line-height:1.55;
  overflow:hidden;
}

/* 行削除 */
.row-del{
  width:38px; height:38px;
  margin:auto;
  border:0; border-radius:12px;
  background:var(--bg);
  box-shadow:3px 3px 7px var(--sd), -3px -3px 7px var(--sl);
  color:var(--muted);
  display:grid; place-items:center;
  cursor:pointer;
  transition:color var(--dur) var(--ease),
             box-shadow var(--dur) var(--ease),
             transform var(--dur) var(--ease);
}
.row-del .ic{ width:16px; height:16px; }
.row-del:hover{ color:var(--danger); }
.row-del:active{
  box-shadow:inset 3px 3px 6px var(--sd), inset -3px -3px 6px var(--sl);
  transform:scale(.92);
}

/* ---------- 更新日 ---------- */
.cell-updated{
  display:flex; align-items:center; justify-content:center;
  width:100%;
  padding:9px 6px;
  font-size:12px;
  font-variant-numeric:tabular-nums;
  letter-spacing:.04em;
  color:var(--muted);
}
.cell-updated:empty::before{
  content:"—";
  opacity:.6;
}

/* ---------- 行ごとのSR ---------- */
.srlist{
  display:flex; flex-wrap:wrap; align-items:center; gap:7px;
  width:100%;
  padding:2px 0;
}

.srbox{
  position:relative;
  display:flex; align-items:center;
  min-height:38px;
  padding:4px 4px 4px 9px;
  border-radius:12px;
  background:var(--bg);
  box-shadow:inset 2px 2px 5px var(--sd), inset -2px -2px 5px var(--sl);
  transition:box-shadow var(--dur) var(--ease);
}
.srbox:focus-within{
  box-shadow:inset 4px 4px 8px var(--sd), inset -4px -4px 8px var(--sl);
}

.sr-label{
  flex:none;
  font-size:9.5px; font-weight:700;
  letter-spacing:.1em;
  color:var(--muted);
  padding-right:7px;
}

.sr-input{
  width:88px;
  border:0; background:transparent;
  padding:0;
  margin:0;
  font:inherit; font-size:13.5px; font-weight:600;
  line-height:1.4;
  color:var(--text-strong);
  outline:0;
  resize:none;
  overflow:hidden;
  box-shadow:none !important;
}
.sr-input::placeholder{ color:var(--muted); opacity:.6; }

.sr-del{
  flex:none;
  width:22px; height:22px;
  border:0; border-radius:8px;
  background:transparent;
  color:var(--muted);
  display:grid; place-items:center;
  cursor:pointer;
  opacity:.45;
  transition:opacity var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sr-del .ic{ width:11px; height:11px; stroke-width:2.3; }
.sr-del:hover{ opacity:1; color:var(--danger); }
.sr-del:active{ transform:scale(.9); }

.sr-add{
  flex:none;
  width:38px; height:38px;
  border:0; border-radius:12px;
  background:var(--bg);
  box-shadow:3px 3px 7px var(--sd), -3px -3px 7px var(--sl);
  color:var(--muted);
  display:grid; place-items:center;
  cursor:pointer;
  transition:box-shadow var(--dur) var(--ease),
             color var(--dur) var(--ease),
             transform var(--dur) var(--ease);
}
.sr-add .ic{ width:16px; height:16px; stroke-width:2.1; }
.sr-add:hover{ color:var(--accent); transform:translateY(-1px); }
.sr-add:active{
  box-shadow:inset 3px 3px 6px var(--sd), inset -3px -3px 6px var(--sl);
  transform:scale(.94);
}

/* ---------- タグセル ---------- */
.tagcell{
  width:100%;
  border:0;
  border-radius:12px;
  background:transparent;
  min-height:40px;
  padding:6px 8px;
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  cursor:pointer;
  text-align:left;
  transition:box-shadow var(--dur) var(--ease);
}
.tagcell:hover{ box-shadow:inset 2px 2px 5px var(--sd), inset -2px -2px 5px var(--sl); }
.tagcell.is-open{ box-shadow:inset 4px 4px 8px var(--sd), inset -4px -4px 8px var(--sl); }

.tag{
  display:inline-flex; align-items:center; gap:5px;
  height:26px;
  padding:0 10px 0 8px;
  border-radius:9px;
  background:var(--bg);
  box-shadow:2px 2px 5px var(--sd), -2px -2px 5px var(--sl);
  font-size:11.5px; font-weight:600;
  letter-spacing:.04em;
  color:var(--text-strong);
  white-space:nowrap;
  max-width:100%;
}
.tag .ic{ width:13px; height:13px; stroke-width:1.9; }
.tag .t-label{ overflow:hidden; text-overflow:ellipsis; }
.tag[data-cat="island"] .ic{ color:var(--island); }
.tag[data-cat="fashion"] .ic{ color:var(--fashion); }

.tag-empty{
  display:inline-flex; align-items:center; gap:6px;
  color:var(--muted);
  font-size:12px;
  padding-left:5px;
  opacity:.8;
}
.tag-empty .ic{ width:15px; height:15px; }

/* ---------- 空表示 ---------- */
.empty{
  display:flex; flex-direction:column; align-items:center; gap:10px;
  padding:70px 0;
  color:var(--muted);
}
.empty .ic{ width:34px; height:34px; opacity:.55; }
.empty p{ margin:0; font-size:13px; letter-spacing:.08em; }

/* ---------- 操作バー ---------- */
.actionbar{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.hint{
  margin-left:auto;
  font-size:11.5px;
  color:var(--muted);
  letter-spacing:.05em;
}

/* ---------- 警告バナー ---------- */
.banner{
  display:flex; align-items:flex-start; gap:11px;
  padding:14px 17px;
  border-radius:var(--r-md);
  color:var(--danger);
}
.banner .ic{ width:17px; height:17px; margin-top:2px; stroke-width:2.2; }
.banner p{
  margin:0;
  font-size:12.5px;
  line-height:1.65;
  letter-spacing:.03em;
}

/* ---------- 並べ替えバー（スマホのみ表示） ---------- */
.sortbar{ display:none; }

.sort-chip{
  flex:none;
  height:40px;
  padding:0 9px 0 15px;
  border:0; border-radius:13px;
  background:var(--bg);
  box-shadow:4px 4px 9px var(--sd), -4px -4px 9px var(--sl);
  color:var(--text-strong);
  font:inherit; font-size:12.5px; font-weight:700;
  letter-spacing:.07em;
  display:inline-flex; align-items:center; gap:3px;
  cursor:pointer;
  transition:box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sort-chip:active{ transform:scale(.97); }
.sort-chip.is-active{
  box-shadow:inset 3px 3px 7px var(--sd), inset -3px -3px 7px var(--sl);
  color:var(--accent);
}
.sort-chip.is-active .sort-ic{ opacity:1; }
.sort-chip[data-dir="asc"]  .sort-ic .s-dn{ opacity:.18; }
.sort-chip[data-dir="desc"] .sort-ic .s-up{ opacity:.18; }

/* ============================================================
   タグ ポップオーバー
   ============================================================ */
.pop-backdrop{
  position:fixed; inset:0;
  z-index:55;
  background:rgba(22,26,36,.3);
  animation:fadeIn .2s var(--ease);
}
[data-theme="dark"] .pop-backdrop{ background:rgba(0,0,0,.5); }
@keyframes fadeIn{ from{ opacity:0; } }

.sheet-handle{ display:none; }

.popover{
  position:fixed;
  z-index:60;
  width:322px;
  border-radius:var(--r-lg);
  padding:14px;
  transform-origin:top left;
  animation:popIn .2s var(--ease);
}
@keyframes popIn{
  from{ opacity:0; transform:translateY(-6px) scale(.97); }
}

.pop-head{
  display:flex; align-items:center; gap:9px;
  margin-bottom:13px;
}
.pop-title{
  flex:1;
  font-size:12.5px; font-weight:700;
  letter-spacing:.09em;
  color:var(--muted);
  padding-left:4px;
}

/* 2択のタグ選択 */
.pop-options{ display:flex; flex-direction:column; gap:10px; }

.opt{
  height:54px;
  padding:0 18px;
  border:0; border-radius:15px;
  background:var(--bg);
  box-shadow:4px 4px 9px var(--sd), -4px -4px 9px var(--sl);
  color:var(--text-strong);
  font:inherit; font-size:14px; font-weight:600;
  letter-spacing:.05em;
  display:flex; align-items:center; gap:12px;
  cursor:pointer;
  transition:box-shadow var(--dur) var(--ease),
             color var(--dur) var(--ease),
             transform var(--dur) var(--ease);
}
.opt .ic{ width:21px; height:21px; color:var(--muted); transition:color var(--dur) var(--ease); }
.opt[data-cat="island"] .ic{ color:var(--island); }
.opt[data-cat="fashion"] .ic{ color:var(--fashion); }
.opt:hover{ transform:translateY(-1px); }
.opt:active{ transform:scale(.985); }

.opt.is-on{
  box-shadow:inset 4px 4px 8px var(--sd), inset -4px -4px 8px var(--sl);
  transform:none;
}
.opt[data-cat="island"].is-on{ color:var(--island); }
.opt[data-cat="fashion"].is-on{ color:var(--fashion); }

.opt-none{
  height:46px;
  font-size:12.5px;
  color:var(--muted);
}
.opt-none .ic{ width:17px; height:17px; stroke-width:2.2; }
.opt-none.is-on{ color:var(--text); }

/* ============================================================
   トースト
   ============================================================ */
.toast{
  position:fixed;
  left:50%; bottom:26px;
  transform:translateX(-50%);
  z-index:80;
  display:flex; align-items:center; gap:14px;
  padding:11px 13px 11px 20px;
  border-radius:16px;
  font-size:13px;
  color:var(--text-strong);
  animation:toastIn .26s var(--ease);
}
@keyframes toastIn{
  from{ opacity:0; transform:translate(-50%, 14px); }
}

/* ============================================================
   レスポンシブ
   ============================================================ */
/* タッチ端末では「押しっぱなしのホバー」を無効化 */
@media (hover:none){
  .tr:hover{
    transform:none;
    box-shadow:5px 5px 11px var(--sd), -5px -5px 11px var(--sl);
  }
  .cell:hover{ box-shadow:none; }
  .opt:hover{ transform:none; }
  .sr-add:hover{ transform:none; }
}

/* ---------- スマートフォン：表 → カード表示 ---------- */
@media (max-width:720px){
  body{ -webkit-tap-highlight-color:transparent; }

  .app{ padding:14px 12px 22px; gap:14px; min-height:100dvh; }

  .topbar{ gap:12px; }
  .brand-mark{ width:44px; height:44px; border-radius:14px; }
  .brand-mark .ic{ width:22px; height:22px; }
  .brand-text h1{ font-size:15px; }

  .topbar-tools{ width:100%; }
  .search{ flex:1; height:46px; }
  .search input{ width:100%; font-size:16px; }   /* iOSの自動ズーム防止 */
  .btn-icon{ width:46px; height:46px; }

  /* 並べ替えバー */
  .sortbar{
    display:flex;
    gap:9px;
    overflow-x:auto;
    padding:3px 2px 7px;
    margin:-4px 0 -6px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .sortbar::-webkit-scrollbar{ display:none; }

  /* 表本体 */
  .board{ padding:10px; border-radius:18px; }
  .table-scroll{ max-height:none; overflow:visible; padding:0; }
  .table{ min-width:0; }
  .thead{ display:none; }
  .tbody{ gap:13px; padding-top:0; }

  .tr{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    padding:13px;
    border-radius:18px;
  }

  .td-id  { order:1; flex:1 1 110px; min-width:0; }
  .td-gp  { order:2; flex:0 0 auto; flex-direction:row; align-items:center; gap:7px;
            height:44px; padding:0 8px 0 12px;
            border-radius:12px;
            box-shadow:inset 2px 2px 5px var(--sd), inset -2px -2px 5px var(--sl); }
  .td-del { order:3; flex:0 0 44px; }
  .td-srs { order:4; flex:1 1 100%; }
  .td-memo{ order:5; flex:1 1 100%; }
  .td-tags{ order:6; flex:1 1 100%; }
  .td-updated{ order:7; flex:1 1 100%; align-items:center; gap:7px; padding:2px 4px 0; }
  .td-updated::before{
    content:attr(data-label);
    flex:none;
    white-space:nowrap;
    font-size:10px; font-weight:700;
    letter-spacing:.1em;
    color:var(--muted);
  }
  .cell-updated{ justify-content:flex-start; padding:0; font-size:12px; }

  .srlist{ gap:8px; }
  .srbox{
    flex:1 1 100%;          /* 1行に1つ。横幅いっぱいに広げる */
    min-height:42px;
    padding:5px 4px 5px 11px;
  }
  .sr-label{ font-size:9.5px; padding-right:8px; }
  .sr-input{
    flex:1;
    width:auto; min-width:0;
    font-size:13.5px;       /* 小さめにして表示できる文字数を増やす */
  }
  .sr-del{ opacity:1; width:28px; height:28px; }
  .sr-add{ width:44px; height:44px; }

  .td-gp::before{
    content:attr(data-label);
    flex:none;
    white-space:nowrap;
    font-size:9.5px; font-weight:700;
    letter-spacing:.1em;
    color:var(--muted);
  }
  .td-gp .cell-gp{
    width:58px;
    padding:0;
    box-shadow:none !important;
  }

  /* 入力欄はタップできると分かるよう常時わずかに凹ませる */
  .cell{ font-size:16px; }
  .cell-id{ padding:11px 14px; }
  .cell-num, .cell-memo{
    box-shadow:inset 2px 2px 5px var(--sd), inset -2px -2px 5px var(--sl);
  }
  .cell-num{ padding:9px 4px; border-radius:11px; }
  .cell-memo{ padding:10px 13px; }

  .tagcell{
    min-height:48px;
    padding:8px 10px;
    box-shadow:inset 2px 2px 5px var(--sd), inset -2px -2px 5px var(--sl);
  }
  .tag{ height:29px; font-size:12px; }

  .row-del{ width:44px; height:44px; }

  /* 操作バー */
  .actionbar{ gap:10px; }
  .actionbar .btn{ flex:1; justify-content:center; height:50px; }
  .hint{ display:none; }

  /* タグ選択はボトムシートに */
  .popover.is-sheet{
    left:0 !important;
    right:0;
    top:auto !important;
    bottom:0;
    width:auto;
    border-radius:26px 26px 0 0;
    padding:8px 16px calc(18px + env(safe-area-inset-bottom));
    animation:sheetIn .28s var(--ease);
  }
  @keyframes sheetIn{ from{ transform:translateY(100%); } }

  .popover.is-sheet .sheet-handle{
    display:block;
    width:42px; height:5px;
    margin:4px auto 13px;
    border-radius:99px;
    background:var(--sd);
  }

  .popover.is-sheet .pop-options{ gap:12px; padding-bottom:4px; }
  .popover.is-sheet .opt{ height:60px; font-size:15px; }
  .popover.is-sheet .opt-none{ height:52px; font-size:13px; }
  .popover.is-sheet .btn-icon.sm{ width:40px; height:40px; }

  .toast{ left:12px; right:12px; bottom:14px; transform:none; }
  @keyframes toastIn{ from{ opacity:0; transform:translateY(14px); } }
}

/* ---------- 小型端末 ---------- */
@media (max-width:380px){
  .td-gp .cell-gp{ width:50px; }
  .brand-text h1{ font-size:14px; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition-duration:.01ms !important; }
}
