.akari-room-wrap,
.akari-room-wrap * {
  box-sizing: border-box;
}

.akari-room-wrap {
  width: 100%;
  max-width: 760px;
  margin: 28px auto;
  padding: 0;
  color: #f8fafc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.akari-room-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin: 0 0 14px;
  padding: 5px;
  background: rgba(8, 11, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.akari-room-tab {
  display: grid;
  min-height: 38px;
  place-items: center;
  color: #aab4c5;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

.akari-room-tab.is-active {
  color: #180f08;
  background: linear-gradient(180deg, #ffb454, #ff7a45);
  box-shadow: 0 0 0 2px rgba(255, 180, 84, 0.16);
}

.akari-room-card {
  display: grid;
  grid-template-rows: auto minmax(430px, 54vh) auto;
  width: 100%;
  min-height: min(720px, calc(100vh - 112px));
  overflow: hidden;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(40, 31, 42, 0.98), rgba(18, 18, 30, 0.98));
  border: 1px solid rgba(255, 216, 226, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(42, 18, 35, 0.46);
}

.akari-room-header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 159, 189, 0.2), transparent 23%),
    linear-gradient(135deg, rgba(255, 159, 189, 0.18), transparent 42%),
    linear-gradient(315deg, rgba(33, 61, 105, 0.3), transparent 46%),
    #151d30;
  border-bottom: 1px solid rgba(255, 216, 226, 0.16);
}

.akari-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 84px;
  height: 84px;
  overflow: hidden;
  background: #302333;
  border: 2px solid rgba(255, 159, 189, 0.82);
  border-radius: 8px;
  box-shadow:
    0 0 0 5px rgba(255, 159, 189, 0.1),
    0 12px 22px rgba(0, 0, 0, 0.18);
}

.akari-avatar img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.akari-avatar-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #ff9fbd;
  font-size: 34px;
  font-weight: 800;
}

.akari-header-copy {
  min-width: 0;
}

.akari-label {
  margin: 0 0 4px;
  color: #ff9fbd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.akari-room-header h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 28px;
  line-height: 1.15;
}

.akari-room-header p {
  margin: 8px 0 0;
  color: #aab4c5;
  font-size: 14px;
  line-height: 1.6;
}

.akari-hearts {
  position: relative;
  flex: 0 0 auto;
  width: 82px;
  height: 62px;
  margin-left: auto;
}

.akari-heart {
  position: absolute;
  display: grid;
  place-items: center;
  color: #ffd7e3;
  background: rgba(255, 124, 164, 0.14);
  border: 1px solid rgba(255, 190, 210, 0.34);
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(255, 124, 164, 0.18);
}

.akari-heart-small {
  top: 14px;
  right: 54px;
  width: 21px;
  height: 21px;
  font-size: 10px;
  opacity: 0.72;
  transform: rotate(-16deg);
}

.akari-heart-medium {
  right: 26px;
  bottom: 3px;
  width: 33px;
  height: 33px;
  font-size: 16px;
  opacity: 0.88;
  transform: rotate(12deg);
}

.akari-heart-large {
  top: 0;
  right: 1px;
  width: 47px;
  height: 47px;
  font-size: 23px;
  transform: rotate(-7deg);
}

.akari-chat-area {
  min-height: 430px;
  padding: 18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cpath d='M24 30c0-4 3-7 7-7 3 0 5 2 7 4 2-2 4-4 7-4 4 0 7 3 7 7 0 8-14 16-14 16S24 38 24 30z' fill='%23ff9fbd' fill-opacity='.05'/%3E%3Cpath d='M72 18l2 5 5 1-4 3 1 5-4-3-4 3 1-5-4-3 5-1 2-5z' fill='%23ffd6a5' fill-opacity='.055'/%3E%3Ccircle cx='18' cy='76' r='2' fill='%23ffd8e2' fill-opacity='.07'/%3E%3Ccircle cx='70' cy='70' r='1.5' fill='%23ffd8e2' fill-opacity='.075'/%3E%3C/svg%3E"),
    linear-gradient(45deg, transparent 0 46%, rgba(255, 255, 255, 0.018) 46% 54%, transparent 54% 100%),
    #11121b;
  background-size: 96px 96px, 28px 28px, auto;
}

.akari-name {
  margin: 0 0 5px;
  color: #ffc6d8;
  font-size: 12px;
  font-weight: 700;
}

.akari-bubble {
  display: inline-block;
  max-width: min(86%, 560px);
  padding: 11px 14px;
  color: #fff7fb;
  background:
    linear-gradient(135deg, rgba(255, 159, 189, 0.16), transparent 38%),
    linear-gradient(180deg, #332036, #241c2a);
  border: 1px solid rgba(255, 216, 226, 0.2);
  border-left: 4px solid #ff9fbd;
  border-radius: 8px;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(255, 159, 189, 0.09);
  font-weight: 600;
  line-height: 1.65;
}

.akari-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 13px;
  background: #1b1722;
  border-top: 1px solid rgba(255, 216, 226, 0.16);
}

.akari-input-row input {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  color: #f8fafc;
  background: #11121b;
  border: 1px solid rgba(255, 216, 226, 0.16);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.45;
}

.akari-input-row input::placeholder {
  color: #7e8799;
}

.akari-input-row button {
  display: grid;
  min-width: 72px;
  min-height: 48px;
  place-items: center;
  padding: 0 18px;
  color: #27121b;
  background: linear-gradient(180deg, #ffc0d1, #ff6f9e);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 0 #b84a70;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  cursor: not-allowed;
  opacity: 0.72;
}

@media (max-width: 560px) {
  .akari-room-wrap {
    margin: 18px auto;
  }

  .akari-room-tab {
    min-height: 40px;
    font-size: 13px;
  }

  .akari-room-card {
    grid-template-rows: auto minmax(260px, 1fr) auto;
    min-height: min(680px, calc(100vh - 82px));
  }

  .akari-room-header {
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .akari-avatar {
    width: 62px;
    height: 62px;
  }

  .akari-room-header h2 {
    font-size: 22px;
  }

  .akari-room-header p {
    font-size: 13px;
  }

  .akari-hearts {
    width: 58px;
    height: 50px;
  }

  .akari-heart-small {
    top: 13px;
    right: 38px;
    width: 17px;
    height: 17px;
    font-size: 8px;
  }

  .akari-heart-medium {
    right: 18px;
    bottom: 4px;
    width: 25px;
    height: 25px;
    font-size: 12px;
  }

  .akari-heart-large {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .akari-chat-area {
    padding: 14px;
  }

  .akari-bubble {
    max-width: 92%;
  }

  .akari-input-row {
    grid-template-columns: 1fr;
  }

  .akari-input-row button {
    width: 100%;
    min-height: 52px;
    font-size: 31px;
  }
}
