:root {
  color-scheme: light;
  --paper: #f7f3ee;
  --surface: rgba(255, 253, 248, 0.88);
  --ink: #26342f;
  --muted: #68736d;
  --eucalyptus: #7aa995;
  --eucalyptus-deep: #416a5a;
  --mint-soft: #e8f2ec;
  --powder: #dbe5f4;
  --powder-soft: #eef4fb;
  --clay: #c97969;
  --clay-deep: #9d5b50;
  --blush: #f1ded8;
  --honey: #d7ad5f;
  --line: #ded8cf;
  --field: #fffdf9;
  --shadow: 0 24px 70px rgba(38, 52, 47, 0.14);
  --soft-shadow: 0 14px 34px rgba(38, 52, 47, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fbfaf6 0%, var(--paper) 54%, #eef4ef 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.mira-tool {
  display: grid;
  justify-items: center;
}

.mira-head {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 244px;
  height: 164px;
  margin-bottom: -18px;
}

.antenna {
  position: absolute;
  top: 10px;
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: var(--eucalyptus-deep);
}

.antenna::before {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: var(--honey);
  content: "";
  transform: translateX(-50%);
  box-shadow: var(--soft-shadow);
}

.face {
  position: relative;
  width: 226px;
  height: 126px;
  margin-top: 38px;
  border: 1px solid rgba(65, 106, 90, 0.24);
  border-radius: 46px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(219, 229, 244, 0.52)),
    #f9fbfa;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.face::before,
.face::after {
  position: absolute;
  top: 45px;
  width: 16px;
  height: 42px;
  border: 1px solid rgba(65, 106, 90, 0.22);
  background: rgba(255, 253, 248, 0.78);
  content: "";
}

.face::before {
  left: -17px;
  border-radius: 16px 0 0 16px;
}

.face::after {
  right: -17px;
  border-radius: 0 16px 16px 0;
}

.eye {
  position: absolute;
  top: 48px;
  width: 15px;
  height: 22px;
  border-radius: 50%;
  background: var(--eucalyptus-deep);
  box-shadow: 0 0 0 6px rgba(122, 169, 149, 0.12);
}

.left-eye {
  left: 72px;
}

.right-eye {
  right: 72px;
}

.blush {
  position: absolute;
  top: 75px;
  width: 32px;
  height: 11px;
  border-radius: 999px;
  background: rgba(201, 121, 105, 0.22);
}

.left-blush {
  left: 42px;
}

.right-blush {
  right: 42px;
}

.smile {
  position: absolute;
  left: 50%;
  top: 76px;
  width: 46px;
  height: 22px;
  border-bottom: 4px solid var(--clay-deep);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.intro-copy {
  width: 100%;
  margin-bottom: 2px;
  text-align: center;
}

.eyebrow,
.response-kicker {
  margin: 0 0 8px;
  color: var(--eucalyptus-deep);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #20312b;
  font-size: 3.85rem;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.intro-copy p:last-child {
  max-width: 62ch;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1rem;
}

.mira-body {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(760px, 100%);
  border: 1px solid rgba(65, 106, 90, 0.22);
  border-radius: 34px 34px 24px 24px;
  padding: 34px 30px 28px;
  background:
    linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.48) 18px 20px, transparent 20px),
    linear-gradient(180deg, rgba(255, 253, 249, 0.96) 0%, rgba(239, 246, 241, 0.9) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.mira-body::before,
.mira-body::after {
  position: absolute;
  top: 98px;
  width: 46px;
  height: 122px;
  border: 1px solid rgba(65, 106, 90, 0.22);
  background: rgba(255, 253, 248, 0.75);
  content: "";
  box-shadow: var(--soft-shadow);
}

.mira-body::before {
  left: -40px;
  border-radius: 24px 0 0 24px;
}

.mira-body::after {
  right: -40px;
  border-radius: 0 24px 24px 0;
}

.body-handle {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: var(--blush);
  transform: translateX(-50%);
}

.prompt-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.prompt-section + .prompt-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.split-section {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.split-section > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.strength-section {
  border-radius: 8px;
  padding: 16px;
  background: var(--mint-soft);
}

.strength-section + .prompt-section {
  border-top: 0;
}

label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 820;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #ddcfcc;
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--field);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

textarea::placeholder {
  color: #988f99;
}

textarea:focus,
input[type="range"]:focus-visible {
  border-color: var(--eucalyptus);
  box-shadow: 0 0 0 4px rgba(122, 169, 149, 0.18);
  background: #ffffff;
}

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

output {
  flex: 0 0 auto;
  color: var(--eucalyptus-deep);
  font-size: 0.9rem;
  font-weight: 850;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--eucalyptus);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 850;
}

.primary-button {
  background: var(--eucalyptus-deep);
  color: white;
  box-shadow: 0 12px 28px rgba(65, 106, 90, 0.22);
}

.primary-button:hover {
  background: #34584a;
}

.secondary-button {
  background: #ebe5dc;
  color: var(--ink);
}

.secondary-button:hover {
  background: #e4d8d4;
}

.mira-response {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  border: 1px solid rgba(85, 128, 107, 0.24);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #f8fbf9 0%, var(--mint-soft) 100%);
}

.mira-response .response-kicker {
  color: #486a59;
}

.mira-response p {
  margin: 0;
  color: #3f4f48;
}

.mira-response .mira-punchline {
  color: #304d3f;
  font-size: 1.06rem;
  font-weight: 850;
}

.mira-response ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.mira-response li {
  color: #3f4f48;
}

.empty-state {
  background: var(--powder-soft);
  border-color: rgba(137, 181, 213, 0.28);
}

.script-line {
  border-left: 4px solid var(--honey);
  padding-left: 12px;
  font-weight: 780;
}

.tomato-invite {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.tomato-invite p {
  flex: 1 1 260px;
}

.tomato-invite button {
  flex: 0 0 auto;
}

.tomato-room[hidden] {
  display: none;
}

.tomato-room {
  width: min(900px, 100%);
}

.tomato-panel {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(65, 106, 90, 0.22);
  border-radius: 8px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96) 0%, #f6fbf7 100%);
  box-shadow: var(--shadow);
}

.tomato-copy {
  text-align: center;
}

.tomato-copy p:last-child {
  max-width: 64ch;
  margin: 12px auto 0;
  color: var(--muted);
}

.tomato-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: end;
}

.tomato-controls input[type="text"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ddcfcc;
  border-radius: 8px;
  padding: 0 13px;
  background: var(--field);
  color: var(--ink);
  outline: none;
}

.tomato-controls input[type="text"]:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(154, 184, 165, 0.2);
}

.file-picker {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--powder-soft);
  color: #3c5870;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tomato-canvas {
  width: 100%;
  height: auto;
  border: 1px solid rgba(85, 128, 107, 0.22);
  border-radius: 8px;
  background: #f8fbf8;
  cursor: crosshair;
}

.tomato-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .mira-body::before,
  .mira-body::after {
    display: none;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 20px, 920px);
    padding: 18px 0 28px;
  }

  .mira-head {
    width: 194px;
    height: 146px;
  }

  .face {
    width: 176px;
    height: 112px;
    border-radius: 38px;
  }

  .eye {
    top: 42px;
  }

  .left-eye {
    left: 54px;
  }

  .right-eye {
    right: 54px;
  }

  .blush {
    top: 65px;
  }

  .left-blush {
    left: 34px;
  }

  .right-blush {
    right: 34px;
  }

  .smile {
    top: 70px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .mira-body {
    border-radius: 26px;
    padding: 28px 16px 18px;
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .range-row {
    align-items: flex-start;
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .tomato-panel {
    padding: 18px;
  }

  .tomato-controls {
    grid-template-columns: 1fr;
  }
}
