.pm-panel { min-width: 0; }
.pm-panel select { color-scheme: dark; }
.pm-panel select option, .pm-panel select optgroup { background-color: #091624; color: #eef4fa; }
.pm-panel select option:checked { background-color: #154361; color: #fff; }
.pm-panel .webshop-inert-filter-row input { cursor: pointer; accent-color: #00c3ff; }
.pm-panel .webshop-inert-filter-row label { cursor: pointer; }
.pm-filter-help { font-size: 10px; color: #b1c2d6; line-height: 1.5; margin: 7px 0; }
.pm-panel h2 { color: #f5c471; font-size: 17px; margin: 18px 0 12px; }
.pm-panel h3 { color: #ecf3ff; font-size: 13px; margin: 10px 0; overflow-wrap: anywhere; }
.pm-note { color: #b1c2d6; font-size: 12px; line-height: 1.6; margin: 10px 0; overflow-wrap: anywhere; }
.pm-review { border-left: 3px solid #e3ae50; background: #342915; color: #ffe2a4; padding: 10px; font-size: 12px; line-height: 1.6; }
.pm-tabs, .pm-pagination { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; align-items: center; }
.pm-button { border: 1px solid #2e7792; border-radius: 4px; color: #dbecfa; background: linear-gradient(#132739,#091624); padding: 10px 12px; font: inherit; font-size: 12px; cursor: pointer; min-height: 40px; }
.pm-button:hover:not(:disabled), .pm-button[aria-pressed="true"] { border-color: #20d9ff; background: #103752; box-shadow: 0 0 9px #00bfff26; }
.pm-button:disabled { color: #9ba9b6; border-color: #45515e; cursor: not-allowed; opacity: .7; }
.pm-button:focus-visible, .pm-panel input:focus-visible, .pm-panel select:focus-visible { outline: 2px solid #ffd079; outline-offset: 3px; }
.pm-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.pm-filters label, .pm-dialog label { font-size: 12px; color: #b1c2d6; display: block; min-width: 0; }
.pm-filters input, .pm-filters select, .pm-dialog input, .pm-dialog select { box-sizing: border-box; width: 100%; margin: 6px 0 0; min-height: 40px; background: #060e19; border: 1px solid #2d5066; border-radius: 4px; color: #eef4fa; padding: 8px; font: inherit; }
.pm-filters input[type="checkbox"] { width: 18px; min-height: 18px; margin-right: 8px; vertical-align: middle; accent-color: #00bfff; }
.pm-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.pm-card { background: #08121fe6; border: 1px solid #284358; border-radius: 5px; padding: 12px; min-width: 0; display: flex; flex-direction: column; }
.pm-card .pm-button { margin-top: auto; width: 100%; }
.pm-item-art { height: 80px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: #92a6b7; background: radial-gradient(ellipse,#143248,#060e18); border: 1px solid #1d4056; border-radius: 4px; }
.pm-item-art small { font-size: 10px; }
.pm-item-art img { max-width: 100%; max-height: 76px; object-fit: contain; }
.pm-item-key { font-size: 21px; color: #b6dded; font-family: Georgia,serif; }
.pm-badge { font-size: 10px; color: #ddbd80; margin: 4px 0 12px; }
.pm-state { color: #d5e8f7; background: #0c2233; border: 1px solid #38647b; padding: 16px; line-height: 1.6; font-size: 13px; margin: 16px 0; overflow-wrap: anywhere; }
.pm-state.pm-error { color: #ffe1b0; background: #302016; border-color: #9f7247; }
.pm-buy-dialog h3 { text-align: center; color: #eee8db; font-size: 14px; }
.pm-buy-dialog .pm-item-art { height: 124px; margin: 8px auto 12px; border: 0; background: transparent; }
.pm-buy-dialog .pm-item-art img { max-height: 120px; max-width: 190px; }
.pm-buy-dialog .pm-item-art[data-art-size="compact"] img { max-height: 78px; max-width: 123.5px; }
.pm-buy-dialog .pm-item-art[data-art-size="book"] img { max-height: 60px; max-width: 95px; }
.pm-buy-dialog .pm-item-art:is([data-art-size="accessory"],[data-art-size="jewel"]) img { max-height: 24px; max-width: 38px; }
.pm-buy-dialog .pm-item-art[data-art-size="consumable"] img { max-height: 36px; max-width: 57px; }
.pm-buy-quote { margin: 12px 0; }
.pm-fixture { background: #342915; border-color: #d8a54f; color: #ffe2a4; }
.pm-vault-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); grid-template-rows: repeat(15,34px); width: 100%; max-width: 380px; margin: 20px auto; background: #01070d; border: 2px solid #5b4522; }
.pm-cell { border: 1px solid #1a2f3d; }
.pm-vault-item { z-index: 1; padding: 3px; font-size: 10px; min-width: 0; min-height: 0; border-color: #b89d53; overflow-wrap: anywhere; background: #102d40; }
.pm-dialog { margin: auto; color: #dce6f0; background: linear-gradient(135deg,#101f30,#040c14); border: 1px solid #a98a46; border-radius: 7px; padding: 20px; width: min(480px,calc(100vw - 60px)); max-height: 80vh; overflow-y: auto; box-shadow: 0 12px 50px #000; }
.pm-dialog::backdrop { background: #000b; }
.pm-dialog h2 { color: #f2c874; font-size: 19px; }
.pm-dialog > .pm-button:first-child { float: right; margin-bottom: 12px; }
.pm-dialog .pm-item-art { clear: both; }
.pm-dialog .pm-button { margin-right: 8px; margin-top: 12px; }
.pm-detail-line { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; border-bottom: 1px solid #203244; padding-bottom: 8px; }
@media(max-width: 420px) { .pm-cards, .pm-filters { grid-template-columns: 1fr; } .pm-tabs .pm-button { flex: 1 1 100%; } .pm-vault-grid { grid-template-rows: repeat(15,30px); } }

/* Owner's existing webshop controls are inherited unchanged from style.css. */
.pm-inline-links { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 5px; font-size: 9px; }
.pm-inline-links a,.pm-text-link { color: #8ba2b9; font: inherit; text-decoration: none; }
.pm-text-link { border: 0; padding: 0; background: none; cursor: pointer; }
.pm-text-link[aria-pressed="true"],.pm-inline-links a:hover { color: #00c3ff; }
.pm-list-pages { justify-content: center; }
.pm-list-pages .pm-button { min-height: 25px; padding: 4px 9px; font-size: 10px; background: transparent; border-color: transparent; }
.pm-list-pages span { font-size: 11px; color: #d7ba77; }
.pm-table-wrap { width: 100%; overflow-x: auto; }
.pm-market-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; table-layout: fixed; }
.pm-market-table th { color: #d7ba77; padding: 8px 6px; background: rgba(8,18,32,.8); border-bottom: 1px solid #24475c; font-weight: 700; }
.pm-market-table th:nth-child(1) { width: 18%; }
.pm-market-table th:nth-child(2) { width: 48%; }
.pm-market-table th:nth-child(3),.pm-market-table th:nth-child(4) { width: 17%; }
.pm-market-table td { padding: 6px; border-bottom: 1px solid #1b3041; color: #a4b3c2; overflow-wrap: anywhere; }
.pm-market-table tr:hover td { background: rgba(0,195,255,.035); }
.pm-item-name { border: 0; padding: 0; background: transparent; color: #eee8db; font: inherit; text-align: left; cursor: pointer; line-height: 1.5; }
.pm-quality-normal { color: #eee8db; }
.pm-quality-upgraded { color: #ffac00; }
.pm-quality-excellent { color: #00ff66; }
.pm-quality-ancient { color: #7b66ff; }
.pm-item-name:hover { text-decoration: underline; }
.pm-reference-badge { display: block; color: #8e8b79; font-size: 8px; }
.pm-item-name:focus-visible,.pm-text-link:focus-visible { outline: 1px solid #00c3ff; outline-offset: 3px; }
.pm-item-tooltip { position: fixed; z-index: 11000; width: min(232px,calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; padding: 5px 10px 7px; color: #dfd6c4; background: rgba(35,20,6,.94); border: 0; box-shadow: none; font: 11px/1.12 Arial,sans-serif; text-align: center; }
/* Narrow-screen placement avoids covering the item-name tap target. */
.pm-item-tooltip { box-sizing: border-box; overflow-wrap: anywhere; overscroll-behavior: contain; }
.pm-filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; color: #b1c2d6; font-size: 10px; }
.pm-filter-actions span { min-width: 0; overflow-wrap: anywhere; }
.pm-reset-filters { flex-shrink: 0; min-height: 32px; padding: 5px 8px; font-size: 10px; }
.pm-list-pages label { color: #d7ba77; font-size: 11px; }
.pm-list-pages select { background: #060e19; color: #dce6f0; border: 1px solid #2d5066; border-radius: 4px; padding: 4px; min-height: 32px; }
.pm-market-table td > .pm-button { display: block; margin-top: 10px; }
@media(max-width: 600px) { .pm-list-pages .pm-button { min-height: 40px; } .pm-item-name { min-height: 32px; } .pm-panel .webshop-inert-filter-row { flex-wrap: wrap; overflow: visible; gap: 6px 10px; } }
.pm-tooltip-title { font-weight: normal; padding: 2px 0; background: transparent; margin-bottom: 7px; }
.pm-item-tooltip .pm-item-art { height: 124px; border: 0; background: transparent; margin: 6px auto 10px; }
.pm-item-tooltip .pm-item-art img { max-height: 120px; max-width: 190px; }
/* Smaller armor parts: 65% of the original tooltip artwork limits.
   Keep the art slot stable and preserve armor/wings sizing. */
.pm-item-tooltip .pm-item-art:is([data-item-group="7"],[data-item-group="9"],[data-item-group="10"],[data-item-group="11"],[data-art-size="compact"]) img { max-height: 78px; max-width: 123.5px; }
.pm-item-tooltip .pm-item-art[data-art-size="book"] img { max-height: 60px; max-width: 95px; }
.pm-item-tooltip .pm-item-art[data-art-size="accessory"] img { max-height: 24px; max-width: 38px; }
.pm-item-tooltip .pm-item-art[data-art-size="jewel"] img { max-height: 24px; max-width: 38px; }
.pm-item-tooltip .pm-item-art[data-art-size="seed"] img { max-height: 96px; max-width: 152px; }
/* All potion, ticket, scroll/parchment and talisman identities: 30% of original. */
.pm-item-tooltip .pm-item-art[data-art-size="consumable"] img { max-height: 36px; max-width: 57px; }
.pm-item-tooltip.pm-wizard-scroll .pm-item-art { height: 72px; }
.pm-item-tooltip .pm-item-key { font-size: 12px; }
.pm-tooltip-line { margin: 0; overflow-wrap: anywhere; }
.pm-tooltip-classes { font-weight: bold; }
.pm-tooltip-classes:first-of-type { margin-top: 8px; }
.pm-tooltip-muted { color: #929d9f; font-size: 10px; margin-top: 8px; }
.pm-tooltip-blue { color: #80b2ff; }
.pm-tooltip-classes + .pm-tooltip-blue,.pm-tooltip-blue + .pm-tooltip-excellent { margin-top: 10px; }
.pm-tooltip-excellent { color: #00ff66; }
.pm-tooltip-set { color: #ffdc00; margin-top: 8px; }
.pm-tooltip-warning { color: #e4b574; margin-top: 7px; }
