/* ============================================================
   FONTS
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

@font-face {
  src: url(/fonts/Spirit.woff2);
  font-family: 'spirits';
  font-display: swap;
}

@font-face {
  src: url(/fonts/script.ttf);
  font-family: 'script';
  font-display: swap;
}

@font-face {
  src: url(/fonts/angel.woff2);
  font-family: 'angel';
  font-display: swap;
}

/* ============================================================
   ROOT VARIABLES
============================================================ */

:root {
  --pink-deep: #f0b5cd;
  --pink-mid: #ffd8e9;
  --pink-light: #fff5fa;
  --pink-pale: #fffaf0;
  --panel: #b98897;
  --panel-dark: #9c6f7e;
  --brown: #8d7c76;
  --brown-dark: #6a5c56;
  --green: #8fc79a;
  --green-dark: #5f9b6e;
  --cream: #fffaf0;
  --shadow-soft: 0 6px 16px rgba(141, 124, 118, 0.25);
}

/* ============================================================
   RESET / BASE
============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: url(/media/cursor/normal-select.gif), progress !important;
}

html, body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  color: var(--brown-dark);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate; 
  overflow: hidden;
  background-color: #ffe0ef;
  background-image: url(https://kkul.store/media/backgrounds/pinkcheck.png);
  background-size: 40px;
  background-repeat: repeat;
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background-image: url(https://kkul.store/media/graphics/clouds.png);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
  filter: drop-shadow(0 -6px 14px rgba(0, 0, 0, 0.08));
  pointer-events: none;
  z-index: -1;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background-image: url(https://kkul.store/media/graphics/clouds.png);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
  transform: scaleY(-1);
  filter: drop-shadow(0 -6px 14px rgba(0, 0, 0, 0.08));
  pointer-events: none;
  z-index: -2;
}

h3 {
  margin-bottom: 6px;
}

::selection {
  background-color: #feeef6;
  color: #616161;
}

::-webkit-scrollbar {
  width: 8px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
  margin: 5px;
}

::-webkit-scrollbar-thumb {
  background-color: #ffcce6;
  border-radius: 50px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #ffb3d9;
}

mark {
  background-color: #ffe9f2;
  color: #8d7c76;
  padding: 0 4px;
  border-radius: 10px;
}

ul {
  list-style: none;
}

/* ============================================================
   TOOLTIP / CONTEXT MENU
============================================================ */

#s-m-t-tooltip {
  max-width: 150px;
  background-color: white;
  border: 7px solid;
  border-image: url(/media/borders/pink.png) 5 fill round;
  border-image-outset: 2px;
  outline: 1px dashed #e1b3c7;
  outline-offset: -6px;
  border-radius: 4px;
  font-family: tahoma;
  font-size: 7px;
  letter-spacing: 2px;
  color: #848484;
  position: fixed;
  z-index: 999999999 !important;
  pointer-events: none;
  padding: 4px;
  text-align: center;
  margin: 0;
}

#context_menu {
  background: #FEF8FC;
  border: 1px dotted #AAAAAA;
  letter-spacing: 1px;
  width: 70px;
  font-family: Verdana;
  font-size: 8px;
  position: absolute;
  display: none;
  z-index: 999999999;
}

#context_menu ul li {
  padding: 4px;
  z-index: 100000;
}

#context_menu ul li:hover {
  background: #FEF8FC;
  color: #848484;
  z-index: 100000;
}

/* ============================================================
   DESKTOP / FRAME LAYOUT
============================================================ */

