body.roster-open #main>:not(#hom-roster):not(#storage-warning),body.roster-open #selection-bar {display:none!important}
body.has-hom-roster #main>.build-library {display:none!important}
#hom-roster[hidden],#hom-editor-header[hidden] {display:none!important}
.hom-roster {min-width:0;width:100%;color:var(--ink)}
.hom-roster-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px;flex-wrap:wrap}
.hom-roster-heading h1 {font-size:24px;line-height:1.4;margin:0 0 7px}
.hom-roster-heading p {font-size:13px;line-height:1.8;color:var(--muted);margin:0}
.hom-roster-tools {display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.hom-roster-tools button,.hom-roster-tools summary {min-height:44px;padding:10px 13px}
.hom-roster-menu {position:relative;font-size:12px}.hom-roster-menu summary {cursor:pointer;border:1px solid var(--line);border-radius:5px;background:#fff}
.hom-roster-menu>div {position:absolute;right:0;top:calc(100% + 6px);z-index:8;min-width:240px;padding:8px;background:#fff;border:1px solid var(--line);box-shadow:0 6px 16px #233e3c15}
.hom-roster-menu>div button {display:block;width:100%;text-align:left;border:0;background:transparent}
.hom-roster-filter {display:flex;align-items:flex-end;gap:20px;margin-bottom:20px}
.hom-roster-filter label {display:flex;flex-direction:column;gap:6px;max-width:440px;flex:1;font-size:12px}
.hom-roster-query {width:100%;padding:10px 12px;min-height:44px;border:1px solid var(--line);border-radius:5px;background:#fff;font-size:14px}
.hom-roster-count {font-size:13px;white-space:nowrap;color:var(--muted);padding-bottom:13px;font-variant-numeric:tabular-nums}
.hom-roster-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.hom-roster-card {min-width:0;max-width:300px;border:1px solid var(--line);background:var(--paper,#fff);border-radius:6px;overflow:hidden}
.hom-roster-create-card {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-width:0;width:100%;max-width:300px;min-height:280px;padding:20px 12px;border:1px dashed #93b7ae;border-radius:6px;background:#f3f8f6;color:var(--accent);text-align:center;cursor:pointer}
.hom-roster-create-card:hover {background:#e7f1ec;border-color:var(--accent)}
.hom-roster-create-card:focus-visible {outline:3px solid var(--accent);outline-offset:3px}
.hom-roster-create-plus {display:grid;place-items:center;width:60px;height:60px;border:1px solid #c7ddd4;border-radius:50%;font-size:38px;font-weight:400;line-height:1;margin-bottom:4px}
.hom-roster-create-card strong {font-size:15px;line-height:1.5}
.hom-roster-create-hint {font-size:12px;color:var(--muted);line-height:1.5}
.hom-roster-open {display:flex;flex-direction:column;gap:5px;width:100%;text-align:left;border:0;background:transparent;padding:12px;color:var(--ink);border-radius:0}
.hom-roster-open:hover {background:#f3f8f7}.hom-roster-open:focus-visible {outline:3px solid var(--accent);outline-offset:-3px}
.hom-roster-art {display:grid;place-items:center;position:relative;background:#211e24;width:100%;height:124px;border-radius:4px;margin-bottom:6px;overflow:hidden}
.hom-roster-art img {position:absolute;inset:0;width:100%;height:100%;padding:7px;object-fit:contain}
.hom-roster-level {position:absolute;bottom:5px;right:6px;color:#f4d577;background:#211e24dd;padding:2px 4px;border-radius:3px;font-size:11px;font-variant-numeric:tabular-nums}
.hom-roster-placeholder {font-size:32px;color:#bdb3c1}
.hom-roster-open strong {font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.hom-roster-species {font-size:11px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere;min-height:15px}
.hom-roster-meta {font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.hom-roster-edit-label {display:block;margin-top:5px;color:var(--accent);font-size:12px;font-weight:650}
.hom-roster-use {width:calc(100% - 24px);min-height:40px;margin:0 12px 12px;border:1px solid #bdd3cf;background:#f3f8f7;font-size:12px;padding:8px;color:var(--ink)}
.hom-roster-empty {grid-column:1/-1;padding:48px 20px;text-align:center;background:#f7faf9;border:1px dashed #bbcbc8;border-radius:6px}.hom-roster-empty strong {font-size:17px}.hom-roster-empty p {font-size:13px;color:var(--muted);line-height:1.7;margin-top:12px}
.hom-roster-empty.with-create-card {grid-column:2/-1;align-content:center;min-width:0;padding:24px 12px;border:0;background:transparent}
.hom-roster-error {color:#993f35;background:#fff1ec;border-left:3px solid #b25c4e;padding:12px;font-size:13px;line-height:1.7;margin:12px 0}
.hom-editor-header {margin-bottom:20px}
.hom-editor-heading {display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid var(--line)}
.hom-editor-heading>div {flex:1;min-width:120px}.hom-editor-heading h1 {font-size:21px;margin:0;overflow-wrap:anywhere}.hom-editor-heading small {font-size:11px;color:var(--muted);display:block;margin-bottom:4px}
.hom-editor-heading>.hom-editor-identity {display:flex;align-items:center;gap:8px;min-width:0}.hom-editor-identity h1{min-width:0}.hom-editor-identity #hom-editor-rename{flex-shrink:0;white-space:nowrap}
.hom-editor-heading button {min-height:44px}.hom-editor-heading .hom-roster-menu summary {min-height:44px;padding:10px 12px}
.hom-editor-header .library-status {display:block;margin:9px 0 0;font-size:11px;color:var(--muted)}
.hom-editor-back {padding:9px 12px;white-space:nowrap}
.party-page dialog.hom-roster-dialog,dialog.hom-roster-dialog {width:min(1020px,calc(100% - 28px));max-width:1020px;max-height:90dvh;padding:20px;overflow:auto}
.hom-roster-close {display:block;margin:0 0 8px auto;min-height:40px}
.hom-roster-dialog .hom-roster-heading h1 {font-size:21px}.hom-roster-dialog .hom-roster-grid {grid-template-columns:repeat(auto-fill,minmax(175px,1fr))}
.hom-roster-dialog .hom-roster-card {max-width:none}
.hom-roster-dialog .hom-roster-duplicate,.party-owned-panel .hom-roster-duplicate{display:flex;align-items:center;justify-content:center;gap:6px;width:calc(100% - 16px);min-height:44px;margin:4px 8px 8px;padding:7px 5px;border:1px solid var(--accent);border-radius:4px;background:var(--tint);color:var(--ink);font-size:13px;white-space:normal;line-height:1.4}
.game-party-page .member-empty.party-owned-panel{padding:0;margin:0;max-width:none;text-align:left;color:var(--ink)}
.party-owned-panel .hom-roster-heading{gap:12px;margin-bottom:14px}
.party-owned-panel .hom-roster-heading h1{font-size:20px}
.game-party-page .party-owned-panel .hom-roster-heading p{font-size:13px;margin:0;line-height:1.7}
.party-owned-panel .hom-roster-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:12px}
.party-owned-panel .hom-roster-card{max-width:none}
.party-owned-panel .hom-roster-art{height:100px}
@media(max-width:680px){.party-owned-panel .hom-roster-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.party-owned-panel .hom-roster-open{padding:8px}.party-owned-panel .hom-roster-open strong{font-size:13px}.party-owned-panel .hom-roster-meta{font-size:10px}}
.hom-roster-duplicate svg{width:17px;height:17px;flex-shrink:0}
.hom-roster-duplicate:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:680px){
  .hom-roster-heading {gap:12px}.hom-roster-heading h1 {font-size:22px}.hom-roster-heading p {font-size:12px}
  .hom-roster-tools {gap:8px}.hom-roster-tools button,.hom-roster-tools summary {font-size:12px}
  .hom-roster-grid,.hom-roster-dialog .hom-roster-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .hom-roster-card,.hom-roster-create-card {max-width:none}.hom-roster-create-card {min-height:260px}.hom-roster-open {padding:9px}.hom-roster-art {height:104px}.hom-roster-open strong {font-size:14px}
  .hom-roster-use {width:calc(100% - 18px);margin:0 9px 9px;min-height:44px}
  .hom-roster-query {font-size:16px}.hom-roster-filter {gap:12px}
  .hom-roster-menu>div {right:0;max-width:calc(100vw - 40px)}
  .hom-editor-heading {gap:10px}.hom-editor-heading h1 {font-size:18px}.hom-editor-heading>div {min-width:130px}
  .party-page dialog.hom-roster-dialog,dialog.hom-roster-dialog {padding:14px;width:calc(100% - 20px)}
}
