:root{
  color-scheme: light;
}
*{box-sizing:border-box}

html,body{
  margin:0;
  height:100%;
  font-family: arial; /*-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; */
  background:#e9edf4;
  color:#172033;
}

body { background: radial-gradient(circle at top left, rgba(144, 76, 255, .45), transparent 34%), radial-gradient(circle at bottom right, rgba(47, 134, 255, .38), transparent 36%), linear-gradient(135deg, #101a3a, #16245a); }

.screen{display:none;height:100dvh}
.screen.active{display:flex}

.login-card{
  margin:auto;
  width:min(92vw,390px);
  background:#fff;
  padding:28px;
  border-radius:28px;
  box-shadow:0 12px 35px rgba(0,0,0,.12);
}

.hint{color:#6b6b6f;margin:0 0 20px}

.login-card input{
  width:100%;
  font-size:18px;
  padding:15px;
  margin:8px 0;
  border:1px solid #d0d6df;
  border-radius:14px;
  text-transform:lowercase;
}

.login-card button{
  width:100%;
  border:0;
  background:#2f63e8;
  color:#fff;
  font-weight:700;
  font-size:18px;
  border-radius:16px;
  padding:15px;
  margin-top:12px;
}

#chat.screen.active{
  display:flex;
  flex-direction:column;
  background:#eef2f7;
}

.chat-header{
  height:64px;
  background:#101a3a;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 28px;
  flex-shrink:0;
}

.brand-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}

.logo-bubble{
  width:40px;
  height:40px;
  border:2px solid #904cff;
  border-right-color:#2f86ff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  font-weight:800;
  font-style:italic;
}

.logo-bubble span{color:#6d8dff}

.brand-text{
  font-size:28px;
  font-weight:800;
  font-style:italic;
  letter-spacing:-1px;
}

.brand-text span{color:#904cff}

.header-actions{
  display:flex;
  gap:10px;
}

.icon-btn{
  width:40px;
  height:40px;
  border:0;
  border-radius:12px;
  background:#d9dee8;
  color:#182238;
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.status-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0;
  padding:7px 14px;
  background:#f8fafc;
  border-bottom:1px solid #d7dde8;
  min-height:40px;
}

.status-item{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#1f2937;
  min-height:26px;
  text-align: right;
}

.status-line{
  display:flex;
  align-items:center;
  gap:8px;
}

.mine-status{
  border:2px solid #cfd7e3;
  background:#fff;
  border-radius:999px;
  padding:5px 14px;
  font-weight:800;
  cursor:pointer;
  min-width:250px;
  justify-content:flex-start;
}

.other{font-weight:500}

.status-light{
  width:11px;
  height:11px;
  border-radius:50%;
  display:inline-block;
  flex:0 0 auto;
}

.status-light.green{background:#22c55e}
.status-light.yellow{background:#facc15}
.status-light.red{background:#ef4444}

#messages{
  flex:1;
  overflow-y:auto;
  margin:0;
  padding:18px 28px 120px;
  background:#ffffff;
  border-radius:0 0 22px 22px;
}

.msg-row{
  display:flex;
  margin:8px 0;
  align-items:flex-end;
  gap:6px;
  position:relative;
}

.msg-row.mine{justify-content:flex-end}

.bubble-wrap{
  position:relative;
  max-width:78%;
  padding-top:14px;
}

.bubble{
    max-width:95%;
    border-radius:24px;
    position:relative;
    padding: 11px 14px;
}

.text-bubble{
    word-wrap:break-word;
    overflow-wrap:break-word;
    white-space:pre-wrap;
}

.mine .bubble{border-bottom-right-radius:6px}
.theirs .bubble{border-bottom-left-radius:6px}

.meta{
  font-size:13px;
  color:#4b5563;
  margin:2px 8px 0;
}

.mine .meta{
    text-align:right;
    justify-content:flex-end;
}

.theirs .meta{color:#64748b}

.img-msg{
  display:block;
  width:100%;
  height:auto;
  max-width:320px;
  max-height:320px;
  object-fit:contain;
  border-radius:18px;
  background:#fff;
}

.bubble:has(.img-msg){
  padding:10px;
  max-width:340px;
}

.readline{
  font-size:12px;
  color:#8e8e93;
  text-align:right;
  margin:-4px 8px 6px;
}

.reaction-menu{
  display:none;
  position:absolute;
  top:-25px;
  right:12px;
  z-index:20;
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  box-shadow:0 10px 30px rgba(15,23,42,.22);
  gap:10px;
  align-items:center;
  white-space:nowrap;
}

.theirs .reaction-menu{
  right:auto;
  left:12px;
}

.bubble-wrap:hover .reaction-menu,
.msg-row.menu-open .reaction-menu{
  display:flex;
}

.reaction-menu button{
  border:0;
  background:transparent;
  font-size:21px;
  width:30px;
  height:30px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.reaction-menu .editInlineBtn{
  width:auto;
  border:2px solid #d1d7e2;
  background:#f3f6fb;
  color:#172033;
  font-size:15px;
  font-weight:800;
  border-radius:999px;
  padding:7px 15px;
}

.delete-x{
  position:absolute;
  right:14px;
  top:20px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#f1f5fb;
  color:#111827;
  font-size:28px;
  line-height:1;
  box-shadow:0 6px 18px rgba(15,23,42,.2);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:22;
  cursor:pointer;
}

.msg-row.mine .bubble-wrap:hover .delete-x,
.msg-row.mine.menu-open .delete-x{
  display:flex;
}

.reactions{
  position:absolute;
  bottom:-15px;
  right:8px;
  background:#fff;
  color:#111;
  border-radius:13px;
  box-shadow:0 2px 8px rgba(0,0,0,.18);
  font-size:14px;
  padding:1px 6px;
}

.mine .reactions {
    right: auto;
    left: 8px;
}

.theirs .reactions{
  left:auto;
  right:8px;
}

.composer{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  gap:12px;
  align-items:center;
  padding:16px 38px calc(16px + env(safe-area-inset-bottom));
  background:#F9FAFC;
}

#messageInput {
    font-family: arial !important;
}

.composer textarea{
  flex:1;
  resize:none;
  max-height:110px;
  border:2px solid #cfd7e3;
  border-radius:18px;
  padding:15px 20px;
  font-size:14px;
  line-height:26px;
  outline:0;
  background:#fff;
  color:#172033;
}

.round,.send{
  width:50px;
  height:50px;
  border-radius:14px;
  border:2px solid #cfd7e3;
  font-size:26px;
  background:#f7f9fc;
  color:#0f172a;
  cursor:pointer;
}

.send{
  background:#2f63e8;
  color:#fff;
  border-color:#2f63e8;
  border-radius:16px;
  font-size:28px;
}

#typing{
  display:none;
  position:fixed;
  bottom:88px;
  left:38px;
  z-index:30;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  color:#1f2937;
  font-weight:700;
  padding:8px 14px;
  border-radius:999px;
  box-shadow:0 6px 18px rgba(15,23,42,.16);
  font-size:14px;
}

.status-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(6px);
  align-items:center;
  justify-content:center;
}

.status-card{
  position:relative;
  width:min(90vw,640px);
  background:#fff;
  border-radius:28px;
  padding:34px;
  box-shadow:0 28px 70px rgba(0,0,0,.28);
}

.status-card h3{
  margin:0 0 24px;
  font-size:32px;
  line-height:1.1;
  color:#111827;
}

.status-close{
  position:absolute;
  top:24px;
  right:28px;
  border:0;
  background:transparent;
  font-size:38px;
  line-height:1;
  color:#6b7280;
  font-weight:800;
  cursor:pointer;
}

.status-card label{
  display:block;
  font-size:18px;
  font-weight:800;
  color:#374151;
  margin:18px 0 9px;
}

#statusColorSelect,
#statusMessageInput{
  width:100%;
  height:58px;
  border:2px solid #d1d7e2;
  border-radius:18px;
  background:#fff;
  color:#172033;
  font-size:21px;
  padding:0 20px;
  outline:0;
}

.bubble-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin:10px 0 18px;
}

.bubble-choice{
  height:44px;
  border-radius:14px;
  border:3px solid transparent;
  cursor:pointer;
}

.bubble-choice.selected{
  border-color:#111827;
}


.bg-light-blue{background:#dbeafe}
.bg-light-sky{background:#e0f2fe}
.bg-light-lavender{background:#e9e5ff}
.bg-light-pink{background:#fce7f3}
.bg-light-mint{background:#dcfce7}
.bg-light-sage{background:#d1fae5}
.bg-light-peach{background:#ffedd5}
.bg-light-yellow{background:#fef3c7}

.bg-blue{background:#2563eb}
.bg-purple{background:#7c3aed}
.bg-charcoal{background:#374151}
.bg-pink{background:#db2777}

.bubble-gradient-light-blue{background:#dbeafe!important;color:#1e3a8a!important}
.bubble-gradient-light-sky{background:#e0f2fe!important;color:#075985!important}
.bubble-gradient-light-lavender{background:#e9e5ff!important;color:#5b21b6!important}
.bubble-gradient-light-pink{background:#fce7f3!important;color:#9d174d!important}

.bubble-gradient-light-mint{background:#dcfce7!important;color:#166534!important}
.bubble-gradient-light-sage{background:#d1fae5!important;color:#065f46!important}
.bubble-gradient-light-peach{background:#ffedd5!important;color:#9a3412!important}
.bubble-gradient-light-yellow{background:#fef3c7!important;color:#92400e!important}

.bubble-gradient-light-blue a,
.bubble-gradient-light-sky a,
.bubble-gradient-light-lavender a,
.bubble-gradient-light-pink a,
.bubble-gradient-light-mint a,
.bubble-gradient-light-sage a,
.bubble-gradient-light-peach a,
.bubble-gradient-light-yellow a{
  color:#1d4ed8 !important;
}

.bubble-gradient-blue{background:#2563eb!important;color:#fff!important}
.bubble-gradient-purple{background:#7c3aed!important;color:#fff!important}
.bubble-gradient-charcoal{background:#374151!important;color:#fff!important}
.bubble-gradient-pink{background:#db2777!important;color:#fff!important}

.bubble-gradient-blue a,
.bubble-gradient-purple a,
.bubble-gradient-charcoal a,
.bubble-gradient-pink a{
  color:#ffffff !important;
}

.bubble a:hover{
  opacity:.8;
}

#saveStatusBtn{
  width:100%;
  height:62px;
  border:0;
  border-radius:18px;
  margin-top:24px;
  background:#2f63e8;
  color:#fff;
  font-size:22px;
  font-weight:800;
  cursor:pointer;
}

.deleted{
  font-style:italic;
  color:#777;
}

.editbox{
  width:100%;
  font:inherit;
  border:0;
  border-radius:12px;
  padding:6px;
}

@media(max-width:700px){
  .chat-header{
    height:58px;
    padding:8px 14px;
  }

  .brand-wrap{gap:8px}

  .brand-text{
    font-size:24px;
  }

  .logo-bubble{
    width:36px;
    height:36px;
    font-size:18px;
  }

  .header-actions{
    gap:8px;
  }

  .icon-btn{
    width:36px;
    height:36px;
    border-radius:12px;
    font-size:16px;
  }

  .status-bar{
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
    margin:0;
    padding:8px 12px;
    min-height:0;
  }

  .status-item{
    font-size:12px;
    min-height:22px;
    text-align: left;
  }

  .mine-status{
    order:2;
    font-weight:800;
    padding:0;
    border:0;
    background:transparent;
    border-radius:0;
    min-width:0;
  }

  .other{order:1}

  #messages{
    margin:0;
    padding:14px 12px 108px;
    border-radius:0 0 18px 18px;
  }

  .msg-row{
    margin:6px 0;
  }

  .bubble-wrap{
    max-width:84%;
    padding-top:14px;
  }

  .bubble{
    font-size:15px;
    padding:11px 14px;
  }

  .meta{
    font-size:12px;
  }

  .img-msg{
    max-width:240px;
    max-height:280px;
  }

  .bubble:has(.img-msg){
    max-width:260px;
  }

  .composer{
    padding:11px 14px calc(11px + env(safe-area-inset-bottom));
    gap:8px;
  }

  .composer textarea{
    font-size:14px;
    padding:12px 15px;
    line-height:23px;
  }

  .round,.send{
    width:44px;
    height:44px;
    font-size:23px;
  }

  #typing{
    bottom:72px;
    left:16px;
    font-size:13px;
  }

  .reaction-menu{
    gap:6px;
    padding:7px 8px;
  }

  .reaction-menu button{
    font-size:19px;
    width:28px;
    height:28px;
  }

  .reaction-menu .editInlineBtn{
    font-size:14px;
    padding:6px 12px;
  }

  .delete-x{
    width:34px;
    height:34px;
    font-size:26px;
  }

  .status-card{
    width:min(92vw,420px);
    padding:26px;
  }

  .status-card h3{
    font-size:27px;
  }

  .status-close{
    top:20px;
    right:22px;
    font-size:34px;
  }

  #statusColorSelect,
  #statusMessageInput{
    height:54px;
    font-size:19px;
  }

  #saveStatusBtn{
    height:56px;
    font-size:19px;
  }
}


input,
textarea,
select,
button{
  color-scheme: light;
}

html{
  background:#e9edf4;
}

body{
  color:#172033;
}

/* 
 * apple
 */

.media-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(6px);
  align-items:center;
  justify-content:center;
  padding:18px;
}

.media-card{
  position:relative;
  width:min(92vw,760px);
  max-height:82vh;
  overflow:auto;
  background:#fff;
  border-radius:22px;
  padding:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}

.media-card h3{
  margin:0 0 18px;
  font-size:28px;
  color:#111827;
}

.media-close{
  position:absolute;
  top:14px;
  right:18px;
  border:0;
  background:transparent;
  font-size:34px;
  font-weight:800;
  color:#374151;
  cursor:pointer;
}

.media-results{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}

.apple-result{
  border:0;
  background:#f3f4f6;
  border-radius:16px;
  padding:10px;
  cursor:pointer;
  text-align:left;
}

.apple-result img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:12px;
  display:block;
}

.apple-title{
  font-size:16px;
  font-weight:800;
  margin-top:8px;
  color:#111827;
}

.apple-artist{
  font-size:14px;
  color:#6b7280;
  font-weight:600;
}

@media(max-width:700px){
  .media-results{
    grid-template-columns:1fr;
  }
}

.bubble.apple-bubble{
  padding:10px 12px !important;
  max-width:360px !important;
  overflow:visible !important;
}

.giphy-img,
.apple-song-card{
  overflow:hidden;
  border-radius:14px;
}

.apple-song-card{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  max-width:100%;
  overflow:hidden;
}

.apple-song-card img{
  display:block;
  width:82px !important;
  height:82px !important;
  min-width:82px;
  max-width:82px !important;
  object-fit:cover;
  border-radius:14px;
  flex:0 0 82px;
}

.apple-song-info{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
}

.apple-song-title,
.apple-song-artist,
.apple-song-link{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

.apple-song-title{
  font-size:18px;
  font-weight:800;
  line-height:1.15;
}

.apple-song-artist{
  margin-top:5px;
  font-size:14px;
  font-weight:600;
}

.apple-song-link{
  display:block;
  margin-top:5px;
  font-size:10px;
  color:inherit;
  text-decoration:underline;
}

/*
 *  giphy
 */
.media-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(6px);
  align-items:center;
  justify-content:center;
  padding:18px;
}

.media-card{
  position:relative;
  width:min(92vw,760px);
  max-height:82vh;
  overflow:auto;
  background:#fff;
  border-radius:22px;
  padding:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}

.media-card h3{
  margin:0 0 18px;
  font-size:28px;
  color:#111827;
}

.media-close{
  position:absolute;
  top:14px;
  right:18px;
  border:0;
  background:transparent;
  font-size:34px;
  font-weight:800;
  color:#374151;
  cursor:pointer;
}

.media-results{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.giphy-result{
  border:0;
  background:#f3f4f6;
  border-radius:16px;
  padding:8px;
  cursor:pointer;
}

.giphy-result img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:12px;
  display:block;
}

@media(max-width:700px){
  .media-card{
    width:94vw;
    max-height:78vh;
    padding:18px;
  }

  .media-results{
    grid-template-columns:repeat(2,1fr);
    gap:10px;
  }
}


.giphy-bubble{
  padding:8px !important;
  max-width:360px !important;
  overflow:visible !important;
}

.giphy-img{
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  border-radius:14px;
  object-fit:contain;
}


.simple-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:10000;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(6px);
  align-items:center;
  justify-content:center;
  padding:18px;
}

.simple-card{
  position:relative;
  width:min(92vw,420px);
  background:#fff;
  border-radius:24px;
  padding:28px;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}

.simple-card h3{
  margin:0 0 20px;
  font-size:26px;
  color:#111827;
}

.simple-close{
  position:absolute;
  top:16px;
  right:20px;
  border:0;
  background:transparent;
  font-size:34px;
  font-weight:800;
  color:#374151;
  cursor:pointer;
}

.simple-card label{
  display:block;
  margin-bottom:8px;
  font-weight:800;
  color:#374151;
}

#slackMessageSelect{
  width:100%;
  height:52px;
  border:2px solid #d1d7e2;
  border-radius:14px;
  padding:0 14px;
  font-size:18px;
  background:#fff;
  color:#172033;
}

#sendSlackBtn{
  width:100%;
  height:54px;
  border:0;
  border-radius:14px;
  background:#2f63e8;
  color:#fff;
  font-size:18px;
  font-weight:800;
  margin-top:18px;
  cursor:pointer;
}

/* 
 * image zoom
 */

.image-zoom-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:20000;
  background:rgba(0,0,0,.88);
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.image-zoom-modal{
  touch-action:none;
}



#zoomedImage{
  max-width:90vw;
  max-height:82vh;
  transform:scale(1);
  transition:transform .15s ease;
  border-radius:12px;
}
#zoomedImage{
  cursor:grab;
  user-select:none;
  -webkit-user-drag:none;
  transform-origin:center center;
}

#zoomedImage:active{
  cursor:grabbing;
}

.image-zoom-close{
  position:absolute;
  top:18px;
  right:22px;
  z-index:2;
  border:0;
  background:#fff;
  color:#111;
  width:42px;
  height:42px;
  border-radius:50%;
  font-size:30px;
  cursor:pointer;
}

.image-zoom-controls{
  position:absolute;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  z-index:2;
  display:flex;
  gap:10px;
}

.image-zoom-controls button{
  border:0;
  background:#fff;
  color:#111;
  border-radius:999px;
  padding:10px 16px;
  font-weight:800;
  cursor:pointer;
}


/*
 * countodwn
 */

.countdown-bubble{
  padding:0 !important;
  max-width:340px !important;
  overflow:visible !important;
  background:transparent !important;
}

.countdown-card{
  text-align:center;
  border-radius:24px;
  padding:18px 22px;
  background:linear-gradient(135deg,#fff7ed,#fde68a,#fbcfe8);
  border:2px solid rgba(255,255,255,.75);
  box-shadow:0 10px 28px rgba(236,72,153,.22);
  color:#7c2d12;
}

.countdown-sparkle{
  font-size:24px;
  margin-bottom:4px;
}

.countdown-title{
  font-size:15px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.countdown-hours{
  font-size:54px;
  line-height:1;
  font-weight:900;
  margin-top:8px;
}

.countdown-label{
  font-size:18px;
  font-weight:800;
  margin-top:2px;
}

.countdown-message{
  margin-top:8px;
  font-size:15px;
  font-weight:700;
}

.countdown-target-date{
  margin-top:8px;
  font-size:11px;
  opacity:.7;
  text-align:center;
  font-weight:500;
}

/*
 * download image 
 */

.image-wrapper{
  position:relative;
  display:inline-block;
  max-width:100%;
}

.image-download{
  position:absolute;
  bottom:12px;
  right:12px;

  width:38px;
  height:38px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:50%;

  background:rgba(255,255,255,.82);
  backdrop-filter:blur(8px);

  color:#666;
  text-decoration:none;

  box-shadow:0 2px 10px rgba(0,0,0,.15);

  opacity:.85;
  z-index:10;

  transition:all .15s ease;
}

.image-download:hover{
  opacity:1;
  transform:scale(1.08);
  color:#444;
}

.image-download i{
  font-size:15px;
}

@media (hover:none){
  .image-download{
    width:42px;
    height:42px;
    opacity:.92;
  }

  .image-download i{
    font-size:18px;
  }
}

/*
 * upload
 */

#uploadStatus{
  display:none;
  position:fixed;
  bottom:88px;
  left:38px;
  z-index:30;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
  color:#1f2937;
  font-weight:700;
  padding:8px 14px;
  border-radius:999px;
  box-shadow:0 6px 18px rgba(15,23,42,.16);
  font-size:14px;
}

#uploadStatus.error{
  background:#fee2e2;
  color:#991b1b;
}

#uploadStatus.success{
  background:#dcfce7;
  color:#166534;
}

@media(max-width:700px){
  #uploadStatus{
    bottom:72px;
    left:16px;
    font-size:13px;
  }
}


/*
 * login 
 */

#login.screen.active{
  display:flex;
  min-height:100dvh;
  background:
    radial-gradient(circle at top left, rgba(144,76,255,.45), transparent 34%),
    radial-gradient(circle at bottom right, rgba(47,134,255,.38), transparent 36%),
    linear-gradient(135deg,#101a3a,#16245a);
  padding:24px;
}

.login-card{
  margin:auto;
  width:min(92vw,420px);
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(18px);
  padding:34px;
  border-radius:30px;
  box-shadow:0 24px 70px rgba(0,0,0,.32);
  border:1px solid rgba(255,255,255,.55);
}


.login-logo{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin-bottom:22px;
}

.login-logo-icon{
    width:72px;
    height:72px;
    border-radius:50%;
    border:4px solid #904cff;
    border-right-color:#2f86ff;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(16,26,58,.04);
}

.login-logo-icon span{
    font-size:36px;
    font-weight:900;
    font-style:italic;
    color:#101a3a;
    letter-spacing:-2px;
}

.login-logo-text{
    font-size:54px;
    font-weight:900;
    font-style:italic;
    line-height:1;
    letter-spacing:-2px;
}

.login-logo-text .jayla{
    color:#ffffff;
}

.login-logo-text .chat{
    background:linear-gradient(135deg,#904cff,#2f86ff);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
}

@media(max-width:700px){

    .login-logo-icon{
        width:58px;
        height:58px;
    }

    .login-logo-icon span{
        font-size:28px;
    }

    .login-logo-text{
        font-size:42px;
    }
}

.login-card .hint{
  text-align:center;
  color:#475569;
  font-size:15px;
  line-height:1.35;
  margin:0 0 22px;
}

.login-card input{
  width:100%;
  font-size:18px;
  padding:16px 18px;
  margin:9px 0;
  border:2px solid #d7ddea;
  border-radius:16px;
  background:#f8fafc;
  color:#101a3a;
  outline:none;
  text-transform:lowercase;
}

.login-card input:focus{
  border-color:#2f63e8;
  background:#fff;
  box-shadow:0 0 0 4px rgba(47,99,232,.14);
}

.login-card button{
  width:100%;
  border:0;
  background:linear-gradient(135deg,#2f63e8,#904cff);
  color:#fff;
  font-weight:900;
  font-size:18px;
  border-radius:18px;
  padding:16px;
  margin-top:14px;
  box-shadow:0 12px 24px rgba(47,99,232,.28);
  cursor:pointer;
}

.login-card button:active{
  transform:scale(.98);
}

@media(max-width:700px){
  #login.screen.active{
    padding:18px;
  }

  .login-card{
    padding:28px 24px;
    border-radius:26px;
  }

}

.login-container{
    margin:auto;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.login-logo{
    margin-bottom:28px;
    text-align:center;
}


@keyframes logoFloat{
    0%   { transform:translateY(0px); }
    50%  { transform:translateY(-6px); }
    100% { transform:translateY(0px); }
}


.login-container{
    margin:auto;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.login-logo{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    margin-bottom:28px;

    filter:
        drop-shadow(0 8px 20px rgba(0,0,0,.35))
        drop-shadow(0 0 24px rgba(144,76,255,.20));
}

.login-logo-icon{
    width:74px;
    height:74px;
    border-radius:50%;

    border:4px solid #904cff;
    border-right-color:#2f86ff;

    display:flex;
    align-items:center;
    justify-content:center;
}

.login-logo-icon span{
    font-size:34px;
    font-weight:900;
    font-style:italic;
    color:#ffffff;
    letter-spacing:-2px;
}

.login-logo-text{
    font-size:58px;
    font-weight:900;
    font-style:italic;
    line-height:1;
    letter-spacing:-2px;
}

.login-logo-text .jayla{
    color:#ffffff;
}

.login-logo-text .chat{
    background:linear-gradient(135deg,#904cff,#2f86ff);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
}

@media(max-width:700px){

    .login-logo{
        gap:12px;
        margin-bottom:22px;
    }

    .login-logo-icon{
        width:58px;
        height:58px;
    }

    .login-logo-icon span{
        font-size:26px;
    }

    .login-logo-text{
        font-size:42px;
    }
}


/*
 *  link 
 */

.bubble a{
  text-decoration:underline;
  font-weight:600;
  word-break:break-all;
}


.bubble a{
  color:inherit !important;
  text-decoration:underline;
  font-weight:700;
}

.emoji-only{
  font-size:48px !important;
  line-height:1.1;
  padding:18px 24px !important;
}

/*
 *  emoji 
 */

.emoji-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:12000;
  background:rgba(15,23,42,.35);
  backdrop-filter:blur(4px);
  align-items:flex-end;
  justify-content:center;
  padding:18px;
}

.emoji-card{
  width:min(94vw,720px);
  max-height:78vh;
  overflow:auto;
  background:#fff;
  border-radius:24px;
  padding:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.25);
  position:relative;
}

.emoji-card h3{
  margin:0 0 18px;
  font-size:28px;
  color:#111827;
}

.emoji-card h4{
  margin:22px 0 14px;
  font-size:20px;
  color:#374151;
}

.emoji-close{
  position:absolute;
  top:18px;
  right:22px;
  border:0;
  background:transparent;
  font-size:34px;
  font-weight:900;
  color:#374151;
  cursor:pointer;
}

#emojiSearch{
  width:100%;
  height:56px;
  border:2px solid #2f63e8;
  border-radius:16px;
  padding:0 18px;
  font-size:22px;
  outline:0;
}

.emoji-grid{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:10px;
}

.emoji-pick{
  border:0;
  background:transparent;
  font-size:30px;
  height:44px;
  border-radius:12px;
  cursor:pointer;
}

.emoji-pick:hover{
  background:#eef2f7;
}

@media(max-width:700px){
  .emoji-card{
    max-height:70vh;
    padding:20px;
  }

  .emoji-grid{
    grid-template-columns:repeat(6,1fr);
  }

  .emoji-pick{
    font-size:28px;
  }
}

/*
 * edit modal
 */

.edit-card{
  width:min(92vw,520px);
}

#editMessageText{
  width:100%;
  min-height:150px;
  resize:vertical;
  border:2px solid #d1d7e2;
  border-radius:16px;
  padding:14px;
  font-size:14px;
  line-height:1.35;
  outline:0;
  color:#172033;
}

#editMessageText:focus{
  border-color:#2f63e8;
}

#saveEditBtn{
  width:100%;
  height:54px;
  border:0;
  border-radius:14px;
  background:#2f63e8;
  color:#fff;
  font-size:18px;
  font-weight:800;
  margin-top:16px;
  cursor:pointer;
}

/*
 * preview
 */

.link-preview-bubble{
  padding:0 !important;
  max-width:360px !important;
  overflow:visible !important;
}

.link-preview-card{
  display:block;
  color:inherit;
  text-decoration:none !important;
  overflow:hidden;
  border-radius:18px;
  background:rgba(255,255,255,.55);
}

.link-preview-card img{
  display:block;
  width:100%;
  max-height:190px;
  object-fit:cover;
}

.link-preview-info{
  padding:12px 14px;
}

.link-preview-title{
  font-weight:800;
  font-size:18px;
  line-height:1.25;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.link-preview-desc{
  font-size:12px;
  line-height:1.35;
  opacity:.8;

  margin-top: 5px;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.link-preview-url{
  margin-top:8px;
  font-size:12px;
  opacity:.6;
  word-break:break-all;
}

/*
 * max width desktop
 */

@media (min-width: 768px){

  body{
    min-height:100vh;
    background:
      radial-gradient(circle at top left, rgba(144,76,255,.18), transparent 34%),
      radial-gradient(circle at bottom right, rgba(47,134,255,.16), transparent 36%),
      #d9e8ed;
    display:flex;
    justify-content:center;
    align-items:center;
  }

  #chat.screen.active{
    width:430px;
    max-width:430px;
    height:calc(100vh - 40px);
    max-height:920px;
    margin:20px auto;
    border-radius:24px;
    overflow:hidden;
    position:relative;
    box-shadow:
      0 22px 70px rgba(15,23,42,.22),
      0 0 0 1px rgba(15,23,42,.08);
  }

  #messages{
    margin:0;
    border-radius:0;
  }

  .composer{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    width:100%;
  }

  #typing,
  #uploadStatus{
    position:absolute;
    left:16px;
    bottom:78px;
  }

  .status-modal,
  .simple-modal,
  .media-modal,
  .emoji-modal,
  .image-zoom-modal{
    position:fixed;
  }
}

/* 
 *  help list
 */

.help-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.help-item code{
  display:block;
  font-size:16px;
  font-weight:800;
  color:#2563eb;
}

.help-item p{
  margin:4px 0 0;
  color:#475569;
  font-size:14px;
}

/*
 * countdown modal
 */

#countdownTimezone{
  width:100%;
  height:52px;
  border:2px solid #d1d7e2;
  border-radius:14px;
  padding:0 14px;
  font-size:16px;
  margin-bottom:14px;
  background:#fff;
  color:#172033;
}

.countdown-setup-card{
    width:min(92vw,520px);
}

#countdownTitle,
#countdownTarget{
    width:100%;
    height:52px;
    border:2px solid #d1d7e2;
    border-radius:14px;
    padding:0 14px;
    font-size:16px;
    margin-bottom:14px;
}

#countdownMessage{
    width:100%;
    min-height:120px;
    border:2px solid #d1d7e2;
    border-radius:14px;
    padding:12px;
    resize:vertical;
    margin-bottom:14px;
    font-size:16px;
}

#saveCountdownBtn{
    width:100%;
    height:54px;
    border:0;
    border-radius:14px;
    background:#2f63e8;
    color:#fff;
    font-size:18px;
    font-weight:800;
    cursor:pointer;
}

/*
 * weather
 */

.weather-bubble{
  padding:0 !important;
  max-width:320px !important;
  overflow:visible !important;
  background:transparent !important;
}

.weather-card{
  text-align:center;
  border-radius:24px;
  padding:18px 22px;
  background:linear-gradient(135deg,#e0f2fe,#dbeafe,#eef2ff);
  border:2px solid rgba(255,255,255,.8);
  box-shadow:0 10px 28px rgba(37,99,235,.18);
  color:#0f172a;
}

.weather-icon{
  font-size:34px;
  line-height:1;
  margin-bottom:6px;
}

.weather-location{
  font-size:15px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#1e3a8a;
}

.weather-current{
  font-size:56px;
  line-height:1;
  font-weight:950;
  margin:8px 0 2px;
  color:#0f172a;
}

.weather-condition{
  font-size:17px;
  font-weight:800;
  color:#334155;
  margin-bottom:12px;
}

.weather-hi-lo{
  display:flex;
  justify-content:center;
  gap:16px;
  font-size:15px;
  font-weight:900;
  color:#1e40af;
}

/* 
 *location
 */

.location-bubble{
  padding:0 !important;
  max-width:360px !important;
  overflow:visible !important;
  background:transparent !important;
}

.location-card{
  display:block;
  overflow:hidden;
  border-radius:22px;
  background:#f8fafc;
  color:#172033 !important;
  text-decoration:none !important;
  box-shadow:0 10px 28px rgba(15,23,42,.14);
}

.location-map-wrap{
  position:relative;
  width:100%;
  background:#e5e7eb;
}

.location-map{
  display:block;
  width:100%;
  height:auto;
  min-height:190px;
  object-fit:cover;
}

.location-pin{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-100%);
  color:#ef4444;
  font-size:34px;
  text-shadow:0 3px 8px rgba(0,0,0,.35);
}

.location-info{
  padding:13px 15px 15px;
}

.location-title{
  font-size:17px;
  font-weight:900;
  color:#111827;
}

.location-address{
  margin-top:5px;
  font-size:13px;
  line-height:1.3;
  color:#475569;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.location-coords{
  margin-top:8px;
  font-size:11px;
  color:#64748b;
  font-weight:700;
}
/*
 *  seperator
 */

.date-separator{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:18px 0 14px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.date-separator:before,
.date-separator:after{
  content:"";
  height:1px;
  flex:1;
  background:#e2e8f0;
}

.date-separator span{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:999px;
  padding:5px 12px;
  box-shadow:0 2px 8px rgba(15,23,42,.05);
}

/*
 * video
 */


.video-record-card{
  width:min(92vw,380px);
}


#recordPreview{
  width:100%;
  aspect-ratio:9 / 16;
  max-height:70vh;
  background:#000;
  border-radius:18px;
  object-fit:contain;
  display:block;
}

.video-record-actions{
  display:flex;
  gap:10px;
  margin-top:14px;
}

.video-record-actions button{
  flex:1;
  height:50px;
  border:0;
  border-radius:14px;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
}

#startRecordBtn{
  background:#ef4444;
  color:#fff;
}

#stopRecordBtn{
  background:#111827;
  color:#fff;
}

#startRecordBtn:disabled,
#stopRecordBtn:disabled{
  opacity:.45;
  cursor:not-allowed;
}

#videoRecordStatus{
  margin-top:12px;
  font-size:13px;
  font-weight:700;
  color:#475569;
  text-align:center;
}