.desktop {
  position: relative;
  z-index: 1;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.frame-wrapper {
  position: relative;
  border: 30px solid;
  border-image: url(https://kkul.store/media/borders/renda-bg.png) 18 repeat;
  border-image-outset: 5px;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: white;
}

.frame {
  position: relative;
  z-index: 2;
  width: 880px;
  max-width: 96vw;
  height: 650px;
  background: white;
  border-radius: 10px;
  border: 1px solid #ffffff;
  outline: 2px solid #ffd8e8;
  padding: 0;
  display: flex;
  flex-direction: column;
}

#lace {
  background-image: url(https://file.garden/aS-t0Aj4K3mdDujK/kkul/graphics/lacey.png);
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-color: transparent;
  width: 100%;
  height: 20px;
  filter: drop-shadow(0px 1px #D1B9B3);
  flex-shrink: 0;
  z-index: 10;
  image-rendering: crisp-edges;
}

/* ============================================================
   SIDE TAB — READING LOGS
============================================================ */

.side-tab {
  position: absolute;
  left: -58px;
  bottom: 51px;
  z-index: 1;
  background: #ffe0ef;
  border: 1px solid #ffdaed;
  border-left: none;
  padding: 14px 6px 14px 20px;
  border-radius: 0 10px 10px 0;
  box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.8), inset -2px -2px 2px rgba(215, 127, 171, 0.15);
  font-family: 'angel';
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #6a5c56;
  cursor: pointer;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-orientation: mixed;
  user-select: none;
  transition: transform 0.15s ease, background 0.2s ease;
  z-index: -1;
}

.side-tab:hover {
  background: #fcdbec;
  font-style: italic;
}

.side-tab-2 {
  position: absolute;
  left: -58px;
  bottom: 145px;
  z-index: 1;
  background: #ffe0ef;
  border: 1px solid #ffdaed;
  border-left: none;
  padding: 14px 6px 14px 20px;
  border-radius: 0 10px 10px 0;
  box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.8), inset -2px -2px 2px rgba(215, 127, 171, 0.15);
  font-family: 'angel';
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #6a5c56;
  cursor: pointer;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-orientation: mixed;
  user-select: none;
  transition: transform 0.15s ease, background 0.2s ease;
  z-index: -1;
  text-decoration: none;
}

.side-tab-2:hover {
  background: #fcdbec;
  font-style: italic;
}

/* ============================================================
   WINDOW HEADER / DECOR
============================================================ */

.win-decor {
  position: absolute;
  top: -62px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: auto;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 2px 2px rgba(141, 124, 118, 0.25));
}

.win-header {
  background: #ffeff7;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ffdaed;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.8), inset -2px -2px 2px rgba(215, 127, 171, 0.15);
  user-select: none;
  flex-shrink: 0;
}

.win-title {
  font-family: script;
  font-size: 10px;
  margin-left: 10px;
}

.win-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #f4abcb;
  background: white;
}

.win-btn.close {
  background: #f4abcb;
  transition: 0.2s;
}

.win-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  font-weight: normal;
  font-size: 12px;
  color: #333333;
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* ============================================================
   WINGS (ANIMATED)
============================================================ */

.wing-left,
.wing-right {
  position: absolute;
  top: 250px;
  width: 130px;
  z-index: 999;
  pointer-events: none;
}

.wing-left {
  left: -130px;
  transform-origin: bottom right;
  animation: flap-left 1.2s ease-in-out infinite alternate;
}

.wing-right {
  right: -130px;
  transform-origin: bottom left;
  animation: flap-right 1.2s ease-in-out infinite alternate;
}

@keyframes flap-left {
  0% {
    transform: rotate(-8deg);
  }

  100% {
    transform: rotate(12deg);
  }
}

@keyframes flap-right {
  0% {
    transform: rotate(8deg);
  }

  100% {
    transform: rotate(-12deg);
  }
}

.wing-left img,
.wing-right img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(rgba(0, 0, 0, 0.3) 1px 2px 2px);
}

.wing-right img {
  transform: scaleX(-1);
}

/* ============================================================
   MESSAGE POSTS
============================================================ */

.msg-post {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin-bottom: 22px;
  box-sizing: border-box;
}

.msg-post.left {
  justify-content: flex-start;
}

.msg-post.right {
  justify-content: flex-end;
}

.msg-post.right .msg-avatar-wrap {
  order: 2;
}

.msg-avatar-wrap {
  position: relative;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
}

.msg-avatar {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 3px solid #ffffff;
  outline: 1px solid #fcc9de;
  border-radius: 14px;
  box-sizing: border-box;
}

.msg-avatar-decor {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: auto;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 2px 1px rgba(141, 124, 118, 0.25));
}

