:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);background:var(--surface);font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh;display:flex;flex-direction:column}a{color:inherit;text-decoration:none}button,input,select{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a:focus-visible,button:focus-visible,select:focus-visible{outline:3px solid #8bb9ff;outline-offset:5px}.topbar{height:86px;padding:0 42px;display:flex;align-items:center;justify-content:space-between}.wordmark{font-size:20px;font-weight:650;letter-spacing:-.6px}.dot{color:#4285f4}.badge{font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:20px;padding:7px 12px}main{flex:1;width:100%}.search-area{max-width:720px;margin:clamp(70px,15vh,180px) auto 0;padding:0 24px;text-align:center}.logo{font-size:clamp(44px,8vw,66px);font-weight:650;letter-spacing:-3px;color:var(--text)}.logo>span:first-child{color:#4285f4}.tagline{font-size:15px;color:var(--muted);margin:20px 0 34px;letter-spacing:2px}.search-box{display:flex;align-items:center;gap:16px;background:var(--field);border:1px solid var(--field-line);border-radius:30px;padding:8px 9px 8px 21px;min-height:60px;box-shadow:0 3px 16px #25385808;transition:box-shadow .2s,border-color .2s}.search-box:hover,.search-box:focus-within{border-color:var(--focus);box-shadow:0 4px 22px #2f65bd12}.search-box>svg{color:var(--muted);flex-shrink:0}input{width:100%;min-width:0;border:0;outline:none;background:transparent;font-size:16px;color:var(--text)}input::placeholder{color:var(--muted)}.search-box button{border:0;flex-shrink:0;background:var(--button);color:var(--button-text);border-radius:24px;padding:12px 20px;font-size:14px}.search-box button:hover{background:var(--button-hover)}.search-box button span{margin-left:6px}.hint{font-size:12px;color:var(--muted);margin-top:22px}.hint span{padding:0 10px}footer{margin-top:80px;padding:22px 42px;background:var(--footer);border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}.results-mode .search-area{margin:20px 0 0 120px;max-width:760px;text-align:left}.results-mode .logo,.results-mode .tagline,.results-mode .hint{display:none}.results-area{max-width:760px;margin:28px 0 30px 120px;padding:0 24px}.results-tab{font-size:14px;color:var(--link);border-bottom:1px solid var(--line);padding:0 4px 14px}.results-tab span{font-size:11px;color:var(--muted);margin-left:8px}#status{font-size:13px;color:var(--muted);line-height:1.8;margin:20px 0 30px}#status.error{color:var(--error)}.result{margin:0 0 30px;max-width:660px}.result-url{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;line-height:1.6}.result h2{font-size:20px;line-height:1.45;font-weight:500;color:var(--link);margin:5px 0 6px;overflow-wrap:anywhere}.result a:hover h2{text-decoration:underline}.result p{font-size:14px;line-height:1.8;color:var(--muted);margin:0;overflow-wrap:anywhere}.retry{border:1px solid var(--line);background:var(--button);color:var(--button-text);padding:10px 20px;border-radius:20px}.loading::before{content:"";display:inline-block;width:12px;height:12px;border:2px solid var(--line);border-top-color:#4285f4;border-radius:50%;margin-right:10px;vertical-align:-2px;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}@media(max-width:700px){.topbar{padding:0 22px;height:72px}.wordmark{font-size:18px}.search-area{padding:0 20px;margin-top:16vh}.search-box{gap:10px;padding-left:16px}.search-box button{padding:12px 16px}.search-box button span{display:none}.results-mode .search-area{margin:16px 0 0;max-width:none}.results-area{margin:24px 0;padding:0 24px}.result h2{font-size:19px}footer{padding:20px 24px;flex-direction:column;line-height:1.6}.hint{font-size:11px}.tagline{font-size:13px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Center the reading column; expand only when actual image content is present. */
:root{color-scheme:light;--surface:#fff;--text:#202124;--muted:#5f6368;--link:#1a0dab;--line:#e3e6eb;--soft:#f1f3f4;--match:#8a4900;--field:#fff;--field-line:#dfe3e9;--focus:#2767ce;--button:#edf4ff;--button-hover:#dceaff;--button-text:#2767ce;--footer:#f8f9fb;--error:#b04a33;background:var(--surface);color:var(--text)}
.results-mode .topbar{height:64px;padding:0 32px}
.results-mode .badge{display:none}
.results-mode .search-area{width:calc(100% - 40px);max-width:720px;margin:12px auto 0;padding:0;text-align:left}
.results-mode .search-box{min-height:54px}
.results-layout{width:calc(100% - 40px);max-width:720px;margin:24px auto 40px}
.results-layout.has-sidebar{max-width:1100px;display:grid;grid-template-columns:minmax(0,720px) minmax(0,320px);gap:60px}
.results-area{min-width:0;max-width:none;margin:0;padding:0}
.results-tab{padding:0 0 14px;border-color:var(--line);color:var(--link)}
#status{margin:18px 0 6px;color:var(--muted)}
#results{margin-top:24px}
.result{display:flex;align-items:flex-start;gap:24px;max-width:none;margin:0 0 32px}
.result-text{min-width:0;flex:1}
.result-identity{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.site-icon{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 30px;height:30px;border-radius:50%;background:var(--soft);color:var(--muted);font-size:14px;overflow:hidden}
.favicon{position:absolute;inset:5px;width:20px;height:20px;object-fit:contain;background:var(--soft)}
.site-details{min-width:0}
.result-site{display:block;color:var(--text);font-size:14px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.result-url{display:block;color:var(--muted);font-size:12px;line-height:1.6}
.result h2{margin:4px 0 6px;font-size:20px;line-height:1.45;font-weight:400;color:var(--link)}
.result p{font-size:14px;line-height:1.75;color:var(--muted)}
.result mark{background:transparent;color:var(--match);font-weight:650}
.result h2 mark{color:inherit}
.result-thumbnail{width:112px;height:100px;flex:0 0 112px;object-fit:cover;border-radius:12px;margin-top:4px;background:var(--soft)}
#related-images{min-width:0;padding-top:8px}
#related-images h2{font-size:18px;font-weight:500;margin:0 0 18px}
.image-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.image-grid a{display:block;overflow:hidden;border-radius:10px;background:var(--soft)}
.related-thumbnail{display:block;width:100%;height:132px;object-fit:cover}
#pagination{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:40px 0 12px}
#pagination a{display:flex;align-items:center;justify-content:center;min-width:40px;min-height:44px;padding:8px 12px;border-radius:8px;color:var(--link);font-size:14px}
#pagination a:hover{background:var(--soft);text-decoration:underline}
#pagination a[aria-current]{background:var(--soft);color:var(--text);font-weight:600;text-decoration:none}
@media(max-width:1000px){.results-layout.has-sidebar{max-width:720px;display:block}#related-images{margin-top:32px}.image-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){
  .results-mode .topbar{padding:0 20px}
  .results-mode .search-area{margin-top:0}
  .results-layout{margin-top:24px}
  .result{gap:14px}
  .result h2{font-size:19px}
  .result-thumbnail{width:84px;height:84px;flex-basis:84px}
  #pagination{gap:2px}
  #pagination a{min-width:36px;padding:8px 10px}
  .image-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.results-layout:has(#results-area[hidden]){display:none}

:root[data-theme="dark"]{color-scheme:dark;--surface:#202124;--text:#e8eaed;--muted:#bdc1c6;--link:#8ab4f8;--line:#3c4043;--soft:#303134;--match:#fdd663;--field:#303134;--field-line:#5f6368;--focus:#8ab4f8;--button:#303134;--button-hover:#3c4043;--button-text:#8ab4f8;--footer:#171717;--error:#f28b82}
.topbar-actions{display:flex;align-items:center;gap:20px}
/* A single moving selection surface keeps all three choices visible. */
.theme-picker{position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(3,40px);padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--soft);color:var(--text);flex-shrink:0}
.theme-picker::before{content:"";position:absolute;z-index:-1;top:3px;left:3px;width:40px;height:40px;border-radius:50%;background:#d3e3fd;box-shadow:0 1px 3px #20212418;transform:translateX(80px)}
:root[data-theme-preference="light"] .theme-picker::before{transform:translateX(0)}
:root[data-theme-preference="dark"] .theme-picker::before{transform:translateX(40px)}
:root[data-theme="dark"] .theme-picker::before{background:#394b68;box-shadow:0 1px 3px #0003}
.theme-picker button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted)}
.theme-picker button:hover{background:#80868b18;color:var(--text)}
.theme-picker button[aria-pressed="true"]{color:#1967d2}
:root[data-theme="dark"] .theme-picker button[aria-pressed="true"]{color:#aecbfa}
.theme-picker button:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
.theme-picker svg{width:19px;height:19px;transform:scale(.95)}
.theme-picker button[aria-pressed="true"] svg{transform:scale(1.08)}
.theme-picker button[data-theme-choice="light"][aria-pressed="true"] svg{transform:rotate(45deg) scale(1.08)}
.theme-picker button[data-theme-choice="dark"][aria-pressed="true"] svg{transform:rotate(-12deg) scale(1.08)}
@media(prefers-reduced-motion:no-preference){
  .theme-picker.is-interactive::before{transition:transform .28s cubic-bezier(.2,.8,.2,1),background-color .2s}
  .theme-picker.is-interactive svg{transition:transform .28s cubic-bezier(.2,.8,.2,1)}
  .theme-picker.is-interactive button{transition:color .2s,background-color .2s}
}
@media(max-width:700px){.topbar-actions .badge{display:none}.topbar-actions{gap:0}}
