.anc-browse{margin:20px 0 32px;color:#173247}.anc-browse h2{font-size:23px;margin:0 0 8px}.anc-browse>p{font-size:14px;color:#596b79;margin:0 0 14px}.anc-branches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:start}.anc-branches>details{border:1px solid #dce5ec;border-radius:10px;background:#fff;padding:8px 12px;min-width:0}.anc-branches summary{cursor:pointer;min-height:44px;padding:10px 2px;overflow-wrap:anywhere;font-weight:600}.anc-branches a{display:block;padding:10px 6px;min-height:44px;color:#245cc4!important;overflow-wrap:anywhere;text-decoration:none}.anc-branches a:hover{text-decoration:underline}.anc-branches a[aria-current]{background:#eaf1ff;border-radius:6px}.anc-branches small{font-size:12px;color:#687888;font-weight:400}.anc-branches ul{margin:0;padding-left:14px;list-style:none}.anc-branches li{margin:0}.anc-branches :focus-visible{outline:3px solid #245cc4;outline-offset:2px}@media(max-width:700px){.anc-branches{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){.anc-branches{grid-template-columns:1fr}}@media print{.anc-browse{display:none!important}}

.anc-switcher{border:1px solid #dce5ec;border-radius:10px;padding:10px 14px;margin-bottom:20px;background:#fff}.anc-switcher>summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:600;color:#245cc4}.anc-switcher .anc-browse{margin-top:10px}

/* English home: compact subject menu below search. */
#aoneko-en-home #ankd-directory>.anc-home-subjects{margin:-4px 0 16px;padding:0;border:0;background:transparent;color:#596b79;font-size:13px}
#aoneko-en-home .anc-home-subjects>summary{display:list-item;width:fit-content;max-width:100%;cursor:pointer;padding:7px 2px;min-height:34px;font:400 13px/1.5 Arial,sans-serif;color:#596b79;list-style:disclosure-closed}
#aoneko-en-home .anc-home-subjects[open]>summary{list-style:disclosure-open}
#aoneko-en-home .anc-home-subjects .anc-browse{margin:8px 0 14px}
#aoneko-en-home .anc-home-subjects .anc-branches{gap:8px}
#aoneko-en-home .anc-home-subjects .anc-branches>details{border-radius:6px}
#aoneko-en-home .anc-home-subjects .anc-branches summary,#aoneko-en-home .anc-home-subjects .anc-branches a{font-size:13px}
#aoneko-en-home .anc-home-subjects :focus-visible{outline:3px solid #245cc4;outline-offset:2px}
@media print{.anc-home-subjects{display:none!important}}

/* Japanese home: subject button next to the collection link. */
#aoneko-jp-home .anc-ja-subject-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;vertical-align:middle;margin:8px 0 8px 12px;padding:12px 18px;min-height:44px;max-width:100%;border:1px solid #cbd8e0;border-radius:8px;background:#fff;color:#315a75;font:600 14px/1.5 sans-serif;cursor:pointer}
#aoneko-jp-home .anc-ja-subject-toggle:hover,#aoneko-jp-home .anc-ja-subject-toggle[aria-expanded="true"]{background:#edf3f7;border-color:#8ca9bc}
#aoneko-jp-home .anc-ja-subject-toggle:focus-visible{outline:3px solid #245cc4;outline-offset:3px}
#aoneko-jp-home #anc-ja-subject-panel[hidden]{display:none!important}
#aoneko-jp-home #anc-ja-subject-panel .anc-browse{margin:20px 0 28px}
@media(max-width:420px){#aoneko-jp-home .anc-ja-subject-toggle{margin-left:8px;padding:12px 10px;font-size:12px}}

/* Consistent, compact home recommendation cards. */
#aoneko-en-home .anc-home-shelf .ankd-copy>strong,#aoneko-jp-home .anc-home-shelf .ankd-copy>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#aoneko-en-home .anc-home-shelf .ankd-copy>span,#aoneko-jp-home .anc-home-shelf .ankd-copy>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.anc-home-shelf .ankd-heading{gap:16px}
.anc-home-shelf .ankd-heading>a{white-space:nowrap;flex-shrink:0}

#aoneko-en-home .anc-home-shelf .ankd-grid,#aoneko-jp-home .anc-home-shelf .ankd-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1000px){#aoneko-en-home .anc-home-shelf .ankd-grid,#aoneko-jp-home .anc-home-shelf .ankd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){#aoneko-en-home .anc-home-shelf .ankd-grid,#aoneko-jp-home .anc-home-shelf .ankd-grid{grid-template-columns:1fr}}

/* Phone-only home card presentation; retain the desktop card. */
.anc-home-shelf .anc-title-mobile{display:none}
.anc-home-picture{display:contents}
@media(max-width:600px){
 #aoneko-en-home .anc-home-shelf .ankd-grid,#aoneko-jp-home .anc-home-shelf .ankd-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .anc-home-shelf .anc-title-mobile{display:inline}
 .anc-home-picture{display:block;width:100%;height:100%}
 #aoneko-en-home .anc-home-shelf .ankd-card,#aoneko-jp-home .anc-home-shelf .ankd-card{min-width:0}
 #aoneko-en-home .anc-home-shelf .ankd-art,#aoneko-jp-home .anc-home-shelf .ankd-art{height:auto;aspect-ratio:10/11;padding:4px}
 #aoneko-en-home .anc-home-shelf .ankd-art img,#aoneko-jp-home .anc-home-shelf .ankd-art img{display:block;width:100%;height:100%;max-height:none;object-fit:contain}
}

/* Same phone-only illustration layout in both language directories. */
@media(max-width:600px){
 #aoneko-tool-main #ankd-directory .ankd-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #aoneko-tool-main #ankd-directory .ankd-card{min-width:0}
 #aoneko-tool-main #ankd-directory .ankd-art{height:auto;aspect-ratio:10/11;padding:4px}
 #aoneko-tool-main #ankd-directory .ankd-art img{display:block;width:100%;height:100%;max-height:none;object-fit:contain}
}