.msg-post.left .msg-content {
  align-items: flex-start;
}

.msg-post.right .msg-content {
  align-items: flex-end;
}

.msg-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 65%;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin-bottom: 5px;
}

.msg-post.right .msg-meta {
  flex-direction: row-reverse;
}

.msg-name {
  font-family: 'angel';
  font-size: 12px;
  color: #ea85af;
  letter-spacing: .5px;
}

.msg-post.right .msg-name {
  color: #ea85af;
}

.msg-reading {
  font-family: 'angel';
  font-size: 11px;
  color: #a68b95;
  letter-spacing: .3px;
}

.msg-mood {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ============================================================
   MESSAGE BUBBLES
============================================================ */

.msg-bubble {
  position: relative;
  display: inline-block;
  min-width: 55px;
  max-width: 100%;
  padding: 13px 17px;
  background: #fef5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), inset 4px 4px 0px rgba(255, 255, 255, 0.8), inset -4px -4px 4px rgba(215, 127, 171, 0.15);
  border-radius: 0 10px 10px 10px;
  border: 1px solid #fcc9de;
  box-sizing: border-box;
  font-family: "verdana", sans-serif;
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: 0.5px;
  color: #6a5c56;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.msg-bubble a {
  color: #ea85af;
  text-decoration: underline;
  text-decoration-color: #fcc9de;
}

.msg-bubble strong {
  color: #6a5c56;
  font-weight: 700;
}

.msg-bubble img.inline-emote {
  display: inline-block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 2px;
}

.msg-post.right .msg-bubble {
  background: #fef5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), inset 4px 4px 0px rgba(255, 255, 255, 0.8), inset -4px -4px 4px rgba(215, 127, 171, 0.15);
  border: 1px solid #fcc9de;
  border-radius: 10px 0 10px 10px;
}

.msg-bubble.image {
  padding: 6px;
  line-height: 0;
  overflow: hidden;
}

.msg-bubble.image img {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 6px;
  object-fit: cover;
}

.msg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  width: 100%;
}

.msg-post.right .msg-footer {
  flex-direction: row-reverse;
}

.msg-post.right .msg-footer.time-left {
  flex-direction: row;
  justify-content: space-between;
}

.msg-mood-label {
  font-family: 'angel';
  font-size: 9px;
  letter-spacing: 0.3px;
  color: #6a5c56;
  opacity: .7;
}

.msg-time {
  font-family: 'angel';
  font-size: 9px;
  letter-spacing: 0.3px;
  color: #6a5c56;
  opacity: .7;
}

/* ============================================================
   VIDEO BUBBLE
============================================================ */

.msg-bubble.video {
  padding: 6px;
  overflow: hidden;
  max-width: 290px;
}

.video-media {
  position: relative;
  line-height: 0;
  cursor: pointer;
}

.video-media img,
.video-media iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: contain;
  border: none;
  background: #000;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #fcc9de;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(141, 124, 118, 0.3);
  transition: transform 0.15s ease, background 0.2s ease;
  pointer-events: none;
}

.video-media:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: #fff;
}

.video-play-btn svg {
  margin-left: 3px;
}

/* ============================================================
   SPOTIFY BUBBLE
============================================================ */

.msg-bubble.spotify {
  padding: 10px;
  max-width: 280px;
}

.spotify-media {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.spotify-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #fcc9de;
}

.spotify-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.spotify-title {
  font-family: "angel", sans-serif;
  font-size: 10px;
  font-weight: bold;
  color: #6a5c56;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-artist {
  font-family: "verdana", sans-serif;
  font-size: 8px;
  color: #a68b95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-play-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffdaed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
  box-shadow:
    inset 2px 2px 3px rgba(255, 255, 255, 0.6),
    inset -2px -2px 3px rgba(154, 62, 97, 0.5);
}

.spotify-media:hover .spotify-play-btn {
  transform: scale(1.1);
}

.msg-bubble.spotify iframe {
  display: block;
  width: 100%;
  height: 152px;
  border-radius: 8px;
  border: none;
}

/* ============================================================
   DAY DIVIDER
============================================================ */

