@import "./tokens.css";

/* ═══════════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--color-body);
  background: var(--color-canvas);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   GLOBAL NAV
   spec: bg #000000, height 44px, nav-link 12px/400/1.0/-0.12px
═══════════════════════════════════════════════════════════ */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--color-surface-black);
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 20px;
}

.global-nav__logo {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.12px;
  color: var(--color-on-dark);
  text-decoration: none;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 14px;
}

.global-nav__links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.global-nav__links a {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.12px;
  color: var(--color-on-dark);
  opacity: 0.8;
  text-decoration: none;
  transition: opacity 0.1s;
}
.global-nav__links a:hover { opacity: 1; text-decoration: none; }

.global-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.global-nav__theme-label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   spec: button-primary bg #0066cc, text #fff, pill, 11px 22px, body-type
         button-secondary bg #fff, text #0066cc, pill, 11px 22px
         active: transform scale(0.95)
         focus: 2px solid outline
═══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  border: none;
  border-radius: var(--r-pill);
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary:hover { text-decoration: none; }
.btn-primary:active { transform: scale(0.95); }
.btn-primary:focus-visible { outline: 2px solid var(--color-primary-focus); outline-offset: 2px; }
.btn-primary:disabled { opacity: 0.38; cursor: not-allowed; }

/* Secondary — white bg, blue text+border */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-canvas);
  color: var(--color-primary);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  border: 1px solid var(--color-primary);
  border-radius: var(--r-pill);
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:hover { text-decoration: none; }
.btn-secondary:active { transform: scale(0.95); }
.btn-secondary:focus-visible { outline: 2px solid var(--color-primary-focus); outline-offset: 2px; }

/* On dark tile: sky blue */
.btn-secondary--on-dark {
  background: transparent;
  color: var(--color-primary-on-dark);
  border-color: var(--color-primary-on-dark);
}

/* Utility button: dark bg, sm radius, 8px 15px, caption-utility type */
.btn-utility {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: -0.224px;
  border: none;
  border-radius: var(--r-sm);
  padding: 8px 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-utility:active { transform: scale(0.95); }

/* Store hero CTA: larger, wt 300 */
.btn-store-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  border: none;
  border-radius: var(--r-pill);
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s;
}
.btn-store-hero:active { transform: scale(0.95); }

/* ═══════════════════════════════════════════════════════════
   PRODUCT TILES — edge-to-edge, 80px vertical
   spec: rounded none, padding 80px, full-bleed
═══════════════════════════════════════════════════════════ */
.tile {
  width: 100%;
  padding: var(--sp-section) 22px;
  text-align: center;
}
.tile--light     { background: var(--color-canvas);          color: var(--color-body); }
.tile--parchment { background: var(--color-canvas-parchment); color: var(--color-body); }
.tile--dark      { background: var(--color-surface-tile-1);  color: var(--color-on-dark); }
.tile--dark-2    { background: var(--color-surface-tile-2);  color: var(--color-on-dark); }
.tile--dark-3    { background: var(--color-surface-tile-3);  color: var(--color-on-dark); }

.tile__inner {
  max-width: 980px;
  margin: 0 auto;
}

/* Hero display: 56px/600/1.07/-0.28px */
.tile__hero {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  margin-bottom: var(--sp-lg);
}

/* Tile heading (display-lg): 40px/600/1.1/0 */
.tile__heading {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: var(--sp-lg);
}

/* Tagline (lead): 28px/400/1.14/0.196px */
.tile__tagline {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.196px;
  margin-bottom: var(--sp-xxl);
}

/* Sub-tagline (tagline): 21px/600/1.19/0.231px */
.tile__sub {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
  margin-bottom: var(--sp-xxl);
}

.tile__actions {
  display: flex;
  justify-content: center;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   STORE UTILITY CARD
   spec: bg #fff, hairline border, 18px radius, 24px padding
═══════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}

