.chat-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  margin: 0;
  background: radial-gradient(circle at 8% 92%, rgba(136, 81, 46, 0.2), transparent 31%), #07150f;
}

.chat-shell {
  width: min(640px, 100%);
  padding: 14px;
}

.chat-card .eyebrow {
  margin-bottom: 16px;
}

.chat-card h2 {
  margin: 0;
  letter-spacing: -2.8px;
  line-height: 0.95;
}

.chat-card h2 em {
  color: #d7a25f;
  font-family: "Permanent Marker", cursive;
  font-style: normal;
  font-weight: 400;
}

.chat-card {
  border: 1px solid rgba(226, 187, 115, 0.3);
  border-radius: 16px;
  padding: clamp(25px, 4vw, 42px);
  background: #10271c;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

.chat-card h2 {
  font-size: clamp(32px, 3.4vw, 43px);
}

.chat-card-heading > p:last-child {
  margin: 14px 0 28px;
  color: #bdb18f;
  font-size: 12px;
  line-height: 1.55;
}

.chat-card form > label {
  display: block;
  margin: 17px 0 8px;
  color: #eee1c4;
  font-size: 11px;
  font-weight: 700;
}

.chat-card input,
.chat-card textarea {
  width: 100%;
  border: 1px solid #70603f;
  border-radius: 8px;
  outline: 0;
  background: #0c2116;
  color: #f4e6c7;
  font: 13px "DM Sans", sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-card input {
  height: 48px;
  padding: 0 13px;
}

.chat-file-picker {
  position: relative;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid #70603f;
  border-radius: 8px;
  background: #0c2116;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-file-picker:focus-within {
  border-color: #dfb46b;
  box-shadow: 0 0 0 3px rgba(223, 180, 107, 0.1);
}

.chat-card .chat-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.chat-file-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(223, 180, 107, 0.62);
  border-radius: 6px;
  background: #1a3525;
  color: #f0dfbd;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s;
}

.chat-file-button:hover {
  border-color: #dfb46b;
  background: #244631;
}

.chat-file-button:active {
  background: #2b5139;
}

.chat-file-name {
  min-width: 0;
  overflow: hidden;
  color: #bdb18f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-image-help {
  margin: 7px 0 -2px;
  color: #9f9478;
  font-size: 10px;
}

.chat-card textarea {
  min-height: 126px;
  padding: 13px;
  resize: vertical;
}

.chat-card input::placeholder,
.chat-card textarea::placeholder {
  color: #877d65;
}

.chat-card input:focus,
.chat-card textarea:focus {
  border-color: #dfb46b;
  box-shadow: 0 0 0 3px rgba(223, 180, 107, 0.1);
}

.chat-form-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: #a99e80;
  font-size: 10px;
}

.chat-form-meta b {
  color: #e1bc78;
}

.chat-card button {
  width: 100%;
  min-height: 48px;
  margin-top: 23px;
  border: 0;
  border-radius: 8px;
  background: #d5a967;
  color: #102016;
  cursor: pointer;
  font: 700 13px "DM Sans", sans-serif;
}

.chat-card button svg {
  width: 17px;
  height: 17px;
  margin-left: 8px;
  vertical-align: -4px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.chat-card button:hover svg { transform: translate(2px, -1px); }

.chat-card button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.chat-card-foot {
  margin: 17px 0 0;
  color: #a99e80;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.chat-toast {
  border: 1px solid rgba(226, 187, 115, 0.35);
  background: #f0dfbd;
  color: #152218;
}

.chat-toast > span {
  background: #a9603a;
}

.chat-toast > span svg {
  width: 13px;
  height: 13px;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-toast small {
  color: #594b37;
}

.chat-toast.is-error {
  border-color: rgba(152, 43, 43, 0.45);
  background: #f4d8d2;
}

.chat-toast.is-error > span {
  background: #9d3434;
}

.chat-toast.is-error small {
  color: #6f3030;
}

@media (max-width: 760px) {
  .chat-page {
    display: block;
  }

  .chat-shell {
    width: 100%;
    padding: 14px 0;
  }

  .chat-card {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .chat-shell {
    padding: 8px 10px;
  }

  .chat-card {
    padding: 18px 14px 20px;
    border-radius: 14px;
  }

  .chat-card .eyebrow {
    margin-bottom: 10px;
    font-size: 9px;
    letter-spacing: 1.6px;
  }

  .chat-card h2 {
    font-size: 28px;
    letter-spacing: -1.7px;
  }

  .chat-card-heading > p:last-child {
    margin: 10px 0 18px;
    font-size: 10px;
    line-height: 1.45;
  }

  .chat-card form > label {
    margin: 11px 0 5px;
    font-size: 9px;
  }

  .chat-card input,
  .chat-card textarea {
    border-radius: 7px;
    font-size: 11px;
  }

  .chat-card input {
    height: 40px;
    padding: 0 10px;
  }

  .chat-file-picker {
    min-height: 40px;
    gap: 6px;
    padding: 4px;
    border-radius: 7px;
  }

  .chat-file-button {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 5px;
    font-size: 9px;
  }

  .chat-file-name {
    font-size: 9px;
  }

  .chat-image-help {
    margin: 5px 0 -1px;
    font-size: 8px;
  }

  .chat-card textarea {
    min-height: 96px;
    padding: 10px;
  }

  .chat-form-meta {
    margin-top: 5px;
    font-size: 8px;
  }

  .chat-card button {
    min-height: 42px;
    margin-top: 16px;
    border-radius: 7px;
    font-size: 11px;
  }

  .chat-card button svg {
    width: 14px;
    height: 14px;
    margin-left: 6px;
  }

  .chat-card-foot {
    margin-top: 12px;
    font-size: 8px;
    line-height: 1.45;
  }
}