.video-bubble{
  padding:8px !important;
  max-width:340px !important;
  overflow:visible !important;
}

.video-card{
  position:relative;
  overflow:hidden;
  border-radius:18px;
  background:#000;
}

.video-msg{
  display:block;
  width:100%;
  max-width:320px;
  max-height:420px;
  background:#000;
  border-radius:18px;
}

.video-meta{
  position:absolute;
  left:10px;
  bottom:10px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  background:rgba(0,0,0,.62);
  color:#fff;
  font-size:12px;
  font-weight:800;
  pointer-events:none;
}

/*
 * library
 */

.library-auth-card,
.library-edit-card{
  width:min(92vw,460px);
}

#libraryEmail,
#libraryPasscode,
#librarySearch,
#libraryTypeFilter,
#libraryEditTitle{
  width:100%;
  height:52px;
  border:2px solid #d1d7e2;
  border-radius:14px;
  padding:0 14px;
  font-size:16px;
  margin-bottom:14px;
  background:#fff;
  color:#172033;
}

#libraryEditDescription{
  width:100%;
  min-height:120px;
  border:2px solid #d1d7e2;
  border-radius:14px;
  padding:12px 14px;
  font-size:16px;
  resize:vertical;
  color:#172033;
}

#libraryAuthSubmitBtn,
#saveLibraryMetaBtn{
  width:100%;
  height:54px;
  border:0;
  border-radius:14px;
  background:#2f63e8;
  color:#fff;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
  margin-top:12px;
}

