:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --ink: #141414;
  --muted: #6c675f;
  --line: rgba(20, 20, 20, 0.12);
  --surface: #fffdf8;
  --surface-2: #ebe6dc;
  --accent: #0d6b61;
  --accent-2: #c9572b;
  --accent-3: #254f8f;
  --graphite-1: #070a10;
  --graphite-2: #151b27;
  --graphite-3: #2a3140;
  --steel: #98a4b8;
  --shadow: 0 26px 80px rgba(25, 22, 18, 0.22);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(13, 107, 97, 0.14), transparent 36%),
    linear-gradient(300deg, rgba(201, 87, 43, 0.13), transparent 38%),
    var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 22px;
}

.phone-frame {
  width: min(100%, 430px);
  max-width: 430px;
  height: min(900px, calc(100vh - 44px));
  min-height: 660px;
  display: grid;
  grid-template-rows: 27% minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(20, 20, 20, 0.14);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.visual-stage {
  position: relative;
  min-height: 180px;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(172, 184, 204, 0.24), transparent 24%),
    radial-gradient(circle at 24% 10%, rgba(255, 255, 255, 0.13), transparent 20%),
    linear-gradient(145deg, var(--graphite-3), var(--graphite-1) 58%, #050608);
  color: #fffdf8;
}

.visual-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52px;
  background: linear-gradient(0deg, rgba(7, 10, 16, 0.94), transparent);
  pointer-events: none;
  z-index: 1;
}

.visual-copy {
  position: relative;
  z-index: 4;
  max-width: 250px;
}

.eyebrow {
  margin: 0 0 6px;
  color: rgba(220, 228, 241, 0.8);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: 0;
}

.visual-art {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.visual-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.header-photo {
  position: absolute;
  z-index: 5;
  right: 14px;
  top: 14px;
  width: 117px;
  height: 117px;
  object-fit: cover;
  object-position: 52% 18%;
  border-radius: 30px 0 0 30px;
  box-shadow: none;
  opacity: 0.96;
  mix-blend-mode: normal;
}

.home-button {
  position: absolute;
  z-index: 6;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(226, 232, 242, 0.34);
  border-radius: 999px;
  padding: 5px 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(128, 142, 165, 0.12));
  color: rgba(255, 253, 248, 0.88);
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  backdrop-filter: blur(12px) saturate(140%);
}

.visual-links {
  position: absolute;
  z-index: 3;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 38px;
  gap: 8px;
  overflow: visible;
  scrollbar-width: none;
}

.visual-links::-webkit-scrollbar,
.chips::-webkit-scrollbar {
  display: none;
}

.visual-link,
.chip {
  border: 1px solid rgba(226, 232, 242, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(128, 142, 165, 0.18));
  color: inherit;
  border-radius: 999px;
  padding: 8px 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px) saturate(140%);
}

.visual-more {
  min-width: 38px;
  padding-left: 0;
  padding-right: 0;
  font-size: 20px;
  line-height: 1;
}

.visual-menu-panel {
  position: absolute;
  right: 14px;
  bottom: 58px;
  z-index: 14;
  width: min(100% - 28px, 260px);
  max-height: 245px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(226, 232, 242, 0.3);
  border-radius: 16px;
  background: rgba(12, 15, 22, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px) saturate(140%);
}

.visual-menu-panel .menu-item {
  color: #fffdf8;
}

.visual-menu-panel .menu-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dialog-panel {
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: linear-gradient(180deg, #fffdf8, #f7f2ea);
}

.status-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.status-row strong {
  display: block;
  font-size: 13px;
}

.status-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.ghost-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}

.messages {
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  scroll-behavior: smooth;
}

.message {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.42;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message.assistant {
  background: #ece7dd;
  border-top-left-radius: 5px;
}

.message.user {
  margin-left: auto;
  background: #0d6b61;
  color: #fff;
  border-top-right-radius: 5px;
}

.message small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.message-link {
  color: #0b6b61;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(11, 107, 97, 0.35);
}

.message.user .message-link {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.image-message {
  padding: 8px;
}

.image-message img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.image-message figcaption {
  margin: 8px 4px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.composer {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
}

.quick-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
  scrollbar-width: none;
}

.chip {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
  width: 100%;
}

.chip:hover,
.ghost-button:hover,
.kebab-button:hover {
  border-color: rgba(13, 107, 97, 0.4);
}

.kebab-button {
  width: 40px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.kebab-menu {
  position: absolute;
  right: 0;
  bottom: 46px;
  z-index: 12;
  width: min(100%, 310px);
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 16px 42px rgba(20, 20, 20, 0.18);
}

.menu-item {
  width: 100%;
  display: block;
  margin: 0 0 6px;
  border: 0;
  border-radius: 10px;
  padding: 10px 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.menu-item:last-child {
  margin-bottom: 0;
}

.menu-item:hover {
  background: var(--surface-2);
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 15px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: rgba(13, 107, 97, 0.62);
  box-shadow: 0 0 0 4px rgba(13, 107, 97, 0.12);
}

.send-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.send-button span {
  display: block;
  transform: translateY(-1px);
  font-size: 20px;
}

.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;
}

@media (max-width: 520px) {
  .app-shell {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  h1 {
    font-size: 22px;
  }
}

.seo-content {
  max-width: 860px;
  margin: 32px auto 0;
  padding: 28px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.seo-content h2 {
  margin: 24px 0 8px;
  font-size: 24px;
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content p {
  margin: 0;
  color: #34312c;
  line-height: 1.6;
}

.seo-content nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.seo-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 107, 97, 0.35);
}
