.tsuma-db-shell { --db-accent: #70e1c2; }
.tsuma-db-hero { position: relative; overflow: hidden; background: radial-gradient(circle at 82% 20%, rgba(112,225,194,.15), transparent 30%), linear-gradient(135deg, rgba(18,31,54,.96), rgba(10,18,34,.98)); }
.tsuma-db-hero::after { content: "ITEMS / LOOT / QUESTS"; position: absolute; right: 2.2rem; bottom: -.2rem; color: rgba(112,225,194,.055); font: 800 clamp(1.8rem,4vw,4.2rem)/1 monospace; letter-spacing: .08em; pointer-events: none; white-space: nowrap; }
.tsuma-db-hero > * { position: relative; z-index: 1; }
.tsuma-db-hero code { color: #9ff3dc; background: rgba(112,225,194,.1); padding: .12rem .35rem; border-radius: .35rem; }
.tsuma-db-nav { display: flex; gap: .45rem; padding: .45rem; margin: -.15rem 0 1rem; width: max-content; max-width: 100%; overflow-x: auto; border: 1px solid rgba(139,160,198,.16); border-radius: 14px; background: rgba(10,17,30,.72); }
.tsuma-db-workspace { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.tsuma-db-library { position: sticky; top: 1rem; padding: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; min-height: 520px; }
.tsuma-db-library > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.tsuma-db-library h2 { margin: .12rem 0 0; font-size: 1.1rem; }
.tsuma-db-library-list { display: flex; flex-direction: column; gap: .35rem; overflow: auto; padding: .55rem .15rem .15rem; }
.tsuma-db-library-row { width: 100%; border: 1px solid transparent; background: rgba(255,255,255,.025); color: inherit; border-radius: 11px; padding: .72rem; display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: .6rem; align-items: center; text-align: left; transition: .16s ease; }
.tsuma-db-library-row:hover { background: rgba(112,225,194,.07); border-color: rgba(112,225,194,.2); }
.tsuma-db-library-row.selected { background: linear-gradient(90deg, rgba(112,225,194,.15), rgba(112,225,194,.04)); border-color: rgba(112,225,194,.38); box-shadow: inset 3px 0 #70e1c2; }
.tsuma-db-library-row span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.tsuma-db-library-row strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsuma-db-library-row small { color: var(--mud-palette-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsuma-db-library-row b { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.07); font-size: .72rem; }
.tsuma-db-library-mark { color: #70e1c2; font-size: .65rem; }
.tsuma-db-empty { padding: 2rem 1rem; text-align: center; color: var(--mud-palette-text-secondary); }
.tsuma-db-toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .8rem 1rem; margin-bottom: 1rem; position: sticky; top: .5rem; z-index: 5; backdrop-filter: blur(16px); }
.tsuma-db-toolbar > div:first-child { display: flex; flex-direction: column; }
.tsuma-db-toolbar-actions { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.tsuma-db-editor-stack { display: flex; flex-direction: column; gap: 1rem; }
.tsuma-db-section { position: relative; padding: 1.15rem; overflow: hidden; }
.tsuma-db-section::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(112,225,194,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(112,225,194,.04) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(110deg, transparent 15%, #000 100%); }
.tsuma-db-section > * { position: relative; z-index: 1; }
.tsuma-db-section > header { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.tsuma-db-section h3 { margin: 0; font-size: 1.05rem; }
.tsuma-db-section header p { margin: .2rem 0 0; color: var(--mud-palette-text-secondary); font-size: .84rem; }
.tsuma-db-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; align-items: center; }
.tsuma-db-form-grid.tsuma-db-four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tsuma-db-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
.tsuma-db-toggle-grid > div { padding: .8rem; border: 1px solid rgba(139,160,198,.14); border-radius: 12px; background: rgba(255,255,255,.02); }
.tsuma-db-toggle-grid p { color: var(--mud-palette-text-secondary); font-size: .78rem; margin: .45rem 0 0; }
.tsuma-db-reward-list { display: flex; flex-direction: column; gap: .45rem; }
.tsuma-db-reward-row { display: grid; grid-template-columns: minmax(120px,1.1fr) repeat(3,minmax(90px,1fr)); gap: .6rem; align-items: center; padding: .55rem .7rem; border: 1px solid rgba(139,160,198,.12); border-radius: 12px; background: rgba(255,255,255,.018); }
.tsuma-db-reward-row > div:first-child { display: flex; flex-direction: column; }
.tsuma-db-reward-row small { color: var(--mud-palette-text-secondary); }
.tsuma-db-list-editor { margin-top: 1rem; padding: .85rem; border: 1px solid rgba(139,160,198,.14); border-radius: 12px; background: rgba(255,255,255,.018); }
.tsuma-db-list-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.tsuma-db-list-head > div { display: flex; flex-direction: column; }
.tsuma-db-list-head small, .tsuma-db-list-head > span { color: var(--mud-palette-text-secondary); font-size: .78rem; }
.tsuma-db-lookup-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .6rem; align-items: center; }
.tsuma-db-chip-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tsuma-db-native-field { display: flex; flex-direction: column; gap: .4rem; }
.tsuma-db-native-field label { font-size: .82rem; color: var(--mud-palette-text-secondary); }
.tsuma-db-native-field input { color: inherit; color-scheme: dark; background: rgba(4,10,20,.42); border: 1px solid rgba(139,160,198,.3); border-radius: 8px; padding: .8rem; }
.tsuma-db-native-field small { color: var(--mud-palette-text-secondary); }
@media (max-width: 1050px) { .tsuma-db-workspace { grid-template-columns: 1fr; } .tsuma-db-library { position: static; min-height: 0; max-height: 420px; } .tsuma-db-form-grid.tsuma-db-four { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 680px) { .tsuma-db-toolbar { align-items: flex-start; flex-direction: column; position: static; } .tsuma-db-form-grid, .tsuma-db-toggle-grid, .tsuma-db-form-grid.tsuma-db-four { grid-template-columns: 1fr; } .tsuma-db-reward-row { grid-template-columns: 1fr 1fr; } .tsuma-db-reward-row > div:first-child { grid-column: 1 / -1; } }
