:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #66706a;
  --paper: #fcf8ef;
  --paper-strong: #fffdf8;
  --line: #d9d7cc;
  --orange: #f06f3c;
  --orange-soft: #ffe4d2;
  --teal: #137e79;
  --teal-dark: #0b5e5a;
  --teal-soft: #d6efea;
  --yellow: #f6c958;
  --shadow: 0 24px 70px rgba(30, 48, 40, 0.1);
  --display: "Arial Black", "Franklin Gothic Heavy", Impact, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 28%, rgba(246, 201, 88, 0.12), transparent 28rem),
    radial-gradient(circle at 82% 72%, rgba(19, 126, 121, 0.1), transparent 30rem),
    var(--paper);
  font-family: var(--body);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.orb {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.orb-one {
  width: 350px;
  height: 350px;
  top: 10vh;
  right: -210px;
  border: 52px solid rgba(240, 111, 60, 0.08);
}

.orb-two {
  width: 270px;
  height: 270px;
  bottom: 3vh;
  left: -150px;
  border: 42px solid rgba(19, 126, 121, 0.07);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.brand > span:last-child span {
  color: var(--orange);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: rotate(-3deg);
  border: 2px solid var(--ink);
  border-radius: 11px 7px 11px 8px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
}

.brand-mark svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.status-pill,
.live-label,
.waiting-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill {
  padding: 9px 13px;
  border: 1px solid rgba(19, 126, 121, 0.28);
  border-radius: 999px;
  background: rgba(214, 239, 234, 0.55);
}

.status-dot,
.live-label i,
.waiting-copy i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #27a270;
  box-shadow: 0 0 0 4px rgba(39, 162, 112, 0.13);
}

.intro {
  min-height: calc(100vh - 186px);
  padding: clamp(72px, 11vh, 130px) 0 90px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--orange);
  font-size: 17px;
}

h1 {
  max-width: 850px;
  margin: 0 auto;
  font-family: var(--display);
  font-size: clamp(52px, 8vw, 104px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.9;
  text-transform: uppercase;
}

h1 em {
  position: relative;
  color: var(--orange);
  font-style: normal;
}

h1 em::after {
  position: absolute;
  right: 2%;
  bottom: -8px;
  left: 2%;
  height: 8px;
  content: "";
  transform: rotate(-1deg);
  border-radius: 50%;
  background: var(--yellow);
  clip-path: polygon(0 30%, 24% 5%, 49% 35%, 76% 0, 100% 48%, 76% 72%, 48% 53%, 22% 90%, 0 65%);
}

.intro-copy {
  max-width: 610px;
  margin: 34px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.7;
}

.address-form {
  max-width: 790px;
  margin: 42px auto 0;
  text-align: left;
}

.address-form > label {
  display: block;
  margin: 0 0 10px 5px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.address-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.address-input-wrap {
  display: flex;
  min-width: 0;
  height: 66px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 14px 10px 13px 9px;
  background: var(--paper-strong);
  box-shadow: 5px 6px 0 rgba(23, 33, 29, 0.12);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.address-input-wrap:focus-within {
  box-shadow: 5px 6px 0 var(--yellow);
  transform: translateY(-2px);
}

.prompt {
  margin-left: 21px;
  color: var(--orange);
  font-size: 28px;
  font-weight: 800;
}

.address-input-wrap input {
  width: 100%;
  min-width: 80px;
  height: 100%;
  padding: 0 7px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
}

.address-input-wrap input::placeholder {
  color: #a7aaa3;
  font-weight: 600;
}

.domain {
  flex: 0 0 auto;
  padding-right: 21px;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 650;
}

.open-button {
  display: inline-flex;
  height: 66px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 25px;
  cursor: pointer;
  border: 2px solid var(--ink);
  border-radius: 11px 14px 9px 13px;
  color: white;
  background: var(--teal);
  box-shadow: 5px 6px 0 var(--ink);
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.open-button:hover {
  background: var(--teal-dark);
  transform: translate(-1px, -1px);
  box-shadow: 7px 8px 0 var(--ink);
}

.open-button:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 3px 0 var(--ink);
}

.open-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.open-button svg,
.back-button svg,
.copy-button svg,
.refresh-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.form-error {
  min-height: 20px;
  margin: 10px 5px 0;
  color: #b13e32;
  font-size: 13px;
  font-weight: 650;
}

.tiny-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  color: #868a84;
  font-size: 12px;
}

.sparkle {
  color: var(--orange);
  font-size: 16px;
}

.mail-app {
  min-height: calc(100vh - 96px);
  padding: 40px 0 80px;
  animation: rise 420ms ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.mail-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.back-button,
.copy-button,
.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.back-button {
  margin-bottom: 12px;
  padding: 0;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.back-button:hover,
.copy-button:hover {
  color: var(--orange);
}

.mail-toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(29px, 4vw, 48px);
  letter-spacing: -0.05em;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  padding-bottom: 3px;
}

.copy-button,
.refresh-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.75);
}

.refresh-button {
  border-color: var(--ink);
  color: white;
  background: var(--ink);
}

.refresh-button.is-loading svg {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.inbox-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
}

.inbox-meta strong {
  color: var(--ink);
}

.live-label {
  margin-left: auto;
  font-size: 10px;
}

.mail-shell {
  display: grid;
  min-height: 610px;
  grid-template-columns: minmax(285px, 0.37fr) minmax(0, 0.63fr);
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 17px 12px 17px 11px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow), 6px 7px 0 rgba(23, 33, 29, 0.08);
}

