@media screen {
  .pat-home-communication {
    --communication-surface: #131d29;
    --communication-line: rgba(210, 176, 122, .24);
    color: var(--home-ink, #fff);
    min-width: 0;
    max-width: 100%;
  }

  .pat-home-communication [hidden] { display: none !important; }

  .pat-home-communication .pat-communication-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }

  .pat-home-communication .pat-communication-tab,
  .pat-home-communication .pat-communication-secondary,
  .pat-home-communication .pat-communication-primary {
    appearance: none;
    min-height: 42px;
    max-width: 100%;
    padding: 8px 14px;
    background: #101a27;
    border: 1px solid var(--communication-line);
    border-radius: 10px;
    color: #edf1f7;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    white-space: normal;
  }

  .pat-home-communication .pat-communication-tab[aria-selected='true'] {
    background: #c6a26c;
    border-color: #c6a26c;
    color: #10161f;
  }

  .pat-home-communication .pat-communication-tab:hover:not([aria-selected='true']),
  .pat-home-communication .pat-communication-secondary:hover:not(:disabled) {
    background: #202d3d;
    border-color: #9c7950;
  }

  .pat-home-communication .pat-communication-primary {
    background: linear-gradient(180deg, #b62d3a, #86222c);
    border-color: #a43743;
    color: #fff;
  }

  .pat-home-communication .pat-communication-primary:hover:not(:disabled) { background: #b62d3a; }
  .pat-home-communication button:disabled { opacity: .5; cursor: default; }

  .pat-home-communication button:focus-visible,
  .pat-home-communication textarea:focus-visible,
  .pat-home-communication [role='log']:focus-visible {
    outline: 2px solid #e5bd81;
    outline-offset: 2px;
  }

  .pat-home-communication .pat-communication-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: clamp(13px, 2vw, 20px);
    background: var(--communication-surface);
    border: 1px solid var(--communication-line);
    border-radius: 16px;
  }

  .pat-home-communication .pat-communication-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
  }

  .pat-home-communication .pat-communication-heading h2 {
    margin: 0;
    color: #edf1f7;
    font-size: 18px;
    font-weight: 650;
    overflow-wrap: anywhere;
  }

  .pat-home-communication .pat-communication-heading button { margin-left: auto; }

  .pat-home-communication .pat-communication-note,
  .pat-home-communication .pat-communication-empty,
  .pat-home-communication .pat-communication-status {
    margin: 0;
    color: #b9c6d7;
    font-size: 13px;
    line-height: 1.5;
  }

  .pat-home-communication .pat-communication-status { color: #f2cd91; }
  .pat-home-communication .pat-communication-note:empty,
  .pat-home-communication .pat-communication-stream:empty,
  .pat-home-communication .pat-communication-participation:empty,
  .pat-home-communication .pat-communication-own:empty,
  .pat-home-communication .pat-communication-status:empty { display: none; }

  .pat-home-communication .pat-communication-participation,
  .pat-home-communication .pat-communication-moderation-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }

  .pat-home-communication .pat-communication-stream,
  .pat-home-communication .pat-communication-own {
    display: grid;
    min-width: 0;
    gap: 8px;
  }

  .pat-home-communication [role='log'] {
    max-height: min(52dvh, 460px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .pat-home-communication .pat-communication-own h3 {
    margin: 3px 0 0;
    color: #d4b37e;
    font-size: 13px;
    font-weight: 650;
  }

  .pat-home-communication .pat-communication-item {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 11px 13px;
    background: #111a25;
    border: 1px solid #2a3747;
    border-radius: 10px;
  }

  .pat-home-communication [role='log'] .pat-communication-item { margin-right: clamp(0px, 5%, 40px); }
  .pat-home-communication [role='log'] .pat-communication-item-mine {
    margin-right: 0;
    margin-left: clamp(0px, 5%, 40px);
    background: #1d2431;
    border-color: var(--communication-line);
  }

  .pat-home-communication .pat-communication-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 12px;
    padding: 0;
    color: #b9c6d7;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .pat-home-communication .pat-communication-item-meta strong { color: #f1d39f; }
  .pat-home-communication .pat-communication-item .pat-communication-state { font-weight: 650; }
  .pat-home-communication .pat-communication-item p {
    margin: 0;
    color: #f0f4fa;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .pat-home-communication .pat-communication-composer {
    display: grid;
    gap: 7px;
    justify-items: end;
    min-width: 0;
    margin: 0;
  }

  .pat-home-communication .pat-communication-composer label {
    width: 100%;
    min-width: 0;
    color: #e5ecf6;
    font-size: 13px;
    font-weight: 650;
  }

  .pat-home-communication .pat-communication-input {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 54px;
    max-height: 240px;
    resize: vertical;
    box-sizing: border-box;
    margin: 6px 0 0;
    padding: 8px 10px;
    color: #edf1f7;
    background: #0e1723;
    border: 1px solid var(--communication-line);
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
  }

  .pat-home-communication .pat-communication-panel > button { justify-self: start; }
}

@media screen and (max-width: 480px) {
  .pat-home-communication .pat-communication-tabs { gap: 6px; }
  .pat-home-communication .pat-communication-tab { flex: 1 1 auto; padding-inline: 9px; }
  .pat-home-communication .pat-communication-composer button { justify-self: stretch; }
  .pat-home-communication .pat-communication-panel { gap: 10px; }
}
