/* Navigation copied from perler-pattern-gallery.ejs. */
.nav-links { display:flex; }
    /* 与拼豆首页共用的页头视觉与导航结构。 */
    .topbar { position: sticky; top: 0; z-index: 20; display: grid; height: 69px; min-height: 69px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; margin: 0; padding: 0 max(16px, calc((100% - 1280px) / 2)); border: 0; border-bottom: 1px solid #e7e5e4; border-radius: 0; background: rgba(255, 253, 249, .94); box-shadow: none; backdrop-filter: blur(14px); }
    .topbar .brand { display: flex; align-items: center; gap: 10px; padding: 0; color: #1c1917; font-size: 15px; font-weight: 700; letter-spacing: normal; }
    .topbar .brand:hover { color: #9a3412; }
    .topbar .brand-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar .brand-mark { display: grid; width: 40px; height: 40px; flex: 0 0 auto; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 6px; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 2px 7px rgba(28, 25, 23, .07), 0 0 0 1px #e7e5e4; }
    .topbar .brand:hover .topbar .brand-mark { transform: none; }
    .topbar .brand-mark i { border-radius: 50%; }.topbar .brand-mark i:nth-child(1) { background: #3b82f6; }.topbar .brand-mark i:nth-child(2) { background: #ec4899; }.topbar .brand-mark i:nth-child(3) { background: #fbbf24; }.topbar .brand-mark i:nth-child(4) { background: #10b981; }.topbar .brand-mark i:nth-child(5) { background: #d86f4c; }.topbar .brand-mark i:nth-child(6) { background: #8b5cf6; }.topbar .brand-mark i:nth-child(7) { background: #06b6d4; }.topbar .brand-mark i:nth-child(8) { background: #fb923c; }.topbar .brand-mark i:nth-child(9) { background: #60a5fa; }
    .nav-links { justify-self: center; flex: 0 1 auto; align-self: auto; align-items: center; gap: 28px; }
    .nav-links .nav-link[aria-label]:not(.nav-mini-program) { display: none !important; }.nav-links .nav-mini-program { gap: 0; }.nav-links .nav-mini-program svg { display: none; }
    .nav-links .nav-link:not([aria-label]), .nav-links .nav-mini-program { display: inline-flex; min-width: 0; height: auto; align-items: center; border: 0; border-radius: 0; padding: 0; color: #78716c; font-size: 15px; font-weight: 500; white-space: nowrap; }
    .nav-links .nav-link:not([aria-label])::after, .nav-links .nav-mini-program::after { content: none; }
    .nav-links .nav-link:not([aria-label]):hover, .nav-links .nav-link:not([aria-label])[aria-current="page"], .nav-links .nav-mini-program:hover { border: 0; background: transparent; color: #1c1917; }
    /* 页头铺满视口，图纸列表沿用原来的宽版内容栅格。 */
    .nav-utility { display: flex; align-items: center; justify-self: end; gap: 12px; }.nav-utility > a { display: inline-flex; height: 40px; align-items: center; justify-content: center; color: #57534e; font-size: 14px; font-weight: 500; text-decoration: none; }.language-menu, .donation-menu { position: relative; }.language-menu summary, .donation-menu summary { display: inline-flex; height: 40px; align-items: center; justify-content: center; gap: 6px; border: 1px solid #e7e5e4; border-radius: 999px; padding: 0 11px; color: #57534e; background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; list-style: none; }.donation-menu summary { padding: 0 16px; background: #f7f1ea; }.language-menu summary::-webkit-details-marker, .donation-menu summary::-webkit-details-marker { display: none; }.language-menu summary:hover { border-color: #d6d3d1; background: #fafaf9; }.donation-menu summary:hover { color: #9a3412; background: #ffedd5; }.language-menu summary > svg:first-child { width: 16px; height: 16px; color: #a8a29e; }.language-menu .chevron { width: 12px; height: 12px; color: #a8a29e; transition: transform .15s; }.language-menu[open] .chevron { transform: rotate(180deg); }.language-panel, .donation-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; display: flex; width: 150px; flex-direction: column; padding: 6px; border: 1px solid #e7e5e4; border-radius: 14px; background: #fffdf9; box-shadow: 0 14px 32px rgba(28,25,23,.14); }.language-panel a { display: flex; height: 38px; align-items: center; padding: 0 10px; border-radius: 9px; color: #57534e; font-size: 13px; }.language-panel a:hover, .language-panel a.is-active { color: #9a3412; background: #fff1eb; }.donation-panel { width: 208px; align-items: center; gap: 7px; padding: 10px; color: #526071; font-size: 12px; font-weight: 700; text-align: center; }.donation-panel img { display: block; width: 100%; border-radius: 10px; background: #fff; }.mobile-menu { position: relative; display: none; }.mobile-menu > summary { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 1px solid #d6d3d1; border-radius: 999px; background: #fff; cursor: pointer; list-style: none; }.mobile-menu > summary::-webkit-details-marker { display: none; }.mobile-menu > summary span { display: block; width: 15px; height: 1.5px; border-radius: 2px; background: #44403c; }.mobile-menu-panel { position: absolute; top: calc(100% + 10px); right: 0; display: flex; width: min(280px, calc(100vw - 24px)); flex-direction: column; padding: 8px; border: 1px solid #e7e5e4; border-radius: 14px; background: #fffdf9; box-shadow: 0 14px 32px rgba(28,25,23,.14); }.mobile-menu-panel a, .mobile-menu-panel .mobile-donation summary { display: flex; min-height: 42px; align-items: center; padding: 0 12px; border-radius: 10px; color: #57534e; font-size: 14px; font-weight: 500; }.mobile-menu-panel a:hover, .mobile-menu-panel a.is-active, .mobile-menu-panel .mobile-donation summary:hover { background: #f5f5f4; color: #1c1917; }.mobile-donation summary { cursor: pointer; list-style: none; }.mobile-donation summary::-webkit-details-marker { display: none; }.mobile-donation .donation-panel { position: static; width: auto; margin: 4px 8px 8px; }
    .language-menu summary { padding-left: 12px; padding-right: 12px; }
    .language-menu .chevron { width: 14px; height: 14px; }
    @media (min-width: 640px) { .topbar .brand { font-size: 16px; } }
    @media (max-width: 1023px) { .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 0 16px; }.nav-links { display: none; }.mobile-menu { display: block; } }
    @media (max-width: 639px) { .topbar { height: 61px; min-height: 61px; padding-right: 12px; padding-left: 12px; } }
    @media (max-width: 639px) { .nav-utility > .donation-trigger { display: none; } }
    @media (max-width: 639px) { .topbar .brand-mark { width: 36px; height: 36px; }.nav-utility { gap: 8px; }.language-menu summary, .mobile-menu > summary { width: auto; min-width: 40px; height: 40px; padding: 0 10px; }.language-menu .chevron { display: inline; } }
    .language-menu .chevron { display: inline; width: 14px; height: 14px; margin: 0; }
    @media (max-width: 379px) { .language-menu summary span { display: none; } }
    .donation-trigger { display: inline-flex; height: 40px; align-items: center; justify-content: center; gap: 8px; border: 1px solid #e7e5e4; border-radius: 999px; padding: 0 16px; color: #57534e; background: #f7f1ea; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; transition: border-color .2s, background .2s, color .2s; }.donation-trigger svg { width: 16px; height: 16px; flex: 0 0 auto; }
    .donation-trigger:hover { border-color: #d99778; color: #9a3412; background: #ffedd5; }
    .donation-trigger:focus-visible { outline: 3px solid #f2a36b; outline-offset: 3px; }
    .mobile-menu-panel .donation-trigger { width: 100%; min-height: 42px; height: auto; justify-content: flex-start; border: 0; border-radius: 10px; padding: 0 12px; color: #57534e; background: transparent; font-size: 14px; font-weight: 500; }
    .mobile-menu-panel .donation-trigger:hover { border-color: transparent; color: #1c1917; background: #f5f5f4; }
    .donation-modal { width: min(30rem, calc(100% - 2rem)); max-height: min(90dvh, 44rem); overflow-y: auto; border: 1px solid rgba(255,255,255,.8); border-radius: 2rem; padding: 16px 20px 20px; color: #172033; background: #fffdf9; box-shadow: 0 24px 64px rgba(30, 25, 20, .25); }
    .donation-modal::backdrop { background: rgba(2, 6, 23, .6); backdrop-filter: blur(4px); }
    .donation-modal-header { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 12px; }
    .donation-modal-heading { display: flex; min-width: 0; align-items: center; gap: 10px; }.donation-modal-icon { display: inline-flex; width: 32px; height: 32px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 8px; color: #c85b36; background: #ffedd5; }.donation-modal-icon svg { width: 20px; height: 20px; }.donation-modal h2 { overflow: hidden; margin: 0; color: #b44f2d; font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 20px; font-style: italic; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
    .donation-modal-close { display: inline-flex; width: 36px; height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; border: 0; border-radius: 50%; color: #64748b; background: transparent; cursor: pointer; }.donation-modal-close:hover { color: #172033; background: #fff; }.donation-modal-close svg { width: 20px; height: 20px; }.donation-modal-close:focus-visible { outline: 3px solid #f2a36b; outline-offset: 2px; }
    .donation-modal-copy { max-width: 28rem; margin: 12px auto 0; text-align: center; }.donation-modal-copy p { margin: 0; color: #526071; font-size: 14px; line-height: 1.7; }.donation-modal-copy p + p { margin-top: 6px; color: #172033; font-weight: 700; }
    .donation-qr { width: min(17rem, 100%); margin: 12px auto 0; border: 1px solid #fed7aa; border-radius: 1.75rem; padding: 12px; background: #fff7ed; box-shadow: 0 14px 32px rgba(124, 45, 18, .12); }.donation-qr img { display: block; width: 100%; aspect-ratio: 1; border-radius: 1rem; object-fit: contain; background: #fff; }
    .donation-scan-hint { display: flex; min-height: 48px; align-items: center; justify-content: center; margin: 16px auto 0; border: 1px solid #e2e8f0; border-radius: 999px; padding: 0 20px; color: #526071; background: #fff; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; box-shadow: 0 2px 7px rgba(55, 38, 25, .05); }
    @media (max-width: 600px) { .donation-modal { width: min(100% - 20px, 30rem); padding: 16px 16px 20px; }.donation-modal-copy p { font-size: 13px; }.donation-scan-hint { border-radius: 1rem; padding: 10px 14px; } }

.topbar .brand > .brand-name { display:block; min-width:0; }
