:root {
  color-scheme: light;
  --paper: #fffff1;
  --ink: #6c6c6c;
  --blue: #2f6582;
  --rule: #ccc;
  font: 12px/1.4 Verdana, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--ink); font-weight: bold; text-decoration: none; }
a:hover { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #13549e; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.image-button { border: 0; padding: 0; background: transparent; }
.image-button img { display: block; max-width: 100%; }

.retro-banner {
  position: relative;
  width: min(100%, 700px);
  height: 115px;
  background:
    url('/chat/images/top.gif') no-repeat left top,
    url('/chat/images/l_arrow.gif') no-repeat left 18px,
    url('/chat/images/r_arrow_2.gif') no-repeat 279px 18px,
    url('/chat/images/lol.gif') no-repeat 370px 18px,
    url('/chat/images/lines_top.gif') no-repeat 417px 18px,
    url('/chat/images/lines_bottom_2.gif') no-repeat 370px 65px;
}
.retro-logo {
  position: absolute;
  left: 61px;
  top: 18px;
  width: 218px;
  height: 97px;
  background: url('/chat/images/snegorod.gif') no-repeat left top;
}
.retro-date { position: absolute; top: 50px; left: 534px; font-weight: bold; white-space: nowrap; }
.retro-body {
  width: min(100%, 700px);
  padding-right: 35px;
  padding-left: 61px;
  text-align: center;
  background:
    url('/chat/images/background_1.gif') repeat-y left top,
    url('/chat/images/background_3.gif') repeat-y right top;
}
.retro-bottom { width: min(100%, 700px); height: 25px; background: url('/chat/images/bottom_2.gif') no-repeat left top; }
.login-screen { width: min(100%, 700px); }
.login-body { min-height: 325px; padding-top: 12px; padding-bottom: 9px; }
.login-body p { margin: 0 0 13px; }
.login-form { width: min(200px, 100%); margin: 19px auto 12px; }
.login-form label { display: block; text-align: left; font-weight: bold; }
.login-form input { display: block; width: 100%; height: 20px; padding: 1px 3px; border: 1px solid var(--rule); background: white; font-size: 11px; }
.login-send { display: block; width: 100%; margin-top: 9px; }
.link-button { border: 0; padding: 0; color: var(--blue); background: transparent; text-decoration: underline; }
.login-rules strong { color: red; }

.shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template: minmax(0, 1fr) 73px / 93px minmax(0, 1fr) 223px;
  overflow: hidden;
}
.rail {
  grid-area: 1 / 1 / 3 / 2;
  padding-top: 18px;
  padding-bottom: 73px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background:
    url('/chat/images/menu_corner.gif') no-repeat left bottom,
    url('/chat/images/menu_back.gif') repeat-y left top;
  overflow-y: auto;
}
.rail button { flex: none; border: 0; background: transparent; padding: 0; }
.rail button img { display: block; }
.rail .mobile-people, .chat-portal-bar { display: none; }
.conversation { grid-area: 1 / 2 / 2 / 3; position: relative; min-width: 0; min-height: 0; }
.connection {
  position: absolute;
  z-index: 1;
  right: 8px;
  top: 5px;
  background: var(--paper);
  color: var(--blue);
  font-size: 10px;
}
.connection.is-live { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.feed-wrap, .feed { height: 100%; }
.feed { padding: 5px 15px; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; }
.empty { margin: 3px 0; }
.messages, .people-list { padding: 0; margin: 0; list-style: none; }
.messages > li {
  margin: 0;
  font: 10pt/1.17 Arial, sans-serif;
  overflow-wrap: anywhere;
}
.messages li.system-line, .messages li.day-separator { color: #555; }
.messages li.direct-line { color: #555; }
.direct-line button.direct-action { padding: 0 .2em; border: 0; color: var(--blue); background: none; font: inherit; }
.direct-receipt { color: #657780; white-space: nowrap; }
.direct-receipt.is-read { color: var(--blue); font-weight: bold; letter-spacing: -.12em; }
.direct-action .chat-trash { width: 1em; height: 1em; vertical-align: -.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.direct-line .direct-new, .mail-unread { color: #9b2222; font-weight: bold; }
.rail #mail-button { position: relative; }
.mail-unread { position: absolute; right: 0; top: 15%; padding: 0 2px; background: var(--paper); }
.direct-form { display: grid; gap: 4px; margin: 8px 0; }
.direct-form textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.mail-photo-names, .direct-photo-link { overflow-wrap: anywhere; }
.direct-photo-link { color: var(--blue); text-decoration: underline; }
#mail-messages { min-width: 0; max-height: min(36dvh, 300px); overflow-y: auto; overscroll-behavior: contain; }
.mailbox .messages > li { padding: 3px 0; overflow-wrap: anywhere; }
.mail-pages { display: flex; align-items: center; justify-content: center; gap: 8px; }
dialog#dialog-mail { width: min(620px, calc(100% - 20px)); }
#chat-mail-delete {
  position: fixed; inset: auto; margin: 0; max-width: calc(100vw - 16px);
  padding: 5px 8px; background: var(--paper); border: 1px solid #c8c8b9;
  box-shadow: 0 3px 12px #302f2b33; font: 10pt/1.3 Arial, sans-serif;
}
#chat-mail-delete button {
  display: block; padding: 4px; background: none; color: var(--blue);
  border: 0; font: inherit; cursor: pointer;
}
#chat-mail-delete button:hover { text-decoration: underline; }
.messages li.day-separator { text-align: left; }
.messages li.history-target { background-color: #e6ecdf; }
.message-link { color: var(--blue); margin-left: .4em; white-space: nowrap; }
.nick { color: #252525; font: inherit; font-weight: bold; border: 0; padding: 0; background: none; text-align: left; }
.nick:hover { text-decoration: underline; }
.system-line .nick { color: inherit; }
.message-text { display: contents; color: #da5004; white-space: pre-wrap; }
.message-text.incoming { font-weight: bold; }
.markdown-message { white-space: normal; }
.markdown-message > p:first-child { display: inline; }
.markdown-message :is(p, ul, ol, pre, blockquote) { margin-block: .35em; }
.markdown-message pre { white-space: pre-wrap; }
.markdown-message a { color: var(--blue); text-decoration: underline; }
.markdown-message img { max-width: 100%; height: auto; }
.message-text .chat-smile { max-width: 34px; max-height: 25px; vertical-align: middle; }
.message-text .chat-smile[src$="/nnn.gif"] {
  width: auto;
  height: 1em;
  height: 1lh;
  max-width: none;
  max-height: none;
  vertical-align: top;
}
.unread {
  position: absolute;
  top: 8px;
  right: 15px;
  padding: 3px 6px;
  border: 1px solid #2f6582;
  color: #fff;
  background: #2f6582;
}
.feed-wrap.reverse .unread { top: auto; bottom: 8px; }
.people {
  grid-area: 1 / 3 / 3 / 4;
  min-height: 0;
  display: grid;
  grid-template-rows: 43px minmax(0, 1fr) 94px;
  background: url('/chat/images/list_back.gif') repeat-y left top;
}
.people-cap {
  position: relative;
  background: url('/chat/images/list_top.gif') no-repeat left top;
}
/* The header artwork draws its left strokes one pixel earlier than list_back. */
.people-cap::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: url('/chat/images/list_back.gif') repeat-y left top;
}
.people-body { min-height: 0; overflow-y: auto; padding: 15px 15px 0 17px; }
.people h2 { font: bold 12pt/1.3 Arial, sans-serif; margin: 0 0 14px; color: #666; }
.member-panel { color: #646464; padding-left: 22px; overflow-wrap: anywhere; }
.member-panel h2 { font: bold 13pt/1.3 Arial, sans-serif; margin: 0 0 16px; }
.member-panel p { margin: 0 0 16px; }
.member-actions { display: grid; grid-template-columns: repeat(3, 54px); justify-content: center; gap: 0 3px; }
.member-navigation #unignore-member { grid-column: 1; }
.member-navigation #member-back { grid-column: 2; }
.member-navigation #ignore-member { grid-column: 3; }
.member-personal-tools { grid-template-columns: 54px; }
#moderation-tools { margin-top: 1px; }
#moderation-tools [data-moderation="syringe"] { grid-column: 1; }
#moderation-tools :is(#member-announcement, [data-moderation="axe"]) { grid-column: 2; }
#moderation-tools :is([data-moderation="delegate"], [data-moderation="revoke"]) { grid-column: 3; }
.member-actions button { border: 0; padding: 0; background: transparent; }
.member-actions img { display: block; }
/* The rail sprite includes frame lines outside the 24px by 31px icon. */
.member-actions #member-edit { position: relative; width: 54px; height: 45px; }
.member-actions #member-edit::before {
  content: '';
  position: absolute;
  inset: 7px auto auto 14px;
  width: 24px;
  height: 31px;
  background: url('/chat/images/menu_config.gif') no-repeat -28px -19px;
}
.member-actions button:hover, .member-actions button:focus-visible { outline: 1px solid var(--rule); }
.profile-thumb { display: block; width: fit-content; margin-bottom: 8px; padding: 2px; border: 1px solid var(--rule); background: var(--paper); }
.profile-thumb img { display: block; max-width: 110px; max-height: 110px; object-fit: contain; }
.mobile-member { display: none; }
.people-list li { position: relative; padding: 4px 0; }
.people-list .person-row { display: grid; grid-template-columns: 13px minmax(0, 1fr); column-gap: 6px; }
.people-body .person-row { padding-inline-start: 7px; }
.person-row .nick { grid-column: 2; color: #666; font: bold 10pt Arial, sans-serif; }
.person-row .person-state { grid-column: 2; color: #555; font: 10px Arial, sans-serif; }
.state-dot { grid-column: 1; grid-row: 1 / span 2; align-self: center; padding: 0; border: 0; background: none; cursor: pointer; }
.state-dot img { display: block; }
.people-foot { background: url('/chat/images/quest_corner.gif') no-repeat left top; padding: 8px 0 0 91px; }
.people-foot button { width: 37px; height: 45px; }
.composer {
  position: relative;
  grid-area: 2 / 2 / 3 / 3;
  display: flex;
  align-items: center;
  gap: min(15%, 100px);
  padding: 0 10px 0 min(17%, 115px);
  background: url('/chat/images/line_back.gif') repeat-x left top;
}
.composer #draft { align-self: end; margin-bottom: 18px; width: min(57%, 350px); min-width: 0; height: 23px; padding: 2px 4px; border: 1px solid var(--rule); background: white; resize: none; font-size: 12px; }
.private-destination { position: absolute; left: min(17%, 115px); top: 10px; max-width: 75%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue); font-weight: bold; }
.mail-recipient { position: relative; }
.mail-recipient input { width: 100%; }
#mail-suggestions { position: absolute; z-index: 1; inset: 100% 0 auto; margin: 0; padding: 2px; list-style: none; background: var(--paper); border: 1px solid var(--rule); max-height: 155px; overflow-y: auto; }
#mail-suggestions li { padding: 3px 5px; cursor: pointer; }
#mail-suggestions small { margin-left: .5em; opacity: .78; }
#mail-suggestions li:hover, #mail-suggestions li[aria-selected="true"] { color: white; background: var(--blue); }
/* The 59px sprite's horizontal stroke aligns with the footer at y=43. */
.composer #send { align-self: end; flex: none; }
.composer .field-error { position: absolute; bottom: 0; left: 10px; background: var(--paper); }
.field-error { color: #8f2d2b; margin: 4px 0; }

dialog {
  color: var(--ink);
  padding: 0;
  width: min(410px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  background: var(--paper);
  border: 1px solid #aaa;
  box-shadow: 0 10px 30px #302f2b44;
}
dialog::backdrop { background: #2d3b3a24; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--rule); }
.dialog-head h2 { margin: 0; color: var(--ink); font-size: 13px; }
.close { border: 0; background: transparent; font-size: 21px; color: var(--blue); }
.dialog-body { padding: 12px; display: grid; gap: 8px; }
.dialog-note { margin: 0; }
.dialog-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 7px; }
.dialog-body button:not(.nick, .state-dot, .direct-action, .profile-thumb, .smile-choice, .member-actions button) {
  background: #2f6582; color: #fff; border: 1px solid #2f6582; border-radius: 0; padding: 3px 6px;
}
.dialog-body button:disabled { opacity: .55; }
.dialog-actions { justify-content: end; }
.smile-list { display: flex; flex-wrap: wrap; gap: 6px; }
.smile-list button { min-width: 40px; height: 37px; display: grid; place-items: center; background: white; border: 1px solid var(--rule); }
.smile-list img { width: auto; height: 20px; max-width: 48px; object-fit: contain; }
.smile-list img[src$="/nnn.gif"] { height: 24px; max-width: 120px; }
#ignored-list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
@media (max-width: 680px) {
  .shell { grid-template: auto auto minmax(0, 1fr) 50px / minmax(0, 1fr); }
  .chat-portal-bar {
    grid-area: 1 / 1 / 2 / 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 36px;
    padding-inline: 8px;
    border-bottom: 1px solid #dedfd1;
  }
  #login-screen .portal-footer { display: none; }
  .mobile-member { display: block; }
  .mobile-member .member-panel { padding: 0; }
  .mobile-member .member-panel h2, .mobile-member .member-panel p { margin-bottom: 5px; }
  .rail {
    --rail-icon-width: 24px;
    --rail-icon-height: 31px;
    --rail-target-height: 44px;
    grid-area: 2 / 1 / 3 / 2;
    padding: 0 4px;
    flex-direction: row;
    align-items: center;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    overflow: visible;
  }
  .rail > button { flex: 1 1 0; min-width: 0; }
  .rail > button, .rail .mobile-people {
    display: grid;
    place-items: center;
    width: 100%;
    height: var(--rail-target-height);
    padding: 0;
  }
  /* Show the framed icon from each desktop sprite without its rail artwork. */
  .rail > button > img {
    width: var(--rail-icon-width);
    height: var(--rail-icon-height);
    object-fit: none;
    object-position: -28px -19px;
  }
  .rail #mail-button img { object-position: -28px -20px; }
  .rail .mobile-people::before {
    content: "";
    width: var(--rail-icon-width);
    height: var(--rail-icon-height);
    background: url('/chat/images/quest_corner.gif') -98px -15px no-repeat;
  }
  .rail .mail-unread { top: 3px; right: max(0px, calc(50% - 19px)); }
  .conversation { grid-area: 3 / 1 / 4 / 2; }
  .people { display: none; }
  .composer { grid-area: 4 / 1 / 5 / 2; padding: 0 8px; gap: 5px; background-position: left bottom; }
  .composer #draft { align-self: center; margin-bottom: 0; width: auto; flex: 1; height: 27px; font-size: 16px; }
  .private-destination { left: 8px; top: 4px; font-size: 10px; line-height: 12px; }
  .composer.is-private :is(#draft, #send) { margin-top: 14px; }
  .composer #send { align-self: center; width: 32px; height: 31px; overflow: hidden; }
  .composer #send img { width: 65px; height: 59px; max-width: none; margin: -14px 0 0 -17px; }
  .retro-banner { height: 107px; }
  .retro-date, .desktop-break { display: none; }
  .retro-body { padding-right: 16px; padding-left: 16px; background: none; }
}

.conversation { display: flex; flex-direction: column; }
.feed-wrap { position: relative; flex: 1; min-height: 0; height: auto; }
.history-nav {
  flex: none;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 8px;
  padding: 2px 15px 4px;
  border-top: 1px solid #e5e4d8;
  font: 11px/1.25 Verdana, Arial, sans-serif;
}
.history-nav button {
  border: 0;
  padding: 0 1px;
  background: none;
  color: var(--blue);
  font-weight: bold;
}
.history-nav button:hover, .history-nav button:focus-visible { text-decoration: underline; }
.history-nav button[aria-current] { color: #252525; text-decoration: underline; }
.history-nav #history-date::before { content: '['; }
.history-nav #history-date::after { content: ']'; }
.history-pages { white-space: nowrap; color: #555; }
.history-filters { display: inline-flex; flex-wrap: wrap; column-gap: .65em; }
.history-filters[hidden] { display: none; }
.history-filters label { white-space: nowrap; }
.history-filters input { margin: 0; vertical-align: middle; }
.history-dialog { width: min(300px, calc(100% - 20px)); }
.calendar-controls { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px; }
.calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.calendar-week button { padding: 4px 0; }
.calendar-week button[aria-pressed=true] { color: #2f6582; background: #fff; font-weight: bold; }
.calendar-week button:disabled { opacity: .45; }

.system-line .announcement-text { color: inherit; }

#login-screen.portal-shell { --portal-max: 900px; }
#login-screen .login-body { text-align: center; padding-top: 24px; }
#login-screen .login-form { width: min(275px, 100%); }
#login-screen .login-form input { height: 29px; padding: 2px 6px; font-size: 13px; }
#login-screen .login-send { width: min(200px, 100%); margin-inline: auto; }
html:has(.shell:not([hidden])) { background: #e8e9db; }
.shell { width: min(100%, 1380px); margin-inline: auto; background: var(--paper); }

.chat-mail-profile:not([hidden]) { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; overflow-wrap: anywhere; }
.chat-mail-profile .profile-thumb { flex: 0 0 auto; margin: 0; }
.chat-mail-profile dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 4px 0 0; }
.chat-mail-profile dd { margin: 0; }