.day-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 6px 0 22px;
  user-select: none;
}

.day-divider:first-child {
  margin-top: 4px;
}

.day-divider::before,
.day-divider::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 1px solid #fcc9de;
}

.day-divider span {
  font-family: 'angel';
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #6a5c56;
  border-radius: 10px;
  padding: 4px 12px;
  white-space: nowrap;
  opacity: .7;
}

/* ============================================================
   INPUT BAR
============================================================ */

.input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ffeff7;
  border-top: 1px solid #ffdaed;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.8), inset -2px -2px 2px rgba(215, 127, 171, 0.15);
  position: relative;
  z-index: 20;
}

.input-icon-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #fcc9de;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.8), inset -2px -2px 2px rgba(215, 127, 171, 0.1);
  transition: transform 0.15s ease;
  user-select: none;
}

.input-icon-btn:hover {
  transform: scale(1.08);
  background: #fff5fa;
}

.input-icon-btn:active {
  transform: scale(0.95);
}

.input-text {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #fcc9de;
  background: #fff;
  font-family: "verdana", sans-serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #6a5c56;
  box-shadow: inset 4px 4px 0px rgba(255, 255, 255, 0.8), inset -4px -4px 4px rgba(215, 127, 171, 0.1);
}

.input-text::placeholder {
  color: #c9a3b3;
}

.send-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #f4abcb;
  background: #fff;
  color: #c9a3b3;
  font-family: 'angel';
  font-size: 11px;
  letter-spacing: 0.5px;
  box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.8), inset -2px -2px 2px rgba(215, 127, 171, 0.15);
  transition: transform 0.15s ease, background 0.2s ease;
}

.send-btn:hover {
  background: #fcdbec;
  transform: scale(1.05);
}

.send-btn:active {
  transform: scale(0.95);
}

/* ============================================================
   EMOTE POPUP
============================================================ */

.emote-popup {
  display: none;
  position: absolute;
  bottom: 46px;
  left: 14px;
  width: 222px;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border: 3px solid #fff;
  outline: 1px solid #fcc9de;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 8px;
  z-index: 999;
}

.emote-popup.open {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.emote-popup img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 6px;
  padding: 3px;
  box-sizing: border-box;
  transition: background 0.15s ease, transform 0.15s ease;
  position: relative;
}

.emote-popup img:hover {
  background: #ffe4f0;
  transform: scale(1.1);
}

.emote-tooltip {
  position: fixed;
  background: #fff;
  border: 1px solid #fcc9de;
  border-radius: 6px;
  padding: 3px 8px;
  font-family: "verdana", sans-serif;
  font-size: 8px;
  letter-spacing: 0.3px;
  color: #6a5c56;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(141, 124, 118, 0.2);
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.emote-tooltip.show {
  opacity: 1;
}

/* ============================================================
   CREDITS POPUP
============================================================ */

.credits-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.credits-overlay.open {
  display: block;
}

.credits-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 540px;
  max-width: 120vw;
  max-height: 90vh;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #ffffff;
  outline: 2px solid #ffd8e8;
  box-shadow: var(--shadow-soft);
  z-index: 9999;
  display: none;
  flex-direction: column;
}

.credits-popup.open {
  display: flex;
}

.credits-popup .win-header {
  cursor: default;
}

.credits-popup .win-body {
  padding: 16px 18px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.credits-popup h4 {
  font-family: 'angel';
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #ea85af;
  margin: 0;
}

.credits-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "verdana", sans-serif;
  font-size: 10px;
  letter-spacing: 0.3px;
  color: #6a5c56;
  line-height: 1.5;
  margin-bottom: 6px;
}

.credits-list li img.credit-bullet {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.credits-list li a {
  color: #ea85af;
  text-decoration: underline;
  text-decoration-color: #fcc9de;
}

.credits-list li strong {
  color: #6a5c56;
}

/* ============================================================
   PRINCESS DECORATION
============================================================ */

.princess {
  position: absolute;
  right: -140px;
  bottom: -40px;
  width: 250px;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 99999;
  transform-origin: 65% 100%;
  animation: 8s ease-in-out 0s infinite normal none running swaying;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.6));
}

