/* K1 portfolio: clear category entry points and an accessible full-image viewer. */
.gallery-instruction { margin-top:-12px; margin-bottom:24px; color:var(--muted); font-size:17px; line-height:1.5; }
.gallery-instruction>span { color:var(--gold-text); font-size:23px; margin-right:8px; }
.project { cursor:pointer; }
.project .project-chip { opacity:1; letter-spacing:.015em; font-size:12px; font-weight:550; background:#292929b3; border-color:#ffffff88; padding:8px 11px; }
.project-chip>span { margin-right:4px; }
.project-view { display:flex; align-items:center; gap:24px; width:fit-content; margin-top:18px; padding:9px 15px; background:#fafaf6; color:#292929; border-radius:999px; font-size:15px; font-weight:550; letter-spacing:0; line-height:1.2; }
.project-view b { font-size:20px; font-weight:400; }
.project:focus-visible { outline:3px solid var(--gold-text); outline-offset:4px; }
body.project-gallery-open { overflow:hidden; }
dialog.project-gallery { width:min(1060px,calc(100vw - 48px)); height:min(890px,calc(100dvh - 48px)); max-width:none; max-height:none; padding:24px; border:1px solid #d8cfbd; border-radius:30px; background:var(--paper); color:var(--ink); overflow:auto; }
dialog.project-gallery[open] { display:flex; flex-direction:column; gap:16px; }
.project-gallery::backdrop { background:#1d1d1dcc; backdrop-filter:blur(7px); }
.gallery-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:16px; flex:none; }
.gallery-dialog-head .eyebrow { font-size:11px; margin:0 0 4px; color:var(--gold-text); }
.gallery-dialog-head h2 { font-size:32px; line-height:1.1; margin:0; }
.gallery-close { width:44px; height:44px; flex:0 0 44px; border:1px solid var(--line); border-radius:50%; background:#fff; color:var(--ink); font-size:29px; line-height:1; cursor:pointer; }
.gallery-categories { display:flex; flex-wrap:wrap; gap:8px; flex:none; }
.gallery-categories button { border:1px solid #d8cfbd; border-radius:999px; padding:9px 15px; background:transparent; color:var(--ink); font:inherit; font-size:14px; cursor:pointer; }
.gallery-categories button[aria-pressed=true] { background:#292929; color:#fff; border-color:#292929; }
.gallery-stage { flex:1 1 auto; min-height:200px; position:relative; border-radius:18px; background:#eae7e1; overflow:hidden; }
.gallery-stage figure { width:100%; height:100%; display:flex; flex-direction:column; margin:0; touch-action:pan-y pinch-zoom; }
#gallery-large-image { width:100%; height:100%; flex:1 1 0; min-height:0; object-fit:contain; }
#gallery-photo-caption { flex:none; padding:11px 64px; color:#fff; background:#292929; font-size:14px; line-height:1.45; text-align:center; }
.gallery-stage>button { position:absolute; z-index:1; top:calc(50% - 23px); width:46px; height:46px; padding:0; border:1px solid #d8cfbd; border-radius:50%; background:#fafaf6ed; color:#292929; box-shadow:0 5px 15px #29292920; font-size:24px; cursor:pointer; }
.gallery-photo-prev { left:12px; }
.gallery-photo-next { right:12px; }
.gallery-photo-meta { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:13px; line-height:1.4; flex:none; }
#gallery-photo-count { color:var(--ink); font-weight:550; }
.gallery-thumbnails { display:flex; justify-content:center; gap:10px; flex:none; }
.gallery-thumbnails button { padding:3px; border:2px solid transparent; border-radius:12px; background:transparent; cursor:pointer; width:92px; height:68px; }
.gallery-thumbnails img { width:100%; height:100%; object-fit:cover; border-radius:7px; }
.gallery-thumbnails button[aria-pressed=true] { border-color:var(--gold-text); background:var(--gold-light); }
.project-gallery button:focus-visible { outline:3px solid var(--gold-text); outline-offset:3px; }
.footer-contact p { margin-bottom:16px; }
.footer-phone { display:grid; grid-template-columns:1fr auto; gap:4px 12px; width:fit-content; }
.footer-phone>span { grid-column:1/-1; font-size:12px; color:var(--muted); }
.footer-phone strong { font-size:20px; font-weight:550; white-space:nowrap; }
.footer-phone i { font-style:normal; color:var(--gold-text); font-size:23px; }
.footer-phone:hover strong { text-decoration:underline; text-underline-offset:4px; }
.about-art { height:680px; }
.craft-photo { width:47%; height:266px; bottom:94px; z-index:2; }
.detail-photo { position:absolute; right:0; bottom:44px; width:56%; height:228px; border:9px solid var(--paper); border-radius:36px; object-fit:cover; object-position:42% 42%; transform:rotate(3deg); z-index:3; box-shadow:0 14px 24px #29292912; }
.about-caption { bottom:0; max-width:100%; }
@media(max-width:1000px) and (min-width:801px) {
 .project .project-chip { left:10px; font-size:11px; padding:7px; }
 .project-caption strong { font-size:24px; }
 .project-view { font-size:14px; }
 .about-art { height:630px; }
 .craft-photo { height:230px; }
 .detail-photo { height:215px; }
}
@media(max-width:800px) {
 .gallery-instruction { font-size:16px; margin-top:0; }
 .project .project-caption { bottom:24px; }
 .project-view { margin-top:15px; }
 .about-art { height:650px; }
 .craft-photo { height:250px; bottom:105px; }
 .detail-photo { height:218px; }
 .footer-phone strong { font-size:18px; }
}
@media(max-width:600px) {
 dialog.project-gallery { width:calc(100vw - 20px); height:calc(100dvh - 20px); padding:16px 12px; border-radius:22px; }
 dialog.project-gallery[open] { gap:12px; }
 .gallery-dialog-head h2 { font-size:25px; }
 .gallery-categories { gap:6px; }
 .gallery-categories button { font-size:12px; padding:8px 10px; min-height:36px; }
 .gallery-stage { min-height:150px; border-radius:14px; }
 .gallery-stage>button { width:40px; height:40px; top:calc(50% - 20px); }
 .gallery-photo-prev { left:6px; } .gallery-photo-next { right:6px; }
 #gallery-photo-caption { padding:10px 12px; font-size:12px; }
 .gallery-photo-meta { font-size:12px; }
 .gallery-photo-meta>span:last-child { max-width:52%; text-align:right; }
 .gallery-thumbnails { gap:6px; }
 .gallery-thumbnails button { width:64px; height:53px; }
}
@media(max-width:450px) {
 .about-art { height:580px; }
 .craft-photo { height:212px; bottom:99px; }
 .detail-photo { height:182px; bottom:44px; border-width:7px; border-radius:28px; }
 .about-caption { font-size:12px; }
 .gallery-instruction { font-size:15px; }
 .project .project-chip { font-size:12px; }
 .project-caption strong { font-size:23px; }
 .footer-top { grid-template-columns:1fr; }
 .footer-contact { margin-top:2px; }
 .footer-phone strong { font-size:22px; }
}
@media(max-height:580px) {
 dialog.project-gallery { height:calc(100dvh - 16px); padding:12px; }
 dialog.project-gallery[open] { gap:8px; }
 .gallery-dialog-head h2 { font-size:23px; }
 .gallery-dialog-head .eyebrow { display:none; }
 .gallery-thumbnails button { height:44px; }
 .gallery-photo-meta>span:last-child { display:none; }
}

/* Extended collections: thumbnails scroll inside the popup without growing its height. */
.gallery-thumbnails { justify-content:flex-start; overflow-x:auto; padding:3px 1px 6px; scrollbar-width:thin; scrollbar-color:var(--gold) transparent; }
.gallery-thumbnails button { flex:0 0 92px; }
@media(max-width:600px) { .gallery-thumbnails button { flex-basis:64px; } }
