:root {
  --bg: #0e1018;
  --panel: #151824;
  --panel-2: #1b1e2d;
  --line: #30354a;
  --text: #f4f4f8;
  --muted: #9298ad;
  --peri: #9a98ff;
  --peri-bright: #b3b1ff;
  --danger: #ff7d8d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
#app { width: 100%; height: 100%; position: relative; overflow: hidden; }
.toolbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 62px;
  display: grid;
  grid-template-columns: auto auto auto auto minmax(260px, 760px) auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: rgba(15,17,26,.98);
  border-bottom: 1px solid #25293a;
  z-index: 30;
  transform: translateY(0);
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.toolbar-toggle {
  position: absolute;
  top: 12px;
  right: 58px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--peri-bright);
  display: grid;
  place-items: center;
  font: 900 17px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  z-index: 45;
  transition: top .24s cubic-bezier(.2,.8,.2,1), right .24s cubic-bezier(.2,.8,.2,1), width .18s ease, height .18s ease, border-radius .18s ease, background .18s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}
.toolbar-toggle:hover { background: #1e2230; }
#app.toolbar-collapsed .toolbar { transform: translateY(-100%); }
#app.toolbar-collapsed .viewport { top: 0; }
#app.toolbar-collapsed .toolbar-toggle {
  top: 0;
  right: 10px;
  width: 24px;
  height: 15px;
  border-radius: 0 0 7px 7px;
  background: rgba(15,17,26,.96);
  border: 1px solid #31364a;
  border-top: 0;
  font-size: 11px;
  line-height: 1;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.025em; white-space: nowrap; }
.brand img { width: 39px; height: 39px; object-fit: contain; border-radius: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.32)); }
.icon-btn, .fullscreen-btn { width: 38px; height: 38px; border: 0; border-radius: 10px; color: #d7d9e4; background: transparent; font-size: 19px; display: grid; place-items: center; }
.icon-btn:hover, .fullscreen-btn:hover { background: #1e2230; }
.fullscreen-btn { justify-self: end; color: var(--peri-bright); font-size: 20px; }
.address-shell { height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 8px 0 13px; border: 1px solid #33384d; border-radius: 13px; background: #181b27; }
.address-shell:focus-within { border-color: var(--peri); box-shadow: 0 0 0 3px rgba(154,152,255,.13); }
.address-dot { width: 8px; height: 8px; border: 2px solid var(--peri); border-radius: 50%; flex: 0 0 auto; }
#address { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
#address::placeholder { color: #747b90; }
.go { height: 34px; min-width: 56px; border: 0; border-radius: 9px; background: var(--peri); color: #11121b; font-weight: 850; }
.go:hover { background: var(--peri-bright); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.viewport { position: absolute; left: 0; right: 0; top: 62px; bottom: 0; min-height: 0; background: #0b0d13; transition: top .24s cubic-bezier(.2,.8,.2,1); }
#tab-hint {
  position: absolute;
  top: 8px;
  left: 14px;
  z-index: 12;
  padding: 5px 8px;
  border: 1px solid rgba(154,152,255,.16);
  border-radius: 8px;
  background: rgba(12,14,21,.72);
  color: #767d92;
  font-size: 10px;
  letter-spacing: .01em;
  pointer-events: none;
  backdrop-filter: blur(5px);
}
#home { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 35%, rgba(154,152,255,.12), transparent 28%), #0e1018; z-index: 5; }
#home.hidden { display: none; }
.home-inner { width: min(720px, 94vw); text-align: center; }
.hero-logo { width: 166px; height: 166px; object-fit: contain; border-radius: 0; filter: drop-shadow(0 18px 32px rgba(0,0,0,.42)); margin-bottom: 13px; }
.pirate-title {
  margin: 0;
  font-family: "Copperplate Gothic Bold", Copperplate, "Rockwell Extra Bold", "Arial Black", fantasy;
  font-size: clamp(42px, 7.5vw, 72px);
  font-weight: 900;
  line-height: .96;
  letter-spacing: -.065em;
  transform: skewX(-2deg);
  text-shadow: 0 3px 0 rgba(0,0,0,.28), 0 0 30px rgba(154,152,255,.10);
}
.pirate-title span { color: var(--peri); }
.subtitle { margin: 14px 0 30px; color: var(--muted); font-size: 16px; }
.search-row { display: flex; gap: 8px; padding: 7px; border: 1px solid #34394d; border-radius: 16px; background: #171a25; box-shadow: 0 14px 50px rgba(0,0,0,.2); }
#home-search { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 17px; padding: 0 12px; }
.search-row button { border: 0; border-radius: 11px; padding: 13px 21px; background: var(--peri); color: #11121b; font-weight: 850; }
.quick { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin-top: 15px; }
.quick button { border: 1px solid #31364a; background: #171a25; color: #c7cad7; border-radius: 999px; padding: 8px 13px; }
.quick button:hover { border-color: #585e7a; color: #fff; }
.engine-note { margin-top: 18px; color: #646b80; font-size: 11px; }
#proxy-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: white; display: none; }
#proxy-frame.visible { display: block; }
#error-banner { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 9px 13px; border: 1px solid rgba(255,125,141,.35); border-radius: 10px; background: rgba(55,16,23,.94); color: #ffc6ce; font-size: 12px; display: none; z-index: 50; }
.legal { position: absolute; right: 12px; bottom: 8px; z-index: 6; font-size: 9px; color: #555c70; text-decoration: none; }
.legal:hover { color: #8e95aa; }
#blackout { position: fixed; inset: 0; z-index: 999999; display: none; background: #000; cursor: none; border: 0 !important; outline: 0 !important; box-shadow: none !important; }
#blackout:focus, #blackout:focus-visible { outline: 0 !important; border: 0 !important; box-shadow: none !important; }
#blackout.active { display: block; }
.blackout-corner { position: absolute; width: 1px; height: 1px; background: #555; opacity: .8; pointer-events: none; }
.blackout-corner.tl { left: 0; top: 0; }
.blackout-corner.tr { right: 0; top: 0; }
.blackout-corner.bl { left: 0; bottom: 0; }
.blackout-corner.br { right: 0; bottom: 0; }
@media (max-width: 760px) {
  .toolbar { height: 58px; grid-template-columns: auto auto auto minmax(120px,1fr) auto auto; padding: 8px; gap: 4px; }
  .viewport { top: 58px; }
  .toolbar-toggle { top: 10px; right: 54px; width: 38px; height: 38px; }
  #app.toolbar-collapsed .toolbar-toggle { top: 0; right: 8px; width: 22px; height: 14px; }
  .brand span { display: none; }
  .brand img { width: 34px; height: 34px; }
  .home-btn { display: none; }
  #forward { display: none; }
  .go { min-width: 49px; }
  #tab-hint { display: none; }
}
