/* Saved teams and exact-form bookmarks use the same quiet battle-tool palette. */
.detail-actions{display:flex;align-items:center;gap:8px;min-width:0}
.bookmark-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:35px;padding:7px 11px;border:1px solid #48513e;border-radius:5px;background:#22271e;color:#b9c4aa;font-size:10px;white-space:nowrap}
.bookmark-toggle .icon{width:15px;height:15px;fill:none}
.bookmark-toggle[aria-pressed="true"]{border-color:#a28b58;color:#ead3a0;background:#302c21}
.bookmark-toggle[aria-pressed="true"] .icon{fill:currentColor;stroke:#302c21}
.bookmark-toggle:hover{border-color:#afba9b;color:#eef2e5}
body.bookmarks-mode main>.hero,body.bookmarks-mode main>.search-section,body.bookmarks-mode main>.detail-section,body.bookmarks-mode main>.dex-section,body.bookmarks-mode main>.history-section{display:none}
.bookmarks-section{padding:34px 0 40px;min-height:55vh}
.bookmarks-section h1{margin:0;font-size:24px;line-height:1.4;letter-spacing:-.4px}
.bookmarks-section .section-title-group>.icon{color:#c8b580;width:19px;height:19px}
.bookmarks-description{font-size:12px;line-height:1.8;color:#a2ab97;margin:0 0 22px}
.bookmarks-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.bookmark-card{min-width:0;border:1px solid #424939;border-radius:7px;background:#22271f;overflow:hidden}
.bookmark-open{display:block;width:100%;padding:15px;background:none;text-align:left}
.bookmark-open:hover{background:#292f25}
.bookmark-card-top{display:flex;align-items:center;gap:11px;min-width:0}
.bookmark-card-top>img{width:58px;height:58px;object-fit:contain;flex:none;image-rendering:pixelated}
.bookmark-card-top>span:nth-child(2){display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.bookmark-card-top small{font:10px var(--mono);color:#8c977f}
.bookmark-card-top strong{font-size:14px;line-height:1.5}
.bookmark-form{color:#9ba88b;font-size:10px;line-height:1.5;overflow-wrap:anywhere}
.bookmark-open-arrow{align-self:flex-start;color:#b8ae89;font-size:17px}
.bookmark-weaknesses{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;margin-top:13px;min-height:38px;color:#979f8a;font-size:10px;line-height:1.6}
.bookmark-weaknesses>span:first-child{color:#a5ac9a;margin-right:2px}
.bookmark-weaknesses>span:not(:first-child){color:var(--type-color,#b2bba1)}
.bookmark-weaknesses b{font:500 10px var(--mono);color:#e1e6d6}
.bookmark-remove{display:flex;align-items:center;justify-content:flex-end;gap:5px;width:100%;padding:9px 14px;border-top:1px solid #363e2e;background:none;color:#9ca98c;font-size:10px;min-height:34px}
.bookmark-remove .icon{width:12px;height:12px;fill:currentColor}
.bookmark-remove:hover{background:#312b22;color:#e6bf9d}
.collection-storage-note{font-size:10px;line-height:1.8;color:#87937a;margin:20px 0 0}
.collection-empty{grid-column:1/-1;padding:40px 18px;border:1px dashed #48513e;text-align:center}
.collection-empty>.icon{width:30px;height:30px;color:#a59b74;margin-bottom:13px}
.collection-empty h2{font-size:17px;line-height:1.6;margin:0 0 10px}
.collection-empty p{font-size:12px;line-height:1.9;color:#9ea78f;margin:0 0 22px}
.collection-dialog{width:calc(100% - 32px);max-width:590px;max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);overflow:auto;overscroll-behavior:contain;padding:25px;border:1px solid #505944;border-radius:10px;background:#20251f;color:var(--ink);box-shadow:0 20px 80px #0008}
.collection-dialog::backdrop{background:rgb(7 10 7 / .8);backdrop-filter:blur(3px)}
.collection-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:21px}
.collection-dialog-header .eyebrow{margin:0 0 7px;color:#9aa589;font-size:9px}
.collection-dialog-header h2{font-size:20px;line-height:1.5;margin:0;letter-spacing:-.4px}
.collection-close{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #46513b;border-radius:5px;background:none;color:#bac4ad}
.collection-close .icon{width:18px;height:18px}
.collection-close:hover{background:#333b2b;color:#f2f3ea}
.library-side-switch{display:flex;gap:0;border-bottom:1px solid #46513c;margin-bottom:21px}
.library-side-switch button{position:relative;flex:1;min-height:41px;padding:7px;background:none;color:#8d9a7e;font-size:12px;font-weight:600}
.library-side-switch button[aria-selected="true"]{color:#efd6af}
.library-side-switch button[aria-selected="true"]::after{position:absolute;content:"";bottom:-1px;left:0;right:0;height:2px;background:var(--accent)}
.preset-create{padding-bottom:20px;border-bottom:1px solid #424a39}
.preset-create h3,.preset-list-heading h3{margin:0;color:#d6ddc9;font-size:12px;font-weight:600}
.preset-preview,.preset-sprites{display:flex;align-items:center;gap:6px;min-height:46px;flex-wrap:wrap;margin:8px 0 12px}
.preset-preview>img,.preset-sprites>img{object-fit:contain;image-rendering:pixelated}
.preset-preview>span{font-size:11px;line-height:1.7;color:#929f83}
#team-preset-form label{display:flex;align-items:center;gap:10px;font-size:11px;margin-bottom:7px;color:#bac6aa}
#team-preset-form label>span{color:#869479;font-size:9px}
.preset-name-row{display:flex;gap:8px;min-width:0}
.preset-name-row input,.collection-name-input{min-width:0;width:100%;border:1px solid #59634b;border-radius:4px;background:#171c15;color:#e5ebdc;min-height:43px;padding:9px 11px;font-family:inherit;font-size:16px;line-height:1.5;outline:none}
.preset-name-row input:focus,.collection-name-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px #ed583d22}
.preset-name-row input::placeholder{color:#79866c;font-size:12px}
.preset-name-row .primary-button{flex:none;font-size:11px;min-width:104px;padding-inline:14px}
.preset-feedback{font-size:11px;line-height:1.7;color:#e5c69b;margin:10px 0 0;overflow-wrap:anywhere}
.preset-feedback:empty{display:none}
.preset-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:21px 0 12px}
.preset-list-heading>span{font:11px var(--mono);color:#a1ad91}
.preset-list{display:flex;flex-direction:column;gap:11px}
.preset-item{padding:13px;border:1px solid #424f37;border-radius:6px;background:#252c21}
.preset-item-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.preset-item h4{font-size:13px;font-weight:600;line-height:1.7;overflow-wrap:anywhere;margin:0}
.preset-item-heading>span{flex:none;font-size:10px;color:#95a382;padding-top:3px}
.preset-sprites{margin:5px 0 9px;gap:4px;min-height:40px}
.preset-item-actions{display:flex;align-items:center;gap:8px;padding-top:8px;border-top:1px solid #3c4931}
.preset-item-actions>button{padding:6px 8px;min-height:33px;border-radius:3px;background:none;color:#adb99c;font-size:10px;white-space:nowrap}
.preset-item-actions>button:hover{background:#36422b;color:#e6eddd}
.preset-item-actions>.preset-load{margin-right:auto;color:#ecd0a5;font-weight:600;background:#3d3929}
.preset-item-actions>.preset-delete{color:#d4a18b}
.preset-item-actions>button:disabled,.preset-name-row>button:disabled{opacity:.4;cursor:default}
.preset-empty{border:1px dashed #414e36;padding:23px 15px;text-align:center}
.preset-empty p{font-size:12px;color:#b1bea0;margin:0 0 7px}
.preset-empty span{font-size:10px;color:#879978;line-height:1.6}
.preset-rename-label{display:block;margin:17px 0 8px;font-size:11px;color:#acb89b}
#rename-preset-dialog .dialog-actions{margin-top:20px}
#collection-confirm-description{overflow-wrap:anywhere}
@media(max-width:900px){.bookmarks-list{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-section-heading{gap:10px;flex-wrap:wrap}.detail-actions{margin-left:auto}}
@media(max-width:680px){
  .detail-section-heading{align-items:center;row-gap:12px}
  .detail-section-heading .section-title-group{flex:1}
  .detail-actions{gap:5px}
  .bookmark-toggle{min-height:34px;padding:5px 8px;font-size:9px}
  .bookmark-toggle .icon{width:14px;height:14px}
  .bookmark-toggle>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .team-toolbar{gap:4px}.team-actions{gap:3px}
  .team-actions .team-back,.team-actions>.text-button{min-width:27px}
  .bookmarks-section{padding-top:25px}.bookmarks-section h1{font-size:20px}
  .bookmarks-section .section-title-group{gap:8px}.bookmarks-section .result-count{font-size:9px}
  .bookmarks-description{font-size:11px;margin-bottom:17px}
  .bookmarks-list{gap:10px}.bookmark-open{padding:12px}
  .bookmark-card-top{gap:7px}.bookmark-card-top>img{width:43px;height:43px}
  .bookmark-card-top strong{font-size:12px}.bookmark-card-top small{font-size:8px}
  .bookmark-form{font-size:9px}.bookmark-open-arrow{font-size:13px}
  .bookmark-weaknesses{font-size:9px;gap:4px 6px}.bookmark-weaknesses b{font-size:9px}
  .collection-dialog{padding:20px 16px;border-radius:8px}
  .collection-dialog-header{margin-bottom:17px}.collection-dialog-header h2{font-size:18px}
  .preset-name-row .primary-button{font-size:10px;min-width:89px;padding-inline:11px}
  .collection-storage-note{font-size:9px}
}
@media(max-width:440px){.bookmarks-list{grid-template-columns:1fr}.bookmark-card-top>img{width:53px;height:53px}.bookmark-card-top strong{font-size:14px}.bookmark-form{font-size:10px}.bookmark-weaknesses{font-size:10px}.bookmark-weaknesses b{font-size:10px}.bookmarks-section>.section-heading{gap:8px;flex-wrap:wrap}.bookmarks-section>.section-heading>.text-button{font-size:10px}.preset-item-actions{gap:3px}.preset-item-actions>button{padding-inline:6px;font-size:10px}.preset-item{padding:11px}.preset-sprites>img{width:36px;height:36px}}
