/* Quiet ink assets, framed parchment and a complete caption at either edge. */
#world .world-choice{grid-template-rows:minmax(42px,1fr) 25px 28px;gap:7px;padding:8px;touch-action:pan-y;user-select:none;-webkit-user-select:none}
#world .world-choice-scene{position:relative;isolation:isolate;background:radial-gradient(ellipse at 50% 44%,#fefcf5 20%,#eee8d7 100%);box-shadow:inset 0 0 0 3px #fffaf080;border-color:#d9cdb2}
#world .world-choice-scene:before{content:'';position:absolute;z-index:-1;inset:13% 12%;border-top:1px solid #b8af8c48;border-bottom:1px solid #b8af8c48;border-radius:45%;transform:rotate(-9deg)}
#world .world-choice-scene:after{content:'';position:absolute;z-index:-1;left:15%;right:15%;bottom:16%;height:13%;border-radius:50%;background:radial-gradient(ellipse,#7c826e18,transparent 73%)}
#world .choice-pit .world-choice-scene{background:radial-gradient(ellipse at 52% 38%,#fdfaf0,#ede5d1)}
#world .choice-pit .world-choice-scene:before{inset:auto 15% 18%;height:20%;border:1px solid #b2a58a38;border-radius:50%;transform:rotate(0)}
#world .choice-workshop .world-choice-scene:before,#world .choice-forge .world-choice-scene:before{inset:16%;border:1px solid #b8af8c3b;border-radius:5px;transform:rotate(45deg)}
#world .choice-keeper .world-choice-scene:before,#world .choice-guide .world-choice-scene:before{inset:12% 25%;border:1px solid #b8af8c3b;border-radius:48% 48% 6px 6px;transform:none}
#world .world-choice-scene>.world-choice-asset{width:76px;height:76px;max-height:76%;max-width:68%;opacity:.96}
#world .world-choice-footer{display:block;width:100%;height:28px}
#world .world-choice-caption,#world .world-choice[data-world-side="1"] .world-choice-caption{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:28px;padding:4px 20px;border:1px solid #ded3b9;border-radius:8px;background:#f5efdf;font-size:9px;line-height:12px}
#world .world-choice-caption-text{display:block;font-size:9px;line-height:12px;text-align:center;overflow:hidden}
#world .world-choice .world-choice-direction{position:absolute;display:grid;place-items:center;inset:0 4px 0 auto;width:13px;height:100%;opacity:.6}
#world .world-choice[data-world-side="1"] .world-choice-direction{inset:0 auto 0 4px}
#world .world-choice .world-choice-direction>.icon{font-size:11px}
#world .world-choice-caption>b{display:contents;font:inherit;color:inherit;background:none;border:0}
#world .world-panel-heading{touch-action:pan-y;user-select:none;-webkit-user-select:none}
/* The closed action track equals 32 + 6 + 65: drawers only grow upward. */
#battle-root .spell-panel-battle .battle-console{--combat-action-height:103px}
#battle-root .spell-panel-battle .battle-buttons{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;flex:none;height:65px;min-height:65px;max-height:65px;margin:0;padding:0}
#battle-root .spell-panel-battle .skill-swipe-hint{display:grid;place-items:center;top:0;bottom:0;left:auto;right:6px;width:13px;height:auto;margin:0;font-size:13px;font-style:normal;pointer-events:none}
#battle-root .spell-panel-battle .combat-skill-swipe{top:0;bottom:0;height:auto}
/* Potion leads have one large framed bottle; supply sits under the name. */
#battle-root .spell-panel-battle .battle-console{--potion-drawer-height:clamp(190px,26dvh,218px)}
#battle-root .spell-panel-battle .battle-potion-card{grid-template-columns:minmax(0,1fr);grid-template-rows:66px minmax(46px,1fr) 27px;gap:7px;flex:0 0 204px;width:204px;padding:10px;border-radius:12px;text-align:left;background:linear-gradient(145deg,#fffdf5,#f6f0df);box-shadow:inset 0 0 0 2px #fffdf5}
#battle-root .potion-card-lead{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:9px;min-width:0}
#battle-root .potion-card-lead>.potion-card-bottle{display:grid;place-items:center;width:58px;height:64px;padding:4px;border:1px solid #dbceb2;border-radius:10px;background:#faf4e4;box-shadow:inset 0 0 0 2px #fffaf0}
#battle-root .potion-card-lead>.potion-card-bottle>img{display:block;width:49px;height:55px;object-fit:contain}
#battle-root .potion-card-copy{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
#battle-root .potion-card-name{margin:0;font:700 15px/18px Interface,sans-serif;color:#365f51;text-align:left;overflow-wrap:normal;white-space:normal;overflow:visible;text-overflow:clip}
#battle-root .potion-card-stock{position:static;display:block;min-width:0;font-size:9px;line-height:12px;color:#8a876d}
#battle-root .potion-card-effect{align-items:flex-start;gap:1px;border-top:1px solid #ded3b9;padding:5px 2px 0}
#battle-root .potion-card-effect>b{font-size:19px;line-height:22px}
#battle-root .potion-card-effect>span{font-size:10px;line-height:12px}
#battle-root .potion-card-effect>small{font-size:8px;line-height:11px;margin-top:2px}
#battle-root .potion-card-use{display:grid;place-items:center;height:27px;min-height:27px;padding:4px;font-size:10px;line-height:12px;text-align:center;border:1px solid #bdcdb1;border-radius:7px}
#battle-root .battle-potion-card:disabled .potion-card-use{font-size:9px}
/* Inventory cards: one illustration, legible properties and a quiet rarity edge. */
.item-grid{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.item-card.inventory-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:17px 89px minmax(34px,auto) 1fr 23px;align-items:stretch;min-width:0;min-height:244px;height:auto;gap:6px;padding:11px 10px 13px;border:1px solid var(--rarity,#c8bda3);border-radius:13px;background:linear-gradient(145deg,#fffdf5 30%,var(--rarity-bg,#f5efdf));box-shadow:inset 0 0 0 3px #fffcf18c;overflow:hidden;text-align:left}
.inventory-topline{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;font-size:8px;line-height:12px;color:#8b886c}
.inventory-rarity{display:flex;align-items:center;gap:4px;min-width:0;color:var(--rarity,#8a8e77)}
.inventory-rarity>i{display:block;flex:none;width:4px;height:4px;border-radius:50%;background:currentColor}
.inventory-stock{flex:none;font-size:8px;color:#637967;font-variant-numeric:tabular-nums}
.inventory-art{position:relative;display:grid;place-items:center;min-width:0;height:89px;border-radius:8px;background:radial-gradient(ellipse at 50% 58%,#ddd4ba3d,transparent 70%)}
.inventory-art:after{content:'';position:absolute;left:19%;right:19%;bottom:3px;height:1px;background:linear-gradient(90deg,transparent,#b7ac8a55,transparent)}
.inventory-art>img{display:block;max-width:90%;width:98px;height:85px;object-fit:contain;filter:drop-shadow(0 2px 1px #56472a13);pointer-events:none}
.item-card.inventory-card>h3{display:block;margin:0;min-height:34px;font:700 15px/18px Interface,sans-serif!important;color:#345d50;text-wrap:balance;overflow-wrap:normal}
.inventory-properties{display:flex;flex-direction:column;justify-content:flex-start;gap:5px;min-height:27px;padding:3px 0 6px;font-size:10px;line-height:14px;color:#71846b}
.inventory-properties>span{display:flex;align-items:flex-start;gap:5px;min-width:0}
.inventory-properties .icon,.inventory-properties img{display:block;width:12px;height:14px;flex:0 0 12px;font-size:12px;line-height:14px;object-fit:contain;color:#83916d}
.inventory-footer{display:flex;align-items:center;justify-content:space-between;gap:5px;padding-top:6px;border-top:1px solid #c4bca549;font-size:8px;line-height:12px;color:#988b70}
.inventory-footer>small{font:inherit}
.inventory-footer>span{color:#6c836a}
.inventory-card.is-equipped .inventory-footer>span{font-weight:700}
.inventory-condition{position:absolute;left:10px;right:10px;bottom:6px;height:2px;background:#e2dfce;overflow:hidden;border-radius:2px}
.inventory-condition>i{display:block;height:100%;background:#91aa7e}
.inventory-condition.low>i{background:#c8946d}
.item-card.inventory-card.compact{min-height:215px;grid-template-rows:15px 72px minmax(31px,auto) 1fr 21px;padding:9px}
.inventory-card.compact .inventory-art{height:72px}
.inventory-card.compact .inventory-art>img{height:69px}
.inventory-card.compact h3{font-size:13px!important;line-height:16px!important}
/* All owned item sheets share the same stable structure, including potions. */
.modal.item-dossier-modal{padding:17px;border:1px solid #d2c4a8;border-radius:19px;background:radial-gradient(ellipse at 0 0,#fffdf6,transparent 62%),#faf5e7;box-shadow:inset 0 0 0 3px #fffcf3;max-height:calc(100dvh - 34px);overflow-y:auto;scrollbar-width:none}
.modal.item-dossier-modal::-webkit-scrollbar{display:none}
.item-dossier-modal>.modal-header{margin-bottom:17px;padding-bottom:0;border:0;align-items:center}
.item-dossier-modal>.modal-header h2{font:700 22px/27px Interface,sans-serif;color:#547665;text-transform:none;letter-spacing:0}
.item-dossier{display:flex;flex-direction:column;gap:14px;min-width:0}
.item-dossier-heading{display:grid;grid-template-columns:94px minmax(0,1fr);align-items:center;gap:14px;min-width:0}
.item-dossier-art{display:grid;place-items:center;min-width:0;width:94px;height:106px;padding:7px;border:1px solid #d9ccb0;border-radius:12px;background:radial-gradient(ellipse,#fffdf7,#eee7d3);box-shadow:inset 0 0 0 3px #fffaf088}
.item-dossier-art>img{display:block;width:78px;height:90px;object-fit:contain;max-width:100%}
.item-dossier-copy{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.item-dossier-rarity{display:flex;align-items:center;gap:5px;color:var(--rarity,#999379);font-size:10px;line-height:13px}
.item-dossier-rarity>i{width:4px;height:4px;border-radius:50%;background:currentColor}
.item-dossier-copy>h2{margin:0;font:700 22px/25px Interface,sans-serif;color:#356050;text-wrap:balance;overflow-wrap:break-word}
.item-dossier-copy>p{margin:0;font-size:11px;line-height:15px;color:#968970}
.item-dossier-status{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;padding:9px 1px;border-top:1px solid #ded3bd;border-bottom:1px solid #ded3bd;color:#758569;font-size:11px;line-height:15px}
.item-dossier-status>span{display:flex;align-items:center;gap:6px}
.item-dossier-status .icon{font-size:15px}
.item-dossier-status b{font-size:12px;margin-left:3px}
.item-dossier-status>small{font-size:9px;color:#a09072}
.item-dossier .v13-property-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0;padding:0;border:0}
.item-dossier .property-tile{display:flex;align-items:center;gap:8px;min-height:64px;padding:10px 9px;border:1px solid #ded2b7;border-radius:10px;background:#f8f3e3;box-shadow:inset 0 1px #fffdf6}
.item-dossier .property-tile:only-child{grid-column:1/-1}
.item-dossier .property-tile>.icon,.item-dossier .property-tile>.item-category-art{display:block;width:20px;height:22px;flex:0 0 20px;object-fit:contain;font-size:20px;color:#8d9b74}
.item-dossier .property-tile>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.item-dossier .property-tile small{font-size:9px;line-height:12px;color:#968a70}
.item-dossier .property-tile strong{font-size:15px;line-height:19px;color:#4f715d;overflow-wrap:normal}
.item-dossier .v13-item-condition{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:0;padding:10px 11px;border:1px solid #ded2b7;border-radius:9px;background:#faf6e8;font-size:10px}
.item-dossier .v13-item-condition>strong{font-size:10px;color:#8c816a}
.item-dossier .v13-item-condition>.progress{grid-column:1/-1;display:block;width:100%;height:4px;min-height:4px}
.item-dossier .v13-item-story{margin:0;padding:0;border:0}
.item-dossier .v13-item-story>summary{display:flex;align-items:center;justify-content:space-between;padding:1px 0 7px;font-size:11px;color:#8e846d;cursor:pointer}
.item-dossier .v13-item-story p{margin:0;padding:3px 0 0;font-size:12px;line-height:19px;color:#8c846f}
.item-dossier-actions{display:flex;flex-direction:column;gap:9px;border-top:1px solid #ded3bd;padding-top:12px}
.item-dossier-actions .v13-item-actions{margin:0;padding:0;border:0;gap:9px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.item-dossier-actions .primary,.item-dossier-actions .secondary{display:flex;align-items:center;justify-content:center;gap:7px;min-height:43px;margin:0;padding:9px 10px;border-radius:10px;font-size:12px;line-height:16px}
.item-action-art{display:block;width:21px;height:23px;object-fit:contain}
.item-dossier-actions .v13-repair{margin:0}
@media(max-height:730px){#world .world-choice{grid-template-rows:minmax(33px,1fr) 23px 27px;gap:5px}#world .world-choice-scene>.world-choice-asset{width:62px;height:62px;max-height:80%}.modal.item-dossier-modal{padding:14px}.item-dossier{gap:11px}.item-dossier-heading{grid-template-columns:84px minmax(0,1fr);gap:12px}.item-dossier-art{width:84px;height:94px}.item-dossier-art>img{width:70px;height:80px}.item-dossier-copy>h2{font-size:20px;line-height:23px}}
@media(max-width:350px){.item-card.inventory-card{padding:9px 8px 12px;gap:5px;grid-template-rows:16px 78px minmax(32px,auto) 1fr 22px;min-height:229px}.inventory-topline{font-size:7px}.inventory-art{height:78px}.inventory-art>img{height:75px}.item-card.inventory-card>h3{font-size:14px!important;line-height:17px!important}.inventory-properties{font-size:9px;line-height:13px}.item-dossier-heading{grid-template-columns:78px minmax(0,1fr);gap:11px}.item-dossier-art{width:78px;height:90px}.item-dossier-copy>h2{font-size:19px;line-height:22px}}

.item-dossier-copy>h2{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}

#battle-root .spell-panel-battle .potion-card-lead{width:100%;justify-self:stretch;grid-template-columns:58px minmax(0,1fr)}
#battle-root .spell-panel-battle .potion-card-copy{width:100%;justify-self:stretch}
#battle-root .spell-panel-battle .potion-card-copy>.potion-card-name{width:100%;font:700 15px/18px Interface,sans-serif;white-space:normal;overflow-wrap:normal}
#battle-root .spell-panel-battle .potion-card-lead>.potion-card-bottle{max-height:none}
#battle-root .spell-panel-battle .potion-card-lead>.potion-card-bottle>img{max-height:none}
.item-dossier-copy>h2{font-size:20px;line-height:24px;overflow-wrap:break-word}
@media(max-width:350px){.item-dossier-heading{grid-template-columns:68px minmax(0,1fr);gap:10px}.item-dossier-art{width:68px;height:86px}.item-dossier-art>img{width:57px;height:74px}.item-dossier-copy>h2{font-size:17px;line-height:21px}}
