.log-panel {
  min-height: 0;
  padding: 12px;
  border-color: rgba(255, 75, 67, 0.62);
  box-shadow: var(--shadow-red);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.section-title {
  color: var(--red-soft);
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.log-summary {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.log-list {
  min-height: 0;
  overflow: auto;
  
  align-content: start;
  gap: 8px;
  padding-right: 4px;
}

.mobile-log-peek {
  display: none;
  pointer-events: auto;
  cursor: pointer;
}

.mobile-log-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 14px;
}

.mobile-log-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.58);
}

.mobile-log-sheet {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(78dvh, 620px);
  min-height: 220px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(255, 75, 67, 0.62);
  background: linear-gradient(135deg, rgba(7, 20, 34, 0.98), rgba(4, 9, 16, 0.96));
  box-shadow: var(--shadow-red), 0 18px 46px rgba(0, 0, 0, 0.62);
  clip-path: polygon(0 12px, 12px 0, calc(100% - 30px) 0, 100% 28px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 24px 100%, 0 calc(100% - 24px));
}

.mobile-log-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.mobile-log-head .section-title {
  margin-bottom: 4px;
}

.mobile-log-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  
  align-content: start;
  gap: 8px;
  padding-right: 3px;
}

.mobile-discard-modal {
  position: fixed;
  z-index: 121;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 14px;
}

.mobile-discard-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.58);
}

.mobile-discard-sheet {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(78dvh, 620px);
  min-height: 220px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(80, 200, 255, 0.62);
  background: linear-gradient(135deg, rgba(7, 20, 34, 0.98), rgba(4, 9, 16, 0.96));
  box-shadow: var(--shadow-blue), 0 18px 46px rgba(0, 0, 0, 0.62);
  clip-path: polygon(0 12px, 12px 0, calc(100% - 30px) 0, 100% 28px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 24px 100%, 0 calc(100% - 24px));
}

.mobile-discard-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.mobile-discard-head .section-title {
  margin-bottom: 4px;
  color: var(--blue-soft);
}

.mobile-discard-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 7px;
  padding-right: 3px;
}

.mobile-discard-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(80, 200, 255, 0.3);
  background: rgba(4, 13, 22, 0.78);
  color: #eaf9ff;
  clip-path: polygon(0 8px, 8px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 12px 100%, 0 calc(100% - 12px));
}

.mobile-discard-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(157, 236, 255, 0.46);
  background: rgba(8, 24, 38, 0.74);
  color: #9fe9ff;
  font-size: 1.14rem;
  font-weight: 950;
  clip-path: polygon(50% 0, 94% 24%, 94% 76%, 50% 100%, 6% 76%, 6% 24%);
}

.mobile-discard-card-main {
  min-width: 0;
}

.mobile-discard-card-name {
  color: #f4fbff;
  font-size: 0.82rem;
  line-height: 1.08;
  font-weight: 950;
}

.mobile-discard-card-meta {
  margin-top: 3px;
  color: #9eddf2;
  font-size: 0.66rem;
  line-height: 1.18;
  font-weight: 800;
}

.empty-log {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.log-round-separator {
  margin: 12px 2px 6px;
  color: var(--blue-soft);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.log-entry {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(80, 200, 255, 0.28);
  background: rgba(3, 9, 15, 0.72);
  border-radius: 4px;
  align-items: start;
  overflow: visible;
  margin-bottom: 5px;
}

.log-entry > div {
  min-width: 0;
}

.log-entry.bot {
  border-color: rgba(255, 75, 67, 0.32);
}

.log-entry.system {
  border-color: rgba(239, 184, 77, 0.35);
}

.log-entry.is-hint {
  border-color: rgba(239, 184, 77, 0.68);
  background: linear-gradient(90deg, rgba(74, 47, 9, 0.64), rgba(3, 9, 15, 0.74));
  box-shadow: inset 3px 0 0 rgba(239, 184, 77, 0.78), 0 0 16px rgba(239, 184, 77, 0.12);
}

.log-entry.is-hint .log-mark {
  color: #ffe28a;
}

.log-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  color: var(--blue-soft);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.bot .log-mark {
  color: var(--red-soft);
}

.system .log-mark {
  color: var(--gold);
}

.log-text {
  min-width: 0;
  font-weight: 700;
  line-height: 1.28;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: normal;
}

.log-entry.is-hint .log-text {
  font-size: 0.92rem;
  line-height: 1.24;
}

.log-time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.22;
  white-space: normal;
  overflow-wrap: anywhere;
}