.message-list {
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(248, 245, 236, 0.7);
}

.message-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 21px 22px 20px 25px;
  cursor: pointer;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
  transition: background 150ms ease;
}

.message-card::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 4px;
  content: "";
  border-radius: 0 4px 4px 0;
  background: transparent;
}

.message-card:hover {
  background: var(--paper-strong);
}

.message-card.is-active {
  background: var(--teal-soft);
}

.message-card.is-active::before {
  background: var(--teal);
}

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

.card-sender,
.card-subject {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-time {
  flex: 0 0 auto;
  color: #858b85;
  font-size: 10px;
  font-weight: 700;
}

.card-subject {
  margin-top: 9px;
  font-size: 14px;
}

.card-preview {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.reader {
  min-width: 0;
  background: var(--paper-strong);
}

.reader-placeholder,
.empty-inbox {
  display: flex;
  min-height: 600px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.placeholder-stamp {
  display: grid;
  width: 112px;
  height: 112px;
  margin-bottom: 24px;
  place-items: center;
  transform: rotate(-3deg);
  border: 2px dashed var(--teal);
  border-radius: 25px 19px 27px 21px;
  color: var(--teal);
  background: var(--teal-soft);
}

.placeholder-stamp svg {
  width: 84px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.placeholder-stamp .motion {
  stroke: var(--orange);
}

.reader-placeholder h3,
.empty-inbox h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.reader-placeholder p,
.empty-inbox p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.reader-content {
  padding: clamp(25px, 4vw, 48px);
}

.message-heading {
  display: flex;
  align-items: flex-start;
  gap: 17px;
}

.sender-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  transform: rotate(-2deg);
  border: 1.5px solid var(--ink);
  border-radius: 50% 46% 50% 44%;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--display);
  font-size: 16px;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}

.heading-copy {
  min-width: 0;
}

.heading-copy h3 {
  margin: -3px 0 9px;
  font-family: var(--display);
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1.16;
}

.sender-line,
.recipient-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sender-line strong {
  color: var(--ink);
}

.recipient-line {
  margin-top: 5px;
  font-size: 11px;
}

.message-tabs {
  display: flex;
  gap: 22px;
  margin-top: 34px;
  border-bottom: 1px solid var(--line);
}

.message-tab {
  position: relative;
  padding: 0 2px 11px;
  cursor: pointer;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-tab.is-active {
  color: var(--teal);
}

.message-tab.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  border-radius: 3px 3px 0 0;
  background: var(--teal);
}

.message-body {
  min-height: 320px;
  padding: 29px 2px 0;
  color: #303a35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.html-message {
  width: 100%;
  min-height: 390px;
  border: 0;
  background: white;
}

.message-details {
  padding-top: 24px;
}

.detail-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #eceae2;
  font-size: 12px;
}

.detail-row dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.auth-pass {
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
}

.empty-inbox {
  min-height: 610px;
}

.waiting-icon {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  margin-bottom: 20px;
  place-items: center;
  transform: rotate(2deg);
  border-radius: 50%;
  color: var(--orange);
  background: var(--orange-soft);
}

.waiting-icon svg {
  width: 57px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.waiting-icon span {
  position: absolute;
  top: -5px;
  right: 3px;
  color: var(--yellow);
  font-size: 23px;
}

.waiting-copy {
  margin-top: 20px;
  font-size: 9px;
}

.skeleton-card {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.skeleton-line {
  height: 9px;
  margin-bottom: 11px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ebe8df 20%, #f7f4ec 50%, #ebe8df 80%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
}

.skeleton-line:nth-child(1) {
  width: 42%;
}

.skeleton-line:nth-child(2) {
  width: 78%;
}

.skeleton-line:nth-child(3) {
  width: 60%;
  margin-bottom: 0;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.error-panel {
  display: flex;
  min-height: 610px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: #a43f34;
  text-align: center;
}

.error-panel strong {
  margin-bottom: 7px;
  font-family: var(--display);
  font-size: 19px;
  text-transform: uppercase;
}

.is-hidden {
  display: none !important;
}

footer {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: #8b8e87;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

footer > span:first-child {
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
}

@media (max-width: 820px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 680px);
  }

  .intro {
    padding-top: 64px;
  }

  .address-control {
    grid-template-columns: 1fr;
  }

  .open-button {
    width: 100%;
  }

  .mail-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
  }

  .copy-button,
  .refresh-button {
    flex: 1;
    justify-content: center;
  }

  .mail-shell {
    display: block;
  }

  .message-list {
    max-height: 380px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reader-placeholder {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 78px;
  }

  .status-pill {
    width: 10px;
    height: 10px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #27a270;
    box-shadow: 0 0 0 5px rgba(39, 162, 112, 0.13);
  }

  .status-dot {
    display: none;
  }

  h1 {
    font-size: clamp(44px, 15vw, 68px);
  }

  .intro-copy br {
    display: none;
  }

  .address-input-wrap {
    height: 60px;
  }

  .prompt {
    margin-left: 14px;
  }

  .domain {
    padding-right: 14px;
    font-size: 13px;
  }

  .open-button {
    height: 60px;
  }

  .meta-separator,
  #last-checked {
    display: none;
  }

  .copy-button span,
  .refresh-button span {
    display: inline;
  }

  .message-heading {
    gap: 14px;
  }

  .reader-content {
    padding: 24px 20px;
  }

  footer {
    justify-content: center;
    text-align: center;
  }

  footer p,
  footer > span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
