/* Shared header geometry for home and browser tools. */
body>header,body>header.bar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:56px 44px;gap:0;padding:0 18px;min-height:103px;background:#0641ad;border-bottom:3px solid #ffe100;position:sticky;top:0;z-index:30;width:100%;box-sizing:border-box}
body>header .brand{grid-column:1;grid-row:1;display:flex;align-items:center;gap:9px;text-decoration:none;color:#ffe100;font:800 18px system-ui,sans-serif;letter-spacing:0;min-width:0}
body>header .brand img{width:42px;height:42px;flex:0 0 42px;border-radius:10px}
body>header .brand strong{font:inherit;color:#ffe100}body>header .brand small,body>header .brand-credit{display:block;font:500 11px system-ui,sans-serif;color:white;line-height:1.4}body>header .brand-credit b{font:inherit}
body>header .header-actions{grid-column:2;grid-row:1}
body>header nav,body>header .desktop-photo-mode-slot{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:flex-start;min-width:0;overflow-x:auto;scrollbar-width:none;margin:0;padding:0;gap:5px;width:100%}
body>header .photo-mode-switch{display:flex;width:max-content;gap:5px;padding:0;margin:0;flex:0 0 auto}
body>header nav a,body>header .photo-mode-button{flex:0 0 auto;white-space:nowrap;padding:8px 12px;border:1px solid transparent;border-radius:7px;text-decoration:none;color:white;font:650 12px system-ui,sans-serif;line-height:1.4;background:transparent}
body>header nav .active,body>header .photo-mode-button.selected{background:#ffe100;color:#08143d;border-color:#ffe100}
.mobile-photo-mode-slot{display:none!important}.server-status{top:103px}
@media(max-width:700px){body>header,body>header.bar{padding:0 10px;grid-template-rows:52px 42px;min-height:97px}body>header .brand{font-size:16px}body>header .brand img{width:38px;height:38px;flex-basis:38px}body>header nav,body>header .desktop-photo-mode-slot{margin:0;padding:0}body>header nav a,body>header .photo-mode-button{padding:8px 10px}.server-status{top:97px}}
body>header nav,body>header .photo-mode-switch{flex-wrap:nowrap}

@media(min-width:701px){body>header,body>header.bar{grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:64px;min-height:67px;column-gap:18px}body>header nav,body>header .desktop-photo-mode-slot{grid-column:2;grid-row:1}body>header .header-actions{grid-column:3;grid-row:1}.server-status{top:67px}}

body>header .powered-label{color:#fff}body>header .powered-domain{color:#ffe100}

body>header .brand-domain{display:inline-flex;align-items:center;flex:0 0 auto;white-space:nowrap;font-size:24px;font-weight:800;text-decoration:none}body>header .brand-domain .powered-domain{color:#ffe100}@media(max-width:700px){body>header .brand-domain{font-size:20px}}

/* One wordmark and tool-button system for every page. */
body>header .brand-wordmark{display:inline-flex;align-items:baseline;gap:0;line-height:1;font-size:24px;font-weight:850;letter-spacing:-1px}
body>header .brand-ganit{color:#ffe100}body>header .brand-dot{color:#ff9687;padding:0 1px}body>header .brand-in{color:#fff;letter-spacing:-.5px}
body>header nav a,body>header .photo-mode-switch a.photo-mode-button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 11px;border:1px solid #ffffff55;border-radius:7px;background:transparent;color:#fff;font:650 12px/1.4 system-ui,sans-serif;text-decoration:none;box-shadow:none;transition:background .15s ease,border-color .15s ease}
body>header nav a:hover,body>header .photo-mode-switch a.photo-mode-button:hover{background:#ffffff18;border-color:#ffffff88}
body>header nav a:focus-visible,body>header .photo-mode-switch a.photo-mode-button:focus-visible{outline:2px solid #ffe100;outline-offset:2px}
body>header nav a.active,body>header .photo-mode-switch a.photo-mode-button.selected{background:#ffe100;color:#08143d;border-color:#ffe100}
body>header.hidden{display:none!important}
@media(max-width:700px){body>header .brand-wordmark{font-size:22px}body>header nav a,body>header .photo-mode-switch a.photo-mode-button{min-height:32px;padding:6px 10px}}
@media(prefers-reduced-motion:reduce){body>header nav a,body>header .photo-mode-switch a.photo-mode-button{transition:none}}

/* The initial G is a small, code-drawn monogram; no image download. */
body>header .brand-ganit{display:inline-flex;align-items:baseline;gap:1px}
body>header .brand-g{position:relative;display:inline-block;font-size:1.23em;font-weight:900;letter-spacing:-2px;line-height:1;color:#ffe100;text-shadow:1px 1px 0 #00266d}
body>header .brand-g::after{content:"";position:absolute;width:5px;height:5px;right:-1px;top:3px;background:#ff9687;border:1.5px solid #0641ad;border-radius:2px;transform:rotate(45deg)}
body>header .brand-wordmark{letter-spacing:-.8px}

body>header .header-account-link{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;width:40px;height:40px;align-self:center;border-radius:8px;border:1px solid #ffffff55;color:white;background:#ffffff12;text-decoration:none}body>header .header-account-link:hover{background:#ffffff25}

body>header .header-account-link{border:0;border-radius:50%;background:transparent;width:44px;height:44px}body>header .header-account-link svg{width:28px;height:28px}@media(min-width:701px){body>header .header-account-link{grid-column:3;grid-row:1}}

body>header .header-tool-trigger{flex:0 0 auto;white-space:nowrap;min-height:34px;padding:7px 11px;border:1px solid #ffffff55;border-radius:7px;background:transparent;color:white;font:650 12px/1.4 system-ui;cursor:pointer;box-shadow:none;transform:none!important}
body>header .header-tool-trigger.active,body>header .header-tool-trigger[aria-expanded="true"]{background:#ffe100;color:#08143d;border-color:#ffe100}
.header-tool-menu{position:fixed;z-index:100;width:190px;padding:6px;background:white;border:1px solid #cfdaed;border-radius:9px;box-shadow:0 6px 20px #001c4530;animation:header-menu-in .14s ease-out}
.header-tool-menu[hidden]{display:none!important}.header-tool-menu .header-tool-option{display:block;padding:10px 12px;border-radius:6px;color:#0641ad;font:650 13px system-ui;text-decoration:none;background:white;margin:0;border:0;white-space:normal;transform:none}
.header-tool-menu .header-tool-option:hover,.header-tool-menu .header-tool-option:focus-visible{background:#edf3ff}.header-tool-menu .header-tool-option.active{background:#ffe100;color:#08143d}
@keyframes header-menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.header-tool-menu{animation:none}}
@media(max-width:700px){body>header .header-tool-trigger{min-height:32px;padding:6px 10px}}

/* Straight corners for the shared header and its navigation. */
body>header,body>header.bar,body>header nav a,body>header .photo-mode-button,body>header .header-tool-trigger,body>header .header-account-link,.header-tool-menu,.header-tool-menu .header-tool-option{border-radius:0!important}

/* Phone navigation has Shop Print in the bottom menu. */
@media(max-width:700px){body>header .shop-print-shortcut{display:none!important}}

body>header nav a[aria-current="page"]{background:#ffe100;color:#08143d;border-color:#ffe100}body>header .ganit-brand-icon{object-fit:contain}body>header a:focus-visible{outline:3px solid #ffe100;outline-offset:2px}

/* Keep phone shortcuts in one place; desktop tools remain scrollable. */
@media(max-width:700px){body>header .mobile-menu-duplicate{display:none!important}}
@media(min-width:701px){body>header nav,body>header .desktop-photo-mode-slot{scrollbar-width:thin;scrollbar-color:#ffffff80 transparent}body>header nav::-webkit-scrollbar{height:4px}body>header nav::-webkit-scrollbar-thumb{background:#ffffff80}}

body>header .header-qr-button{grid-column:2;grid-row:1;justify-self:end;align-self:center;margin-right:104px;width:36px;height:36px;border:0;background:transparent;color:white;cursor:pointer;padding:6px}
@media(min-width:701px){body>header .header-qr-button{grid-column:3;margin-right:104px}body>header{padding-right:18px!important}body>header nav{padding-right:38px!important;box-sizing:border-box}}
@media(max-width:700px){body>header .header-account-link.mobile-menu-duplicate{display:flex!important}}
#shopQrPopup{width:min(360px,calc(100vw - 32px));box-sizing:border-box;border:0;border-radius:18px;padding:24px;color:#172642;background:white;box-shadow:0 16px 60px #10234440}#shopQrPopup::backdrop{background:#10234470}#shopQrPopup .qr-close{position:absolute;right:12px;top:10px;color:#d53939;border:0;background:transparent;font-size:24px;cursor:pointer}#shopQrPopup img{display:block;width:240px;max-width:100%;margin:16px auto}#shopQrPopup input{box-sizing:border-box;width:100%;padding:12px;border:1px solid #cbd7e8;border-radius:8px}#shopQrPopup .qr-save{margin-top:12px;padding:12px;border:0;border-radius:8px;background:#0641ad;color:white;width:100%}

#shopQrPopup [hidden]{display:none!important}

#shopQrPopup .qr-download{display:block;text-align:center;margin:14px 0;padding:12px;border-radius:8px;background:#0641ad;color:white;text-decoration:none;font-weight:700}

/* Reserve one compact action group so icons cannot overlap tool links. */
body>header .header-shop-link{display:none}
body>header{position:sticky;padding-right:18px!important}
body>header .header-qr-button{grid-column:auto;position:absolute;right:110px;top:9px;margin:0;width:34px;height:34px}
@media(min-width:701px){body>header{padding-right:164px!important}body>header .header-shop-link{display:flex;position:absolute;right:118px;top:15px;width:34px;height:34px;align-items:center;justify-content:center;color:white}body>header .header-shop-link svg{width:25px;height:25px}body>header .header-qr-button{right:158px;top:15px}body>header{padding-right:204px!important}body>header .profile-account-controls{position:absolute;right:12px;top:10px}body>header>.header-account-link{position:absolute;right:12px;top:10px}body>header nav{padding-right:0!important}}
@media(max-width:700px){body>header{padding:0 8px!important}body>header .brand{max-width:calc(100% - 144px)}body>header .brand img{width:28px;height:28px;flex-basis:28px}body>header .brand-wordmark{font-size:19px}body>header .brand{gap:5px}body>header .profile-account-controls{position:absolute;right:5px;top:4px;gap:4px}body>header>.header-account-link{position:absolute;right:5px;top:4px}body>header .header-qr-button{right:97px;top:9px;width:30px;height:30px}body>header .profile-ring-button{width:34px;height:34px}}

/* All public tool pages use the same header geometry and labels. */
body>header .header-actions{display:none!important}
body>header .desktop-photo-mode-slot{overflow:visible!important}
body>header .shared-tools-nav{display:flex!important;align-items:center;gap:5px;overflow-x:auto!important;flex-wrap:nowrap;width:100%;min-width:0;margin:0;padding:0!important;scrollbar-width:thin}
body>header #photoModeSwitch a{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;min-height:34px;border:1px solid #ffffff55;border-radius:0;background:transparent;color:white;font:650 12px/1.4 system-ui;text-decoration:none;white-space:nowrap}
body>header #photoModeSwitch a.active{background:#ffe100;color:#08143d;border-color:#ffe100}
@media(max-width:700px){body>header #photoModeSwitch a.mobile-menu-duplicate{display:none!important}body>header #photoModeSwitch a{min-height:32px;padding:6px 10px}}
body>header .account-icon{display:none!important}

.shared-scan-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px}.shared-scan-toolbar .scan-header-icons{display:flex;gap:8px;flex-wrap:wrap}.shared-scan-toolbar .scan-header-icon{color:#0641ad;background:#edf3ff;border:1px solid #cbd9ee}

@media(min-width:701px){body>header,body>header.bar{grid-template-rows:64px!important;height:67px!important;min-height:67px!important}}
@media(max-width:700px){body>header,body>header.bar{grid-template-rows:52px 42px!important;height:97px!important;min-height:97px!important}}

body>header:not(.header-ready) nav,body>header:not(.header-ready) #photoModeSwitch{visibility:hidden}

/* Keep active header tools in the same quiet style as the navigation. */
body>header nav a.active,body>header nav a[aria-current="page"],body>header nav .header-tool-trigger.active,body>header nav .header-tool-trigger[aria-expanded="true"],body>header .photo-mode-switch a.photo-mode-button.selected,body>header #photoModeSwitch a.active{background:transparent;color:#fff;border-color:transparent}
.header-tool-menu .header-tool-option.active{background:#edf3ff;color:#0641ad}

/* Compact phone header: tool navigation stays available on desktop. */
@media(max-width:700px){
 body>header:not(.document-toolbar),body>header.bar:not(.document-toolbar){grid-template-rows:48px!important;height:51px!important;min-height:51px!important}
 body>header nav,body>header .shared-tools-nav,body>header .desktop-photo-mode-slot,body>header .photo-mode-switch,body>header #photoModeSwitch,body>header .header-tool-trigger{display:none!important}
 .header-tool-menu{display:none!important}
 .server-status{top:51px}
}

.phone-tool-search{display:none}@media(max-width:700px){body>header:not(.document-toolbar),body>header.bar:not(.document-toolbar){grid-template-rows:48px 38px!important;height:89px!important;min-height:89px!important}.phone-tool-search{display:flex;grid-column:1/-1;grid-row:2;align-items:center;gap:7px;position:relative;margin:0 0 6px;padding:0 10px;background:#fff;border-radius:5px;color:#536885;min-width:0;height:32px}.phone-tool-search>svg{width:17px;height:17px;flex-shrink:0}.phone-tool-search input{width:100%;min-width:0;height:30px;padding:0;border:0;outline:0;background:transparent;color:#10233e;font:14px system-ui}.phone-tool-search:focus-within{outline:2px solid #ffe100}.phone-tool-results{position:absolute;top:38px;left:0;right:0;max-height:55dvh;overflow:auto;background:white;border:1px solid #d9e3f2;box-shadow:0 8px 24px #10233e30;border-radius:5px;z-index:100}.phone-tool-results[hidden]{display:none}.phone-tool-results a{display:block;padding:13px 14px;color:#10233e;text-decoration:none;font:14px system-ui;border-bottom:1px solid #edf1f6}.phone-tool-results a:focus-visible,.phone-tool-results a:hover{background:#edf3ff}.phone-tool-results p{padding:12px;font-size:14px}.server-status{top:89px}}

@media(max-width:700px){body>header:not(.document-toolbar),body>header.bar:not(.document-toolbar){grid-template-rows:56px 38px!important;height:97px!important;min-height:97px!important;background:#0641ad}.phone-tool-search{margin-bottom:6px}body>header .profile-account-controls,body>header>.header-account-link{top:8px}body>header .header-qr-button{top:13px}.server-status{top:97px}}

/* Reserve both phone rows before search JavaScript loads. */
@media(max-width:700px){
 body>header:not(.document-toolbar),body>header.bar:not(.document-toolbar){grid-template-rows:48px 38px!important;height:89px!important;min-height:89px!important;max-height:89px!important;overflow:visible;flex-shrink:0}
 body>header .profile-account-controls,body>header>.header-account-link{top:4px}
 body>header .header-qr-button{top:9px}
 .server-status{top:89px}
}

/* Custom phone tool search menu with straight corners. */
@media(max-width:700px){
 .phone-tool-search,.phone-tool-results{border-radius:0}
 .phone-tool-results{padding:5px;background:#fff;border:1px solid #d5e1f2;border-top:3px solid #0641ad;box-shadow:0 12px 28px #122b4926;max-height:min(55dvh,420px);scrollbar-width:thin;scrollbar-color:#b6c7df #f4f7fb}
 .phone-tool-results a{display:flex;align-items:center;gap:10px;margin:0;padding:12px 10px;min-height:44px;border-bottom:1px solid #edf1f7;font:600 13px/1.4 system-ui;color:#233953;background:#fff;transition:background .12s ease,color .12s ease}
 .phone-tool-results a::before{content:"";width:6px;height:6px;border:1.5px solid #53739f;flex-shrink:0}
 .phone-tool-results a::after{content:"";margin-left:auto;width:6px;height:6px;border-top:1.5px solid #6982a5;border-right:1.5px solid #6982a5;transform:rotate(45deg);flex-shrink:0}
 .phone-tool-results a:last-child{border-bottom:0}
 .phone-tool-results a:hover,.phone-tool-results a:focus-visible{background:#edf3ff;color:#0641ad;outline:2px solid #0641ad;outline-offset:-2px}
 .phone-tool-results p{margin:0;padding:16px 12px;color:#61728a}
}
@media(prefers-reduced-motion:reduce){.phone-tool-results a{transition:none}}
