: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; }
.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 { 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-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; }
.mailbox .messages li { padding: 3px 0; }
dialog#dialog-mail { width: min(620px, calc(100% - 20px)); }
.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 { color: #da5004; white-space: pre-wrap; }
.message-text img { max-width: 34px; max-height: 25px; vertical-align: middle; }
.unread {
  position: absolute;
  top: 8px;
  right: 15px;
  padding: 3px 6px;
  border: 1px solid var(--rule);
  color: var(--blue);
  background: var(--paper);
}
.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: flex; flex-wrap: wrap; gap: 4px; }
.member-actions button { border: 0; padding: 0; background: transparent; }
.member-actions img { display: block; }
.member-actions button:hover, .member-actions button:focus-visible { outline: 1px solid var(--rule); }
.mobile-member { display: none; }
.people-list li { position: relative; padding: 4px 0; }
.people-body .people-list li { padding-left: 26px; }
.people-list .nick { font-size: 10pt; font-family: Arial, sans-serif; }
.people-list .person-state { display: block; margin-top: 12px; color: #111; font: 10px Arial, sans-serif; }
.state-dot { color: var(--blue); margin-right: 4px; padding: 0; border: 0; background: none; cursor: pointer; }
.people-body .state-dot { position: absolute; left: 7px; top: 20px; width: 13px; height: 13px; font-size: 0; background: url('/chat/images/lol.gif') center / contain no-repeat; }
.state-dot.away { opacity: .6; }
.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 textarea { 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: 5px; 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, .settings-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 7px; }
.dialog-body button, .settings-actions button { background: white; border: 1px solid var(--rule); padding: 3px 6px; }
.dialog-actions { justify-content: end; }
.smile-list { display: flex; flex-wrap: wrap; gap: 6px; }
.smile-list button { min-width: 34px; height: 31px; display: grid; place-items: center; }
.smile-list img { max-height: 23px; max-width: 30px; }
.retro-settings { width: min(800px, calc(100% - 20px)); max-height: min(650px, calc(100% - 20px)); overflow: auto; }
.settings-close { position: absolute; z-index: 1; top: 8px; right: 9px; }
.settings-form { padding-top: 20px; padding-bottom: 13px; font-size: 12px; line-height: 1.4; }
.settings-form p { margin: 8px 0 20px; }
.settings-form fieldset { border: 0; padding: 0; margin: 0 0 19px; min-width: 0; }
.settings-form legend { margin: 0 auto; padding: 0; font-weight: bold; }
.settings-save { margin: 2px 0 14px; }
.settings-save button { min-width: 95px; padding: 4px 12px; border: 1px solid var(--rule); background: white; font-weight: bold; }
.settings-actions { padding: 12px 0 2px; border-top: 1px solid var(--rule); }
.settings-actions a { padding: 3px 6px; }
#legacy-confirm { margin: 10px 0; }
#legacy-confirm summary { cursor: pointer; color: var(--blue); }
.settings-form .profile-choices legend { padding-top: 3px; }
.profile-choices p { margin: 10px 0 12px; }
.radio-list, .color-fields { display: grid; width: fit-content; margin: 0 auto; text-align: left; }
.radio-list label { display: block; }
.settings-form input[type=radio] { margin: 0 3px 0 0; }
.color-fields { margin-bottom: 14px; }
.color-fields input { width: 80px; color: #111; }
.technical-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 9px; margin: 19px 0 15px; }
.technical-grid span, .technical-grid select { display: block; width: fit-content; margin: 8px auto 0; }
.order-settings { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 680px) {
  .shell { grid-template: auto minmax(0, 1fr) 50px / minmax(0, 1fr); }
  .shell.has-member { grid-template-rows: auto auto minmax(0, 1fr) 50px; }
  .has-member .mobile-member { display: block; grid-area: 2 / 1 / 3 / 2; padding: 8px 12px; border-bottom: 1px solid var(--rule); max-height: 30vh; overflow: auto; }
  .mobile-member .member-panel { padding: 0; }
  .mobile-member .member-panel h2, .mobile-member .member-panel p { margin-bottom: 5px; }
  .has-member .conversation { grid-row: 3 / 4; }
  .has-member .composer { grid-row: 4 / 5; }
  .rail { grid-area: 1 / 1 / 2 / 2; padding: 0; flex-direction: row; align-items: center; justify-content: space-around; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .rail button img { width: 38px; height: 36px; object-fit: cover; }
  .rail .mobile-people { display: block; font-size: 10px; }
  .conversation { grid-area: 2 / 1 / 3 / 2; }
  .people { display: none; }
  .composer { grid-area: 3 / 1 / 4 / 2; padding: 0 8px; gap: 5px; background-position: left bottom; }
  .composer textarea { width: auto; flex: 1; height: 27px; font-size: 16px; }
  .private-destination { left: 8px; top: 0; font-size: 10px; }
  .composer.is-private textarea { margin-top: 10px; }
  .composer #send { align-self: start; width: 32px; height: 31px; margin-top: 5px; 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; }
  .technical-grid { grid-template-columns: 1fr; }
}

.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: white; background: var(--blue); }
.calendar-week button:disabled { opacity: .45; }
