.controls {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 12;
  display: flex;
  gap: 9px;
}

.control-btn {
  border: 0;
  background: rgba(255, 250, 241, .72);
  color: rgba(56, 48, 42, .72);
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 5px 16px rgba(40,30,24,.08);
  font-size: 12px;
  letter-spacing: .04em;
  transition: 180ms ease;
}

.control-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 250, 241, .92);
}

.control-btn:disabled {
  opacity: .34;
  cursor: not-allowed;
  transform: none;
  background: rgba(255, 250, 241, .48);
  box-shadow: none;
}

.control-btn:disabled:hover {
  transform: none;
  background: rgba(255, 250, 241, .48);
}


.scripture-banner {
  position: absolute;
  left: 50%;
  top: 66%;
  bottom: auto;
  transform: translate(-50%, 12px);
  width: min(68%, 760px);
  padding: 14px 20px;
  border-radius: 18px;
  background: rgba(20, 18, 22, .46);
  border: 1px solid rgba(255, 243, 214, .16);
  color: rgba(255, 247, 228, .95);
  text-align: center;
  line-height: 1.72;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(255,255,255,.03);
  backdrop-filter: blur(8px);
  z-index: 18;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease, transform 360ms ease;
}

.scripture-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.scripture-line {
  display: block;
}

.scripture-line + .scripture-line {
  margin-top: 7px;
}

.scripture-text,
.scripture-ref {
  display: inline;
}

.scripture-text {
  font-size: clamp(13px, 1.25vw, 16px);
  letter-spacing: .01em;
}

.scripture-ref {
  margin-left: .45em;
  font-size: clamp(12px, 1.05vw, 14px);
  color: rgba(255, 233, 184, .9);
  white-space: nowrap;
}

.scripture-en {
  color: rgba(240, 238, 232, .82);
  line-height: 1.52;
}

.scripture-en .scripture-text {
  font-size: clamp(11px, 1vw, 13.5px);
  letter-spacing: 0;
}

.scripture-en .scripture-ref {
  font-size: clamp(10.5px, .92vw, 12.5px);
  color: rgba(255, 225, 165, .74);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(30, 25, 22, .45);
  backdrop-filter: blur(8px);
  z-index: 100;
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none;
}

.paper-modal {
  width: min(480px, 100%);
  background: #fffaf0;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(25,18,14,.28);
  padding: 34px;
  position: relative;
  transform: rotate(-.6deg);
}

.paper-modal h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
}

.paper-modal p {
  opacity: .55;
  margin-top: 8px;
  font-size: 14px;
}

.paper-modal textarea {
  width: 100%;
  min-height: 130px;
  resize: none;
  border: 0;
  border-radius: 8px;
  padding: 17px;
  outline: 1px solid rgba(91,69,53,.14);
  background:
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(106,87,70,.08) 31px 32px),
    #fffdf8;
  color: #4e463f;
  line-height: 31px;
}

.close-btn {
  position: absolute;
  right: 16px;
  top: 14px;
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  opacity: .45;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

.counter {
  font-size: 12px;
  opacity: .45;
}

.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: #6e655f;
  color: white;
  cursor: pointer;
}

.computer-modal {
  width: min(650px, 100%);
  min-width: 0;
  max-width: 100%;
  position: relative;
}

.dark-close {
  top: 10px;
  right: 18px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  color: white;
  z-index: 2;
  opacity: .65;
}

.os-window {
  min-width: 0;
  max-width: 100%;
  background: #292d31;
  border: 10px solid #d2cbc0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 85px rgba(0,0,0,.34);
}