.card {
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  text-align: left;
  text-decoration: none;
  color: var(--color-body);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.card:hover {
  text-decoration: none;
  /* Only the product shadow rule in DESIGN.md — for cards, subtle lift is OK on hover */
  box-shadow: rgba(0,0,0,0.10) 0 2px 12px;
}

.card__icon {
  width: 32px;
  height: 32px;
  margin-bottom: var(--sp-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

/* body-strong: 17px/600/1.24/-0.374px */
.card__title {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.374px;
  color: var(--color-body);
}

/* caption: 14px/400/1.43/-0.224px */
.card__desc {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--color-ink-muted-48);
  flex: 1;
}

.card__link {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
  letter-spacing: -0.224px;
  margin-top: var(--sp-xs);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* List variant for articles */
.card--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) var(--sp-lg);
  gap: var(--sp-lg);
}
.card--row .card__body { flex: 1; }

/* ═══════════════════════════════════════════════════════════
   SEARCH INPUT
   spec: bg canvas (white!), ink text, pill, 12px 20px, 44px height
═══════════════════════════════════════════════════════════ */
.search-wrap {
  max-width: 560px;
  margin: 0 auto var(--sp-xxl);
  position: relative;
}

.search-input {
  width: 100%;
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--color-ink);
  background: var(--color-canvas);
  border: none;
  border-radius: var(--r-pill);
  padding: 12px 20px 12px 44px;
  height: 44px;
  outline: none;
  -webkit-appearance: none;
  transition: box-shadow 0.15s;
}
.search-input::placeholder { color: var(--color-ink-muted-48); }
.search-input:focus {
  box-shadow: 0 0 0 3px rgba(0,102,204,0.3);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-ink-muted-48);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-section {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-lg);
}

/* caption-strong: 14px/600/1.29/-0.224px */
.form-label {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: -0.224px;
  color: var(--color-body);
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--color-ink);
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.15);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   spec: bg canvas-parchment, ink-muted-80 text, fine-print type, 64px padding
         dense-link for links (17px/400/2.41/0), caption-strong for headings
═══════════════════════════════════════════════════════════ */
.footer {
  background: var(--color-canvas-parchment);
  padding: 64px 22px;
}

.footer__inner {
  max-width: 980px;
  margin: 0 auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xxl);
}

/* caption-strong: 14px/600/1.29/-0.224px */
.footer__col-title {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: -0.224px;
  color: var(--color-body);
  margin-bottom: var(--sp-xs);
}

.footer__links { list-style: none; }

/* dense-link: 17px/400/2.41/0 */
.footer__links a {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 2.41;
  letter-spacing: 0;
  color: var(--color-ink-muted-80);
  text-decoration: none;
  display: block;
}
.footer__links a:hover { color: var(--color-primary); text-decoration: none; }

/* fine-print: 12px/400/1.0/-0.12px */
.footer__legal {
  border-top: 1px solid var(--color-divider-soft);
  padding-top: var(--sp-lg);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.12px;
  color: var(--color-ink-muted-48);
}

/* ═══════════════════════════════════════════════════════════
   CHAT WIDGET — Apple Support 스타일
   패널: 흰 배경, 1px hairline, 20px radius, 그림자 없음(기본)
   헤더: surface-black
   버블: customer = #0066cc bg white text / agent = parchment bg
═══════════════════════════════════════════════════════════ */
.chat-fab {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  right: 28px;
  z-index: 300;
  width: 50px;
  height: 50px;
  border-radius: var(--r-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.chat-fab:active { transform: scale(0.95); }

.chat-fab__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: #ff3b30;
  border-radius: var(--r-pill);
  border: 2px solid var(--color-canvas);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}
.chat-fab__badge--visible { display: flex; }

.chat-panel {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  right: 28px;
  z-index: 300;
  width: 370px;
  height: min(560px, calc(100dvh - 110px));
  border-radius: var(--r-lg);
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  /* Only elevation Apple uses is the product shadow — for floating UI, subtle is OK */
  box-shadow: 0 4px 40px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
.chat-panel--closed {
  opacity: 0;
  transform: scale(0.9) translateY(8px);
  pointer-events: none;
}

/* Panel header: surface-black, 44px, nav-link type */
.chat-panel__header {
  background: var(--color-surface-black);
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-panel__info { display: flex; flex-direction: column; gap: 2px; }

/* tagline: 21px/600/1.19 for panel title */
.chat-panel__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.2px;
  color: var(--color-on-dark);
}

.chat-panel__status {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-panel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
}

.chat-panel__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.chat-panel__close:hover { background: rgba(255,255,255,0.2); }

/* Start screen */
.chat-start {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 12px;
  background: var(--color-canvas-parchment);
  overflow-y: auto;
}

.chat-start__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-xs);
}

/* tagline: 21px/600 */
.chat-start__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
  text-align: center;
  color: var(--color-body);
}

/* caption: 14px/400 */
.chat-start__desc {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--color-ink-muted-48);
  text-align: center;
  white-space: pre-line;
}