#libraryAuthMessage{
  margin-top:12px;
  font-size:13px;
  font-weight:700;
  color:#991b1b;
  text-align:center;
}

.library-card{
  width:min(94vw,760px);
  max-height:86vh;
  overflow:auto;
}

.library-controls{
  display:grid;
  grid-template-columns:1fr 150px;
  gap:10px;
  margin-bottom:16px;
}

#libraryGrid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.library-item{
  background:#f8fafc;
  border-radius:18px;
  overflow:hidden;
  text-align:left;
  box-shadow:0 4px 14px rgba(15,23,42,.08);
}

.library-preview-btn{
  width:100%;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  cursor:pointer;
  display:block;
}

.library-thumb-wrap{
  position:relative;
  background:#e5e7eb;
  aspect-ratio:1/1;
}

.library-thumb-wrap img,
.library-thumb-wrap video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.library-play{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:42px;
  text-shadow:0 4px 14px rgba(0,0,0,.45);
}

.library-item-info{
  padding:10px 12px;
}

.library-item-title{
  font-size:14px;
  font-weight:900;
  color:#111827;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.library-item-desc{
  margin-top:3px;
  font-size:12px;
  color:#64748b;
  line-height:1.25;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.save-library-btn{
  position:absolute;
  left:12px;
  bottom:12px;
  width:38px;
  height:38px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.88);
  color:#475569;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:12;
  cursor:pointer;
  box-shadow:0 2px 10px rgba(0,0,0,.16);
}

.save-library-btn:hover{
  color:#2f63e8;
  transform:scale(1.06);
}

@media(max-width:700px){
  .library-controls{
    grid-template-columns:1fr;
  }

  #libraryGrid{
    grid-template-columns:repeat(2,1fr);
  }

  .library-card{
    width:94vw;
    max-height:82vh;
  }
}
.library-viewer-card{
  position:relative;
  width:min(94vw,820px);
  max-height:88vh;
  background:#0f172a;
  border-radius:24px;
  padding:18px;
  box-shadow:0 24px 70px rgba(0,0,0,.35);
}

#libraryViewerContent img,
#libraryViewerContent video{
  display:block;
  max-width:100%;
  max-height:78vh;
  margin:0 auto;
  border-radius:18px;
  background:#000;
}

#libraryViewerContent video{
  width:100%;
}

.library-mini-actions{
  display:flex;
  gap:6px;
  margin-top:7px;
}

.library-edit-mini,
.library-delete-mini{
  width:auto;
  height:24px;
  border:0;
  border-radius:999px;
  padding:0 9px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.library-edit-mini{
  background:#e0e7ff;
  color:#1e3a8a;
}

.library-delete-mini{
  background:#fee2e2;
  color:#991b1b;
}
