:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --panel-soft: #f3f6fa;
  --text: #18202b;
  --muted: #657285;
  --line: #d8dee8;
  --accent: #126c65;
  --accent-strong: #0c504b;
  --accent-soft: #dff3f0;
  --focus: #c98622;
  --danger: #b42318;
  --topbar-height: 64px;
  --layout-offset: 40px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
select,
textarea,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 44px;
}

.brand-title {
  font-weight: 760;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ui-language-picker {
  position: relative;
}

.ui-language-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.14);
  z-index: 40;
}

.ui-language-list button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.ui-language-list button:hover,
.ui-language-list button.active {
  background: var(--panel-soft);
}

.account-email {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 28px auto 48px;
}

.translator-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.option-sidebar {
  display: flex;
  order: 2;
  flex: 0 0 208px;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
  position: sticky;
  top: calc(var(--topbar-height) + 12px);
  max-height: calc(100vh - var(--topbar-height) - var(--layout-offset));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.option-card {
  padding: 10px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.option-card .segmented-field legend {
  margin-bottom: 7px;
}

.option-disclosure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.option-disclosure-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  cursor: pointer;
  list-style: none;
}

.option-disclosure-trigger::-webkit-details-marker {
  display: none;
}

.option-disclosure-heading {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.option-disclosure-title {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.option-disclosure-value {
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-disclosure-chevron {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  position: relative;
}

.option-disclosure-chevron::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translate(-65%, -55%) rotate(-45deg);
  transition: transform 0.16s ease;
}

.option-disclosure[open] .option-disclosure-chevron::before {
  transform: translate(-55%, -35%) rotate(45deg);
}

.option-disclosure-body {
  padding: 0 8px 8px;
  overflow: visible;
}

.option-disclosure-body .segmented-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.option-disclosure-body .dialect-wrap {
  display: block;
}

.option-history-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.option-history-button:hover,
.option-history-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-history-icon {
  font-size: 0.95rem;
  line-height: 1;
}

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

.translator {
  display: grid;
  order: 1;
  flex: 1 1 0;
  gap: 18px;
  align-self: flex-start;
  min-width: 0;
}

.language-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.layout-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.layout-toggle-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.layout-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  display: inline-block;
}

.layout-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.layout-toggle-slider {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.layout-toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  transition: transform 0.16s ease;
}

.layout-toggle input:checked + .layout-toggle-slider {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.layout-toggle input:checked + .layout-toggle-slider::before {
  transform: translateX(18px);
}

#translatorPanel.layout-stacked .panes {
  grid-template-columns: 1fr;
}

#translatorPanel.layout-stacked .input-pane {
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.select-wrap,
.advanced label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.select-wrap input[type="text"] {
  height: 38px;
  font-size: 0.9rem;
  padding: 0 10px;
}

.language-combobox {
  position: relative;
}

.language-combobox input[type="text"] {
  height: 46px;
  padding-right: 34px;
}

.language-combobox::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 0.85rem;
}

.language-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 230px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  z-index: 25;
}

.language-option-button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  cursor: pointer;
  font-size: 0.93rem;
}

.language-option-button:hover,
.language-option-button.active {
  background: var(--panel-soft);
}

.language-option-button.selected {
  font-weight: 700;
}

.language-option-empty {
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.88rem;
}

.language-hidden-select {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

select,
input {
  height: 46px;
  padding: 0 12px;
}

select:focus,
input:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(201, 134, 34, 0.18);
}

.icon-button,
.ghost-button,
.mini-button,
.primary-button,
.segment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.icon-button {
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
}

.ghost-button,
.mini-button {
  height: 38px;
  padding: 0 14px;
}

.ghost-button:hover,
.mini-button:hover,
.icon-button:hover {
  background: var(--panel-soft);
}

.segmented-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: stretch;
  gap: 3px;
  min-height: 46px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.segmented-control--vertical {
  flex-direction: column;
  flex-wrap: nowrap;
}

.segmented-control--vertical .segment {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.segmented-control--with-help {
  gap: 4px;
}

.segment-row {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.segment-row .segment {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.option-help {
  flex: 0 0 22px;
  width: 22px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  position: relative;
}

.option-help:hover,
.option-help:focus-visible {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
  z-index: 30;
}

.option-help::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  width: max(220px, 16vw);
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--text);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 40;
}

.option-help:hover::after,
.option-help:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.option-sidebar .segment-row {
  position: relative;
}

.option-sidebar .option-help {
  position: static;
}

.option-sidebar .option-help::after {
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  width: auto;
  max-width: none;
  transform: none;
  box-sizing: border-box;
}

.segment {
  flex: 1 1 auto;
  min-width: fit-content;
  max-width: 100%;
  height: 38px;
  padding: 0 10px;
  border-color: transparent;
  color: #334155;
  background: transparent;
  white-space: nowrap;
}

.segment:hover {
  background: #ffffff;
}

.segment.active {
  border-color: var(--accent);
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.pane {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 16px;
}

.input-pane {
  border-right: 1px solid var(--line);
}

.pane-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.pane-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pane-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#resetButton {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
#resetButton:hover,
#resetButton:focus-visible {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--panel-soft);
}

textarea {
  min-height: calc(1.55em * 3 + 22px);
  height: auto;
  padding: 14px 0 8px;
  resize: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  line-height: 1.55;
}

textarea:focus {
  box-shadow: none;
}

.output-text {
  display: block;
  min-height: calc(1.55em * 3 + 22px);
  padding: 14px 0 8px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.output-text.editable {
  min-height: 0;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: auto;
}

.output-text.editable:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(201, 134, 34, 0.18);
}

body.output-edit-active {
  overflow: hidden;
}

body.output-edit-active::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.42);
  z-index: 90;
}

