/* QuackTown Town News */
body .kh-news-mailbox {
  position: absolute;
  z-index: 1800;
  left: 8%;
  bottom: 35%;
  display: none;
  width: 84px;
  height: 103px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 4px 2px rgba(9, 58, 65, .28));
}
body .kh-client[data-room="lobby"] .kh-news-mailbox { display: block; }
body .kh-news-mailbox:hover { transform: translateY(-2px); }
body .kh-news-mailbox:active { transform: translateY(1px); }
body .kh-news-mailbox:focus-visible { outline: 3px solid #fff1a7; outline-offset: 2px; border-radius: 14px; }
body .kh-news-mailbox-art { position: absolute; inset: 0 0 14px; display: grid; place-items: end center; }
body .kh-news-mailbox-art img { display: block; width: 84px; height: 84px; object-fit: contain; transform: scaleX(-1); }
body .kh-news-mailbox-label {
  position: absolute;
  left: 50%;
  bottom: 0;
  min-width: 62px;
  padding: 3px 7px;
  border: 2px solid #09536a;
  border-radius: 999px;
  background: #fff3ae;
  color: #06445a;
  box-shadow: 0 2px 0 #073e52;
  font-size: 8px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}
body .kh-news-mailbox-flag {
  position: absolute;
  z-index: 2;
  top: 17px;
  left: 4px;
  width: 23px;
  height: 32px;
  transform: rotate(80deg);
  transform-origin: 5px 27px;
  transition: transform .3s cubic-bezier(.2, .85, .25, 1.2);
}
body .kh-news-mailbox-flag i {
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 6px;
  height: 27px;
  border: 2px solid #71351b;
  border-radius: 5px;
  background: #f47742;
}
body .kh-news-mailbox-flag b {
  position: absolute;
  top: 0;
  left: 5px;
  width: 17px;
  height: 13px;
  border: 2px solid #71351b;
  border-radius: 3px 7px 7px 3px;
  background: #ffcb3f;
}
body .kh-news-mailbox.is-unread .kh-news-mailbox-flag { transform: rotate(0deg); animation: kh-news-flag-wave 1.2s ease-in-out infinite alternate; }
body .kh-news-mailbox > strong {
  position: absolute;
  z-index: 3;
  top: 3px;
  right: -2px;
  display: grid;
  min-width: 22px;
  height: 22px;
  box-sizing: border-box;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff7bf;
  border-radius: 999px;
  background: #ef6545;
  color: #fff;
  box-shadow: 0 2px 0 #8d3628;
  font-size: 9px;
  font-weight: 1000;
}
@keyframes kh-news-flag-wave { from { transform: rotate(-3deg); } to { transform: rotate(4deg); } }

body .kh-news-dialog[open] { width: 790px; height: 500px; overflow: hidden; }
body .kh-news-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 1px 38px 10px 0; border-bottom: 2px solid #cde4a5; }
body .kh-news-heading h2 { margin: 6px 0 2px; color: #17482c; font-size: 22px; line-height: 1.05; }
body .kh-news-heading p { margin: 0; color: #5a715b; font-size: 10px; }
body .kh-news-write,
body .kh-news-index-head button,
body .kh-news-author-actions button,
body .kh-news-reactions button,
body .kh-news-comments button,
body .kh-news-composer button,
body .kh-news-role-manager button {
  box-sizing: border-box;
  border: 2px solid #1f743a;
  border-radius: 9px;
  background: linear-gradient(#50c368, #279246);
  color: #fff;
  box-shadow: 0 2px 0 #155d31;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 1000;
}
body .kh-news-write { flex: 0 0 auto; min-height: 33px; padding: 7px 12px; }
body .kh-news-write > span { margin-right: 4px; color: #fff6a6; font-size: 13px; }
body .kh-news-browser { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; height: 375px; padding-top: 11px; }
body .kh-news-browser[hidden],
body .kh-news-composer[hidden],
body .kh-news-article[hidden],
body .kh-news-welcome[hidden] { display: none !important; }
body .kh-news-index { min-width: 0; overflow: hidden; border: 2px solid #b7d78a; border-radius: 14px; background: #f5fbdc; }
body .kh-news-index-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border-bottom: 1px solid #c9dda3; background: #e9f7c9; color: #235235; }
body .kh-news-index-head > strong { font-size: 11px; }
body .kh-news-index-head button { min-height: 25px; padding: 3px 8px; }
body .kh-news-list { display: grid; align-content: start; gap: 7px; max-height: 328px; padding: 8px; overflow: auto; }
body .kh-news-list-item {
  position: relative;
  display: grid;
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 9px;
  border: 2px solid #a8cc78;
  border-radius: 10px;
  background: #fffdf0;
  color: #214b31;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
body .kh-news-list-item:hover { border-color: #4b9b45; transform: translateY(-1px); }
body .kh-news-list-item.is-active { border-color: #e4a51a; background: #fff5bf; box-shadow: 0 2px 0 #c98916; }
body .kh-news-list-item.is-unread::before { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border: 2px solid #fff5b5; border-radius: 50%; background: #ef6545; }
body .kh-news-list-item strong { padding-right: 12px; overflow: hidden; font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
body .kh-news-list-item p { display: -webkit-box; margin: 0; overflow: hidden; color: #63735b; font-size: 8px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
body .kh-news-list-item small { color: #3c7049; font-size: 7px; font-weight: 800; }
body .kh-news-list-empty { margin: 20px 12px; color: #61755c; font-size: 9px; text-align: center; }
body .kh-news-article { min-width: 0; height: 100%; overflow: auto; padding: 3px 10px 14px 3px; }
body .kh-news-article > header { position: relative; padding: 3px 90px 10px 0; border-bottom: 1px solid #c6dc9d; }
body .kh-news-article > header > span { color: #bc7814; font-size: 8px; font-weight: 1000; letter-spacing: .09em; text-transform: uppercase; }
body .kh-news-article h3 { margin: 4px 0; color: #17482c; font-size: 22px; line-height: 1.08; }
body .kh-news-article > header > p { margin: 0; color: #68755f; font-size: 8px; }
body .kh-news-author-actions { position: absolute; top: 3px; right: 0; display: flex; gap: 5px; }
body .kh-news-author-actions button { min-height: 26px; padding: 3px 8px; }
body .kh-news-author-actions button[data-news-delete] { border-color: #9e512e; background: linear-gradient(#ffad78, #ea7848); color: #5b291a; box-shadow: 0 2px 0 #9e512e; }
body .kh-news-article-body { padding: 13px 3px 7px; color: #294f37; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
body .kh-news-article-body :is(h2, h3, h4) { margin: 13px 0 5px; color: #17482c; line-height: 1.15; }
body .kh-news-article-body h2 { font-size: 18px; }
body .kh-news-article-body h3 { font-size: 15px; }
body .kh-news-article-body h4 { font-size: 13px; }
body .kh-news-article-body p { margin: 7px 0; }
body .kh-news-article-body img { display: block; max-width: 100%; max-height: 320px; margin: 9px auto; object-fit: contain; border: 3px solid #5c9f51; border-radius: 12px; background: #e7f4ce; }
body .kh-news-article-body blockquote { margin: 9px 0; padding: 8px 10px; border-left: 4px solid #f0b72b; border-radius: 0 8px 8px 0; background: #fff3bd; }
body .kh-news-article-body a { color: #08728b; font-weight: 900; }
body .kh-news-reactions { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 0; border-block: 1px solid #c6dc9d; color: #56705a; font-size: 8px; }
body .kh-news-reactions button { display: inline-flex; align-items: center; gap: 4px; min-height: 29px; padding: 4px 9px; }
body .kh-news-reactions button > span { color: #ffd96b; font-size: 13px; }
body .kh-news-reactions button.is-liked { border-color: #b94940; background: linear-gradient(#f98975, #dc5a4d); box-shadow: 0 2px 0 #943c36; }
body .kh-news-reactions em { min-width: 17px; padding: 2px 5px; border-radius: 999px; background: rgba(255,255,255,.28); font-style: normal; text-align: center; }
body .kh-news-comments { padding-top: 10px; }
body .kh-news-comments > div:first-child { color: #235235; font-size: 10px; }
body .kh-news-comment-list { display: grid; gap: 6px; margin-top: 7px; }
body .kh-news-comment { padding: 7px 9px; border: 1px solid #b9d38f; border-radius: 9px; background: #f8fce8; }
body .kh-news-comment header { display: flex; justify-content: space-between; gap: 10px; color: #2a663e; font-size: 8px; }
body .kh-news-comment p { margin: 3px 0 0; color: #354f3a; font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
body .kh-news-comments-empty { margin: 10px 0; color: #6a7962; font-size: 8px; }
body .kh-news-comments form { display: grid; gap: 4px; margin-top: 9px; }
body .kh-news-comments form > label { color: #235235; font-size: 9px; font-weight: 900; }
body .kh-news-comments form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
body .kh-news-comments input { min-width: 0; padding: 7px 9px; border: 2px solid #82ad5e; border-radius: 9px; background: #fffef2; color: #234b31; font: inherit; font-size: 9px; }
body .kh-news-comments button { min-width: 55px; }
body .kh-news-comments form > small { color: #6d7866; font-size: 8px; }
body .kh-news-welcome { display: grid; align-content: center; justify-items: center; height: 100%; color: #59735d; text-align: center; }
body .kh-news-welcome > span { display: grid; width: 58px; height: 58px; place-items: center; border: 3px solid #268b46; border-radius: 50%; background: #fff1a9; color: #08738b; box-shadow: 0 3px 0 #1d6a37; font-size: 29px; }
body .kh-news-welcome strong { margin-top: 10px; color: #245333; font-size: 14px; }
body .kh-news-welcome p { margin: 4px 0; font-size: 9px; }
body .kh-news-composer { height: 375px; padding-top: 10px; }
body .kh-news-composer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
body .kh-news-composer-head > div { display: grid; gap: 2px; }
body .kh-news-composer-head strong { color: #204f31; font-size: 13px; }
body .kh-news-composer-head small { color: #64765f; font-size: 8px; }
body .kh-news-composer-head button { min-height: 28px; padding: 4px 9px; }
body .kh-news-composer form { display: grid; gap: 5px; }
body .kh-news-composer label { color: #245333; font-size: 9px; font-weight: 900; }
body .kh-news-composer input { box-sizing: border-box; width: 100%; padding: 7px 10px; border: 2px solid #7dab5b; border-radius: 9px; background: #fffef2; color: #234b31; font: inherit; font-size: 10px; }
body .kh-news-composer .tox-tinymce { border: 2px solid #69a451; border-radius: 10px; }
body .kh-news-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body .kh-news-compose-footer strong { min-height: 14px; color: #52705a; font-size: 8px; }
body .kh-news-compose-footer button { min-width: 120px; min-height: 31px; padding: 5px 12px; }

body .kh-news-role-manager { grid-column: 1 / -1; }
body .kh-news-role-mark { font-size: 13px !important; }
body .kh-news-role-manager form { display: grid; gap: 8px; }
body .kh-news-role-manager fieldset { display: flex; flex-wrap: wrap; gap: 6px 13px; margin: 0; padding: 0; border: 0; }
body .kh-news-role-manager legend { width: 100%; margin-bottom: 5px; color: #245333; font-size: 10px; font-weight: 900; }
body .kh-news-role-manager label { display: inline-flex; align-items: center; gap: 4px; color: #3f6245; font-size: 10px; font-weight: 800; }
body .kh-news-role-manager input { width: 15px !important; height: 15px; margin: 0; accent-color: #238f44; }
body .kh-news-role-manager button { justify-self: start; min-height: 31px; padding: 5px 11px; }
body .kh-news-role-manager .kh-support-status { min-height: 13px; color: #426848; font-size: 9px; }

@container kwaak-shell (max-width: 690px) {
  body .kh-news-browser { grid-template-columns: 180px minmax(0, 1fr); }
  body .kh-news-mailbox { left: 8%; bottom: 35%; transform: scale(.82); transform-origin: left bottom; }
  body .kh-news-mailbox:hover { transform: translateY(-2px) scale(.82); }
}
