/* A single compact inventory record, with no repeated purpose or ownership lines. */
#bag .inventory-list{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}
.item-card.inventory-entry{display:grid;grid-template-columns:69px minmax(0,1fr);position:relative;align-items:center;gap:12px;min-width:0;width:100%;height:auto;min-height:99px;margin:0;padding:11px;border:1px solid var(--rarity,#c9bda3);border-radius:12px;background:linear-gradient(110deg,#fffdf5 55%,var(--rarity-bg,#f1eddf));box-shadow:inset 0 0 0 3px #fffaf055;text-align:left;overflow:hidden}
.entry-art{display:grid;place-items:center;width:69px;height:74px;padding:5px;border:1px solid #d4c9ad80;border-radius:9px;background:radial-gradient(ellipse,#f9f5e6,#ede7d65c);box-shadow:inset 0 1px #fffdf5}
.entry-art>img{display:block;width:59px;height:64px;max-width:100%;object-fit:contain;filter:drop-shadow(0 2px 1px #52442313);pointer-events:none}
.entry-copy{display:flex;flex-direction:column;gap:6px;min-width:0}
.entry-meta{display:flex;align-items:center;gap:7px;padding-right:30px;flex-wrap:wrap;font-size:8px;line-height:11px;color:#9a8d71}
.entry-meta>span{color:var(--rarity,#8c8b73)}
.entry-meta>span:before{content:'';display:inline-block;width:3px;height:3px;margin:0 4px 2px 0;border-radius:50%;background:currentColor}
.entry-meta>small{font-size:8px;line-height:11px;color:#9a8d71}
.entry-copy>strong{margin:0;min-width:0;font:700 17px/20px Interface,sans-serif;color:#365f50;overflow-wrap:break-word}
.entry-copy>strong>em{font:700 12px/16px Interface,sans-serif;color:#9a7d46;font-style:normal;white-space:nowrap}
.entry-facts{display:flex;align-items:center;flex-wrap:wrap;column-gap:11px;row-gap:4px;margin-top:1px;color:#72876a;font-size:10px;line-height:14px}
.entry-facts>span{display:inline-flex;align-items:center;gap:5px;min-width:0}
.entry-facts .icon,.entry-facts img{display:block;width:12px;height:13px;font-size:12px;line-height:13px;object-fit:contain;color:#8b9975}
.entry-quantity{position:absolute;right:11px;top:11px;font-size:10px;line-height:13px;font-weight:700;color:#71816a}
.entry-condition{display:grid;grid-template-columns:1fr auto;gap:4px 8px;margin-top:1px;color:#8e957a;font-size:8px;line-height:11px}
.entry-condition>small{font-size:8px;line-height:11px}
.entry-condition>i{grid-column:1/-1;display:block;height:2px;border-radius:3px;background:#dddcc9;overflow:hidden}
.entry-condition>i>b{display:block;height:100%;background:#97ae83}
.inventory-entry.is-equipped .entry-condition>span{color:#648563;font-weight:700}
.item-card.inventory-entry.compact{grid-template-columns:44px minmax(0,1fr);gap:8px;padding:9px;min-height:104px;align-items:start}
.inventory-entry.compact .entry-art{width:44px;height:52px;padding:3px;margin-top:16px}
.inventory-entry.compact .entry-art>img{width:38px;height:46px}
.inventory-entry.compact .entry-copy>strong{font-size:13px;line-height:16px}
.inventory-entry.compact .entry-meta{gap:2px;padding-right:12px;font-size:7px;line-height:10px}
.inventory-entry.compact .entry-meta>small{font-size:7px;line-height:10px}
.inventory-entry.compact .entry-quantity{right:7px;top:7px;font-size:9px}
.inventory-entry.compact .entry-facts{font-size:8px;line-height:11px;gap:4px}
#bag>.hint{margin:13px 5px;color:#a29376;font-size:10px;line-height:16px}
/* The large sheet is a display, a title and useful properties. Materials need no filler. */
.modal.item-sheet-modal{width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 38px);padding:16px;border:1px solid #d2c6ab;border-radius:20px;background:#fcf8ec;box-shadow:inset 0 0 0 3px #fffdf5;overflow-y:auto;scrollbar-width:none}
.modal.item-sheet-modal::-webkit-scrollbar{display:none}
.item-sheet-modal>.modal-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px;padding:0;border:0}
.item-sheet-modal>.modal-header>h2{font:700 20px/25px Interface,sans-serif;text-transform:none;color:#69816b}
.item-sheet{display:flex;flex-direction:column;gap:13px;min-width:0}
.item-sheet-display{display:grid;place-items:center;position:relative;height:150px;padding:25px 12px 8px;border:1px solid #e0d6bf;border-radius:13px;background:radial-gradient(ellipse at 50% 72%,#e5ddc345,transparent 65%),#f7f2e4;box-shadow:inset 0 0 0 3px #fffbef}
.item-sheet-display>img{display:block;width:126px;height:118px;max-height:100%;object-fit:contain;filter:drop-shadow(0 3px 2px #62523719);pointer-events:none}
.item-sheet-grade,.item-sheet-category{position:absolute;top:10px;font-size:9px;line-height:13px;color:#9d8e72}
.item-sheet-grade{left:11px;color:var(--rarity,#9b967b)}
.item-sheet-grade:before{content:'';display:inline-block;width:4px;height:4px;margin-right:4px;border-radius:50%;background:currentColor;vertical-align:1px}
.item-sheet-category{right:11px;text-align:right;max-width:48%}
.item-sheet-title{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;text-align:center}
.item-sheet-title>h2{font:700 25px/28px Interface,sans-serif;color:#375f4e;margin:0;max-width:100%;text-wrap:balance;overflow-wrap:break-word}
.item-sheet-title>p{margin:0;font-size:11px;line-height:15px;color:#8e8b71}
.item-sheet-title>p>b{margin-left:5px;color:#648267;font-size:12px}
.item-sheet-properties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-top:1px solid #dfd5bc;border-bottom:1px solid #dfd5bc;padding:3px 0}
.item-sheet-properties>.property-tile{display:flex;align-items:center;gap:9px;min-height:58px;padding:9px 7px;border:0;border-radius:0;background:none;box-shadow:none}
.item-sheet-properties>.property-tile:only-child{grid-column:1/-1;justify-content:center}
.item-sheet-properties>.property-tile>.icon{font-size:18px;color:#91a078;flex:none;width:19px}
.item-sheet-properties>.property-tile>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.item-sheet-properties .property-tile small{font-size:9px;line-height:12px;color:#9b8d73}
.item-sheet-properties .property-tile strong{font-size:17px;line-height:21px;color:#5a7b5e}
.item-sheet-condition{display:grid;grid-template-columns:1fr auto;gap:7px;margin:0 3px;color:#958970;font-size:10px;line-height:13px}
.item-sheet-condition>b{font-size:10px;font-weight:500;color:#879575}
.item-sheet-condition>i{grid-column:1/-1;height:4px;background:#e4e1cd;border-radius:3px;overflow:hidden}
.item-sheet-condition>i>em{display:block;height:100%;background:#9bb386}
.item-sheet-broken{font-size:11px;line-height:16px;color:#b8876a;margin:0}
.item-sheet-description{margin:0;padding:1px 3px 5px;font-size:12px;line-height:19px;text-align:left;color:#91836c}
.item-sheet-footer{display:flex;flex-direction:column;gap:8px;padding-top:11px;border-top:1px solid #dfd5bc}
.item-sheet-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
.item-sheet-footer .primary,.item-sheet-footer .secondary{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:42px;padding:9px 8px;margin:0;border-radius:10px;font-size:12px;line-height:16px}
.item-sheet-footer .item-action-art{display:block;width:20px;height:22px;object-fit:contain}
/* Totals and percentages occupy the middle of each battle potion card. */
#battle-root .spell-panel-battle .potion-card-effect{width:100%;align-items:center;justify-content:center;text-align:center;padding:6px 3px 0}
#battle-root .spell-panel-battle .potion-card-effect>b{font-size:20px;line-height:23px}
#battle-root .spell-panel-battle .potion-card-effect>span,#battle-root .spell-panel-battle .potion-card-effect>small{text-align:center}
/* Preserve the layout height during a transition; only the paper and content move. */
#battle-root .spell-panel-battle>.battle-console.drawer-layered{background:transparent!important;box-shadow:none!important;border-color:transparent;isolation:isolate}
.combat-console-paper{position:absolute;inset:-1px;z-index:-1;border:1px solid #d8d8bf;border-radius:inherit;background:#fbfaef;box-shadow:0 -3px 10px #2c432416;transform-origin:50% 100%;pointer-events:none}
#battle-root .spell-panel-battle .combat-drawer{transition:none!important}
#battle-root .spell-panel-battle .combat-player{z-index:3}
#battle-root .spell-panel-battle .battle-log>.battle-log-toggle{position:relative;z-index:3}
#battle-root .spell-panel-battle .drawer-animating .combat-console-paper,#battle-root .spell-panel-battle .drawer-animating .combat-player,#battle-root .spell-panel-battle .drawer-animating .battle-log-toggle,#battle-root .spell-panel-battle .drawer-animating [data-drawer-pane]{will-change:transform,opacity;backface-visibility:hidden}
#battle-root .spell-panel-battle .battle-buttons{position:relative;z-index:4}
/* One painted eye is played by the native video decoder. */
.location-eye{position:relative;display:block;flex:1 1 50px;width:112px;height:100%;max-height:116px;min-height:30px;margin:0;overflow:hidden}
.location-eye>video,.location-eye>img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border:0;background:#f8f4e8;pointer-events:none}
.location-eye>video{opacity:0}
.location-eye.is-playing>video{opacity:1}
.location-eye.is-playing>img{opacity:0}
.world-npc-card>strong{font:700 18px/23px Interface,sans-serif}
@media(min-width:700px){#bag .inventory-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:350px){.item-card.inventory-entry{grid-template-columns:59px minmax(0,1fr);gap:9px;padding:9px}.entry-art{width:59px;height:66px}.entry-art>img{width:50px;height:58px}.entry-copy>strong{font-size:16px;line-height:19px}.entry-meta{gap:4px}.entry-facts{font-size:9px;line-height:13px}.modal.item-sheet-modal{padding:13px}.item-sheet-display{height:137px}.item-sheet-title>h2{font-size:23px;line-height:26px}}
@media(max-height:700px){.item-sheet{gap:10px}.item-sheet-display{height:125px}.item-sheet-display>img{height:99px}.item-sheet-title>h2{font-size:22px;line-height:25px}}

#bag .inventory-list{grid-auto-rows:auto;align-content:start}
.item-grid .item-card.inventory-entry:not(.compact){min-height:99px;aspect-ratio:auto;grid-template-rows:auto}
.victory-loot .item-card.inventory-entry.compact,.slot-choice .item-card.inventory-entry{height:auto;grid-template-rows:auto;min-height:104px!important;aspect-ratio:auto}

.item-sheet-footer .primary,.item-sheet-footer .secondary{clip-path:none}
.item-sheet-footer .primary>.item-action-art{filter:brightness(0) invert(.92) sepia(.25)}