.chat-start__input {
  width: 100%;
  font-family: var(--font-text);
  font-size: 17px;
  color: var(--color-ink);
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-start__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.15);
}

/* Start button = btn-primary spec */
.chat-start__btn {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  border: none;
  border-radius: var(--r-pill);
  padding: 11px 22px;
  cursor: pointer;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.chat-start__btn:active { transform: scale(0.95); }
.chat-start__btn:disabled { opacity: 0.38; cursor: not-allowed; }

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-canvas);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--color-hairline); border-radius: 3px; }

.msg-system {
  text-align: center;
  font-family: var(--font-text);
  font-size: 11px;
  color: var(--color-ink-muted-48);
  padding: 2px 8px;
}

.msg-row { display: flex; flex-direction: column; gap: 2px; }
.msg-row--customer { align-items: flex-end; }
.msg-row--agent    { align-items: flex-start; }

/* caption: 14px/400 for sender name */
.msg-sender {
  font-family: var(--font-text);
  font-size: 11px;
  color: var(--color-ink-muted-48);
  padding: 0 6px;
}

.msg-bubble {
  max-width: 78%;
  padding: 9px 14px;
  border-radius: var(--r-lg);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  word-break: break-word;
}

/* Customer: primary blue bg */
.msg-bubble--customer {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-bottom-right-radius: 4px;
}

/* Agent: parchment bg */
.msg-bubble--agent {
  background: var(--color-canvas-parchment);
  color: var(--color-body);
  border: 1px solid var(--color-hairline);
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-family: var(--font-text);
  font-size: 10px;
  color: var(--color-ink-muted-48);
  padding: 0 6px;
}

/* Typing indicator */
.typing-wrap { display: flex; align-items: center; gap: 6px; }
.typing-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 14px;
  background: var(--color-canvas-parchment);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-lg);
  border-bottom-left-radius: 4px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--color-ink-muted-48);
  border-radius: 50%;
  animation: typing-bounce 1.3s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
  0%,60%,100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Input wrap */
.chat-input-wrap {
  border-top: 1px solid var(--color-divider-soft);
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--color-canvas);
  flex-shrink: 0;
}

.chat-attach {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-canvas-parchment);
  border: 1px solid var(--color-hairline);
  color: var(--color-ink-muted-48);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.chat-attach:hover { color: var(--color-primary); }

.chat-input {
  flex: 1;
  font-family: var(--font-text);
  font-size: 15px;
  color: var(--color-ink);
  background: var(--color-canvas-parchment);
  border: 1px solid var(--color-hairline);
  border-radius: 18px;
  padding: 8px 14px;
  outline: none;
  resize: none;
  line-height: 1.4;
  min-height: 36px;
  max-height: 100px;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--color-primary); }

/* Send button = primary pill but circular */
.chat-send {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.chat-send:active { transform: scale(0.95); }
.chat-send:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── SVG filter 숨김 ── */
.svg-filters { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   spec: 1440(content lock) / 1068(small-desktop) / 833(tablet) / 734 / 640(phone) / 419(small phone)
═══════════════════════════════════════════════════════════ */
@media (max-width: 833px) {
  .global-nav__links { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .tile__hero    { font-size: 40px; }
  .tile__heading { font-size: 34px; }
  .tile__tagline { font-size: 21px; }
  .tile { padding: 64px 20px; }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
  .tile { padding: 48px 16px; }
  .tile__hero    { font-size: 34px; }
  .tile__heading { font-size: 28px; }
  .tile__tagline { font-size: 17px; font-weight: 400; }
  .tile__actions { flex-direction: column; align-items: stretch; }
  .tile__actions .btn-primary,
  .tile__actions .btn-secondary { justify-content: center; }
}

@media (max-width: 419px) {
  .footer__grid { grid-template-columns: 1fr; }
  .tile { padding: 40px 14px; }
  .tile__hero { font-size: 28px; }
}

/* Chat responsive */
@media (max-width: 833px) {
  .chat-panel { width: calc(100vw - 56px); }
}
@media (max-width: 600px) {
  .chat-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom,0px)); }
  .chat-panel {
    position: fixed;
    bottom: 0 !important; right: 0 !important; left: 0 !important;
    width: 100% !important; max-width: 100% !important;
    height: 88dvh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-left: none; border-right: none; border-bottom: none;
    transform-origin: bottom center;
  }
  .chat-panel--closed { opacity: 1 !important; transform: translateY(100%) !important; }
  .chat-input-wrap { padding-bottom: calc(12px + env(safe-area-inset-bottom,0px)); }
}
