:root {
  color-scheme: light;
  --ink: #182027;
  --muted: #69727d;
  --line: #d9e0e6;
  --panel: #ffffff;
  --surface: #f3f5f7;
  --brand: #0b7a75;
  --brand-strong: #075c59;
  --accent: #e5a93b;
  --danger: #bd3b43;
  --shadow: 0 12px 34px rgba(18, 39, 57, 0.09);
  --soft-shadow: 0 8px 24px rgba(18, 39, 57, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 70%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 224, 230, 0.9);
}

.brand {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  letter-spacing: 0;
}

.language-switcher,
.language-links {
  display: none;
}

.language-menu {
  position: relative;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 86px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.flag {
  display: inline-block;
  width: 22px;
  height: 15px;
  flex: 0 0 22px;
  border: 1px solid rgba(24, 32, 39, 0.16);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.flag-uk { background: linear-gradient(#0057b7 0 50%, #ffd700 50%); }
.flag-ru { background: linear-gradient(#fff 0 33%, #0039a6 33% 66%, #d52b1e 66%); }
.flag-en {
  background:
    linear-gradient(29deg, transparent 0 40%, #fff 40% 45%, #cf142b 45% 55%, #fff 55% 60%, transparent 60%),
    linear-gradient(-29deg, transparent 0 40%, #fff 40% 45%, #cf142b 45% 55%, #fff 55% 60%, transparent 60%),
    linear-gradient(90deg, transparent 0 38%, #fff 38% 43%, #cf142b 43% 57%, #fff 57% 62%, transparent 62%),
    linear-gradient(transparent 0 32%, #fff 32% 38%, #cf142b 38% 62%, #fff 62% 68%, transparent 68%),
    #012169;
}
.flag-de { background: linear-gradient(#000 0 33%, #dd0000 33% 66%, #ffce00 66%); }
.flag-fr { background: linear-gradient(90deg, #0055a4 0 33%, #fff 33% 66%, #ef4135 66%); }
.flag-es { background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%); }
.flag-pt { background: linear-gradient(90deg, #046a38 0 40%, #da291c 40%); }
.flag-it { background: linear-gradient(90deg, #009246 0 33%, #fff 33% 66%, #ce2b37 66%); }
.flag-pl { background: linear-gradient(#fff 0 50%, #dc143c 50%); }
.flag-nl { background: linear-gradient(#ae1c28 0 33%, #fff 33% 66%, #21468b 66%); }
.flag-tr { background: #e30a17; }
.flag-zh { background: #de2910; }
.flag-ja { background: radial-gradient(circle at 50% 50%, #bc002d 0 30%, #fff 31%); }
.flag-ko { background: radial-gradient(circle at 50% 50%, #cd2e3a 0 20%, #0047a0 21% 34%, #fff 35%); }
.flag-ar { background: linear-gradient(#007a3d 0 33%, #fff 33% 66%, #000 66%); }
.flag-fa { background: linear-gradient(#239f40 0 33%, #fff 33% 66%, #da0000 66%); }
.flag-cs { background: linear-gradient(#fff 0 50%, #d7141a 50%); }
.flag-da { background: linear-gradient(90deg, transparent 0 30%, #fff 30% 38%, transparent 38%), linear-gradient(transparent 0 42%, #fff 42% 58%, transparent 58%), #c60c30; }
.flag-fi { background: linear-gradient(90deg, transparent 0 30%, #002f6c 30% 44%, transparent 44%), linear-gradient(transparent 0 38%, #002f6c 38% 62%, transparent 62%), #fff; }
.flag-el { background: repeating-linear-gradient(#0d5eaf 0 11%, #fff 11% 22%); }
.flag-hu { background: linear-gradient(#ce2939 0 33%, #fff 33% 66%, #477050 66%); }
.flag-id { background: linear-gradient(#ce1126 0 50%, #fff 50%); }
.flag-no { background: linear-gradient(90deg, transparent 0 30%, #fff 30% 45%, #00205b 45% 55%, #fff 55% 70%, transparent 70%), linear-gradient(transparent 0 36%, #fff 36% 46%, #00205b 46% 56%, #fff 56% 66%, transparent 66%), #ba0c2f; }
.flag-ro { background: linear-gradient(90deg, #002b7f 0 33%, #fcd116 33% 66%, #ce1126 66%); }
.flag-sr { background: linear-gradient(#c6363c 0 33%, #0c4076 33% 66%, #fff 66%); }
.flag-sv { background: linear-gradient(90deg, transparent 0 32%, #fecc00 32% 45%, transparent 45%), linear-gradient(transparent 0 38%, #fecc00 38% 62%, transparent 62%), #006aa7; }
.flag-th { background: linear-gradient(#a51931 0 17%, #fff 17% 33%, #2d2a4a 33% 67%, #fff 67% 83%, #a51931 83%); }
.flag-vi { background: #da251d; }

.language-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: none;
  width: min(220px, calc(100vw - 28px));
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.language-menu.is-open .language-popover {
  display: grid;
  gap: 2px;
}

.language-popover a {
  display: grid;
  grid-template-columns: 24px 30px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--ink);
  text-decoration: none;
}

.language-popover a:hover,
.language-popover a[aria-selected="true"] {
  background: rgba(11, 122, 117, 0.1);
}

.language-popover strong {
  font-size: 0.82rem;
}

.language-popover span:last-child {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-popover.is-gateway {
  position: static;
  display: grid;
  width: 100%;
  max-height: none;
  overflow: visible;
  box-shadow: none;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "intro"
    "mailbox"
    "inbox";
  gap: 14px;
  align-items: start;
  width: min(1120px, calc(100% - 32px));
  min-height: auto;
  margin: 0 auto;
  padding: 22px 0 38px;
  background: transparent;
}

.ad-slot {
  display: none;
  place-items: center;
  border: 1px dashed rgba(105, 114, 125, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: rgba(105, 114, 125, 0.72);
  font-size: 0.74rem;
  line-height: 1;
  text-transform: uppercase;
}

.ad-slot ins {
  display: block;
  width: 100%;
}

.ad-slot-top,
.ad-slot-content {
  width: min(970px, calc(100% - 36px));
  min-height: 90px;
  margin: 18px auto;
}

.ad-slot-content {
  margin-top: 0;
  margin-bottom: 28px;
}

.intro-panel {
  grid-area: intro;
  max-width: 820px;
  margin: 0 auto;
  padding: 4px 0 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin: 0 auto 10px;
  font-size: clamp(1.9rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
}

.intro-panel p:not(.eyebrow) {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  color: #43505b;
  font-size: 1rem;
  line-height: 1.55;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(11, 122, 117, 0.22);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.68);
  color: #31434b;
  font-size: 0.86rem;
  font-weight: 700;
}

.seo-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.seo-shortcuts a,
.text-link-strong {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.seo-shortcuts a {
  border: 1px solid rgba(11, 122, 117, 0.22);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.82);
}

.seo-shortcuts a:hover,
.text-link-strong:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.mailbox-panel,
.settings,
.inbox,
.composer {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.mailbox-panel {
  grid-area: mailbox;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 24px);
  text-align: center;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.address-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 122, 117, 0.13);
}

#emailAddress {
  min-height: 58px;
  border-color: #ccd8e0;
  background: #f9fbfc;
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
}

.primary,
.settings button.is-active,
.composer button,
#simulateButton {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 14px auto 14px;
}

.actions button,
.segmented button {
  min-width: 0;
}

.danger {
  color: var(--danger);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 430px;
  margin: 0 auto;
}

.meta-grid div,
.secret-box {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafb;
}

.meta-grid span,
.secret-box span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.meta-grid strong,
.secret-box strong {
  display: block;
  overflow-wrap: anywhere;
}

.settings,
.inbox,
.composer {
  padding: 20px;
  box-shadow: none;
}

.settings {
  grid-area: settings;
  width: min(900px, 100%);
  margin: 0 auto;
  box-shadow: var(--soft-shadow);
}

.inline-settings {
  grid-area: auto;
  width: 100%;
  margin: 8px auto 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.settings h2 {
  margin-bottom: 14px;
  font-size: 1.2rem;
  text-align: center;
}

.settings label span,
.field-label,
.composer label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) minmax(120px, 0.45fr) minmax(100px, 0.45fr);
  gap: 12px;
  align-items: end;
}

.settings-wide {
  grid-column: auto;
}

.settings-field {
  grid-column: auto;
  margin: 0;
}

.settings-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.settings-field input:focus {
  border-color: #0b7a75;
  outline: 3px solid rgba(11, 122, 117, 0.14);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.toggle {
  display: flex !important;
  align-items: center;
  gap: 9px;
  color: var(--ink) !important;
  margin: 0;
}

.toggle input {
  width: 18px;
  min-height: 18px;
}

.secret-box {
  grid-column: 1 / -1;
  margin-top: 2px;
  text-align: left;
}

.inbox-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 190px;
  border: 1px dashed #b9c4cc;
  border-radius: 8px;
  padding: 18px;
  background: #f8fafb;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: rgba(11, 122, 117, 0.1);
  color: var(--brand);
  font-size: 1.35rem;
}

.hero-inbox {
  grid-area: inbox;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 360px;
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-inbox h2 {
  font-size: 1.45rem;
}

.hero-inbox .section-head {
  min-height: 64px;
  padding: 14px 22px 12px;
  border-bottom: 1px solid var(--line);
}

.hero-inbox .inbox-list {
  flex: 1;
  align-content: start;
  max-height: none;
  overflow: auto;
  padding: 14px;
  background: #f8fafb;
}

.hero-inbox .empty-state {
  min-height: 180px;
}

.message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}

.message-open {
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) minmax(76px, 0.55fr) minmax(96px, 0.8fr) minmax(158px, max-content);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  position: relative;
}

.message-open:hover,
.message-open:focus-visible {
  background: #f7fbfb;
  outline: none;
}

.message-sender,
.message-subject,
.message-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-sender {
  display: -webkit-box;
  line-height: 1.25;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.message-sender,
.message-subject {
  font-weight: 800;
}

.message-preview,
.message-time {
  color: var(--muted);
}

.message-time {
  justify-self: end;
  max-width: none;
  min-width: 158px;
  overflow: visible;
  text-align: right;
  font-size: 0.86rem;
  white-space: nowrap;
}

.message-delete,
.back-button {
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 0 14px;
  background: #fff;
  color: #c12b3a;
  font-weight: 700;
  cursor: pointer;
}

.message-delete:hover,
.message-delete:focus-visible {
  background: #fff5f6;
  outline: none;
}

.message-detail {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.message-detail-toolbar {
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.back-button {
  border-left: 0;
  border-right: 1px solid var(--line);
  color: var(--brand);
}

.back-button:hover,
.back-button:focus-visible {
  background: #f1f8f8;
  outline: none;
}

.message-detail-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.message-detail-head p,
.message-detail-head h3 {
  overflow-wrap: anywhere;
}

.message-detail-head p,
.message-detail-head time {
  color: var(--muted);
}

.message-detail-head h3 {
  margin: 6px 0;
  font-size: 1.15rem;
}

.message-body {
  flex: 1;
  min-height: 280px;
  margin: 0;
  padding: 20px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow: auto;
}

.message-html {
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}

.message-attachments {
  border-top: 1px solid var(--line);
  padding: 16px 20px 20px;
  background: #f8fafb;
}

.message-attachments h4 {
  margin-bottom: 10px;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #e4ecf3;
}

.attachment-item:first-of-type {
  border-top: 0;
}

.attachment-item div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.attachment-item strong,
.attachment-item span {
  overflow-wrap: anywhere;
}

.attachment-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.attachment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.attachment-actions a,
.attachment-actions span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #0b7a75;
  font-weight: 800;
  text-decoration: none;
}

.message-attachment-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #0b7a75;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.composer textarea {
  resize: vertical;
}

.composer button {
  width: 100%;
  margin-top: 14px;
}

.seo-content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px clamp(18px, 4vw, 54px) 44px;
  background: #fff;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.seo-content h2 {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
}

.seo-lead {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 24px;
  color: #43505b;
  font-size: 1.08rem;
  line-height: 1.65;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.seo-grid article,
.seo-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: #f8fafb;
}

.seo-note {
  max-width: 1040px;
  margin: 16px auto 0;
  text-align: left;
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto 32px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.site-footer a {
  color: #0b7a75;
  font-weight: 800;
  text-decoration: none;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer span {
  color: #52627a;
  font-weight: 700;
}

.contact-page {
  max-width: 900px;
  margin: 34px auto 48px;
  padding: 0 24px;
}

.legal-page {
  max-width: 960px;
  margin: 34px auto 48px;
  padding: 0 24px;
}

.legal-card {
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: 10px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--soft-shadow);
}

.legal-card h1 {
  margin-bottom: 14px;
}

.legal-card section {
  margin-top: 24px;
}

.legal-card h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.legal-card p {
  color: #43505b;
  line-height: 1.7;
}

.seo-article details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafb;
}

.seo-article details + details {
  margin-top: 10px;
}

.seo-article summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.seo-article details p {
  margin: 10px 0 0;
}

.contact-card {
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--soft-shadow);
}

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: #52627a;
  font-weight: 800;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form button {
  justify-self: start;
  background: #0b7a75;
  color: #fff;
  border-color: #0b7a75;
}

.contact-status {
  min-height: 24px;
  color: #0b7a75;
  font-weight: 800;
}

.contact-status.is-error {
  color: #bf263a;
}

.seo-grid h3,
.seo-note h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.seo-grid p,
.seo-note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.seo-note {
  max-width: 1180px;
  margin: 16px auto 0;
  border-color: rgba(189, 59, 67, 0.22);
  background: #fff9f8;
  text-align: left;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript-panel {
  margin: 18px auto 40px;
  max-width: 900px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  color: var(--ink);
}

.noscript-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1120px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "mailbox"
      "inbox";
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-wide,
  .settings-field,
  .secret-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 10px 16px;
  }

  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "mailbox"
      "inbox";
  }

  .app-layout {
    min-height: auto;
  }

  .hero-inbox {
    min-height: 330px;
  }

  .message-open {
    grid-template-columns: minmax(150px, 1.2fr) minmax(72px, 0.6fr) minmax(88px, 0.8fr) minmax(150px, max-content);
  }

  .message-time {
    min-width: 150px;
  }

  .actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .ad-slot-top,
  .ad-slot-content,
  .ad-slot-side {
    width: calc(100% - 28px);
    min-height: 100px;
  }
}

@media (max-width: 560px) {
  .app-layout {
    gap: 12px;
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  .intro-panel p:not(.eyebrow) {
    line-height: 1.45;
  }

  .trust-row,
  .seo-shortcuts {
    gap: 7px;
    margin-top: 10px;
  }

  .seo-shortcuts {
    justify-content: flex-start;
    flex-wrap: nowrap;
    margin-inline: -12px;
    padding: 0 12px 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .seo-shortcuts::-webkit-scrollbar {
    display: none;
  }

  .trust-row span,
  .seo-shortcuts a {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 9px;
  }

  .mailbox-panel {
    padding: 14px;
  }

  .actions,
  .meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .address-box {
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 8px;
  }

  #emailAddress {
    min-height: 52px;
    text-align: left;
  }

  .actions {
    gap: 8px;
    margin: 12px auto;
  }

  .actions button {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 0.92rem;
  }

  .meta-grid {
    gap: 8px;
  }

  .message-row,
  .message-open {
    grid-template-columns: 1fr;
  }

  .message-open {
    gap: 4px;
    padding: 12px;
  }

  .message-preview {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .message-delete {
    min-height: 40px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .message-time {
    justify-self: start;
    min-width: 0;
    width: 100%;
    text-align: left;
    white-space: normal;
  }

  .attachment-item,
  .attachment-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-wide,
  .secret-box {
    grid-column: 1 / -1;
  }
}
