* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 16px; font-family: system-ui, sans-serif; font-size: 16px;
       background: #10161d; color: #eef2f6; }
main { max-width: 480px; margin: 0 auto; }
h1 { font-size: 1.4rem; overflow-wrap: anywhere; }
label { display: block; margin-bottom: 12px; }
input:not([type=radio]):not([type=checkbox]) { display: block; width: 100%; margin-top: 4px; padding: 12px;
       font: inherit; color: inherit; background: #1c2630; border: 1px solid #44525f; border-radius: 8px; }
fieldset { margin: 0 0 16px; padding: 8px 12px 0; border: 1px solid #44525f; border-radius: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 4px 0; }
.choice input { width: 22px; height: 22px; margin: 0; flex: none; }
small { display: block; color: #a9b6c2; }
button { display: block; width: 100%; margin-bottom: 12px; padding: 14px; font: inherit; font-weight: 600;
         color: #fff; background: #2563eb; border: 0; border-radius: 8px; }
button.secondary { background: #334155; }
button:disabled { opacity: .6; }
:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }
ul { padding-left: 20px; }
#user-list { padding: 0; list-style: none; }
#user-list button { text-align: left; background: #1c2630; overflow-wrap: anywhere; }
#message { position: sticky; top: 8px; padding: 12px; border-radius: 8px; background: #7f1d1d; }
#message.ok { background: #14532d; }
.note { color: #a9b6c2; }
#camera-preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 50vh;
  max-height: 50dvh;
  margin-inline: auto;
  border-radius: 8px;
}

.workspace-grid { display: grid; gap: 1rem; }
.post-list { display: grid; gap: .75rem; margin-block: 1rem; }
.post-card { padding: .8rem 1rem; border: 1px solid #54637a; border-radius: .9rem; }
.post-card.own-post { border-inline-start: .25rem solid #66b9ff; }
.post-card p { margin: .55rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-card img { display: block; max-width: 100%; max-height: 24rem; margin-block: .5rem; border-radius: .5rem; }
.post-card small { display: block; margin-top: .5rem; }
#post-form textarea, #posts-target { width: 100%; font: inherit; }
@media (min-width: 750px) {
  .workspace-grid { grid-template-columns: minmax(9rem, 1fr) minmax(0, 2fr); align-items: start; }
}

:root { color-scheme: dark; }
body { background: #10191e; }
main.workspace { max-width: 1040px; }
.account-rights { margin-block: 0 1rem; color: #a9b6c2; }
.account-rights summary { cursor: pointer; }
#android-notifications { display: block; padding: .8rem 0; color: #88d9cc; }
.workspace-nav, .workspace-content { min-width: 0; background: #17252b; border-radius: 14px; padding: 1rem; }
#posts-screen > button, #posts-refresh { width: auto; }
#posts-target, #post-form select, #post-form textarea {
  background: #10191e; color: inherit; border: 1px solid #53656a;
  border-radius: 8px; padding: .75rem; margin-top: .35rem;
}
#posts-target, #post-form select { min-height: 44px; }
#conversation-list { display: grid; gap: .45rem; }
.conversation-entry { text-align: left; background: #22353c; margin: 0; overflow-wrap: anywhere; min-height: 44px; }
.conversation-entry[aria-pressed="true"] { background: #24574e; box-shadow: inset 3px 0 #88d9cc; }
#conversation-title { margin: 0 0 .75rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.post-card { background: #203239; border-color: #3b555e; min-width: 0; }
.post-card strong { display: block; overflow-wrap: anywhere; }
.post-list.conversation .post-card { justify-self: start; max-width: 90%; }
.post-list.conversation .own-post { justify-self: end; background: #234b44; border-color: #5da697; }
#message { z-index: 1; }

.home-header { padding: .8rem 0; }
.home-header h1 { margin: 0; font-size: 2rem; }
.home-actions { display: grid; gap: .65rem; margin-bottom: 1.25rem; }
.home-actions button { display: flex; justify-content: space-between; margin: 0; text-align: left;
  background: #24574e; padding: 1rem; }
.account { border-top: 1px solid #3b555e; padding-top: .75rem; }
.account > summary { cursor: pointer; padding: .65rem 0; margin-bottom: .65rem; }
.thread-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.thread-header h2 { flex: 1 1 10rem; margin: 0; }
.thread-header button { margin: 0; }
#post-form textarea { resize: vertical; }
#post-editor { border: 0; padding: 0; margin: 0; min-width: 0; }
#report-template-row, #report-fields label { display: grid; gap: .3rem; margin-block: .5rem; }
#report-fields:empty { display: none; }
#report-fields fieldset { border: 1px solid #54637a; border-radius: .6rem; min-width: 0; margin: .65rem 0; }
#report-fields :is(input, select), #report-template { width: 100%; min-width: 0; font: inherit; }
#report-fields button { margin-block: .25rem; }
#report-preview-content { margin-block: .6rem; }
.compose-actions { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin-top: .55rem; }
.compose-actions label { flex: 1 1 12rem; margin: 0; min-width: 0; }
.compose-actions button { width: auto; margin: 0; }
@media (min-width: 750px) { #conversation-back { display: none; } }
@media (max-width: 749px) {
  .messages-mode:not(.thread-open) .workspace-content,
  .messages-mode.thread-open .workspace-nav { display: none; }
  .workspace-nav, .workspace-content { padding: .75rem; }
}

body { background: #101927; padding-bottom: 88px; }
.home-header { padding-block: 1.1rem 1.35rem; }
.home-actions button, button:not(.secondary):not(.conversation-entry) {
  background: #ff9a24; color: #141c25;
}
#user-list button, #primary-nav button { background: #202e40; color: #eaf0f8; }
.workspace-nav, .workspace-content, .account { background: #162233; }
.account { border: 0; border-radius: 12px; padding: .5rem 1rem; }
.conversation-entry, .post-card { background: #223247; border-color: #3a4b60; }
.conversation-entry[aria-pressed="true"] { background: #2b3b50; box-shadow: inset 3px 0 #ff9a24; }
.post-list.conversation .own-post { background: #ff9a24; border-color: #ff9a24; color: #141c25; }
.post-list.conversation .own-post small { color: #343025; }
#android-notifications { color: #ffc474; }
#primary-nav {
  position: fixed; z-index: 2; bottom: 0; left: 50%; transform: translateX(-50%);
  display: flex; width: min(100%, 480px); gap: .25rem;
  padding: .5rem .65rem max(.5rem, env(safe-area-inset-bottom));
  background: #152131; border: 1px solid #34465b; border-radius: 14px 14px 0 0;
}
#primary-nav button { flex: 1; width: auto; margin: 0; padding: .75rem .25rem; font-size: .85rem; }
#primary-nav button[aria-current="page"] { color: #ffad49; background: #302b28; }
