/* ===== KakaoTalk case preview ===== */
.page-test {
  padding-bottom: 48px;
  background: #f7f8fa;
}

.page-test .header__inner {
  justify-content: space-between;
}

.test-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}

.test-back:hover { color: var(--black); }

.kakao-cases {
  padding: 88px 0 64px;
  background: #f5f5f5;
  color: #111;
}

.kakao-cases__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--orange);
  margin-bottom: 12px;
  text-align: center;
}

.kakao-cases__title {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.03em;
  margin-bottom: 12px;
  text-align: center;
  color: #111;
  word-break: keep-all;
}

.kakao-cases__title em {
  font-style: normal;
  color: var(--orange);
}

.kakao-cases__desc {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 28px;
  text-align: center;
}

.kakao-cases__grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 20px;
  padding: 8px 24px 16px;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (min-width: 1024px) {
  .kakao-cases__grid {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* Phone frame — KakaoTalk light theme */
.kakao-phone {
  flex: 0 0 288px;
  width: 288px;
  height: 560px;
  display: flex;
  flex-direction: column;
  background: #b2c7d9;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .08),
    0 16px 40px rgba(0, 0, 0, .12);
}

/* Header: back + name | search / call / hamburger */
.kakao-phone__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 10px 8px 6px;
  background: #b2c7d9;
}

.kakao-phone__left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.kakao-phone__left strong {
  font-size: 16px;
  font-weight: 700;
  color: #191919;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kakao-phone__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.kakao-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #191919;
}

.kakao-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.kakao-icon--back svg {
  width: 24px;
  height: 24px;
}

.kakao-icon--menu svg {
  width: 22px;
  height: 22px;
}

.kakao-phone__body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #b2c7d9;
}

.kakao-date {
  display: flex;
  justify-content: center;
  margin: 4px 0 2px;
}

.kakao-date span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.kakao-date span::after {
  content: "›";
  font-size: 12px;
  opacity: .9;
}

/* Messages */
.kakao-msg--in {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.kakao-msg__avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.kakao-msg__avatar--marketing {
  background: #4b8bf5;
}

.kakao-msg__avatar--hospital {
  background: #2db7a0;
}

.kakao-msg__avatar:not([class*="--"]) {
  background: #64748b;
}

.kakao-msg__avatar--blog {
  background: #f0792b;
}

.kakao-msg__col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  max-width: calc(100% - 42px);
}

.kakao-msg__name {
  font-size: 11px;
  color: #4c5a67;
  padding-left: 2px;
  margin-bottom: 1px;
}

.kakao-msg__row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.kakao-msg__row--out {
  justify-content: flex-end;
}

.kakao-msg--out {
  display: flex;
  justify-content: flex-end;
}

.kakao-msg__row time {
  flex-shrink: 0;
  font-size: 10px;
  color: #5a6b7b;
  padding-bottom: 1px;
  white-space: nowrap;
}

.kakao-bubble {
  position: relative;
  max-width: 188px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
  word-break: keep-all;
}

.kakao-bubble b {
  font-weight: 700;
}

.kakao-bubble--in {
  background: #fff;
  border-radius: 2px 12px 12px 12px;
  color: #191919;
}

.kakao-bubble--in::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0;
  border-style: solid;
  border-width: 0 7px 7px 0;
  border-color: transparent #fff transparent transparent;
}

.kakao-bubble--out {
  background: #fee500;
  border-radius: 12px 2px 12px 12px;
  color: #191919;
}

.kakao-bubble--out::before {
  content: "";
  position: absolute;
  right: -5px;
  top: 0;
  border-style: solid;
  border-width: 0 0 7px 7px;
  border-color: transparent transparent transparent #fee500;
}

/* Input bar — Kakao-like: + | pill field(+emoji) | # */
.kakao-phone__input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
  background: #f5f5f5;
  border-top: 1px solid rgba(0, 0, 0, .06);
  flex-shrink: 0;
}

.kakao-phone__plus {
  width: 30px;
  height: 30px;
  color: #4c4c4c;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.kakao-phone__plus svg {
  width: 28px;
  height: 28px;
  display: block;
}

.kakao-phone__field {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border-radius: 20px;
  border: none;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e6e6e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 14px;
  color: #b0b0b0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.kakao-phone__field > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kakao-phone__field svg {
  width: 22px;
  height: 22px;
  color: #8a8a8a;
  flex-shrink: 0;
}

.kakao-phone__hash {
  font-weight: 700;
  font-size: 20px;
  color: #4c4c4c;
  line-height: 1;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  font-family: inherit;
}

@media (min-width: 960px) {
  .kakao-phone {
    flex-basis: 300px;
    width: 300px;
    height: 580px;
  }

  .kakao-bubble {
    max-width: 200px;
    font-size: 13.5px;
  }
}
