:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #202124;
  --muted: #66716a;
  --line: #c9d0c8;
  --green: #1c6b36;
  --green-dark: #15552b;
  --chrome: #153d24;
  --chrome-toolbar: #1e5b2e;
  --lime: #d8ed72;
  --white: #fffefa;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  display: flex;
  flex: 0 0 36px;
  align-items: stretch;
  padding: 0 8px;
  background: var(--chrome);
}

.tab-strip {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.browser-tabs {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.browser-tabs::-webkit-scrollbar {
  display: none;
}

.browser-tab-item {
  display: flex;
  width: min(250px, 42vw);
  height: 30px;
  flex: 0 1 250px;
  align-items: center;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
  background: transparent;
}

.browser-tab-item.active {
  background: #28643a;
}

.browser-tab-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
}

.browser-tab {
  display: flex;
  min-width: 0;
  height: 30px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 2px 0 9px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #f5f8f5;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}

.tab-close-button {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  margin-right: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #edf4ee;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.tab-close-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.new-tab-button {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #edf4ee;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.new-tab-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tab-favicon {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: #418552;
  color: #dcebdc;
  font-family: Georgia, serif;
  font-size: 12px;
  flex: 0 0 auto;
}

.tab-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding-right: 7px;
  color: #d4dfd5;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #88d295;
  box-shadow: 0 0 0 3px rgba(136, 210, 149, 0.14);
}

.workspace {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-self: center;
  padding: 0;
}

.controls {
  flex: 0 0 auto;
  margin-bottom: 0;
  background: var(--chrome-toolbar);
}

.search-controls {
  display: flex;
  min-height: 47px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
}

.navigation-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.icon-button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #d8e6da;
  cursor: pointer;
}

.icon-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.13);
}

.icon-button:disabled {
  color: #88a18d;
  cursor: default;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.address-row {
  display: flex;
  flex: 1;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 5px 0 11px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: #164626;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

#proxy-address {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 29px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f7f5;
  font-size: 12px;
}

#search-engine {
  flex: 0 0 auto;
  max-width: 108px;
  height: 26px;
  padding: 0 5px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  color: #f5f7f5;
  font-size: 11px;
}

#search-engine option {
  background: #fff;
  color: #202124;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#proxy-address::placeholder {
  color: #cfdbd0;
}

.address-row:focus-within {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.go-button {
  display: inline-flex;
  min-width: 45px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: #347b43;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.go-button:hover {
  background: #408950;
}

.browser-status {
  max-width: 145px;
  overflow: hidden;
  margin-right: 2px;
  color: #d5e4d7;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-button,
.clear-button {
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #ecf4ed;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.save-button:hover:not(:disabled),
.clear-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.13);
}

.save-button:focus-visible,
.clear-button:focus-visible,
.icon-button:focus-visible,
.browser-tab:focus-visible,
.tab-close-button:focus-visible,
.new-tab-button:focus-visible,
.side-toggle:focus-visible {
  outline: 2px solid #d5ebd7;
  outline-offset: 2px;
}

.save-button:hover:not(:disabled) {
  color: #fff;
}

.save-button:disabled,
.clear-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.browser {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.frame-wrapper {
  position: relative;
  min-height: 0;
  flex: 1;
  background: #fff;
}

.proxy-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.proxy-frame[hidden] {
  display: none;
}

.error-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  background: var(--white);
  text-align: center;
}

.error-panel[hidden] {
  display: none;
}

.error-kicker {
  color: #aa593e;
}

.error-panel h1 {
  max-width: 520px;
  margin: 5px 0 0;
  font-size: clamp(18px, 4vw, 25px);
}

.error-panel p:last-child {
  max-width: 450px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.side-toggle {
  position: fixed;
  z-index: 5;
  bottom: 8px;
  left: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(32, 33, 36, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #455148;
  cursor: pointer;
  font-size: 10px;
  opacity: 0.32;
  transition: opacity 140ms ease;
}

.side-toggle:hover {
  opacity: 1;
}

.footer {
  display: none;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  color: #737e76;
  font-family: var(--mono);
  font-size: 9px;
}

@media (max-width: 920px) {
  .search-controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 7px;
    padding-block: 4px;
  }

  .navigation-controls {
    grid-column: 1;
    grid-row: 1;
  }

  .icon-button {
    width: 28px;
    height: 29px;
  }

  .address-row {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .browser-status {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    padding-left: 3px;
  }

  .save-button {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    margin-right: 93px;
  }

  .clear-button {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-basis: 36px;
    padding: 0 6px;
  }

  .browser-tab {
    width: min(230px, 62vw);
  }

  .local-indicator {
    font-size: 8px;
    gap: 5px;
    padding-right: 3px;
  }

  .workspace {
    width: 100%;
    padding: 0;
  }

  .go-button {
    min-width: 38px;
    padding: 0 5px;
  }

  #search-engine {
    max-width: 84px;
    padding: 0 3px;
    font-size: 10px;
  }

  .browser-status {
    max-width: 110px;
    font-size: 8px;
  }

  .save-button,
  .clear-button {
    min-height: 25px;
    padding-inline: 5px;
    font-size: 9px;
  }

  .save-button {
    margin-right: 78px;
  }

  .footer {
    min-height: 34px;
    gap: 8px;
    padding: 0 12px;
    font-size: 8px;
  }
}