.princess.princess-small {
  width: 200px;
}

@keyframes swaying {
  0% {
    transform: rotate(-1.5deg);
  }

  50% {
    transform: rotate(1.5deg);
  }

  100% {
    transform: rotate(-1.5deg);
  }
}

/* ============================================================
   IMAGE GALLERY BUBBLE
============================================================ */

.msg-bubble.gallery {
  padding: 6px;
  overflow: hidden;
  position: relative;
}

.gallery-track {
  display: flex;
  gap: 4px;
  width: 308px;
  max-width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 auto;
  width: 100px;
  height: calc(100px * var(--gallery-ratio, 1));
  border-radius: 6px;
  overflow: hidden;
  scroll-snap-align: start;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-bubble.gallery.gallery-count-1 .gallery-track,
.msg-bubble.gallery.gallery-count-2 .gallery-track {
  overflow: visible;
}

.gallery-count-1 .gallery-item {
  width: 280px;
  max-width: 100%;
  height: auto;
  aspect-ratio: var(--gallery-ar, 1);
}

.gallery-count-2 .gallery-item {
  flex: 1 1 0;
  width: auto;
  height: auto;
  aspect-ratio: var(--gallery-ar, 1);
}

.gallery-item.clickable {
  cursor: url(/media/cursor/normal-select.gif), pointer !important;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #fcc9de;
  background: rgba(255, 255, 255, 0.85);
  color: #ea85af;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(141, 124, 118, 0.2);
  transition: transform 0.15s ease, background 0.2s ease;
}

.gallery-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.gallery-arrow.prev {
  left: 4px;
}

.gallery-arrow.next {
  right: 4px;
}

.gallery-dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.gallery-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #fcc9de;
  transition: background 0.15s ease;
}

.gallery-dot.active {
  background: #ea85af;
  border-color: #ea85af;
}

.gallery-caption {
  padding: 8px 4px 2px;
  font-family: "verdana", sans-serif;
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: 0.5px;
  color: #6a5c56;
  overflow-wrap: anywhere;
}

/* ============================================================
   LIGHTBOX (popup de imagem)
============================================================ */

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99998;
}

.lightbox-overlay.open {
  display: block;
}

.lightbox-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-popup.open {
  display: block;
}

.lightbox-popup img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  border: 4px solid #fff;
  outline: 2px solid #ffd8e8;
  box-sizing: border-box;
  cursor: url(/media/cursor/normal-select.gif), pointer !important;
}

/* ============================================================
   MOBILE / SMALL SCREENS
============================================================ */

@media (max-width: 700px) {

  .desktop {
    overflow-y: auto;
    padding: 30px 0;
  }

  .wing-left,
  .wing-right,
  .princess {
    display: none !important;
  }

  .frame-wrapper {
    border-width: 12px;
    border-radius: 16px;
    width: 88vw;
  }

  .frame {
    width: 100%;
    max-width: 100%;
    height: 72vh;
    max-height: 72vh;
    border-radius: 6px;
  }

  .side-tab,
  .side-tab-2 {
    left: auto;
    bottom: auto;
    top: -40px;
    writing-mode: horizontal-tb;
    transform: none;
    text-orientation: initial;
    border-left: 1px solid #ffdaed;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 8px 12px 14px;
    font-size: 9px;
  }

  .side-tab {
    right: 85px;
  }

  .side-tab-2 {
    right: 10px;
  }

  .win-body {
    padding: 14px 12px;
  }

  .msg-content {
    max-width: 78%;
  }

  .msg-avatar-wrap {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .msg-avatar {
    width: 48px;
    height: 48px;
  }

  .msg-avatar-decor {
    width: 36px;
  }

  .gallery-track {
    width: 100%;
  }

  .msg-bubble.video,
  .msg-bubble.spotify {
    max-width: 100%;
  }

  .credits-popup {
    width: 92vw;
  }
  
  .input-text {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #fcc9de;
  background: #fff;
  font-family: "verdana", sans-serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #6a5c56;
  z-index: 1000000;
 }

.input-text::placeholder {
  color: #c9a3b3;
 }
}