:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light dark;
  --bg: #f6f8fc;
  --chrome: #e7ebf2;
  --surface: #fff;
  --text: #243047;
  --muted: #69758a;
  --line: #d8dfea;
  --accent: #496ee8;
  --hover: #d8deea;
  --shadow: 0 14px 50px #22345c0b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  border: 0;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
[role="tab"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chrome {
  background: var(--chrome);
  position: relative;
  flex: none;
  border-bottom: 1px solid var(--line);
}
.tab-strip {
  height: 45px;
  display: flex;
  align-items: center;
  padding: 6px 12px 0;
  gap: 7px;
}
#tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  scrollbar-width: thin;
  align-self: stretch;
  min-width: 0;
}
.tab {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 210px;
  min-width: 115px;
  max-width: 230px;
  padding: 0 9px 0 15px;
  border-radius: 11px 11px 0 0;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.tab:hover {
  background: var(--hover);
}
.tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
}
.tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.close-tab {
  border-radius: 50%;
  font-size: 19px;
  width: 24px;
  height: 24px;
  background: transparent;
  flex: none;
}
.close-tab:hover {
  background: var(--hover);
}
.icon {
  background: transparent;
  font-size: 22px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: none;
  display: grid;
  place-items: center;
}
.icon:hover {
  background: var(--hover);
}
#new-tab {
  font-size: 23px;
  margin-bottom: 4px;
}
.toolbar {
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.navigation {
  display: flex;
  gap: 3px;
}
#address-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg);
  flex: 1;
  min-width: 0;
  padding: 3px 6px 3px 14px;
  gap: 10px;
}
#address-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #496ee81c;
}
#address {
  background: none;
  border: 0;
  outline: 0;
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 14px;
  padding: 6px 0;
}
#status-icon {
  color: var(--muted);
  display: inline-block;
}
.go {
  border-radius: 20px;
  background: var(--surface);
  padding: 6px 14px;
  color: var(--muted);
  font-size: 12px;
}
#loading {
  height: 2px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}
#loading:after {
  content: "";
  display: block;
  width: 35%;
  height: 100%;
  background: var(--accent);
  animation: progress 1.3s ease-in-out infinite;
}
#pages {
  flex: 1;
  min-height: 0;
  position: relative;
}
.page {
  height: 100%;
  width: 100%;
}
[hidden] {
  display: none !important;
}
iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}
.home-page {
  height: 100%;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 45px 24px;
  background: radial-gradient(ellipse at 50% 20%, #738bff0b, transparent 65%);
}
.home-content {
  text-align: center;
  width: min(100%, 640px);
  margin-top: -35px;
}
.brand {
  display: inline-grid;
  place-items: center;
  font-size: 50px;
  color: var(--accent);
  width: 90px;
  height: 90px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
h1 {
  font-size: clamp(23px, 4vw, 32px);
  letter-spacing: 1px;
  font-weight: 600;
  margin: 25px 0 10px;
}
.home-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 32px;
}
.home-search {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 10px 8px 20px;
  box-shadow: var(--shadow);
  gap: 10px;
}
.home-search:focus-within {
  border-color: var(--accent);
}
.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 15px;
}
.home-search button {
  background: var(--accent);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 22px;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px auto 45px;
  max-width: 500px;
}
.quick-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 2px;
  border-radius: 14px;
}
.quick-links a:hover {
  background: var(--hover);
  color: var(--text);
}
.quick-links span {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}
.quick-links a:nth-child(3) span {
  color: #e47729;
}
.quick-links a:nth-child(4) span {
  color: #249cab;
}
.home-content small {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
}
.spinning {
  animation: spin 1s linear infinite;
}
@keyframes progress {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(400%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151922;
    --chrome: #10131a;
    --surface: #202631;
    --text: #e1e6f0;
    --muted: #939eb3;
    --line: #303949;
    --accent: #8a9fff;
    --hover: #2d3544;
    --shadow: 0 14px 50px #0002;
  }
  .home-search button {
    color: #17203a;
  }
}
@media (max-width: 600px) {
  .toolbar {
    padding: 8px;
    gap: 5px;
  }
  .navigation {
    gap: 0;
  }
  .icon {
    width: 29px;
    font-size: 20px;
  }
  #address-form {
    padding-left: 10px;
    gap: 6px;
  }
  .go {
    padding: 6px 9px;
  }
  #address {
    font-size: 12px;
  }
  .tab {
    width: 150px;
  }
  .home-page {
    padding: 28px 18px;
  }
  .quick-links {
    gap: 5px;
  }
  .home-content {
    margin-top: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:after {
    animation: none !important;
  }
}
