/* Ocarina of Time wiki: compact layout (oot-wiki.mjs), based on the A Link to the Past layout. Uses the site palette variables. */
.oz{--oz-line:color-mix(in srgb,var(--line,#393732) 85%,#fff 15%);--oz-soft:color-mix(in srgb,var(--surface,#1c1c1c) 80%,#000 20%);font-size:15px;line-height:1.5;min-width:0}
.oz h1{font-size:clamp(1.45rem,1.1rem + 1.4vw,2rem);line-height:1.15;margin:.2rem 0 .5rem}
.oz-h1-sub{display:block;font-size:.55em;font-weight:600;color:var(--muted,#aaa69d);letter-spacing:.02em;margin-top:.2rem}
.oz h2{font-size:1.15rem;margin:1.6rem 0 .6rem;padding-bottom:.3rem;border-bottom:1px solid var(--oz-line)}
.oz h3{font-size:1rem;margin:0 0 .2rem}
.oz p{margin:.4rem 0}
.oz a{color:var(--accent,var(--gold))}
.oz small{display:block;color:var(--muted,#aaa69d);font-size:.8rem}
.oz-px{image-rendering:pixelated;image-rendering:crisp-edges}
.oz img{max-width:100%;height:auto}
.oz-muted{color:var(--muted,#aaa69d);font-size:.86rem}
.oz-lead{font-size:1.02rem;color:var(--text);max-width:70ch}
.oz-crumbs{font-size:.8rem;color:var(--muted);margin-bottom:.4rem}
.oz-crumbs a{color:var(--muted)}
.oz-scope{font-size:.82rem;color:var(--muted)}
.oz-facts{display:flex;flex-wrap:wrap;gap:6px;margin:.7rem 0;padding:0}
.oz-facts>div{background:var(--oz-soft);border:1px solid var(--oz-line);border-radius:6px;padding:4px 10px;min-width:0}
.oz-facts dt{font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.oz-facts dd{margin:0;font-weight:600;font-size:.9rem}
.oz-fig{margin:0}
.oz-fig figcaption{font-size:.8rem;color:var(--muted);margin-top:4px}
.oz-fig img{display:block;border-radius:4px;background:#000;width:100%}
/* inline item links with a tiny sprite */
.oz-item{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;margin:1px 6px 1px 0}
.oz-mini{width:18px;height:18px;object-fit:contain;flex:none}
.oz-chip{display:inline-block;font-size:.74rem;padding:1px 8px;border:1px solid var(--oz-line);border-radius:999px;text-decoration:none;margin-left:4px;white-space:nowrap}
/* dungeon page top */
.oz-top{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:14px;align-items:start;margin:.8rem 0}
.oz-panel{background:var(--oz-soft);border:1px solid var(--oz-line);border-radius:6px;padding:10px 12px}
.oz-panel h2{margin:0 0 .4rem;border:0;font-size:1rem}
.oz-kv{margin:0}
.oz-kv>div{padding:5px 0;border-top:1px solid var(--oz-line);font-size:.88rem}
.oz-kv>div:first-child{border-top:0}
.oz-kv dt{font-weight:700;font-size:.78rem;color:var(--secondary,var(--gold))}
.oz-kv dd{margin:0}
.oz-foe-row{display:flex;flex-wrap:wrap;gap:6px}
.oz-foe-row a{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--text);border:1px solid var(--oz-line);border-radius:6px;padding:4px 8px 4px 4px;font-size:.82rem;background:var(--oz-soft)}
.oz-foe-row a>span{width:34px;height:34px;display:grid;place-items:center;background:#000;border-radius:4px;flex:none}
.oz-foe-row img{max-width:30px;max-height:30px;width:auto;height:auto}
/* dungeons hub */
.oz-dgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin:.6rem 0}
.oz-dcard{display:flex;flex-direction:column;border:1px solid var(--oz-line);border-radius:7px;overflow:hidden;text-decoration:none;background:var(--oz-soft);scroll-margin-top:80px}
.oz .oz-dcard{color:var(--text)}
.oz-dcard:hover,.oz-dcard:focus-visible{border-color:var(--accent,var(--gold))}
.oz-dshot{display:block;background:#000;aspect-ratio:8/7;overflow:hidden}
.oz-dshot img{display:block;width:100%;height:100%;object-fit:cover}
.oz-dbody{padding:8px 10px;display:grid;gap:1px;font-size:.84rem}
.oz-dbody strong{font-size:1.02rem}
.oz-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.oz-table{width:100%;border-collapse:collapse;font-size:.86rem}
.oz-table th,.oz-table td{padding:6px 8px;border-bottom:1px solid var(--oz-line);text-align:left;vertical-align:top}
.oz-table thead th{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.oz-table tr{scroll-margin-top:80px}
.oz-table tr:target{background:var(--oz-soft);outline:2px solid var(--accent,var(--gold));outline-offset:-2px}
.oz-item-table th[scope=row]{display:flex;align-items:center;gap:8px;white-space:nowrap}
.oz-sprite{width:32px;height:32px;object-fit:contain;flex:none}
.oz-sprite-lg{width:64px;height:auto}
.oz-h2-pic{width:26px;height:26px;object-fit:contain;vertical-align:-6px;margin-right:8px}
.oz-tips ul,.oz-list,.oz-route{padding-left:1.3rem;margin:.3rem 0}
.oz-tips li,.oz-list li{margin:.25rem 0}
.oz-route li{margin:.35rem 0;padding-left:.2rem}
.oz-route strong{color:var(--secondary,var(--gold));margin-right:4px}
/* FAQ + sources */
.oz-faq details{border:1px solid var(--oz-line);border-radius:6px;padding:6px 10px;margin:6px 0;background:var(--oz-soft)}
.oz-faq summary{cursor:pointer;font-weight:600}
.oz-sources{margin-top:1.4rem;font-size:.82rem;color:var(--muted)}
.oz-sources summary{cursor:pointer}
.oz-sources ul{columns:2;column-gap:20px;padding-left:1.1rem}
.oz-sources li{overflow-wrap:anywhere}
/* home */
.oz-hero{display:grid;grid-template-columns:220px minmax(0,1fr);gap:16px;align-items:start}
.oz-hero>a img{width:220px;border-radius:5px;display:block}
.oz-cta a{font-weight:700}
.oz-topic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
.oz-topic-grid a,.oz-related a{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);border:1px solid var(--oz-line);border-radius:7px;padding:8px;background:var(--oz-soft);font-size:.82rem}
.oz-topic-grid a:hover,.oz-related a:hover{border-color:var(--accent,var(--gold))}
.oz-topic-grid img,.oz-related img{width:56px;height:56px;object-fit:contain;flex:none;background:#000;border-radius:4px}
.oz-topic-grid strong{display:block;color:var(--accent,var(--gold));font-size:.95rem}
.oz-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.oz-strip a{display:grid;gap:4px;text-decoration:none;font-size:.78rem;color:var(--text)}
.oz-strip img{width:100%;aspect-ratio:8/7;object-fit:cover;background:#000;border-radius:4px}
.oz-trivia{padding-left:1.2rem;font-size:.9rem}
.oz-related{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;margin-top:1.4rem}
/* characters + enemies */
.oz-char-grid,.oz-enemy-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}
.oz-char,.oz-enemy{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--oz-line);border-radius:7px;padding:8px;background:var(--oz-soft);scroll-margin-top:80px}
.oz-char:target,.oz-enemy:target{border-color:var(--accent,var(--gold))}
.oz-char>a{flex:none;width:80px;height:100px;display:grid;place-items:center;background:#000;border-radius:5px;overflow:hidden}
.oz-char>a img{max-width:80px;max-height:100px;width:auto;height:auto;object-fit:contain}
.oz-char>a img.oz-px{min-width:40px}
.oz-char p,.oz-enemy p{font-size:.84rem;margin:.2rem 0}
.oz-role{color:var(--muted)}
.oz-enemy-pic{flex:none;width:64px;height:64px;display:grid;place-items:center;background:#000;border-radius:5px}
.oz-enemy-pic img{max-width:58px;max-height:58px;width:auto;height:auto}
.oz-enemy-pic img[width="16"],.oz-enemy-pic img[width="14"]{width:40px}
.oz-filter{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:.6rem 0}
.oz-filter input{display:block;margin-top:3px;padding:6px 9px;border-radius:5px;border:1px solid var(--oz-line);background:var(--bg);color:var(--text);min-width:240px}
.oz-filter p{margin:0;color:var(--muted);font-size:.84rem}
.oz-jump{display:flex;flex-wrap:wrap;gap:5px;margin:.6rem 0}
.oz-jump a{font-size:.78rem;padding:3px 9px;border:1px solid var(--oz-line);border-radius:999px;text-decoration:none}
/* figures side by side */
.oz-side{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:14px;align-items:start}
.oz-side>.oz-fig img{width:100%}
.oz-fig-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.oz-maps{grid-template-columns:repeat(2,minmax(0,1fr));margin:.8rem 0}
.oz-secret{scroll-margin-top:80px}
.oz-region-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px}
.oz-region-grid>div{border:1px solid var(--oz-line);border-radius:6px;padding:8px 10px;background:var(--oz-soft);font-size:.84rem}
.oz-region-grid h3{font-size:.9rem;color:var(--secondary,var(--gold))}
.oz-loc-table td{width:50%}
.oz-loc-table strong{display:block}
.oz-hp-table td:first-child{width:2.2em;color:var(--muted)}
.oz-hp-table td:last-child,.oz-up-table td:last-child{min-width:150px}
/* bosses */
.oz-boss-row{display:grid;grid-template-columns:150px 120px minmax(0,1fr);gap:12px;align-items:start}
.oz-boss-row>a img{width:100%;height:auto;max-height:180px;object-fit:contain;background:#000;border-radius:5px;display:block}
.oz-boss-row.oz-one{grid-template-columns:150px minmax(0,1fr)}
.oz-boss-table{display:grid;gap:8px}
.oz-boss-table article{display:grid;grid-template-columns:230px minmax(0,1fr);gap:12px;border:1px solid var(--oz-line);border-radius:7px;padding:8px;background:var(--oz-soft);scroll-margin-top:80px}
.oz-boss-table article:target{border-color:var(--accent,var(--gold))}
.oz-boss-table h2{border:0;margin:0;padding:0;font-size:1.05rem}
.oz-boss-pics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start}
.oz-boss-pics>a:only-child{grid-column:span 2}
.oz-boss-pics img{width:100%;height:120px;object-fit:contain;background:#000;border-radius:5px;display:block}
/* pager */
.oz-pager{display:flex;justify-content:space-between;gap:10px;margin-top:1.2rem;flex-wrap:wrap}
.oz-pager a{border:1px solid var(--oz-line);border-radius:6px;padding:7px 12px;text-decoration:none;font-weight:600;font-size:.88rem}
/* gallery */
.oz-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.oz-gallery figure{margin:0;font-size:.74rem;text-align:center}
.oz-gallery figure>a{display:grid;place-items:center;aspect-ratio:1;background:#000;border-radius:5px;overflow:hidden}
.oz-gallery img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.oz-gallery img.oz-px[width="16"],.oz-gallery img.oz-px[width="14"],.oz-gallery img.oz-px[width="24"],.oz-gallery img.oz-px[width="26"],.oz-gallery img.oz-px[width="28"],.oz-gallery img.oz-px[width="32"]{width:56px}
.oz-gallery figcaption{margin-top:3px;overflow-wrap:anywhere}
/* rail */
.oz-rail .infobox>a>img{display:block;width:100%;height:auto;max-height:220px;object-fit:contain}
.oz-rail-nav{border:1px solid var(--line);border-radius:6px;padding:10px;background:var(--surface);margin-top:12px}
.oz-rail-nav h2{font-size:.95rem;margin:0 0 .4rem}
.oz-rail-nav a{display:flex;gap:8px;align-items:center;padding:4px 0;text-decoration:none;font-size:.85rem;border-top:1px solid var(--line)}
.oz-rail-nav small{display:block;font-size:.7rem;color:var(--muted)}
.oz-rail-shot{width:48px;height:42px;object-fit:cover;background:#000;border-radius:3px;flex:none}
@media (max-width:900px){
 .oz-top{grid-template-columns:1fr}
 .oz-top .oz-fig{max-width:520px}
}
@media (max-width:640px){
 .oz-hero{grid-template-columns:110px minmax(0,1fr);gap:10px}
 .oz-hero>a img{width:110px}
 .oz-side{grid-template-columns:1fr}
 .oz-side>.oz-fig{max-width:340px}
 .oz-maps{grid-template-columns:1fr}
 .oz-boss-row{grid-template-columns:100px minmax(0,1fr)}
 .oz-boss-row>a:nth-child(2):not(:last-child){display:none}
 .oz-boss-row.oz-one{grid-template-columns:100px minmax(0,1fr)}
 .oz-boss-table article{grid-template-columns:1fr}
 .oz-boss-pics{max-width:260px}
 .oz-sources ul{columns:1}
 .oz-dgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .oz-filter input{min-width:0;width:100%}
 .oz-filter label{flex:1}
 .oz-facts>div{padding:3px 8px}
 #order .oz-table th:nth-child(3),#order .oz-table td:nth-child(3),#order .oz-table th:nth-child(6),#order .oz-table td:nth-child(6){display:none}
}
/* Ocarina of Time additions: ages, song notes, location table, model renders */
.oz-age{display:inline-block;font-size:.78rem;padding:0 7px;border-radius:999px;border:1px solid var(--oz-line);font-weight:700}
.oz-age-child{color:#8fd16a;border-color:color-mix(in srgb,#8fd16a 55%,transparent)}
.oz-age-adult{color:#e6b45a;border-color:color-mix(in srgb,#e6b45a 55%,transparent)}
.oz-age-child-adult{color:#7fc3e6;border-color:color-mix(in srgb,#7fc3e6 55%,transparent)}
.oz-notes{display:flex;flex-wrap:wrap;gap:3px;margin-bottom:3px}
.oz-note{width:24px;height:24px;background:#000;border-radius:50%;padding:2px}
.oz-song-table th[scope=row]{white-space:nowrap}
.oz-song-table td:nth-child(2){min-width:190px}
.oz-song-table tr{scroll-margin-top:80px}
.oz-loc-table td{width:auto}
.oz-loc-table th[scope=row]{min-width:150px}
.oz-loc-pic{display:block;width:120px;height:68px;object-fit:cover;border-radius:4px;background:#000;margin-bottom:4px}
.oz-enemy-pic img,.oz-foe-row img{object-fit:contain}
.oz-maps .oz-fig img{background:#fff}
.oz-maps .oz-fig:first-child:last-child{max-width:720px}
#map .oz-maps{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
@media (max-width:640px){
 .oz-loc-table thead{display:none}
 .oz-loc-table tr{display:grid;grid-template-columns:1fr;border-bottom:1px solid var(--oz-line);padding:6px 0}
 .oz-loc-table th,.oz-loc-table td{border:0;padding:3px 4px}
 .oz-loc-table td:nth-of-type(1)::before{content:'As a child: ';font-weight:700;color:var(--secondary,var(--gold))}
 .oz-loc-table td:nth-of-type(2)::before{content:'Seven years later: ';font-weight:700;color:var(--secondary,var(--gold))}
 .oz-song-table thead{display:none}
 .oz-song-table tr{display:grid;grid-template-columns:1fr;border-bottom:1px solid var(--oz-line);padding:8px 0}
 .oz-song-table th,.oz-song-table td{border:0;padding:3px 4px;min-width:0}
 .oz-song-table td:nth-child(2){min-width:0}
 .oz-song-table th[scope=row]{font-size:1rem;white-space:normal}
 .oz-song-table td:nth-of-type(2)::before{content:'Learned from: ';font-weight:700;color:var(--secondary,var(--gold))}
 .oz-song-table td:nth-of-type(3)::before{content:'Use: ';font-weight:700;color:var(--secondary,var(--gold))}
 /* tables become stacked cards on phones */
 .oz-hp-table thead,.oz-up-table thead,.oz-item-table thead{display:none}
 .oz-hp-table tr,.oz-up-table tr,.oz-item-table tr{display:grid;grid-template-columns:1fr;border-bottom:1px solid var(--oz-line);padding:7px 0}
 .oz-hp-table th,.oz-hp-table td,.oz-up-table th,.oz-up-table td,.oz-item-table th,.oz-item-table td{border:0;padding:2px 4px;min-width:0}
 .oz-hp-table tr{grid-template-columns:2.4em minmax(0,1fr)}
 .oz-hp-table td:nth-of-type(2),.oz-hp-table td:nth-of-type(3){grid-column:1/-1}
 .oz-hp-table td:first-child{width:auto;font-weight:700}
 .oz-hp-table td:nth-of-type(3)::before,.oz-up-table td:nth-of-type(3)::before{content:'Need: ';font-weight:700;color:var(--secondary,var(--gold))}
 .oz-up-table td:nth-of-type(1)::before,.oz-item-table td:nth-of-type(2)::before{content:'Where: ';font-weight:700;color:var(--secondary,var(--gold))}
 .oz-item-table th[scope=row]{white-space:normal}
}
