.anyship-pr-hidden {
  display: none !important;
}

.anyship-plan-room-bridge-root {
  box-sizing: border-box;
  margin: 0 16px 12px;
}

.anyship-pr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(120, 120, 128, 0.14);
}

.anyship-pr-tab {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.anyship-pr-tab.is-active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.dark .anyship-pr-tab.is-active {
  background: #2c2c2e;
}

.anyship-pr-plan-list-panel {
  margin: 10px -16px -12px;
}

.anyship-pr-room-list {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .anyship-pr-room-list {
  border-top-color: rgba(255, 255, 255, 0.10);
}

.anyship-pr-room-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 78px;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.dark .anyship-pr-room-row {
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.anyship-pr-room-row:active {
  background: rgba(120, 120, 128, 0.08);
}

.anyship-pr-room-cover {
  display: flex;
  width: 58px;
  height: 58px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(52, 160, 255, 0.12);
  font-size: 25px;
}

.anyship-pr-room-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anyship-pr-room-cover.is-placeholder {
  color: #34a0ff;
}

.anyship-pr-room-row-body {
  display: block;
  min-width: 0;
}

.anyship-pr-room-title-line {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.anyship-pr-room-title {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anyship-pr-host-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(52, 160, 255, 0.12);
  color: #147bd1;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-transform: uppercase;
}

.anyship-pr-room-preview {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.55);
  font-size: 14px;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .anyship-pr-room-preview {
  color: rgba(255, 255, 255, 0.60);
}

.anyship-pr-room-after {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding-left: 8px;
}

.anyship-pr-room-date {
  color: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.dark .anyship-pr-room-date {
  color: rgba(255, 255, 255, 0.52);
}

.anyship-pr-unread {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  box-sizing: border-box;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #34a0ff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.anyship-pr-center-state {
  box-sizing: border-box;
  width: min(340px, calc(100vw - 48px));
  margin: 22vh auto 0;
  padding: 0 12px;
  color: rgba(0, 0, 0, 0.56);
  text-align: center;
}

.dark .anyship-pr-center-state {
  color: rgba(255, 255, 255, 0.68);
}

.anyship-pr-center-state strong,
.anyship-pr-center-state span {
  display: block;
}

.anyship-pr-center-state strong {
  color: inherit;
  font-size: 17px;
  line-height: 24px;
}

.anyship-pr-center-state span {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
}

.anyship-pr-center-state button {
  min-height: 34px;
  margin-top: 12px;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: #34a0ff;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.anyship-pr-room-overlay {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  background: #f2f2f7;
  color: #000;
}

.dark .anyship-pr-room-overlay {
  background: #000;
  color: #fff;
}

.anyship-pr-room-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.anyship-pr-room-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 48px;
  padding: env(safe-area-inset-top) 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(248, 248, 248, 0.96);
  backdrop-filter: blur(18px);
}

.dark .anyship-pr-room-header {
  border-bottom-color: rgba(255, 255, 255, 0.14);
  background: rgba(28, 28, 30, 0.96);
}

.anyship-pr-back {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #34a0ff;
  font: inherit;
  font-size: 40px;
  font-weight: 300;
  line-height: 40px;
}

.anyship-pr-room-heading {
  min-width: 0;
  text-align: center;
}

.anyship-pr-room-heading-title {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anyship-pr-room-heading-subtitle {
  overflow: hidden;
  margin-top: 1px;
  color: rgba(0, 0, 0, 0.52);
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .anyship-pr-room-heading-subtitle {
  color: rgba(255, 255, 255, 0.56);
}

.anyship-pr-readonly {
  padding: 8px 14px;
  background: rgba(255, 159, 10, 0.13);
  color: #9a5b00;
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}

.dark .anyship-pr-readonly {
  color: #ffb340;
}

.anyship-pr-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 14px 12px 18px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.anyship-pr-message-row {
  display: flex;
  margin: 5px 0;
  justify-content: flex-start;
}

.anyship-pr-message-row.is-mine {
  justify-content: flex-end;
}

.anyship-pr-message-bubble {
  max-width: min(78%, 520px);
  box-sizing: border-box;
  padding: 7px 10px 5px;
  border-radius: 15px 15px 15px 4px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.dark .anyship-pr-message-bubble {
  background: #262628;
}

.anyship-pr-message-row.is-mine .anyship-pr-message-bubble {
  border-radius: 15px 15px 4px 15px;
  background: #d8fdd2;
}

.dark .anyship-pr-message-row.is-mine .anyship-pr-message-bubble {
  background: #075e54;
}

.anyship-pr-message-sender {
  margin-bottom: 2px;
  color: #147bd1;
  font-size: 11px;
  font-weight: 700;
  line-height: 15px;
}

.anyship-pr-message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 20px;
}

.anyship-pr-message-time {
  margin-top: 2px;
  color: rgba(0, 0, 0, 0.42);
  font-size: 10px;
  line-height: 13px;
  text-align: right;
}

.dark .anyship-pr-message-time {
  color: rgba(255, 255, 255, 0.48);
}

.anyship-pr-host-update {
  max-width: min(92%, 620px);
  box-sizing: border-box;
  margin: 10px auto;
  padding: 10px 12px;
  border: 1px solid rgba(52, 160, 255, 0.26);
  border-radius: 12px;
  background: rgba(52, 160, 255, 0.09);
}

.anyship-pr-host-update-label {
  color: #147bd1;
  font-size: 12px;
  font-weight: 800;
  line-height: 17px;
}

.anyship-pr-host-update-text {
  margin-top: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 20px;
}

.anyship-pr-host-update-meta {
  margin-top: 5px;
  color: rgba(0, 0, 0, 0.48);
  font-size: 10px;
  line-height: 14px;
}

.dark .anyship-pr-host-update-meta {
  color: rgba(255, 255, 255, 0.54);
}

.anyship-pr-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  box-sizing: border-box;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(248, 248, 248, 0.97);
}

.dark .anyship-pr-composer {
  border-top-color: rgba(255, 255, 255, 0.12);
  background: rgba(28, 28, 30, 0.97);
}

.anyship-pr-composer textarea {
  width: 100%;
  max-height: 116px;
  min-height: 36px;
  box-sizing: border-box;
  resize: none;
  padding: 8px 11px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 18px;
  outline: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 15px;
  line-height: 19px;
}

.dark .anyship-pr-composer textarea {
  border-color: rgba(255, 255, 255, 0.17);
  background: #1c1c1e;
}

.anyship-pr-host-toggle,
.anyship-pr-send {
  min-height: 36px;
  border: 0;
  font: inherit;
}

.anyship-pr-host-toggle {
  width: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(52, 160, 255, 0.10);
  font-size: 17px;
}

.anyship-pr-host-toggle.is-active {
  background: #34a0ff;
}

.anyship-pr-send {
  padding: 0 5px;
  background: transparent;
  color: #147bd1;
  font-size: 15px;
  font-weight: 700;
}

.anyship-pr-send:disabled,
.anyship-pr-composer textarea:disabled {
  opacity: 0.55;
}

.anyship-pr-room-empty {
  width: min(340px, calc(100vw - 48px));
  box-sizing: border-box;
  margin: 28vh auto 0;
  padding: 0 12px;
  color: rgba(0, 0, 0, 0.55);
  text-align: center;
}

.dark .anyship-pr-room-empty {
  color: rgba(255, 255, 255, 0.62);
}

.anyship-pr-room-empty strong,
.anyship-pr-room-empty span {
  display: block;
}

.anyship-pr-room-empty strong {
  font-size: 17px;
  line-height: 24px;
}

.anyship-pr-room-empty span {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
}

.anyship-pr-send-error {
  position: fixed;
  z-index: 2147483001;
  right: 16px;
  bottom: calc(70px + env(safe-area-inset-bottom));
  left: 16px;
  margin: auto;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

@media (min-width: 700px) {
  .anyship-pr-room-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.18);
  }

  .anyship-pr-room-shell {
    width: min(700px, 100%);
    height: min(900px, 100%);
    background: #f2f2f7;
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.22);
  }

  .dark .anyship-pr-room-shell {
    background: #000;
  }
}

/* Plan Room tab interaction hardening V1 */

.anyship-plan-room-bridge-root {
  position: relative !important;
  z-index: 30 !important;
  pointer-events: auto !important;
  isolation: isolate;
}

.anyship-pr-tabs {
  position: relative !important;
  z-index: 31 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.anyship-pr-tab {
  position: relative !important;
  z-index: 32 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}


/* ==========================================================
   Plan Room polish V1
   Reuses the visual contract of the existing Framework7
   People chat instead of inventing a second chat language.
   ========================================================== */

.anyship-pr-room-overlay {
  --f7-message-sent-bg-color: #dcf7c7;
  --f7-message-sent-text-color: #000;
  --f7-message-received-bg-color: #fff;
  --f7-message-received-text-color: #000;
  background-image: url('/assets/message-bg-light.a2b0351c.jpg');
  background-size: 828px auto;
  background-color: #efe7dd;
}

.dark .anyship-pr-room-overlay {
  --f7-message-sent-bg-color: #056161;
  --f7-message-sent-text-color: #fff;
  --f7-message-received-bg-color: #3c3c3e;
  --f7-message-received-text-color: #fff;
  background-image: url('/assets/message-bg-dark.452b974c.jpg');
  background-color: #0b141a;
}

.anyship-pr-room-shell { background: transparent !important; }

.anyship-pr-room-header {
  grid-template-columns: 48px minmax(0, 1fr) 52px;
  min-height: 58px;
  padding-right: 6px;
  padding-left: 4px;
  background: rgba(248, 248, 248, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.dark .anyship-pr-room-header { background: rgba(28, 28, 30, 0.97); }

.anyship-pr-back {
  display: flex;
  width: 44px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: var(--f7-theme-color, #34a0ff);
  font-size: 26px;
  line-height: 1;
}
.anyship-pr-back .f7-icons { font-size: 27px; }

.anyship-pr-room-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  text-align: left;
}
.anyship-pr-room-header-cover {
  display: flex;
  width: 36px;
  min-width: 36px;
  height: 36px;
  margin-right: 9px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(52, 160, 255, 0.14);
  color: #147bd1;
  font-size: 15px;
  font-weight: 700;
}
.anyship-pr-room-header-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.anyship-pr-room-heading-text { min-width: 0; overflow: hidden; }
.anyship-pr-room-heading-title { font-size: 17px; font-weight: 600; line-height: 20px; }
.anyship-pr-room-heading-subtitle { margin-top: 0; font-size: 12px; line-height: 16px; }
.anyship-pr-room-header-meta {
  display: flex;
  min-width: 44px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.dark .anyship-pr-room-header-meta { color: rgba(255, 255, 255, 0.55); }

.anyship-pr-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 7px 7px 12px;
  background: transparent !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.anyship-pr-message-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 5px;
  align-items: end;
  width: 100%;
  min-height: 0;
  margin: 1px 0;
  box-sizing: border-box;
}
.anyship-pr-message-row.is-mine {
  display: flex;
  justify-content: flex-end;
  padding-left: 44px;
}
.anyship-pr-avatar-slot {
  display: flex;
  width: 38px;
  min-width: 38px;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  box-sizing: border-box;
}
.anyship-pr-sender-avatar {
  display: flex;
  width: 32px;
  height: 32px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(52, 160, 255, 0.16);
  color: #147bd1;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.10);
}
.anyship-pr-sender-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.anyship-pr-message-row .message {
  display: flex;
  width: auto;
  max-width: min(78vw, 560px);
  margin: 0;
  box-sizing: border-box;
}
.anyship-pr-message-row.is-mine .message { justify-content: flex-end; }
.anyship-pr-message-row .message-content { max-width: 100%; }
.anyship-pr-message-row .message-bubble {
  max-width: min(78vw, 560px);
  padding-top: 6px;
  padding-bottom: 5px;
  overflow-wrap: anywhere;
}
.anyship-pr-message-row .message-received .message-bubble {
  background: var(--f7-message-received-bg-color, #fff);
  color: var(--f7-message-received-text-color, #000);
}
.anyship-pr-message-row .message-sent .message-bubble {
  background: var(--f7-message-sent-bg-color, #dcf7c7);
  color: var(--f7-message-sent-text-color, #000);
}
.anyship-pr-message-row .message-text { font-size: 17px; line-height: 21px; }
.anyship-pr-message-sender {
  margin: 0 0 2px;
  color: #147bd1;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
}
.anyship-pr-message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.anyship-pr-message-time {
  display: inline-flex;
  float: right;
  margin: 5px 0 -2px 10px;
  align-items: center;
  gap: 2px;
  color: rgba(0, 0, 0, 0.43);
  font-size: 11px;
  line-height: 13px;
  white-space: nowrap;
}
.dark .anyship-pr-message-time { color: rgba(255, 255, 255, 0.50); }
.anyship-pr-message-ticks {
  color: #34a0ff;
  font-size: 12px;
  letter-spacing: -3px;
  transform: translateX(-1px);
}

.anyship-pr-host-update {
  width: min(88%, 560px);
  max-width: 560px;
  margin: 8px auto;
  padding: 8px 11px 7px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dark .anyship-pr-host-update { background: rgba(42, 57, 66, 0.94); }
.anyship-pr-host-update-top { display: flex; align-items: center; gap: 5px; }
.anyship-pr-host-update-icon { font-size: 13px; }
.anyship-pr-host-update-label { color: #147bd1; font-size: 12px; font-weight: 800; line-height: 16px; }
.anyship-pr-host-update-text { margin-top: 3px; font-size: 15px; line-height: 20px; }
.anyship-pr-host-update-meta { margin-top: 3px; text-align: right; font-size: 10px; }

.anyship-pr-composer {
  display: block;
  min-height: calc(52px + max(var(--tg-safe-bottom, 0px), var(--tg-content-safe-bottom, 0px), env(safe-area-inset-bottom)));
  box-sizing: border-box;
  padding: 6px 8px max(6px, var(--tg-content-safe-bottom, 0px), env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(248, 248, 248, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.dark .anyship-pr-composer {
  border-top-color: rgba(255, 255, 255, 0.12);
  background: rgba(28, 28, 30, 0.97);
}
.anyship-pr-composer-inner {
  display: flex;
  min-height: 40px;
  align-items: flex-end;
  gap: 6px;
}
.anyship-pr-messagebar-area {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.17);
  border-radius: 18px;
  background: #fff;
}
.dark .anyship-pr-messagebar-area {
  border-color: rgba(255, 255, 255, 0.18);
  background: #1c1c1e;
}
.anyship-pr-composer textarea {
  display: block;
  width: 100%;
  min-height: 34px;
  max-height: 116px;
  margin: 0;
  padding: 7px 13px;
  border: 0;
  border-radius: 18px;
  outline: 0;
  resize: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 20px;
  box-sizing: border-box;
}
.anyship-pr-host-toggle,
.anyship-pr-send {
  display: flex;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--f7-theme-color, #34a0ff);
}
.anyship-pr-host-toggle { background: rgba(52, 160, 255, 0.10); font-size: 17px; }
.anyship-pr-host-toggle.is-active { background: #34a0ff; color: #fff; }
.anyship-pr-send .f7-icons { font-size: 28px; }
.anyship-pr-send:active,
.anyship-pr-host-toggle:active { opacity: 0.55; }
.anyship-pr-room-empty.messages-empty-state { margin: 28vh auto 0; }

@media (min-width: 700px) {
  .anyship-pr-room-overlay {
    background-image: url('/assets/message-bg-light.a2b0351c.jpg');
    background-size: 828px auto;
    background-color: #efe7dd;
  }
  .dark .anyship-pr-room-overlay {
    background-image: url('/assets/message-bg-dark.452b974c.jpg');
    background-color: #0b141a;
  }
  .anyship-pr-room-shell { background: transparent !important; }
}