.os-topbar {
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  background: #1f2225;
  color: rgba(236,242,239,.72);
  font: 12px ui-monospace, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.os-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.os-dot {
  color: #9bb6a5;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
}

.os-content {
  min-width: 0;
  max-width: 100%;
  min-height: 340px;
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 20px 22px 22px;
  background:
    radial-gradient(circle at 50% 12%, rgba(129,166,148,.1), transparent 28%),
    linear-gradient(#2a3030, #232829);
  color: #e6eee9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.os-content.playlist-open {
  min-height: 0;
  padding-bottom: 22px;
}

.os-content.note-open {
  min-height: 170px;
}

.os-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.hello {
  font-size: clamp(22px, 4vw, 34px);
  letter-spacing: -.045em;
  margin-bottom: 0;
  color: #dce8df;
  flex: 1 1 auto;
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(3, 84px);
  justify-content: end;
  gap: 8px;
  flex: 0 0 auto;
}

.os-app {
  width: 84px;
  height: 48px;
  border: 1px solid rgba(220,236,227,.12);
  background: rgba(255,255,255,.035);
  border-radius: 10px;
  color: #dce8df;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-size: 18px;
  transition: 180ms ease;
}

.os-app span {
  font-size: 10px;
  opacity: .7;
}

.os-app:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
}

.os-app.active {
  background: rgba(155, 182, 165, .18);
  border-color: rgba(185, 218, 198, .34);
  color: #f0f7f2;
}

.os-message {
  margin-top: 12px;
  min-height: 18px;
  font-size: 11px;
  line-height: 1.4;
  opacity: .54;
}

.os-message:empty {
  display: none;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(220,236,227,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}

.chat-panel[hidden] {
  display: none;
}

.chat-messages {
  min-height: 190px;
  max-height: 300px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2px 3px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(220,236,227,.2) transparent;
}

.chat-empty {
  display: grid;
  min-height: 170px;
  place-items: center;
  color: rgba(220,236,227,.42);
  font-size: 10px;
  text-align: center;
}

.chat-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 8px;
}

.chat-message.mine {
  align-items: flex-end;
}

.chat-bubble {
  max-width: min(82%, 420px);
  padding: 7px 9px;
  border: 1px solid rgba(220,236,227,.10);
  border-radius: 11px 11px 11px 4px;
  background: rgba(255,255,255,.055);
  color: rgba(238,247,241,.9);
  font-size: 11px;
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-message.mine .chat-bubble {
  border-color: rgba(185,218,198,.2);
  border-radius: 11px 11px 4px 11px;
  background: rgba(155,182,165,.16);
}

.chat-time {
  margin-top: 3px;
  color: rgba(220,236,227,.34);
  font-size: 8px;
}

.chat-status {
  min-height: 14px;
  padding: 0 2px 3px;
  color: rgba(220,236,227,.42);
  font-size: 9px;
}

.chat-status.error {
  color: rgba(244,185,185,.78);
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 7px;
}

.chat-input {
  min-width: 0;
  height: 38px;
  min-height: 38px;
  border: 1px solid rgba(220,236,227,.14);
  border-radius: 10px;
  background: rgba(18,22,22,.3);
  color: #eef7f1;
  padding: 0 9px;
  outline: none;
  font: 11px/38px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chat-input::placeholder {
  color: rgba(220,236,227,.3);
}

.chat-input:focus {
  border-color: rgba(195,225,207,.48);
}

.chat-remaining {
  white-space: nowrap;
  color: rgba(220,236,227,.58);
  font: 9px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chat-remaining.near-limit {
  color: rgba(244,205,165,.78);
}

.chat-send {
  min-width: 102px;
  border: 1px solid rgba(220,236,227,.16);
  border-radius: 10px;
  background: rgba(155,182,165,.18);
  color: #eef7f1;
  padding: 0 11px;
  cursor: pointer;
  font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.chat-send:disabled {
  opacity: .45;
  cursor: default;
}

.os-embed {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin-top: 20px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(220,236,227,.12);
  background: rgba(255,255,255,.035);
}

.os-embed[hidden] {
  display: none;
}

.os-embed-head {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.playlist-title-status {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  flex: 1 1 auto;
}

.playlist-selected-title {
  min-width: 0;
  width: 0;
  max-width: 360px;
  flex: 1 1 0;
  overflow: hidden;
  color: rgba(226, 238, 231, .9);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-duration-value {
  color: rgba(220,236,227,.82);
  font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .01em;
  white-space: nowrap;
}

.playlist-progress-value {
  min-width: 34px;
  margin-left: -5px;
  color: #eef7f1;
  font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .01em;
  text-align: right;
}

.playlist-progress-wrap {
  display: flex;
  align-items: center;
  margin: 1px 0 8px;
}

.playlist-progress {
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: #9bb6a5;
}

.playlist-progress:disabled {
  cursor: default;
  opacity: .35;
}

.playlist-progress:focus-visible {
  outline: 2px solid rgba(195, 225, 207, .58);
  outline-offset: 2px;
  border-radius: 999px;
}

.playlist-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.playlist-volume {
  display: flex;
  align-items: center;
  gap: 4px;
}

.playlist-volume-label {
  margin-right: 1px;
  color: rgba(220,236,227,.48);
  font: 9px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .06em;
}

.playlist-volume-step {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(220,236,227,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: rgba(238,247,241,.88);
  padding: 0;
  font: 16px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.playlist-volume-step:active:not(:disabled) {
  transform: scale(.94);
}

.playlist-volume-step:disabled {
  opacity: .3;
  cursor: default;
}

.playlist-volume-step:focus-visible {
  outline: 2px solid rgba(190,222,205,.58);
  outline-offset: 2px;
}

.playlist-volume-value {
  min-width: 39px;
  text-align: center;
  color: #eef7f1;
  font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .01em;
}

@media (hover: hover) and (pointer: fine) {
  .playlist-volume-step:hover:not(:disabled) {
    background: rgba(255,255,255,.09);
  }
}

.playlist-toggle {
  min-width: 72px;
  min-height: 30px;
  border: 1px solid rgba(220,236,227,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: #dce8df;
  padding: 5px 10px;
  font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.playlist-toggle:disabled {
  cursor: default;
  opacity: .42;
}

.playlist-toggle:not(:disabled):active {
  transform: scale(.97);
}

@media (hover: hover) and (pointer: fine) {
  .playlist-toggle:not(:disabled):hover {
    background: rgba(255,255,255,.11);
  }
}

.playlist-picker {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: center;
  gap: 5px;
  overflow: visible;
  padding: 1px 0 7px;
  margin-bottom: 2px;
}

.playlist-item-btn {
  width: 100%;
  min-width: 0;
  height: 27px;
  border: 1px solid rgba(220,236,227,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.045);
  color: rgba(220,236,227,.78);
  font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.playlist-item-btn.active {
  background: rgba(155, 182, 165, .22);
  border-color: rgba(185, 218, 198, .52);
  color: #f0f7f2;
}

.playlist-item-btn:active {
  transform: scale(.96);
}

.playlist-item-btn:focus-visible {
  outline: 2px solid rgba(195, 225, 207, .7);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .playlist-item-btn:hover {
    background: rgba(255,255,255,.10);
  }
  .playlist-item-btn.active:hover {
    background: rgba(155, 182, 165, .27);
  }
}

.playlist-player-engine,
#playlistFrame {
  position: fixed !important;
  width: 320px !important;
  height: 200px !important;
  left: -10000px !important;
  top: 0 !important;
  border: 0 !important;
  opacity: .001 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* Full-screen room mode. The document is the fullscreen element so modals such as Little OS remain visible. */
html:fullscreen,
html:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #111;
}

html:fullscreen body,
html:-webkit-full-screen body,
html:fullscreen .app,
html:-webkit-full-screen .app {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

html:fullscreen .app,
html:-webkit-full-screen .app {
  padding: 0;
  place-items: stretch;
}

html:fullscreen .room,
html:-webkit-full-screen .room {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

html:fullscreen .room .controls,
html:-webkit-full-screen .room .controls {
  right: 26px;
  bottom: 24px;
}

