/* Author: Jiaqi LI */
:root #theme-toggle,:root #weather-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;padding:9px;border:0;background:transparent;color:var(--ink);cursor:pointer;border-radius:50%}
:root #weather-toggle[hidden]{display:none}
:root #theme-toggle:hover,:root #weather-toggle:hover{background:var(--line)}
:root #theme-toggle:focus-visible,:root #weather-toggle:focus-visible{outline:1px solid var(--ink);outline-offset:3px}
:root #theme-toggle svg,:root #weather-toggle svg{width:21px;height:21px}
:root #weather-toggle .weather-off{display:none}
:root #weather-toggle[aria-pressed="false"]{opacity:.55}
:root #weather-toggle[aria-pressed="false"] .weather-on{display:none}
:root #weather-toggle[aria-pressed="false"] .weather-off{display:block}
:root .weather-layer{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:9990}
:root .weather-layer[hidden]{display:none}
:root #theme-toggle .theme-moon{display:none}
:root[data-theme="light"] #theme-toggle .theme-sun{display:none}
:root[data-theme="light"] #theme-toggle .theme-moon{display:block}
:root:root:root[data-theme="light"]{--paper:#fafaf8;--ink:#191919;--muted:#626262;--line:#d8d8d4;--green:#333;--deep:#333;--white:#fff;color-scheme:light}
:root[data-theme="light"] .site-header,:root[data-theme="light"] .site-footer,:root[data-theme="light"] .home-statement,:root[data-theme="light"] .home-selected .section-heading,:root[data-theme="light"] .gallery-tools,:root[data-theme="light"] .search-box,:root[data-theme="light"] .about-stats{border-color:var(--line)}
:root[data-theme="light"] .site-header nav a:not(.active),:root[data-theme="light"] .category-link,:root[data-theme="light"] .search-box,:root[data-theme="light"] .tag,:root[data-theme="light"] .photo-caption,:root[data-theme="light"] .photo-meta>span,:root[data-theme="light"] .about-stats span,:root[data-theme="light"] .eyebrow,:root[data-theme="light"] .home-statement>.eyebrow,:root[data-theme="light"] .page-heading p,:root[data-theme="light"] .site-footer,:root[data-theme="light"] .detail-info p{color:var(--muted)}
:root[data-theme="light"] .site-header nav a:hover,:root[data-theme="light"] .site-header nav a.active,:root[data-theme="light"] .text-link,:root[data-theme="light"] .tag:hover,:root[data-theme="light"] .contact-list a:hover,:root[data-theme="light"] .search-box input,:root[data-theme="light"] .photo-meta h3,:root[data-theme="light"] .empty-state h3,:root[data-theme="light"] .site-footer>a:last-child{color:var(--ink)}
:root[data-theme="light"] .site-header nav a.active:after{background:var(--ink)}
:root[data-theme="light"] .photo-open,:root[data-theme="light"] .about-image img,:root[data-theme="light"] .detail-image,:root[data-theme="light"] .admin-item img{background:#f0f0ed}
:root:root[data-theme="light"] .photo-open{background:transparent}
:root[data-theme="light"] .slide-preview{filter:brightness(.9);opacity:.5}
:root[data-theme="light"] .slide-preview:hover{filter:brightness(1);opacity:.85}
:root[data-theme="light"] .slide-bar,:root[data-theme="light"] .slide-bar>.text-link,:root[data-theme="light"] #slide-counter,:root[data-theme="light"] .home-statement p,:root[data-theme="light"] .about-copy p,:root[data-theme="light"] .about-info{color:#505050}
:root[data-theme="light"] .home-statement>.text-link,:root[data-theme="light"] .slide-controls .icon-button{color:var(--ink)}
:root[data-theme="light"] .page-index{color:#757575}
:root[data-theme="light"] .icon-button,:root[data-theme="light"] .button-outline{border-color:#aaa;background:transparent;color:var(--ink)}
:root[data-theme="light"] .icon-button:hover,:root[data-theme="light"] .button-outline:hover,:root[data-theme="light"] .category-link:not(.active):hover,:root[data-theme="light"] .active-filter button{background:#e8e8e4;color:var(--ink)}
:root[data-theme="light"] .category-link.active,:root[data-theme="light"] .button-dark,:root[data-theme="light"] .toast{background:#222;color:#fff}
:root[data-theme="light"] .category-link.active span{color:#ddd}
:root[data-theme="light"] .button-dark:hover{background:#444;color:#fff}
:root[data-theme="light"] .active-filter{color:var(--muted)}
:root[data-theme="light"] dialog,:root[data-theme="light"] .photo-dialog{background:var(--paper);color:var(--ink);border-color:var(--line)}
:root[data-theme="light"] .admin-form input,:root[data-theme="light"] .admin-form select{background:#fff;color:var(--ink);border-color:#aaa}
:root[data-theme="light"] #language-toggle:hover{background:#e8e8e4}
:root[data-theme="light"] .language-menu{background:#fff;border-color:#ccc;box-shadow:0 12px 30px #0002}
:root[data-theme="light"] .language-menu button{color:#333}
:root[data-theme="light"] .language-menu button:hover,:root[data-theme="light"] .language-menu button[aria-checked="true"]{background:#eee;color:#111}
:root[data-theme="light"] .world-map-wrap,:root[data-theme="dark"] .world-map-wrap{background:transparent}
:root[data-theme="light"] :is(.map-marker,.moon-marker):hover circle.map-marker-dot,:root[data-theme="light"] :is(.map-marker,.moon-marker):focus circle.map-marker-dot{fill:#bbb}
:root[data-theme="light"] .map-controls{background:#fafaf8e8;border-color:#aaa}
:root[data-theme="light"] .map-mode-toggle{background:#fafaf8e8;border-color:#aaa;color:#222}
:root[data-theme="light"] .map-mode-toggle:hover{background:#e8e8e4;border-color:#777}
:root[data-theme="light"] .map-controls button{border-color:#aaa;color:#222}
:root[data-theme="light"] .map-controls button:hover{background:#e8e8e4;border-color:#777}
:root[data-theme="light"] .map-controls span{color:#555}
:root[data-theme="light"] .search-box input::placeholder{color:#666}
:root[data-theme="light"] .cloud-status,:root[data-theme="light"] #admin-message{color:#805000}
@media(max-width:700px){:root #theme-toggle{margin-left:0}:root #weather-toggle,:root #theme-toggle{width:36px;height:36px;padding:8px}}
:root .gallery-filters{display:flex;align-items:center;gap:8px;flex-shrink:0}
:root .filter-control{height:36px;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--line);color:var(--muted);font-size:10px;white-space:nowrap}
:root .filter-control select{max-width:128px;padding:0;border:0;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
:root .filter-control select option{background:var(--paper);color:var(--ink)}
:root .category-link.unavailable{opacity:.3;cursor:not-allowed}
:root .filter-control select:focus-visible{outline:2px solid var(--deep);outline-offset:3px}
:root .active-filter{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
:root .active-filter button{display:inline-flex;align-items:center;gap:5px}
:root .active-filter button svg{width:13px;height:13px}
:root .active-filter .clear-filter{padding:5px 8px;border:0;background:transparent;color:var(--muted);font-size:10px}
:root .active-filter .clear-filter:hover{color:var(--ink)}
@media(max-width:1200px){:root .gallery-tools{flex-wrap:wrap;justify-content:flex-start}:root .gallery-tools>.search-box{margin-left:auto}}
@media(max-width:700px){:root .gallery-filters{order:2}:root .gallery-tools>.search-box{order:3;flex:1 1 100%;width:100%;margin-left:0}:root .filter-control select{max-width:108px}}
:root :is(a,button,input,select,summary):focus-visible{outline:2px solid currentColor;outline-offset:3px}
:root :is(.map-marker,.moon-marker,.planet-target):focus-visible{outline:2px solid var(--ink);outline-offset:3px}
:root .slide-stage{touch-action:pan-y pinch-zoom}
:root .tag{display:inline-flex;align-items:center;min-height:24px}
:root .photo-unavailable{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;height:100%;min-height:0;background:var(--line);color:var(--muted);font-size:12px;padding:8px;text-align:center;overflow-wrap:anywhere}
:root .photo-unavailable svg{width:24px;height:24px;flex-shrink:0}
:root .admin-item>.photo-unavailable{min-height:0;height:80px;font-size:10px}
:root .detail-image>.photo-unavailable{min-height:280px}
:root .collection-view-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 28px}
:root .collection-view{display:inline-flex;max-width:100%;border:1px solid var(--line);user-select:none;-webkit-user-select:none}
:root .collection-view button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:8px 12px;border:0;border-radius:0;background:transparent;color:var(--muted);font-size:11px}
:root .collection-view button svg{width:15px;height:15px;flex-shrink:0}
:root .collection-view button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
:root .collection-view button:focus-visible{outline:2px solid var(--ink);outline-offset:3px;position:relative;z-index:1}
:root .photo-grid.photo-months{display:block}
:root .photo-month+.photo-month{margin-top:42px}
:root .photo-month-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);padding:18px 0;margin-bottom:8px}
:root .photo-month-heading h2{margin:0;font:400 18px/1.5 var(--sans);overflow-wrap:anywhere}
:root .photo-month-heading>span{flex-shrink:0;color:var(--muted);font-size:11px}
:root .cloud-status[data-loading]{position:fixed;top:132px;right:5%;z-index:100;width:max-content;max-width:90vw;padding:8px 12px;border:1px solid var(--line);background:var(--paper);box-shadow:0 4px 16px #0002}
:root .analytics-admin-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
:root .analytics-admin-head h2{margin:0}
:root .analytics-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 12px}
:root .analytics-stat-card{border:1px solid var(--line);padding:14px 16px;background:var(--paper);display:flex;flex-direction:column;gap:6px}
:root .analytics-stat-label{font-size:11px;color:var(--muted);letter-spacing:.3px}
:root .analytics-stat-value{font-size:24px;font-weight:500;line-height:1.15;font-variant-numeric:tabular-nums;color:var(--ink)}
:root .analytics-admin-note{margin:0;font-size:12px;color:var(--muted)}
:root .analytics-admin-error{margin:0;font-size:12px;color:var(--muted)}
:root .analytics-chart-panel{margin:16px 0 12px;border:1px solid var(--line);background:var(--paper);padding:14px 16px 12px}
:root .analytics-chart-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:12px}
:root .analytics-granularity{display:inline-flex;border:1px solid var(--line);max-width:100%}
:root .analytics-granularity button{min-height:32px;padding:4px 12px;border:0;border-radius:0;background:transparent;color:var(--muted);font-size:11px;cursor:pointer}
:root .analytics-granularity button+button{border-left:1px solid var(--line)}
:root .analytics-granularity button:hover:not(:disabled){color:var(--ink)}
:root .analytics-granularity button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
:root .analytics-granularity button:focus-visible{outline:2px solid var(--ink);outline-offset:2px;position:relative;z-index:1}
:root .analytics-chart-readout{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums;min-height:16px}
:root .analytics-chart-readout strong{color:var(--ink);font-weight:500}
:root .analytics-chart-wrap{width:100%;min-height:170px;position:relative}
:root .analytics-chart-svg{display:block;width:100%;height:auto;overflow:visible}
:root .analytics-chart-grid{stroke:var(--line);stroke-width:1;stroke-dasharray:2 3}
:root .analytics-chart-axis{fill:var(--muted);font-size:10px;font-family:var(--sans);font-variant-numeric:tabular-nums}
:root .analytics-chart-area{fill:var(--ink);fill-opacity:.07}
:root .analytics-chart-line{fill:none;stroke:var(--ink);stroke-width:1.75;stroke-linejoin:round;stroke-linecap:round}
:root .analytics-chart-guide{stroke:var(--line);stroke-width:1;opacity:0;transition:opacity .12s ease}
:root .analytics-chart-guide.is-active{opacity:1}
:root .analytics-chart-dot{fill:var(--paper);stroke:var(--ink);stroke-width:1.75;transition:r .12s ease,fill .12s ease}
:root .analytics-chart-dot.is-active{fill:var(--ink)}
:root .analytics-chart-hit{fill:transparent;cursor:pointer;outline:none}
:root .analytics-chart-status{margin:0;padding:42px 0;text-align:center;font-size:12px;color:var(--muted)}
/* Rounded guestbook inputs & Paper Plane Send adapted from UI Moments (https://github.com/guanmo-ai/ui-moments) · MIT License */
:root #guestbook-form input,:root #guestbook-form textarea{border-radius:10px;transition:border-color .2s ease}
:root #guestbook-form input:focus,:root #guestbook-form textarea:focus{border-color:var(--ink)}
:root #guestbook-form label{position:relative}
:root #guestbook-form [aria-invalid="true"]{border-color:var(--ink)}
:root #guestbook-form .guestbook-field-error{position:absolute;left:14px;top:calc(100% + 8px);z-index:8;display:inline-flex;align-items:center;gap:8px;padding:7px 11px;border-radius:8px;border:1px solid var(--ink);background:var(--paper);color:var(--ink);font-size:12px;line-height:1.35;box-shadow:0 8px 24px rgb(0 0 0 / .24);white-space:nowrap}
:root #guestbook-form .guestbook-field-error::before{content:'';position:absolute;top:-5px;left:14px;width:8px;height:8px;background:var(--paper);border-top:1px solid var(--ink);border-left:1px solid var(--ink);transform:rotate(45deg)}
:root #guestbook-form .guestbook-field-error-icon{display:inline-grid;place-items:center;width:18px;height:18px;flex:none;border-radius:4px;background:var(--ink);color:var(--paper);font-size:12px;font-weight:700;line-height:1}
:root #guestbook-form .guestbook-send{min-width:136px;height:42px;padding:0 20px;border:1px solid var(--ink);border-radius:999px;background:var(--ink);color:var(--paper);display:inline-flex;align-items:center;justify-content:center;gap:9px;font-size:12px;font-weight:500;overflow:visible;transition:transform .28s cubic-bezier(.3,1.45,.5,1),background .25s ease,color .25s ease,border-color .25s ease}
:root #guestbook-form .guestbook-send:hover:not(:disabled){opacity:.9}
:root #guestbook-form .guestbook-send:active:not(:disabled){transform:scale(.96);transition-duration:.1s}
:root #guestbook-form .guestbook-send-plane{display:grid;width:16px;flex:none;transition:width .35s cubic-bezier(.3,1.45,.5,1),margin .35s cubic-bezier(.3,1.45,.5,1),opacity .25s ease}
:root #guestbook-form .guestbook-send-plane svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
:root #guestbook-form .guestbook-send-swap{display:grid;overflow:hidden}
:root #guestbook-form .guestbook-send-swap>span{grid-area:1/1;transition:transform .38s cubic-bezier(.3,1.45,.5,1),opacity .25s ease;white-space:nowrap}
:root #guestbook-form .guestbook-send-swap>:last-child{transform:translateY(115%);opacity:0}
:root #guestbook-form .guestbook-send[data-done]{background:var(--paper);color:var(--ink);border-color:var(--ink)}
:root #guestbook-form .guestbook-send[data-done] .guestbook-send-plane{width:0;margin-right:-9px;opacity:0}
:root #guestbook-form .guestbook-send[data-done] .guestbook-send-swap>:first-child{transform:translateY(-115%);opacity:0}
:root #guestbook-form .guestbook-send[data-done] .guestbook-send-swap>:last-child{transform:translateY(0);opacity:1}
@media(max-width:700px){
	:root .analytics-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
	:root .analytics-granularity button{min-height:38px;padding:6px 11px;font-size:12px}
	:root .collection-view button{min-height:44px;font-size:12px;padding:8px 10px}
	:root .photo-month-heading h2{font-size:16px}
	:root .site-header{height:auto;min-height:124px;padding-top:16px;padding-bottom:10px;row-gap:12px}
	:root .site-header nav{height:44px;gap:20px}
	:root .site-header nav a{height:44px;padding-top:12px;font-size:12px}
	:root #language-toggle,:root #theme-toggle,:root .slide-controls .icon-button,:root .detail-arrow,:root .close-dialog{width:44px;height:44px}
	:root .language-menu button{min-height:44px}
	:root .map-controls button{min-width:44px;min-height:44px}
	:root .map-mode-toggle{min-width:44px;min-height:44px}
	:root .admin-form input,:root .admin-form select,:root .search-box input{font-size:16px}
	:root .filter-control{height:44px}
}
/* Navigation leaf adapted from UI Moments (https://github.com/guanmo-ai/ui-moments) · MIT License */
:root .site-header nav{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-self:center;gap:0;width:340px;max-width:100%;height:48px;padding:3px;border:0;border-radius:13px;background:#242424;perspective:260px}
:root[data-theme="light"] .site-header nav{background:#e2e2e0}
:root .site-header nav .nav-leaf{position:absolute;z-index:0;border-radius:10px;background:#414141;box-shadow:0 2px 5px #0005;pointer-events:none;backface-visibility:visible}
:root[data-theme="light"] .site-header nav .nav-leaf{background:#fff;box-shadow:0 2px 5px #0002}
:root .site-header nav .nav-leaf[hidden]{display:none}
:root .site-header nav a{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:42px;padding:0;border-radius:10px;font-size:10.5px;line-height:1.1;white-space:nowrap;transition:color .2s}
:root .site-header nav a svg{width:14px;height:14px;stroke-width:1.65;flex-shrink:0}
:root .site-header nav a>span{font-size:inherit;color:inherit}
:root .site-header nav a.active:after{content:none}
:root .site-header nav a:focus-visible{outline:2px solid var(--ink);outline-offset:-3px}
@media(max-width:700px){
	:root .site-header nav{width:100%;height:50px;gap:0}
	:root .site-header nav a{height:44px;padding:0;gap:3px;font-size:10.5px}
	:root .site-header nav a svg{width:15px;height:15px}
}