.output-pane.manual-edit-active {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(75vw, 1200px);
  height: 75vh;
  transform: translate(-50%, -50%);
  z-index: 100;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  background: var(--panel);
}

.manual-edit-rephrase {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.manual-edit-rephrase-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.manual-edit-rephrase-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-rephrase-button {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.manual-rephrase-button:hover,
.manual-rephrase-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.counter,
.status {
  color: var(--muted);
  font-size: 0.9rem;
}

.advanced {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.advanced summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.advanced-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 0 16px 16px;
}

.advanced textarea {
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-disclaimer {
  margin: -8px 0 0;
  color: var(--muted);
  opacity: 0.78;
  font-size: 0.76rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.cookie-disclaimer a {
  color: inherit;
  text-underline-offset: 2px;
}

.cookie-inline-button {
  border: 0;
  padding: 0;
  margin-left: 8px;
  color: inherit;
  background: transparent;
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cookie-banner {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: min(420px, calc(100vw - 28px));
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  z-index: 110;
}

.cookie-banner-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.cookie-banner-text a {
  color: var(--text);
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.cookie-banner-actions .ghost-button,
.cookie-banner-actions .mini-button {
  height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}


.history-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.26);
  z-index: 70;
}

.history-drawer {
  position: fixed;
  top: calc(var(--topbar-height) + 10px);
  right: 12px;
  width: min(430px, calc(100vw - 24px));
  max-height: calc(100vh - var(--topbar-height) - 22px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  z-index: 80;
  transform: translateX(calc(100% + 16px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.history-drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.history-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.history-drawer-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 1rem;
}

.history-content {
  padding: 0 16px 16px;
  max-height: calc(100vh - var(--topbar-height) - 120px);
  overflow: auto;
}

.history-heading-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 10px;
  padding-top: 10px;
}

.history-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  color: var(--text);
}

.history-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.history-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.history-summary::-webkit-details-marker {
  display: none;
}

.history-summary-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.history-summary-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  color: var(--muted);
}

.history-summary-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.history-body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.history-body-row {
  font-size: 0.86rem;
  color: var(--text);
}

.history-body-row pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
}

.history-use-button {
  justify-self: start;
}

.history-actions {
  display: flex;
  justify-content: center;
}

.history-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-delete-button {
  border-color: #f3c7c7;
  color: #8d1f1f;
  background: #fff5f5;
}

.history-delete-button:hover,
.history-delete-button:focus-visible {
  border-color: #e5a8a8;
  background: #ffeaea;
}

.primary-button {
  min-width: 142px;
  height: 46px;
  padding: 0 22px;
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 750;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.status.error {
  color: var(--danger);
}

.hidden {
  display: none;
}

.policy-shell {
  width: min(900px, calc(100vw - 28px));
  margin: 22px auto 44px;
}

.policy-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.policy-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.policy-card h2 {
  margin: 20px 0 8px;
  font-size: 1.1rem;
}

.policy-card h3 {
  margin: 16px 0 8px;
  font-size: 0.96rem;
}

.policy-updated {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.policy-card p {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.5;
}

.policy-table {
  width: 100%;
  margin: 10px 0 4px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.policy-table th,
.policy-table td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  background: var(--panel-soft);
  font-weight: 700;
}

.policy-backlink {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .translator-layout {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .translator {
    order: 1;
  }

  .option-sidebar {
    order: 2;
    position: static;
    flex: none;
    width: 100%;
    max-height: min(42vh, 360px);
    align-self: auto;
  }

  .history-drawer {
    top: 12px;
    right: 12px;
    max-height: calc(100vh - 24px);
  }

  .policy-shell {
    width: min(100vw - 20px, 900px);
  }

  .policy-card {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-height: 108px;
    --layout-offset: 28px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .account {
    width: 100%;
    justify-content: space-between;
  }

  .shell {
    width: min(100vw - 20px, 1180px);
    margin-top: 18px;
  }

  .language-row {
    grid-template-columns: 1fr;
  }

  .icon-button {
    justify-self: center;
  }

  .panes,
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .translator-layout {
    gap: 14px;
  }

  .input-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }

  .cookie-disclaimer {
    margin-top: -4px;
  }

  .cookie-banner {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
  }
}
