:root {
  color-scheme: light;
  --ink: #1f2e29;
  --muted: #607169;
  --surface: rgba(255, 255, 255, 0.92);
  --line: rgba(50, 68, 57, 0.18);
  --green: #2f7d5b;
  --green-dark: #1f6046;
  --coral: #ce6952;
  --shadow: 0 24px 64px rgba(19, 45, 35, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #eaf1eb;
}

[v-cloak] {
  display: none;
}

.kiosk-screen {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  overflow: hidden;
  padding: 24px;
}

.scene-image,
.scene-tint {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-image {
  object-fit: cover;
  z-index: -2;
}

.scene-tint {
  z-index: -1;
  background: rgba(249, 252, 247, 0.64);
}

.screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.school-name,
.status-line,
.dialog-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.school-name {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 20px;
  font-weight: 800;
}

.school-name img {
  width: 64px;
  height: 46px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.dialog-shell {
  display: grid;
  place-items: stretch center;
  min-height: 0;
}

.dialog-card {
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto auto;
  gap: 18px;
  width: min(1040px, 100%);
  min-height: min(760px, calc(100vh - 140px));
  padding: 24px;
}

.dialog-intro {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(50, 68, 57, 0.12);
}

.dialog-intro .dialog-avatar {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transform-origin: 50% 88%;
  animation: xhz-float 3.8s ease-in-out infinite;
  will-change: transform, box-shadow;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.12;
}

.main-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 4px 6px 4px 0;
}

.chat-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  max-width: 86%;
  justify-self: start;
  align-items: start;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.chat-message .chat-avatar {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  transform-origin: 50% 88%;
  animation: xhz-breathe 4.6s ease-in-out infinite;
  will-change: transform;
}

.chat-message.user {
  grid-template-columns: minmax(0, 1fr);
  justify-self: end;
  border-color: rgba(47, 125, 91, 0.36);
  background: rgba(47, 125, 91, 0.08);
}

.voice-line {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(47, 125, 91, 0.18);
  border-radius: 8px;
  background: rgba(47, 125, 91, 0.06);
  color: var(--green-dark);
  font-size: 13px;
}

.voice-line.is-error {
  border-color: rgba(206, 105, 82, 0.24);
  background: rgba(206, 105, 82, 0.08);
  color: var(--coral);
}

.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(50, 68, 57, 0.12);
}

.ask-form .el-form-item {
  margin-bottom: 0;
}

.el-button:not(.el-button--primary):not(.el-button--danger):hover,
.el-button:not(.el-button--primary):not(.el-button--danger):focus {
  color: var(--green);
  border-color: rgba(47, 125, 91, 0.32);
  background-color: rgba(47, 125, 91, 0.08);
}

.el-button--primary {
  background-color: var(--green);
  border-color: var(--green);
}

.el-button--primary:hover,
.el-button--primary:focus,
.el-button--primary:active {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
}

.el-button--primary.is-disabled,
.el-button--primary.is-disabled:hover,
.el-button--primary.is-disabled:focus,
.el-button--primary.is-disabled:active {
  background-color: rgba(47, 125, 91, 0.56);
  border-color: rgba(47, 125, 91, 0.56);
}

.el-input.is-active .el-input__inner,
.el-input__inner:focus,
.el-textarea__inner:focus {
  border-color: var(--green);
}

.el-tag.el-tag--plain:not(.el-tag--success):not(.el-tag--danger):not(.el-tag--warning):not(.el-tag--info) {
  color: var(--green);
  border-color: rgba(47, 125, 91, 0.32);
  background-color: rgba(47, 125, 91, 0.08);
}

.el-tag--success.el-tag--plain {
  color: var(--green);
  border-color: rgba(47, 125, 91, 0.32);
}

@keyframes xhz-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg) scale(1);
    box-shadow: 0 10px 22px rgba(31, 96, 70, 0.12);
  }

  35% {
    transform: translateY(-8px) rotate(2deg) scale(1.035);
    box-shadow: 0 18px 28px rgba(31, 96, 70, 0.16);
  }

  68% {
    transform: translateY(-3px) rotate(-2deg) scale(1.015);
    box-shadow: 0 14px 24px rgba(31, 96, 70, 0.14);
  }
}

@keyframes xhz-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  42% {
    transform: translateY(-2px) scale(1.045);
  }

  70% {
    transform: translateY(0) scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dialog-intro .dialog-avatar,
  .chat-message .chat-avatar {
    animation: none;
  }
}

@media (max-width: 980px) {
  .kiosk-screen {
    padding: 16px;
  }

  .screen-top {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-card {
    min-height: calc(100vh - 150px);
    padding: 18px;
  }

  .dialog-intro {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .dialog-intro .dialog-avatar {
    width: 72px;
    height: 72px;
  }

  h1 {
    font-size: 30px;
  }

  .main-message {
    font-size: 16px;
  }

  .chat-message {
    max-width: 100%;
  }

  .ask-form {
    grid-template-columns: 1fr;
  }
}
