:root {
  --bg: #f7f7f4;
  --panel: #ffffff;
  --panel-soft: #f1f2f0;
  --text: #202421;
  --muted: #6b726d;
  --line: #e2e5e1;
  --line-strong: #d2d8d3;
  --accent: #25636a;
  --accent-dark: #1d4f55;
  --choice: #fafbf9;
  --choice-line: #dfe4df;
  --guide: #e7f0f0;
  --guide-line: #cbdcdd;
  --shadow: 0 12px 30px rgba(35, 65, 69, 0.07);
}

body,
.app {
  background: var(--bg);
}

.brand-mark,
.login-brand,
.mobile-auth-brand {
  background: var(--accent);
}

.login-screen {
  background:
    radial-gradient(circle at 50% 12%, rgba(37, 99, 106, 0.08), transparent 33%),
    var(--bg);
}

.login-panel {
  width: min(408px, 100%);
  padding: 36px 36px 28px;
  border-color: var(--line);
  border-radius: 22px;
  box-shadow: 0 22px 64px rgba(35, 65, 69, 0.09);
}

.login-heading > span {
  color: var(--accent);
}

.login-heading h1 {
  margin-top: 16px;
  font-size: 29px;
  line-height: 1.28;
}

.login-heading h1 em {
  color: var(--accent-dark);
  font-style: normal;
}

.login-heading p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.login-primary-actions {
  display: grid;
  justify-items: center;
  gap: 11px;
  margin-top: 21px;
}

.wechat-login-button {
  min-width: 72px;
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 4px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.wechat-login-button:hover {
  background: #f0f3f1;
}

.wechat-login-button:focus-visible {
  outline: 3px solid rgba(37, 99, 106, 0.2);
  outline-offset: 2px;
}

.wechat-app-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #07c160;
  color: #fff;
  box-shadow: 0 2px 7px rgba(7, 193, 96, 0.12);
}

.wechat-app-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.login-agreement {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  color: #7b817c;
  font-size: 10.5px;
  line-height: 1.5;
}

.login-agreement input {
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.test-login-toggle {
  min-height: 34px;
  display: block;
  margin: 11px auto 0;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #737a75;
  font-size: 11px;
  font-weight: 650;
}

.test-login-toggle:hover {
  background: transparent;
  color: var(--accent-dark);
}

.login-form {
  margin-top: 6px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.login-form[hidden] {
  display: none;
}

.login-form input {
  border-color: var(--line);
  background: #fbfcfa;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 106, 0.1);
}

.login-form > button {
  background: var(--accent);
}

.login-status {
  margin-top: 9px;
}

.login-status:not(.error) {
  background: var(--guide);
  color: var(--accent-dark);
}

.login-footnote {
  margin-top: 16px;
}

.composer-area {
  min-width: 0;
  display: grid;
  align-content: end;
  background: var(--panel);
}

.composer-area .composer {
  grid-row: auto;
}

.composer-area .quota-low-notice {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin: 2px 20px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #858b87;
  font-size: 10px;
  font-weight: 450;
  line-height: 18px;
}

.composer-area .quota-low-notice[hidden] {
  display: none;
}

.composer-area .quota-low-notice #quotaLowNoticeButton {
  min-height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #717874;
  font-size: 10px;
  font-weight: 550;
  line-height: 18px;
}

.composer-area .quota-low-notice:hover #quotaLowNoticeButton {
  background: transparent;
  color: var(--accent-dark);
}

.composer-area .quota-low-notice.is-warning {
  color: #9a6a28;
}

.composer-area .quota-low-notice.is-warning #quotaLowNoticeButton {
  color: #86591e;
}

.session-drawer {
  top: 0;
  bottom: 0;
  left: 0;
  width: min(232px, calc(100vw - 20px));
  grid-template-rows: 52px auto minmax(0, 1fr) auto;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-soft);
  box-shadow: none;
}

