/* 載入順序：既有 figs.css → 本檔。只需在 .fg-frame 加上一個 case-*。
   不定義 .t-exc / .t-ult 的邊框或背景，保留正式站的等級框。
   紋理 URL 相對於本 CSS；不依賴外部服務、字型或點陣素材。 */
.fg-frame.case-wood {
  --case-rim: #39291f; --case-panel: #272a2b; --case-slot: #202629;
  --case-silhouette: #7a7b78; --case-line: #b6c0c0;
  background: linear-gradient(90deg, #ffffff12, transparent 13%, #140b0633 91%, #ffffff10), var(--tll-asset-cases-walnut-svg) 0 0 / 280px 480px;
  box-shadow: inset 0 0 0 1px #c39469, inset 0 0 0 3px #4d3021,
    inset 0 0 0 6px #bd8b5f40, inset 0 0 0 9px #27190f90,
    0 3px 3px #0003, 0 16px 28px #0004;
}
.fg-frame.case-metal {
  --case-rim: #0f151b; --case-panel: #20262d; --case-slot: #19232c;
  --case-silhouette: #73818c; --case-line: #b0bfcb;
  background: linear-gradient(120deg, #ffffff16, transparent 26%, #0006 65%, #ffffff09),
    repeating-linear-gradient(0deg, #ffffff05 0 1px, transparent 1px 3px), #323c45;
  box-shadow: inset 0 0 0 1px #8b989e, inset 0 0 0 3px #161d23,
    inset 0 0 0 4px #5e6b73, inset 0 0 0 7px #10171b,
    0 3px 3px #0003, 0 16px 28px #0004;
}
.fg-frame.case-linen {
  --case-rim: #4c5047; --case-panel: #464b47; --case-slot: #252f2c;
  --case-silhouette: #85877b; --case-line: #c0c5b4;
  background: linear-gradient(115deg, #e2ddcd, #a5a796 42%, #c9caba 65%, #9d9e8e);
  box-shadow: inset 0 0 0 1px #f6f2e4, inset 0 0 0 3px #8c8e7d,
    inset 0 0 0 5px #e1ddcd, inset 0 0 0 8px #777c6c,
    0 3px 3px #0002, 0 16px 28px #0003;
}
.fg-frame:is(.case-wood, .case-metal, .case-linen) {
  --ink: #edf1f3; --muted: #b9c4cd;
  position: relative; isolation: isolate; box-sizing: border-box;
  min-width: 0; padding: clamp(11px, 1.5vw, 21px); border-radius: 12px;
}
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-grid {
  position: relative; display: grid;
  grid-template-columns: repeat(var(--fg-cols, 6), minmax(0, 1fr));
  gap: clamp(6px, .75vw, 10px); padding: clamp(7px, .9vw, 12px);
  border-radius: 4px; background: var(--case-panel);
  box-shadow: 0 0 0 2px var(--case-rim), inset 0 3px 12px #0007;
}
.fg-frame.case-wood .fg-grid {
  background: repeating-linear-gradient(90deg, #ffffff02 0 1px, transparent 1px 4px), var(--case-panel);
}
.fg-frame.case-linen .fg-grid { background: var(--tll-asset-cases-linen-svg) repeat; }
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot {
  box-sizing: border-box; min-width: 0; padding: clamp(4px, .5vw, 6px);
  border-radius: 7px; color: var(--ink);
}
/* 僅素框換襯底；等級框仍由原站規則繪製，避免蓋掉彩虹背景。 */
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot:not(.t-exc):not(.t-ult):not(.empty) {
  border: 1px solid #485363; background: var(--case-slot);
}
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot:not(.t-exc):not(.t-ult):not(.on) {
  box-shadow: inset 0 1px 0 #ffffff0a, 0 2px 4px #0003;
}
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot .fg-ph { border-radius: 4px; }
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot:not(.own) .fg-ph {
  background: var(--case-silhouette); isolation: isolate;
}
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot:not(.own) .fg-name { color: var(--muted); }
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-glass {
  position: absolute; inset: clamp(9px, 1.25vw, 17px); border-radius: 5px;
  pointer-events: none; z-index: 3;
  background: linear-gradient(119deg, #ffffff04 0%, #ffffff04 15%, #ffffff0b 15.2%, transparent 27%, transparent 76%, #ffffff04 94%);
  box-shadow: inset 0 1px 0 #ffffff42, inset 1px 0 0 #ffffff12,
    inset 0 -1px 0 #0005;
}
.fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot:focus-visible {
  outline: 2px solid #70d6c4; outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .fg-frame:is(.case-wood, .case-metal, .case-linen) .fg-slot { transition: none; }
}
