@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'DM Sans', 'Avenir Next', Avenir, sans-serif;
  color: #171a21;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --blue: #2165d7;
  --blue-dark: #174fb1;
  --blue-soft: #eef4ff;
  --ink: #171a21;
  --muted: #777f8e;
  --line: #e7eaf0;
  --green: #1c9563;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #fff; }
button, textarea, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(100% - 40px, 680px); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f1f4; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; color: var(--blue); display: inline-flex; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: 'Manrope', 'DM Sans', sans-serif; font-size: 22px; line-height: 1; font-weight: 800; letter-spacing: -1.2px; }
.brand-dot { color: var(--blue); }
.topbar-label, .eyebrow, .result-kicker, .footer-location { font-size: 10px; font-weight: 700; letter-spacing: 1.15px; }
.topbar-label { color: #9299a6; }
main { padding-top: 43px; }
.intro { margin: 0 0 28px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--blue); }
.eyebrow-line { width: 19px; height: 2px; border-radius: 2px; background: var(--blue); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 11px; color: #141820; font-family: 'Manrope', 'DM Sans', sans-serif; font-size: clamp(32px, 7.5vw, 43px); line-height: 1.13; letter-spacing: -1.8px; font-weight: 800; }
.intro-copy { max-width: 510px; margin-bottom: 0; color: #737b89; font-size: 14px; line-height: 1.65; }
.composer { padding: 23px 24px 22px; border: 1px solid #e8ebf0; border-radius: 14px; background: #fff; box-shadow: 0 10px 35px rgba(22, 39, 66, .045); }
.field-label { display: block; color: #202631; font-size: 13px; font-weight: 700; }
textarea { display: block; width: 100%; min-height: 104px; resize: vertical; margin-top: 10px; padding: 14px 15px; border: 1px solid #dfe4ec; border-radius: 9px; outline: none; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.55; transition: border-color .16s, box-shadow .16s; }
textarea::placeholder { color: #a0a7b2; opacity: 1; }
textarea:focus, input:focus { border-color: #80a8ef; box-shadow: 0 0 0 3px rgba(33, 101, 215, .11); }
.field-meta { display: flex; justify-content: space-between; gap: 8px; margin: 7px 1px 0; color: #9299a6; font-size: 11px; line-height: 1.4; }
.error-message { margin: 9px 1px 0; color: #b42318; font-size: 12px; }
.control-section { margin-top: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-note, .timezone-note { color: #9097a3; font-size: 11px; }
.timezone-note { display: inline-flex; align-items: center; gap: 5px; }
.tiny-globe { color: var(--blue); font-size: 13px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; border-radius: 10px; background: #f3f5f8; }
.tone-option { min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: #707887; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .16s, color .16s, box-shadow .16s; }
.tone-option:hover { color: #323a47; }
.tone-option.is-selected { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(18, 35, 58, .12); }
.time-options { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.time-option { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 7px; padding: 7px 8px; border: 1px solid #e3e7ed; border-radius: 9px; background: #fff; color: #5a6371; font-size: 11px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: border-color .16s, background .16s, color .16s; }
.time-option b { color: #252b35; font-size: 11px; font-weight: 700; }
.time-icon { color: #8d98a8; font-size: 15px; line-height: 1; }
.time-option:hover { border-color: #a9c2ee; }
.time-option.is-selected { border-color: #91b2ee; background: #f5f8ff; color: var(--blue); }
.time-option.is-selected b, .time-option.is-selected .time-icon { color: var(--blue); }
.custom-datetime { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 10px; }
.custom-datetime input { width: 100%; min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid #dfe4ec; border-radius: 8px; outline: none; background: #fff; color: #29313e; font-size: 13px; }
.ready-time { display: flex; align-items: center; gap: 7px; margin: 13px 0 0; color: #737b89; font-size: 12px; }
.ready-time strong { color: #313946; font-weight: 600; }
.ready-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #39aa7b; box-shadow: 0 0 0 3px #e7f6ef; }
.create-button { display: flex; width: 100%; min-height: 51px; align-items: center; justify-content: center; gap: 9px; margin-top: 23px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 9px rgba(33, 101, 215, .17); transition: background .16s, transform .16s, box-shadow .16s; }
.create-button svg { width: 18px; height: 18px; }
.create-button:hover { background: var(--blue-dark); box-shadow: 0 6px 13px rgba(33, 101, 215, .22); }
.create-button:active { transform: translateY(1px); }
.browser-save-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 11px; }
.save-status { display: flex; align-items: center; gap: 6px; margin: 0; color: #858d99; font-size: 10px; line-height: 1.4; }
.save-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #39aa7b; content: ''; }
.save-status.is-error { color: #a64235; }
.save-status.is-error::before { background: #c64d3d; }
.clear-saved-data { min-height: 30px; padding: 4px 0; border: 0; background: transparent; color: #707887; font-size: 10px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.clear-saved-data:hover { color: var(--blue); }
button:focus-visible, a:focus-visible { outline: 3px solid #a9c7ff; outline-offset: 2px; }
.result-card { margin-top: 18px; padding: 21px 22px 15px; border: 1px solid #dfe9f8; border-radius: 14px; background: #fbfdff; box-shadow: 0 8px 28px rgba(29, 62, 110, .055); animation: appear .25s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-title-wrap { display: flex; align-items: flex-start; gap: 11px; }
.whatsapp-icon { display: inline-flex; width: 34px; height: 34px; flex: 0 0 34px; align-items: center; justify-content: center; border-radius: 50%; background: #e4f7ed; color: #19875c; }
.whatsapp-icon svg { width: 21px; height: 21px; }
.result-kicker { margin: 2px 0 5px; color: #1b9663; font-size: 9px; letter-spacing: 1px; }
.result-title-wrap h2 { margin: 0; color: #222a36; font-family: 'Manrope', 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: -.2px; }
.tone-badge { flex: 0 0 auto; margin-top: 1px; padding: 5px 8px; border-radius: 20px; background: #eef4ff; color: #3b68ac; font-size: 10px; font-weight: 600; }
.message-paper { margin-top: 17px; padding: 15px 15px 14px; border: 1px solid #edf0f5; border-radius: 9px; background: #fff; }
.message-paper p { margin: 0; color: #323a47; font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.schedule-summary { display: flex; align-items: center; gap: 7px; margin: 13px 1px 15px; color: #737b89; font-size: 11px; }
.schedule-clock { display: inline-flex; width: 16px; height: 16px; color: #78869a; }
.schedule-clock svg { width: 100%; height: 100%; }
.wat-tag { margin-left: auto; padding: 3px 6px; border-radius: 4px; background: #f1f3f7; color: #7b8492; font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.result-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; }
.copy-button, .whatsapp-button { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .16s, border-color .16s, transform .16s; }
.copy-button svg, .whatsapp-button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.copy-button { border: 1px solid #dce2ea; background: #fff; color: #374151; }
.copy-button:hover { border-color: #b9c8dd; background: #f9fbfd; }
.copy-button.is-copied { border-color: #b7e4cf; background: #f1fbf5; color: #18764f; }
.whatsapp-button { border: 1px solid #19875c; background: #18875a; color: #fff; }
.whatsapp-button:hover { border-color: #126f49; background: #126f49; }
.whatsapp-button .external-icon { width: 13px; height: 13px; margin-left: -3px; opacity: .8; }
.copy-button:active, .whatsapp-button:active { transform: translateY(1px); }
.prototype-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 12px 0 0; color: #8a929f; font-size: 10px; }
.prototype-note span { font-size: 12px; }
.action-feedback { min-height: 0; margin: 0; color: #18764f; text-align: center; font-size: 11px; }
.action-feedback:not(:empty) { margin-top: 8px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 24px; color: #a1a7b1; font-size: 11px; }
.footer-location { font-size: 9px; letter-spacing: .9px; }
.footer-location span { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 520px) {
  .app-shell { width: min(100% - 32px, 680px); }
  .topbar { height: 64px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 21px; }
  .topbar-label { font-size: 9px; letter-spacing: .9px; }
  main { padding-top: 31px; }
  .intro { margin-bottom: 23px; }
  .eyebrow { margin-bottom: 12px; font-size: 9px; }
  h1 { font-size: clamp(31px, 9vw, 39px); letter-spacing: -1.4px; }
  .intro-copy { font-size: 13px; line-height: 1.6; }
  .composer { padding: 19px 16px 17px; border-radius: 12px; }
  .control-section { margin-top: 20px; }
  .time-options { gap: 6px; }
  .time-option { min-height: 47px; gap: 5px; padding: 7px 4px; font-size: 10px; }
  .time-option b { font-size: 10px; }
  .time-icon { font-size: 13px; }
  .ready-time { align-items: flex-start; font-size: 11px; }
  .ready-time strong { font-size: 11px; }
  .result-card { padding: 18px 15px 14px; }
  .result-title-wrap { gap: 9px; }
  .result-title-wrap h2 { font-size: 14px; }
  .tone-badge { font-size: 9px; padding: 5px 7px; }
  .result-actions { grid-template-columns: 1fr; }
  .copy-button, .whatsapp-button { min-height: 47px; font-size: 13px; }
  .page-footer { align-items: flex-start; margin-top: 28px; font-size: 10px; }
  .footer-location { font-size: 8px; white-space: nowrap; }
}

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