.session-drawer-head {
  min-height: 52px;
  padding: 7px 8px 7px 12px;
  border: 0;
  background: var(--panel-soft);
}

.session-drawer-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-drawer-brand > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: ui-serif, Georgia, serif;
  font-size: 14px;
  font-weight: 750;
}

.session-drawer-brand > strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-drawer-head .notes-close {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5f6761;
}

.session-drawer-head .notes-close:hover {
  background: #e4e8e4;
}

.session-drawer-head .notes-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-drawer-actions {
  display: grid;
  gap: 2px;
  padding: 4px 6px 7px;
  border: 0;
  background: var(--panel-soft);
}

.session-drawer-actions > button,
.session-drawer-actions > button.session-new-entry,
.session-drawer-actions > button.session-review-entry {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  margin: 0;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.session-drawer-actions > button:hover {
  background: #e4e8e4;
}

.session-drawer-actions .session-new-entry {
  gap: 8px;
}

.session-drawer-actions .session-new-entry strong,
.session-drawer-actions .session-review-entry strong {
  font-size: 13px;
  font-weight: 600;
}

.session-drawer-actions .session-review-entry {
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: auto;
  justify-content: stretch;
  column-gap: 8px;
}

.session-drawer-actions .session-review-entry > strong {
  justify-self: start;
  text-align: left;
}

.session-drawer-actions .session-review-entry::before {
  display: none;
}

.session-drawer-actions .session-review-entry > span {
  width: 20px;
  height: 20px;
  grid-row: 1;
  color: #58615b;
}

.session-drawer-actions .session-review-entry > span svg {
  width: 18px;
  height: 18px;
}

.session-list {
  gap: 1px;
  padding: 2px 6px 9px;
}

.session-group-title {
  padding: 11px 9px 4px;
  color: #7a817c;
  font-size: 10.5px;
}

.session-card {
  border-radius: 8px;
}

.session-card.current {
  background: #e7f0f0;
}

.session-card-main {
  min-height: 34px;
  padding: 7px 34px 7px 9px;
  border-radius: 8px;
}

.session-card-head strong {
  font-size: 12.5px;
  font-weight: 550;
}

.session-current-badge {
  background: var(--accent);
}

.session-card-tools {
  top: 2px;
  right: 2px;
}

.session-card-tools summary {
  width: 30px;
  height: 30px;
  padding-bottom: 5px;
}

.session-account-footer {
  padding: 6px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.session-account-footer button {
  min-height: 42px;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 9px;
}

.session-account-footer button:hover {
  background: #e4e8e4;
}

.session-account-footer button > span {
  width: 28px;
  height: 28px;
  grid-row: 1;
  border-radius: 9px;
  background: var(--accent-dark);
  font-size: 11px;
}

.session-account-footer button strong {
  grid-column: 2;
  align-self: center;
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-account-footer button small,
.session-account-footer button b {
  display: none;
}

@media (min-width: 1100px) {
  .app.desktop-session-open {
    width: calc(100% - 232px);
    margin-left: 232px;
  }
}

@media (max-width: 760px) {
  .login-panel {
    width: 100%;
    padding: 0 24px calc(28px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-brand {
    margin-top: min(9dvh, 72px);
  }

  .login-heading h1 {
    font-size: 28px;
  }

  .login-primary-actions {
    margin-top: 30px;
  }

  .login-form {
    margin-top: 5px;
  }

  .composer-area .quota-low-notice {
    margin: 0 16px 1px;
    font-size: 9.5px;
  }

  .session-drawer {
    width: min(82vw, 300px);
    grid-template-rows: 54px auto minmax(0, 1fr) auto;
    border-radius: 0;
    background: var(--panel-soft);
  }

  .session-drawer-head {
    min-height: 54px;
    padding-top: max(7px, env(safe-area-inset-top));
    background: var(--panel-soft);
  }

  .session-drawer-actions,
  .session-account-footer {
    background: var(--panel-soft);
  }

  .session-card.current {
    background: #e7f0f0;
  }
}
