/* The problem page presentation. Game dialogs keep their existing layout. */
:root {
  --blue: #3498db;
  --line: #e1e5ec;
  --muted: #82909b;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Noto Sans", "Noto Sans SC", "Source Sans Pro", "Source Han Sans", "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  color: #1f1f1f;
  background: #eff2f8;
  --card-surface: rgba(255, 255, 255, .84);
  --card-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

body {
  padding-left: 64px;
  background: #eff2f8;

}

.lg-rail {
  position: fixed;
  inset: 55px auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 64px;
  overflow-y: auto;
  padding-top: 24px;
  background: var(--card-surface);
  color: #303640;
  border-right: 1px solid #e7eaf0;
  scrollbar-width: thin;
}
.lg-rail > a,
.lg-rail > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 4px;
  width: 100%;
  min-height: 42px;
  padding: 9px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #313c46;
  text-decoration: none;
}
.lg-rail > a:hover,
.lg-rail > button:hover,
.lg-rail > .active { background: #eaf3fb; color: #3498db; }
.lg-rail svg { width: 21px; height: 21px; }
.lg-rail img { width: 31px; height: 31px; object-fit: contain; }
.lg-rail small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lg-rail-icon { display: flex; align-items: center; justify-content: center; height: 23px; font-size: 23px; line-height: 1; font-weight: 400; }
.lg-rail > a:first-child,
.lg-rail > button:first-child { min-height: 42px; }
.lg-topbar-brand,
.lg-rail > .lg-rail-brand { position: fixed; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 64px; height: 55px; min-height: 55px; padding: 0; border: 0; background: #fff; z-index: 65; }
.lg-topbar-brand img { display: block; width: 32px; height: 32px; object-fit: contain; }

.lg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 55;
  min-height: 55px;
  padding: 8px 28px 8px 8px;
  background: #fff;
  border-bottom: 1px solid #e4e8ee;
  font-size: 14px;
}
.lg-topbar a { color: #3498db; }
.lg-topbar .muted { color: #aaa; }
.lg-topbar button { font-size: 13px; }
.lg-topbar .account { gap: 9px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-profile-avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #e9f2f9; color: #5b90b8; font-size: 14px; }
.lg-breadcrumb { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.lg-breadcrumb > span:first-of-type { color: #666; }
.lg-breadcrumb, .lg-topbar .lg-breadcrumb button { color: #272727; font-size: 16px; }
.lg-page { width: calc(100% - 112px); max-width: 1200px; margin: 24px auto 36px; }
.lg-page > .alert { margin-bottom: 18px; }
.lg-page .btn { border-radius: 3px; box-shadow: none; }
.lg-page .btn svg,
.lg-reference-links svg { flex-shrink: 0; width: 14px; height: 14px; }
.lg-page .btn.primary { border-color: #3498db; background: #3498db; color: #fff; }
.lg-page .btn.primary:hover { border-color: #2488ca; background: #2488ca; }
.lg-page .input { border-color: #ddd; border-radius: 3px; }
.lg-page .input:focus { border-color: #3498db; }
.lg-page :is(button, a, input, select, textarea):focus-visible,
.lg-rail :is(button, a):focus-visible {
  outline: 3px solid #83c7f3;
  outline-offset: 3px;
}
.lg-page :is(button, a, input, select, textarea) { scroll-margin-top: 18px; }

.lg-problem-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 91px;
  padding: 20.8px 20.8px 16px;
  margin-bottom: 0;
  background: var(--card-surface);
  border: 0;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 1px 6px #27364a08;
}
.lg-problem-header h1 {
  flex: 1;
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.lg-problem-stats {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
  gap: 22px;
  padding-bottom: 0;
  color: #262626;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.lg-problem-stats > span,
.lg-problem-stats > .lg-stat { display: flex; flex-direction: column; gap: 0; }
.lg-problem-stats strong,
.lg-problem-stats .lg-stat-value { color: #262626; font-size: 14px; font-weight: 700; }
.lg-problem-stats a { color: #3498db; }
.lg-problem-tabs,
.lg-submit-tabs { display: flex; align-items: stretch; gap: 26px; }
.lg-problem-tabs { border-top: 0; }
.lg-page > .lg-problem-tabs { gap: 16px; padding: 0 28px; margin: 0 0 20px; border-radius: 0 0 4px 4px; background: var(--card-surface); box-shadow: 0 2px 5px #27364a08; }
.lg-problem-tabs button,
.lg-submit-tabs button {
  position: relative;
  min-height: 48px;
  padding: 12px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #68717e;
  font-size: 14px;
  white-space: nowrap;
}
.lg-problem-tabs button { padding-inline: 8px; color: #252525; font-size: 16px; }
.lg-problem-tabs button:hover,
.lg-submit-tabs button:hover { color: #3498db; }
.lg-problem-tabs button.active,
.lg-submit-tabs button.active { border-bottom-color: #3498db; color: #3498db; }

.lg-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
  gap: 16px;
}
.lg-main,
.lg-sidebar { min-width: 0; }
.lg-card {
  padding: 20.8px;
  margin-bottom: 20.8px;
  border: 0;
  border-radius: 4px;
  background: var(--card-surface);
  box-shadow: var(--card-shadow);
}
.lg-card h2 { margin-bottom: 16px; color: #1f1f1f; font-size: 20px; line-height: 1.2; font-weight: 700; }
.lg-card h3 { margin-bottom: 8px; font-size: 18px; line-height: 1.2; font-weight: 700; }
.lg-card p { line-height: 1.5; }
.lg-background { overflow: visible; margin-bottom: 0; padding-bottom: 20px; border-radius: 4px 4px 0 0; box-shadow: 0 -1px 5px #27364a04; }
.lg-background + .lg-statement { border-radius: 0 0 4px 4px; padding-top: 12px; }
.lg-background-intro { margin: -4px 0 12px; color: #555; font-size: 14px; }
.lg-background .room-status {
  padding: 9px 11px;
  margin-bottom: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  background: #f8fafc;
  font-size: 13px;
}
.lg-game-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #666;
}
.lg-game-toolbar .btn { min-height: 31px; font-size: 13px; padding: 4px 10px; }
.lg-game-toolbar > div:last-child { margin-left: auto; }
.lg-public-rooms { padding-top: 14px; margin-top: 16px; border-top: 1px solid #eee; font-size: 13px; }
.lg-public-rooms summary { cursor: pointer; color: #3498db; }
.lg-public-rooms[open] summary { margin-bottom: 14px; }
.lg-public-rooms .table { font-size: 12px; }
.lg-public-rooms .table th { font-weight: 400; border-bottom-width: 1px; }
.lg-public-rooms .table :is(th, td) { padding: 8px 6px; }
.lg-background .seats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.lg-background .seat {
  min-width: 0;
  min-height: 96px;
  padding: 18px 4px 7px;
  border: 1px solid #e4e7eb;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}
.lg-background .seat.me { border-color: #9dcae8; background: #f6fbfe; }
.lg-background .seat.speaking { border-color: #65b996; background: #f4fcf8; }
.lg-background .seat.selected { border-color: #3498db; background: #eaf5fd; box-shadow: inset 0 0 0 1px #3498db; }
.lg-background .seat.empty { border-style: dashed; background: #fafbfd; }
.lg-background .seat.dead { opacity: .55; }
.lg-background .seat-number { left: 6px; top: 5px; font-size: 11px; font-weight: 400; color: #82909b; }
.lg-background .seat-role { top: 5px; right: 4px; }
.lg-background .seat-role .badge { max-width: 55px; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
.lg-background .seat-name { font-size: 12px; font-weight: 400; color: #555; }
.lg-background .seat.me .seat-name { color: #2980b9; }
.lg-background .seat.empty .seat-name { color: #aaa; }
.lg-background .seat-status { font-size: 11px; min-height: 18px; }
.lg-background .avatar { width: 36px; height: 36px; margin: 0 auto 5px; font-size: 18px; overflow: hidden; }
.lg-background .avatar svg,
.lg-background .avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lg-seat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.lg-seat-button:not(:disabled):hover { border-color: #3498db; box-shadow: 0 0 0 3px #3498db1a; }
.lg-seat-button.selected,
.seat.selected .lg-seat-button { border-color: #3498db; box-shadow: 0 0 0 3px #3498db1f; }
.lg-seat-button:disabled { opacity: 1; cursor: default; }
.lg-background .identity,
.lg-background .sheriff-panel { border-radius: 3px; font-size: 13px; }
.lg-background .identity { border-color: #d3e7f5; background: #f6fbfe; }
.lg-background .controls { justify-content: flex-start; margin-bottom: 0; }
.lg-background .controls + p { margin-top: 11px; }
.lg-background .action-panel { margin: 16px 0 0; }
.lg-page .action-panel { border-radius: 3px; border-color: #d7e7f2; background: #f8fbfd; }
.lg-page .action-panel h3 { margin-bottom: 8px; font-size: 16px; }
.lg-page .target { border-radius: 3px; }
.lg-page .target.selected { background: #3498db; border-color: #3498db; }

.lg-statement { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.lg-statement h2 { margin: 28px 0 16px; }
.lg-statement h2:first-child { margin-top: 0; }
.lg-statement h3 { margin: 22px 0 12px; }
.lg-statement p { margin: 12px 0; }
.lg-statement p:last-child { margin-bottom: 0; }
.lg-statement :is(ul, ol) { margin: 10px 0; padding-left: 26px; }
.lg-statement li { margin: 5px 0; }
.lg-statement :is(code, pre) { font-family: Consolas, "Liberation Mono", Menlo, monospace; }
.lg-statement code { padding: 2px 4px; border-radius: 2px; background: #f4f4f4; font-size: .9em; }
.lg-statement pre {
  max-width: 100%;
  overflow: auto;
  padding: 14px 16px;
  margin: 12px 0;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  background: #f8f8f8;
  color: #333;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
  overflow-wrap: normal;
}
.lg-statement pre code { padding: 0; background: transparent; font-size: inherit; }
.lg-statement img { max-width: 100%; height: auto; }
.lg-statement table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.lg-statement :is(th, td) { padding: 8px; border: 1px solid #ddd; text-align: left; }
.lg-statement th { background: #fafafa; font-weight: 500; }
.lg-statement .problem-section + .problem-section { margin-top: 28px; }
.lg-statement .problem-sample { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 14px 0; }
.lg-statement .problem-sample-block { display: flex; min-width: 0; flex-direction: column; }
.lg-statement .problem-sample-label { margin: 0; font-size: 14px; font-weight: 500; }
.lg-statement .problem-sample pre { flex: 1; margin-bottom: 0; }

.lg-sidebar .lg-card { padding: 20.8px; }
.lg-sidebar h3 { font-size: 18px; }
.lg-meta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; font-size: 16px; line-height: 1.5; }
.lg-meta-row > :first-child { font-weight: 700; }
.lg-meta-row > :last-child { text-align: right; }
.lg-meta-row strong { font-weight: 400; }
.lg-meta-row .lg-difficulty { color: #9d3dcf; font-weight: 700; }
.lg-provider { color: #e8a01b; font-weight: 700; }
.lg-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 7px 0 0; }
.lg-tags > * { display: inline-block; padding: 1px 7px; border-radius: 2px; background: #3498db; color: #fff; font-size: 13px; line-height: 20px; }
.lg-tags > :first-child { background: #13b9ae; }
.lg-tags > :nth-child(3) { background: #f39c11; }
.lg-reference-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 0; font-size: 16px; }
.lg-reference-links button,
.lg-reference-links a { display: inline-flex; align-items: center; gap: 4px; color: #3498db; }
.lg-side-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lg-side-heading h3 { margin: 0; color: #1f1f1f; line-height: 1.2; }
.lg-side-title, .lg-disclosure { border: 0; padding: 0; background: none; }
.lg-side-title { color: inherit; font: inherit; text-align: left; }
.lg-side-link { padding: 0; color: #3498db; font-size: 16px; text-decoration: none; }
.lg-side-link:hover, .lg-rec-list a:hover { text-decoration: underline; }
.lg-disclosure { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 24px; margin-top: 4px; color: #737373; font-size: 14px; line-height: 21px; }
.lg-disclosure:hover { color: #3498db; }
.lg-side-content[hidden] { display: none; }
.lg-side-content { margin-top: 10px; }
.lg-side-content .identity { margin: 0; }
.lg-rec-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.lg-rec-list a { color: #3498db; text-decoration: none; overflow-wrap: anywhere; }
.lg-sidebar .lg-side-ad { position: relative; margin: 0 0 20px; padding: 0; overflow: hidden; border-radius: 4px; }
.lg-side-ad > a, .lg-side-ad img { display: block; width: 100%; }
.lg-side-ad img { height: auto; }
.lg-ad-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; color: #888; font-size: 13px; }
.lg-ad-caption button { padding: 1px 5px; border: 0; background: transparent; color: inherit; }
.lg-connection { font-size: 12px; color: #888; line-height: 1.7; }
.lg-connection .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: #5cb88a; }

.lg-discussion .lg-card { padding: 0; }
.lg-discussion .chat-card { margin-bottom: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.lg-discussion .card-header { padding: 0 0 12px; min-height: 0; border: 0; background: transparent; align-items: flex-start; flex-wrap: wrap; gap: 4px 8px; }
.lg-discussion .card-header strong { font-size: 18px; font-weight: 700; color: #1f1f1f; }
.lg-discussion .card-header small { font-size: 11px; }
.lg-discussion .card-body { padding: 14px 0 0; }
.lg-discussion .chat-feed { height: 270px; padding: 12px 0; border-top: 1px solid #eee; font-size: 13px; line-height: 1.7; scrollbar-width: thin; }
.lg-discussion .chat-feed:has(> p:only-child) { height: auto; min-height: 64px; }
.lg-discussion .chat-feed.team { height: 210px; }
.lg-discussion .chat-form { padding: 12px 0 0; border-top: 1px solid #eee; }
.lg-discussion .chat-input { min-height: 88px; font-size: 13px; line-height: 1.6; resize: vertical; }
.lg-discussion .chat-actions { align-items: flex-start; gap: 8px; }
.lg-discussion .chat-actions small { font-size: 11px; line-height: 1.6; }
.lg-discussion .chat-actions .btn { flex-shrink: 0; }

.lg-submit-tabs { margin: 0 0 20px; border-bottom: 0; gap: 24px; }
.lg-submit-tabs button { min-height: 32px; padding: 0 0 9px; border-bottom: 0; font-size: 14px; }
.lg-code-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; font-size: 14px; }
.lg-code-toolbar label { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lg-code-toolbar .input { flex: 0 1 190px; width: 190px; min-width: 140px; min-height: 31px; height: 31px; padding: 4px 9px; font-size: 13px; }
.lg-code-toolbar > .btn:last-child { margin-left: auto; }
.lg-code-toolbar .btn { min-height: 31px; font-size: 12px; }
.lg-editor-surface { position: relative; padding-left: 43px; border: 1px solid #dfe3e9; border-radius: 3px; background: #fff; overflow: hidden; }
.lg-editor-surface:focus-within { border-color: #82bbe2; box-shadow: 0 0 0 2px #3498db1a; }
.lg-code-gutter {
  position: absolute;
  inset: 0 auto 0 0;
  width: 43px;
  margin: 0;
  padding: 12px 10px 12px 4px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #e9ecf1;
  background: #f8f9fb;
  color: #a0a7b2;
  font-family: Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 20px;
  text-align: right;
  user-select: none;
}
.lg-code-editor #code-editor {
  display: block;
  height: 475px;
  min-height: 300px;
  padding: 12px 10px;
  border: 0;
  border-radius: 0;
  background-color: #fff;
  background-image: linear-gradient(#eef5ff, #eef5ff);
  background-repeat: no-repeat;
  background-size: 100% 20px;
  background-position: 0 calc(12px + (var(--editor-current-line, 1) - 1) * 20px - var(--editor-scroll-top, 0px));
  color: #333;
  font-family: Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 20px;
  white-space: pre;
  overflow-wrap: normal;
  tab-size: 4;
  resize: vertical;
}
.lg-code-editor #code-editor:focus-visible { outline: 0; }
.lg-editor-status { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: #888; font-size: 12px; }
.lg-editor-status .btn { font-size: 14px; }
.lg-code-editor > .controls,
.lg-night-actions > .controls { justify-content: flex-start; margin-bottom: 0; }
.lg-night-actions > .action-panel:first-child { margin-top: 0; }
.lg-night-actions .chat-card { border-radius: 3px; margin-top: 20px; }
.lg-night-actions .card-header { background: #fafafa; }
.lg-page > .footer { padding: 14px 0; margin-top: 8px; border: 0; color: #aaa; font-size: 12px; }
.lg-page > .footer button { margin-left: 8px; font-size: 12px; }

@media (max-width: 1120px) {
  .lg-page { width: calc(100% - 48px); }
  .lg-layout { grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); }
  .lg-problem-header { flex-wrap: wrap; gap: 15px; }
  .lg-problem-header h1 { flex-basis: 100%; }
  .lg-problem-stats { gap: 25px; }
  .lg-background .seats { gap: 6px; }
  .lg-background .seat-role .badge { max-width: 45px; }
  .lg-background .seat-status { font-size: 10px; }
}
@media (max-width: 900px) {
  .lg-page { width: calc(100% - 40px); margin-top: 20px; }
  .lg-topbar { padding-left: 20px; padding-right: 20px; }
  .lg-layout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .lg-main,
  .lg-sidebar { display: contents; }
  .lg-background,
  .lg-submission { order: 1; }
  .lg-problem-tags { order: 2; }
  .lg-discussion { order: 3; }
  .lg-statement { order: 4; }
  .lg-problem-meta { order: 5; }
  .lg-recommendations { order: 6; }
  .lg-side-ad { order: 7; }
  .lg-background { margin-bottom: 16px; border-radius: 4px; box-shadow: var(--card-shadow); }
  .lg-background + .lg-statement { padding-top: 20px; border-radius: 4px; }
  .lg-background .seats { gap: 8px; }
  .lg-background .seat-role .badge { max-width: 55px; }
  .lg-discussion .chat-feed { height: 230px; }
  .lg-discussion .chat-feed:has(> p:only-child) { height: auto; }
}
@media (max-width: 640px) {
  .lg-card { padding: 18px; }
  .lg-problem-header { padding: 18px 18px 12px; }
  .lg-page > .lg-problem-tabs { padding-left: 18px; padding-right: 18px; }
  .lg-problem-stats { gap: 18px; font-size: 11px; }
  .lg-problem-stats strong { font-size: 13px; }
  .lg-background .seats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg-background .room-status { align-items: flex-start; flex-wrap: wrap; }
  .lg-background .identity button { margin-left: 0; }
}
@media (max-width: 540px) {
  body { padding-left: 48px; }
  .lg-rail { width: 48px; }
  .lg-rail > a,
  .lg-rail > button { min-height: 49px; padding: 11px 1px; gap: 0; }
  .lg-rail > a:first-child,
  .lg-rail > button:first-child { min-height: 49px; }
  .lg-rail svg { width: 19px; height: 19px; }
  .lg-topbar-brand,
  .lg-rail > .lg-rail-brand { width: 48px; min-height: 55px; }
  .lg-topbar-brand img { width: 28px; height: 28px; }
  .lg-rail-icon { height: 22px; font-size: 22px; }
  .lg-topbar { min-height: 55px; padding: 10px 12px; gap: 8px; font-size: 12px; }
  .lg-topbar .account { font-size: 12px; gap: 5px; }
  .lg-profile-avatar { width: 24px; height: 24px; font-size: 12px; }
  .lg-breadcrumb { gap: 7px; }
  .lg-topbar .btn { padding: 4px 7px; font-size: 12px; min-height: 30px; }
  .lg-page { width: calc(100% - 20px); margin: 12px auto 24px; }
  .lg-problem-header { padding: 15px 14px 10px; gap: 12px; }
  .lg-page > .lg-problem-tabs { padding-left: 14px; padding-right: 14px; margin-bottom: 12px; }
  .lg-problem-header h1 { font-size: 18px; line-height: 1.5; }
  .lg-problem-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 10px; font-size: 10px; }
  .lg-problem-stats strong { font-size: 12px; }
  .lg-problem-tabs { gap: 25px; }
  .lg-problem-tabs button { min-height: 43px; padding-top: 9px; padding-bottom: 9px; font-size: 13px; }
  .lg-card,
  .lg-sidebar .lg-card { padding: 15px 12px; margin-bottom: 12px; }
  .lg-background + .lg-statement { padding-top: 15px; }
  .lg-discussion { padding: 15px 12px; margin-bottom: 12px; }
  .lg-sidebar .lg-discussion .chat-card { padding: 0; margin-bottom: 0; }
  .lg-card h2 { margin-bottom: 12px; font-size: 18px; }
  .lg-background .seats { gap: 6px; }
  .lg-background .seat { min-height: 101px; padding: 23px 3px 6px; }
  .lg-background .seat-name { font-size: 11px; }
  .lg-background .seat-number { left: 4px; top: 5px; font-size: 10px; }
  .lg-background .seat-role { right: 3px; top: 5px; }
  .lg-background .seat-role .badge { max-width: 40px; font-size: 8px; overflow: hidden; text-overflow: ellipsis; }
  .lg-background .avatar { width: 32px; height: 32px; font-size: 17px; }
  .lg-background .seat-status { font-size: 10px; line-height: 1.4; }
  .lg-background .seat-status .badge { font-size: 9px; }
  .lg-game-toolbar { gap: 7px; }
  .lg-game-toolbar .btn { font-size: 12px; padding: 4px 8px; }
  .lg-background .controls { gap: 6px; }
  .lg-background .controls .btn { padding: 5px 8px; font-size: 11px; }
  .lg-background .controls .btn svg { width: 12px; height: 12px; }
  .lg-statement { font-size: 14px; }
  .lg-statement pre { padding: 10px; font-size: 12px; }
  .lg-statement .problem-sample { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lg-code-toolbar { gap: 8px; }
  .lg-code-toolbar .input { flex: 1 1 140px; width: auto; min-width: 0; }
  .lg-code-toolbar > .btn:last-child { margin-left: 0; }
  .lg-code-editor #code-editor { height: 380px; padding: 12px 8px; font-size: 12px; }
  .lg-code-gutter { font-size: 12px; }
  .lg-editor-status { align-items: flex-start; }
}

.lg-rail-divider { width: 40px; margin: 10px auto; border: 0; border-top: 1px solid #ddd; }
.lg-topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lg-topbar-tools > :is(a,button) { display: inline-flex; align-items: center; justify-content: center; background: transparent; padding: 0; border: 0; color: #242424; }
.lg-topbar .lg-topbar-tools .account { max-width: none; }
.lg-topbar-tools svg { width: 18px; height: 18px; }
.lg-topbar-tools .lg-profile-avatar { width: 32px; height: 32px; }
.lg-header-tools { margin-left: auto; display: flex; align-items: flex-start; gap: 8px; }
.lg-header-tools a, .lg-problem-tabs .lg-header-tools button { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 14px; line-height: 22px; padding: 4px 12px; min-height: 32px; border: 1px solid #3498db; color: #3498db; border-radius: 3px; text-decoration: none; white-space: nowrap; }
.lg-header-tools a:hover, .lg-problem-tabs .lg-header-tools button:hover { background: #eef7fd; }
.lg-disclosure-arrow { width: 7px; height: 7px; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-2px) rotate(45deg); }
.lg-disclosure[aria-expanded=true] .lg-disclosure-arrow { transform: translateY(2px) rotate(225deg); }
.lg-side-section .lg-personal-role { padding-top: 12px; }
.lg-algorithm-tags a { color: white; text-decoration: none; background: #3498db; }
.lg-algorithm-tags a:hover { text-decoration: underline; }
.lg-ad-caption { position: absolute; inset: 0; pointer-events: none; margin: 0; }
.lg-ad-caption span { position: absolute; bottom: 10px; left: 10px; color: #fff; font-size: 14px; text-shadow: 0 1px 3px #222; }
.lg-ad-caption span::before { content: 'AD'; font: 700 9px Arial,sans-serif; border: 1px solid; border-radius: 2px; padding: 0 1px; margin-right: 4px; }
.lg-ad-caption button { position: absolute; right: 9px; top: 9px; pointer-events: auto; font: 18px/21px Arial,sans-serif; min-width: 23px; border-radius: 3px; background: #0008; color: white; }
@media(max-width:640px) { .lg-header-tools { gap: 4px; align-items: center; } .lg-header-tools a,.lg-problem-tabs .lg-header-tools button { font-size: 12px; padding: 2px 4px; min-height: 26px; } .lg-page > .lg-problem-tabs { flex-wrap: wrap; gap: 8px; } .lg-topbar-tools { gap: 9px; } }
