:root {
  color-scheme: light;
  font-family: "Noto Sans JP", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f4f1ef;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 clamp(10px, 2.2vw, 24px);
  color: #fff;
  background: #a93a00;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.brand {
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

nav a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 10px;
  color: #ffe7d3;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
}

nav a.my9-nav {
  min-width: 64px;
  padding-right: 7px;
  padding-left: 7px;
  font-size: 12px;
  white-space: normal;
}

nav a.my9-nav span {
  display: block;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

nav a.active {
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
}

.updated {
  color: #ffe7d3;
  font-size: 13px;
  white-space: nowrap;
}

main {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 20px;
  background: #fffaf7;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
}

.summary-item {
  min-height: 86px;
  padding: 14px;
  border: 1px solid #ddc9bc;
  border-radius: 6px;
  background: #fff;
}

.summary-item span {
  display: block;
  color: #7b6559;
  font-size: 13px;
  font-weight: 700;
}

.summary-item strong {
  display: block;
  margin-top: 8px;
  color: #101820;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 88px;
  margin: 0 24px 18px;
  border: 1px dashed #a89183;
  border-radius: 6px;
  color: #7b6559;
  background: #fff;
}

.section-block {
  margin: 18px 24px;
  border: 1px solid #d9c9bf;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 10px 14px;
  border-bottom: 2px solid #202020;
  background: #ead6c8;
}

.section-title h2 {
  font-size: 20px;
}

.section-title span {
  color: #7b2b00;
  font-weight: 800;
}

.ranking-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  align-items: center;
}

.date-picker {
  position: relative;
}

.date-picker-button {
  position: relative;
  min-height: 32px;
  border: 1px solid #c9a994;
  border-radius: 4px;
  padding: 4px 28px 4px 10px;
  background: #fff;
  color: #432414;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.date-picker-button::after {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #7b2b00;
  border-bottom: 2px solid #7b2b00;
  content: "";
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.date-picker-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.ranking-calendar {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 286px;
  overflow: hidden;
  border: 1px solid #d5b39e;
  border-radius: 8px;
  background: #fffdfb;
  box-shadow: 0 18px 42px rgb(67 36 20 / 18%);
}

.calendar-header {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #ead6c8;
  color: #2f1a0f;
  background: #f4e5db;
  text-align: center;
}

.calendar-header strong {
  font-size: 17px;
}

.calendar-nav {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #432414;
  cursor: pointer;
  font-size: 14px;
}

.calendar-nav:hover {
  background: #fff7f0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  padding: 8px;
  background: #fffdfb;
}

.calendar-weekday,
.calendar-day {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
}

.calendar-weekday {
  min-height: 24px;
  color: #6b5c55;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-weekday:nth-child(7n + 1),
.calendar-day:nth-child(7n + 1) {
  background: #fff0ec;
}

.calendar-weekday:nth-child(7n),
.calendar-day:nth-child(7n) {
  background: #f0f2ff;
}

.calendar-day {
  border: 0;
  color: #2f1a0f;
  background: #fff;
}

.calendar-day.available {
  border: 1px solid #e0c7b7;
  color: #7b2b00;
  background: #fff7f0;
  cursor: pointer;
  font-weight: 900;
}

.calendar-day.unsaved {
  border-style: dashed;
  color: #9b7b68;
  background: #fffdfb;
}

.calendar-day.available:hover {
  background: #f0cdb8;
}

.calendar-day.selected {
  color: #fff;
  background: #b33100;
}

.calendar-day.disabled {
  color: #c8b9b0;
  background: transparent;
}

.calendar-day.blank {
  background: transparent;
}

#live .section-title {
  margin-top: 0;
}

#liveLastUpdated {
  color: #7b6559;
  font-size: 13px;
  font-weight: 800;
}

.page-section[hidden] {
  display: none;
}

.compact-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 4px;
}

.pager button {
  min-width: 88px;
  height: 34px;
  border: 1px solid #d8b9a4;
  border-radius: 5px;
  background: #fff;
  color: #8d3b00;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: default;
}

.pager span {
  color: #6b5c55;
  font-size: 13px;
  font-weight: 800;
}

select {
  min-width: 126px;
  height: 34px;
  border: 1px solid #bca99c;
  border-radius: 5px;
  padding: 0 10px;
  background: #fff;
  color: #1f2933;
  font: inherit;
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6d9d0;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: #432414;
  background: #f2e4da;
  font-weight: 800;
}

tbody tr:hover {
  background: #fff7f0;
}

.session-row {
  cursor: pointer;
}

.session-row.expanded {
  background: #fff7f0;
}

.session-detail-row:hover {
  background: transparent;
}

.session-detail-panel {
  display: grid;
  gap: 10px;
  padding: 4px 0 10px;
}

.highlight-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #eadbd1;
  border-radius: 5px;
  padding: 10px;
  background: #fffdfb;
}

.highlight-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.highlight-head > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.highlight-head strong {
  color: #432414;
  font-size: 14px;
}

.highlight-head span,
.highlight-empty,
.highlight-list span {
  color: #7b6559;
  font-size: 12px;
}

.highlight-button {
  border: 1px solid #b33100;
  border-radius: 5px;
  padding: 7px 12px;
  color: #fff;
  background: #b33100;
  font-weight: 800;
  cursor: pointer;
}

.highlight-button:disabled {
  opacity: 0.65;
  cursor: progress;
}

.highlight-empty {
  margin: 0;
}

.highlight-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
}

.highlight-list li {
  padding-left: 2px;
}

.highlight-list a {
  margin-right: 8px;
  color: #a33100;
  font-weight: 900;
  text-decoration: none;
}

.highlight-list a:hover {
  text-decoration: underline;
}

.identity {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: #4b5563;
  font-weight: 900;
  object-fit: cover;
}

.avatar.youtube {
  background: #c81e1e;
}

.avatar.twitch {
  background: #6d28d9;
}

.identity > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.identity a {
  color: #1f2933;
  text-decoration: none;
}

.identity a:hover {
  text-decoration: underline;
}

.identity strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-title {
  display: block;
  min-width: 0;
  color: #7b6559;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity span:not(.stream-title) {
  color: #7b6559;
  font-size: 12px;
}

.session-cell {
  display: grid;
  grid-template-columns: 96px minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
}

.mobile-record-avatar,
.mobile-session-meta,
.mobile-session-score,
.session-detail-thumb {
  display: none;
}

.session-detail-stats {
  display: grid;
  gap: 8px;
}

.record-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.record-head {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.record-streamer {
  width: fit-content;
  max-width: 100%;
  color: #7b6559;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-chat-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-main-title {
  display: block;
  color: #101820;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-streamer:hover {
  text-decoration: underline;
}

.thumb-link,
.thumb-placeholder {
  display: block;
  width: 96px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #ead6c8;
}

.thumb-link.large,
.thumb-placeholder.large {
  width: 100%;
  border-radius: 0;
}

.thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.platform-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
}

.platform-metric {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  gap: 6px;
  align-items: center;
}

.platform-metric strong {
  font-size: 16px;
}

.platform-metric span {
  color: #7b6559;
  font-size: 12px;
}

.platform-only {
  display: inline-grid;
  place-items: center;
}

.live-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 14px;
}

.live-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e6d9d0;
  border-radius: 0;
  background: #fff;
}

.live-card + .live-card {
  border-top: 0;
}

.live-card:first-child {
  border-radius: 6px 6px 0 0;
}

.live-card:last-child {
  border-radius: 0 0 6px 6px;
}

.live-card:only-child {
  border-radius: 6px;
}

.live-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px 18px;
  align-items: center;
  padding: 12px 14px;
}

.live-rank-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.live-headline {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.live-headline .identity {
  flex: 0 1 auto;
}

.live-title-link {
  display: block;
  color: #101820;
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: #6b5c55;
  font-size: 13px;
}

.category-pill {
  max-width: 220px;
  overflow: hidden;
  border: 1px solid #e0c7b7;
  border-radius: 4px;
  padding: 2px 7px;
  color: #7b2b00;
  background: #fff3eb;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restriction-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b33100;
  border-radius: 4px;
  padding: 2px 7px;
  color: #fff;
  background: #b33100;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.viewer-score {
  display: grid;
  justify-items: end;
  gap: 1px;
  border: 0;
  border-left: 1px solid #eadbd1;
  padding: 8px 2px 8px 16px;
  color: #a33100;
  background: transparent;
  cursor: pointer;
  text-align: right;
}

.viewer-score.restricted strong {
  color: #8b2f00;
  font-size: clamp(26px, 3.6vw, 40px);
}

.viewer-score span {
  color: #6b5c55;
  font-size: 12px;
  font-weight: 700;
}

.viewer-score strong {
  color: #b33100;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.viewer-score small {
  color: #a33100;
  font-size: 14px;
  font-weight: 800;
}

.live-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #eadbd1;
}

.live-detail[hidden] {
  display: none;
}

.restricted-panel {
  border: 1px solid #eadbd1;
  border-radius: 5px;
  padding: 14px;
  color: #7b2b00;
  background: #fff3eb;
  font-weight: 800;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  min-width: 310px;
}

.live-stats.session-chat-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-stats div {
  padding: 10px;
  border: 1px solid #eadbd1;
  border-radius: 5px;
  background: #fff8f3;
}

.live-stats dt {
  color: #7b6559;
  font-size: 12px;
  font-weight: 700;
}

.live-stats dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.mini-chart {
  min-height: 260px;
  border: 1px solid #eadbd1;
  border-radius: 5px;
  background: #fffdfb;
}

.mini-chart svg {
  display: block;
  width: 100%;
  height: 260px;
}

.mini-chart text {
  fill: #7b6559;
  font-size: 12px;
  font-weight: 700;
}

.chart-heading {
  fill: #432414;
  font-size: 14px;
  font-style: italic;
  font-weight: 800;
}

.chart-axis,
.chart-tick {
  fill: none;
  stroke: #d8c8bd;
  stroke-width: 1.4;
}

.chart-guide {
  fill: none;
  stroke: #eadbd1;
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.chart-y-label,
.chart-y-value {
  fill: #a33100;
  font-size: 12px;
  font-weight: 900;
}

.chart-x-label {
  fill: #7b6559;
  font-size: 11px;
}

.chart-current {
  fill: #a33100;
  font-size: 12px;
  font-weight: 900;
}

.chart-category-line {
  fill: none;
  stroke: #b33100;
  stroke-dasharray: 2 4;
  stroke-width: 1.2;
}

.chart-category-label {
  fill: #b33100;
  font-size: 12px;
  font-weight: 900;
}

.chart-raid-line {
  fill: none;
  stroke: #0d7c86;
  stroke-dasharray: 3 5;
  stroke-width: 1.4;
}

.chart-raid-label {
  fill: #0d7c86;
  font-size: 11px;
  font-weight: 900;
}

.chart-area {
  fill: rgba(179, 49, 0, 0.08);
}

.chart-line {
  fill: none;
  stroke: #b33100;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point {
  fill: #b33100;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: #7b6559;
}

.back-link {
  color: #7b2b00;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.streamer-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px;
}

.streamer-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  padding: 10px;
}

.streamer-list-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  border: 1px solid #e0d2c9;
  border-radius: 5px;
  padding: 10px;
  color: #1f2933;
  background: #fffdfb;
  text-decoration: none;
}

.streamer-list-card:hover {
  border-color: #c99575;
  background: #fff7f0;
}

.streamer-list-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.streamer-list-head .avatar {
  width: 42px;
  height: 42px;
}

.streamer-list-head strong {
  overflow: hidden;
  font-size: 19px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streamer-list-platforms {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
}

.streamer-list-platforms .platform-icon {
  width: 22px;
  height: 22px;
}

.streamer-list-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.streamer-list-stats div {
  min-width: 0;
}

.streamer-list-stats dt {
  color: #7b6559;
  font-size: 12px;
  font-weight: 700;
}

.streamer-list-stats dd {
  margin: 2px 0 0;
  color: #432414;
  font-size: 17px;
  font-weight: 900;
  text-align: right;
}

.my9-layout {
  display: grid;
  grid-template-columns: minmax(320px, 464px) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.my9-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid #dfe6ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(94, 44, 16, 0.1);
}

.my9-slot {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid #e5cfc1;
  border-radius: 6px;
  padding: 0;
  background: #fff8f3;
  cursor: pointer;
}

.my9-slot img,
.my9-picker-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my9-slot-number,
.my9-empty {
  position: absolute;
  top: 6px;
  left: 7px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.my9-empty {
  position: static;
  display: grid;
  gap: 3px;
  place-items: center;
  height: 100%;
  border: 1px dashed #d7b9a7;
  color: #b43b00;
  font-size: 28px;
  text-shadow: none;
}

.my9-empty small {
  color: #c8b5a9;
  font-size: 10px;
  letter-spacing: 0;
}

.my9-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: #b43b00;
  font-size: 42px;
  font-weight: 900;
}

.my9-slot strong {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  padding: 30px 8px 8px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  font-size: 14px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my9-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: rgba(97, 75, 64, 0.72);
  font-size: 18px;
  font-weight: 900;
}

.my9-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.my9-guide {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0 4px;
}

.my9-guide strong,
.my9-guide span {
  display: block;
}

.my9-guide strong {
  color: #2b1b13;
  font-size: 15px;
}

.my9-guide span {
  margin-top: 4px;
  color: #7b6559;
  font-size: 13px;
  line-height: 1.5;
}

.my9-progress {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #005e93;
  font-size: 14px;
  font-weight: 900;
}

.my9-progress::before {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.my9-progress span {
  position: relative;
  z-index: 1;
  margin-top: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1;
}

.my9-name-field {
  display: grid;
  gap: 6px;
  color: #6f584d;
  font-size: 13px;
  font-weight: 800;
}

.my9-name-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7b9a7;
  border-radius: 7px;
  padding: 10px 12px;
  color: #2b1b13;
  background: #fffdfb;
  font: inherit;
}

.my9-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.ghost-button,
.primary-button {
  border: 1px solid #d7b9a7;
  border-radius: 7px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
}

.ghost-button {
  color: #b43b00;
  background: #fff3f1;
}

.primary-button {
  color: #fff;
  background: #0b8fd8;
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.my9-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.my9-help {
  margin: 0;
  max-width: none;
  color: #7b6559;
  font-size: 13px;
  line-height: 1.55;
}

.my9-help span {
  display: block;
  white-space: nowrap;
}

.my9-picker-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #e5cfc1;
  border-radius: 7px;
  padding: 7px;
  color: #2b1b13;
  background: #fffdfb;
  cursor: pointer;
  text-align: left;
}

.my9-picker-card img,
.my9-picker-card .avatar {
  width: 42px;
  height: 56px;
  border-radius: 4px;
}

.my9-picker-card span:last-child {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my9-picker-card.selected {
  border-color: #b43b00;
  background: #fff3eb;
  box-shadow: inset 0 0 0 2px rgba(180, 59, 0, 0.16);
}

.my9-picker-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.my9-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 19, 12, 0.38);
}

.my9-modal[hidden] {
  display: none;
}

.my9-modal-panel {
  width: min(760px, 100%);
  max-height: min(720px, 86vh);
  overflow: hidden;
  border: 1px solid #e5cfc1;
  border-radius: 8px;
  background: #fffaf7;
  box-shadow: 0 24px 70px rgba(49, 24, 12, 0.24);
}

.my9-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5cfc1;
  background: #b43b00;
  color: #fff;
}

.my9-modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.my9-modal .my9-picker {
  max-height: calc(min(720px, 86vh) - 57px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

body.my9-modal-open {
  position: fixed;
  right: 0;
  left: 0;
  overflow: hidden;
  width: 100%;
}

.empty {
  padding: 26px 12px;
  color: #7b6559;
  text-align: center;
}

.empty-panel {
  grid-column: 1 / -1;
  padding: 34px 12px;
  color: #7b6559;
  text-align: center;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  color: #fff;
  background: #a93a00;
  font-weight: 800;
}

.daily-ranking-table {
  min-width: 1080px;
  table-layout: fixed;
}

.daily-ranking-table th,
.daily-ranking-table td {
  padding: 8px;
}

.daily-ranking-table th:nth-child(1),
.daily-ranking-table td:nth-child(1) {
  width: 54px;
}

.daily-ranking-table th:nth-child(2),
.daily-ranking-table td:nth-child(2) {
  width: 190px;
}

.daily-ranking-table th:nth-child(3),
.daily-ranking-table td:nth-child(3) {
  width: 62px;
  text-align: center;
}

.daily-ranking-table th:nth-child(4),
.daily-ranking-table td:nth-child(4),
.daily-ranking-table th:nth-child(5),
.daily-ranking-table td:nth-child(5) {
  width: 104px;
}

.daily-ranking-table th:nth-child(7),
.daily-ranking-table td:nth-child(7) {
  width: 126px;
}

.daily-ranking-row td {
  vertical-align: middle;
}

.ranking-person,
.ranking-stream {
  display: grid;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.ranking-person {
  grid-template-columns: 32px minmax(0, 1fr);
}

.ranking-stream {
  grid-template-columns: 84px minmax(0, 1fr);
}

.ranking-person .avatar {
  width: 32px;
  height: 32px;
}

.ranking-person strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-stream .thumb-link,
.ranking-stream .thumb-placeholder {
  width: 84px;
}

.ranking-metric {
  display: grid;
  gap: 5px;
}

.ranking-metric strong {
  display: block;
  line-height: 1.1;
  text-align: right;
}

.ranking-metric.max strong {
  color: #b33100;
  font-size: 18px;
}

.ranking-metric.avg strong {
  color: #546371;
  font-size: 15px;
}

.ranking-bar {
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 1px;
  background: #efe5de;
}

.ranking-bar span {
  display: block;
  height: 100%;
}

.ranking-metric.max .ranking-bar span {
  background: #ff1638;
}

.ranking-metric.avg .ranking-bar span {
  background: #8795a1;
}

.daily-ranking-row td:last-child span {
  color: #7b6559;
  font-size: 12px;
}

.ranking-note {
  padding: 10px 14px 14px;
  color: #8a766b;
  font-size: 12px;
  text-align: right;
}

.mobile-ranking-card {
  display: none;
}

footer {
  width: min(1320px, calc(100% - 28px));
  margin: 16px auto 36px;
  color: #6b5c55;
  font-size: 13px;
  line-height: 1.7;
}

footer p + p {
  margin-top: 8px;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 6px;
  }

  nav {
    grid-column: 1 / -1;
    order: 2;
  }

  .brand {
    font-size: 16px;
  }

  nav a {
    min-height: 38px;
    padding: 5px 7px;
    font-size: 12px;
  }

  nav a.my9-nav {
    min-width: 54px;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 10px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .my9-layout {
    grid-template-columns: 1fr;
  }

  .live-body {
    grid-template-columns: 1fr;
  }

  .viewer-score {
    justify-items: start;
    border-left: 0;
    border-top: 1px solid #eadbd1;
    padding: 10px 0 0;
    text-align: left;
  }

  .live-stats {
    min-width: 0;
  }

  .streamer-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  footer {
    width: 100%;
  }

  .section-block,
  .ad-slot {
    margin-left: 10px;
    margin-right: 10px;
  }

  .section-title {
    gap: 6px;
    min-height: 0;
    padding: 12px 14px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .section-title span {
    font-size: 14px;
  }

  #rankings .section-title h2 {
    font-size: 16px;
    line-height: 1.25;
    white-space: nowrap;
  }

  #rankings .ranking-controls {
    width: 100%;
    justify-content: space-between;
  }

  #rankings #dailyRankingRange {
    font-size: 11px;
  }

  #rankings .ranking-calendar {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    width: min(326px, calc(100vw - 28px));
    transform: translate(-50%, -50%);
  }

  #rankings .table-wrap {
    overflow: visible;
  }

  #rankings table,
  #rankings tbody,
  #rankings tr,
  #rankings td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #rankings thead {
    display: none;
  }

  #rankings tbody {
    padding: 10px;
  }

  #rankings td {
    border: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
  }

  #rankings .daily-ranking-row {
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #e6d9d0;
    border-radius: 6px;
    background: #fff;
  }

  #rankings .daily-ranking-row > td:not(:nth-child(2)) {
    display: none;
  }

  #rankings .ranking-person {
    display: none;
  }

  #rankings .mobile-ranking-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(176px, 48%);
    gap: 5px 8px;
    align-items: center;
    padding: 8px 9px;
  }

  #rankings .mobile-ranking-head {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    gap: 5px;
    align-items: center;
    min-width: 0;
  }

  #rankings .mobile-ranking-head .rank-badge {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  #rankings .mobile-ranking-head .avatar {
    width: 28px;
    height: 28px;
  }

  #rankings .mobile-ranking-head .platform-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }

  #rankings .mobile-ranking-category {
    min-width: 0;
    overflow: hidden;
    color: #1f2933;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #rankings .mobile-ranking-card > strong {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    color: #1f2933;
    font-size: 16px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #rankings .mobile-ranking-metrics {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  #rankings .ranking-metric {
    gap: 3px;
    border: 1px solid #eadbd1;
    border-radius: 5px;
    padding: 5px 7px;
    background: #fff8f3;
  }

  #rankings .ranking-metric::before {
    color: #7b6559;
    font-size: 10px;
    font-weight: 800;
  }

  #rankings .ranking-metric.max::before {
    content: "最大同接";
  }

  #rankings .ranking-metric.avg::before {
    content: "平均同接";
  }

  #rankings .ranking-metric strong {
    text-align: left;
  }

  #rankings .ranking-metric.max strong,
  #rankings .ranking-metric.avg strong {
    font-size: 15px;
  }

  #rankings .ranking-bar {
    height: 8px;
  }

  #rankings .ranking-detail-row {
    display: block;
    margin: -8px 0 8px;
    border: 1px solid #e6d9d0;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: #fff;
  }

  #rankings .ranking-detail-row > td {
    display: block;
  }

  #rankings .ranking-detail-panel {
    display: grid;
    grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
    gap: 8px;
    padding: 0 8px 10px;
  }

  #rankings .session-detail-thumb {
    display: block;
    overflow: hidden;
    border-radius: 5px;
  }

  #rankings .session-detail-thumb .thumb-link.large,
  #rankings .session-detail-thumb .thumb-placeholder.large {
    display: block;
    width: 100%;
    border-radius: 5px;
  }

  #rankings .ranking-detail-text {
    display: grid;
    gap: 6px;
    align-content: start;
  }

  #rankings .ranking-detail-text .record-main-title {
    display: -webkit-box;
    font-size: 13px;
    line-height: 1.32;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  #rankings .ranking-note {
    padding: 8px 10px 12px;
    font-size: 10px;
    text-align: left;
  }

  .live-grid {
    padding: 10px;
  }

  #sessions .table-wrap {
    overflow: visible;
  }

  #sessions table,
  #sessions tbody,
  #sessions tr,
  #sessions td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #sessions thead {
    display: none;
  }

  #sessions tbody {
    padding: 10px;
  }

  #sessions td {
    border: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
  }

  #sessions .session-row {
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #e6d9d0;
    border-radius: 6px;
    background: #fff;
  }

  #sessions .session-row > td:not(:first-child) {
    display: none;
  }

  #sessions .session-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 9px;
    align-items: center;
    padding: 9px 10px;
  }

  #sessions .session-cell > .thumb-link,
  #sessions .session-cell > .thumb-placeholder {
    display: none;
  }

  #sessions .record-title {
    grid-column: 1;
    gap: 4px;
  }

  #sessions .record-head {
    gap: 6px;
  }

  #sessions .mobile-record-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
  }

  #sessions .record-streamer {
    color: #1f2933;
    font-size: 15px;
    line-height: 1.2;
  }

  #sessions .record-main-title {
    display: -webkit-box;
    font-size: 13px;
    line-height: 1.32;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #sessions .mobile-session-meta {
    display: flex;
    grid-column: 1;
    flex-wrap: wrap;
    gap: 4px 7px;
    align-items: center;
    color: #6b5c55;
    font-size: 11px;
  }

  #sessions .mobile-session-meta .platform-icon {
    width: 18px;
    height: 18px;
  }

  #sessions .mobile-session-score {
    display: grid;
    grid-template-columns: auto auto;
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-content: flex-end;
    align-content: center;
    align-items: baseline;
    gap: 1px;
    min-width: 72px;
    border-left: 1px solid #eadbd1;
    padding-left: 9px;
    color: #b33100;
    text-align: right;
  }

  #sessions .mobile-session-score > span {
    grid-column: 1 / -1;
    color: #8a766b;
    font-size: 10px;
    font-weight: 800;
  }

  #sessions .mobile-session-score strong {
    font-size: 24px;
    line-height: 1;
  }

  #sessions .mobile-session-score small {
    margin-left: 2px;
    font-size: 11px;
    font-weight: 900;
  }

  #sessions .category-pill,
  #sessions .restriction-badge {
    max-width: 92px;
    padding: 1px 5px;
    font-size: 10px;
  }

  #sessions .session-detail-row {
    display: block;
    margin: -8px 0 8px;
    border: 1px solid #e6d9d0;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: #fff;
  }

  #sessions .session-detail-row > td {
    display: block;
  }

  #sessions .session-detail-panel {
    grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
    gap: 6px 8px;
    padding: 0 8px 10px;
  }

  #sessions .session-detail-thumb {
    display: block;
    grid-column: 1;
    overflow: hidden;
    border-radius: 5px;
  }

  #sessions .session-detail-thumb .thumb-link.large,
  #sessions .session-detail-thumb .thumb-placeholder.large {
    display: block;
    width: 100%;
    border-radius: 5px;
  }

  #sessions .session-detail-stats {
    display: grid;
    grid-column: 2;
    gap: 4px;
  }

  #sessions .session-viewer-stats,
  #sessions .session-chat-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    min-width: 0;
  }

  #sessions .session-viewer-stats div:nth-child(3) {
    grid-column: 1 / -1;
  }

  #sessions .session-viewer-stats div,
  #sessions .session-chat-stats div {
    padding: 5px 7px;
  }

  #sessions .session-viewer-stats dt,
  #sessions .session-chat-stats dt {
    font-size: 10px;
  }

  #sessions .session-viewer-stats dd,
  #sessions .session-chat-stats dd {
    margin-top: 1px;
    font-size: 14px;
  }

  #sessions .highlight-panel {
    grid-column: 1 / -1;
    padding: 8px;
  }

  #sessions .highlight-head {
    align-items: flex-start;
  }

  #sessions .highlight-list {
    gap: 4px;
    padding-left: 20px;
  }

  #sessions .mini-chart {
    grid-column: 1 / -1;
  }

  .live-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .live-card + .live-card {
    margin-top: 8px;
    border-top: 1px solid #e6d9d0;
  }

  .live-card,
  .live-card:first-child,
  .live-card:last-child {
    border-radius: 6px;
  }

  .live-card > .thumb-link.large,
  .live-card > .thumb-placeholder.large {
    display: none;
  }

  .live-card .live-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    align-content: center;
    padding: 8px 10px;
  }

  .live-card .live-rank-main {
    gap: 3px;
  }

  .live-card .live-headline {
    gap: 6px;
  }

  .live-card .identity {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
  }

  .live-card .identity .avatar {
    width: 28px;
    height: 28px;
  }

  .live-card .identity strong {
    font-size: 15px;
    line-height: 1.2;
  }

  .live-card .live-title-link {
    display: -webkit-box;
    font-size: 13px;
    line-height: 1.28;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .live-card .live-submeta {
    gap: 4px 7px;
    font-size: 11px;
  }

  .live-card .live-submeta .platform-icon {
    width: 18px;
    height: 18px;
  }

  .live-card .category-pill,
  .live-card .restriction-badge {
    max-width: 86px;
    padding: 1px 5px;
    font-size: 10px;
  }

  .live-card .viewer-score {
    display: grid;
    grid-template-columns: auto auto;
    align-self: center;
    align-content: center;
    align-items: baseline;
    justify-content: end;
    min-width: 72px;
    border-top: 0;
    border-left: 1px solid #eadbd1;
    padding: 2px 0 2px 8px;
    text-align: right;
  }

  .live-card .viewer-score span {
    display: block;
    grid-column: 1 / -1;
    margin-right: 0;
    color: #8a766b;
    font-size: 10px;
    font-weight: 800;
  }

  .live-card .viewer-score strong {
    font-size: 24px;
  }

  .live-card .viewer-score small {
    margin-left: 2px;
    font-size: 11px;
    font-weight: 900;
  }

  .live-card:not(.expanded) .thumb-link.large,
  .live-card:not(.expanded) .thumb-placeholder.large {
    display: none;
  }

  .live-card:not(.expanded) .live-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    align-content: center;
    padding: 8px 10px;
  }

  .live-card:not(.expanded) .live-rank-main {
    gap: 3px;
  }

  .live-card:not(.expanded) .identity {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
  }

  .live-card:not(.expanded) .identity .avatar {
    width: 28px;
    height: 28px;
  }

  .live-card:not(.expanded) .identity strong {
    font-size: 15px;
    line-height: 1.2;
  }

  .live-card:not(.expanded) .live-title-link {
    display: -webkit-box;
    font-size: 13px;
    line-height: 1.28;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .live-card:not(.expanded) .live-submeta {
    gap: 4px 7px;
    font-size: 11px;
  }

  .live-card:not(.expanded) .live-submeta .platform-icon {
    width: 18px;
    height: 18px;
  }

  .live-card:not(.expanded) .category-pill,
  .live-card:not(.expanded) .restriction-badge {
    max-width: 86px;
    padding: 1px 5px;
    font-size: 10px;
  }

  .live-card:not(.expanded) .viewer-score {
    display: grid;
    grid-template-columns: auto auto;
    align-self: center;
    align-content: center;
    align-items: baseline;
    justify-content: end;
    min-width: 72px;
    border-top: 0;
    border-left: 1px solid #eadbd1;
    padding: 2px 0 2px 8px;
    text-align: right;
  }

  .live-card:not(.expanded) .viewer-score span {
    display: block;
    grid-column: 1 / -1;
    color: #8a766b;
    font-size: 10px;
    font-weight: 800;
  }

  .live-card:not(.expanded) .viewer-score strong {
    font-size: 24px;
  }

  .live-card:not(.expanded) .viewer-score small {
    margin-left: 2px;
    font-size: 11px;
    font-weight: 900;
  }

  .live-card.expanded {
    grid-template-columns: 1fr;
  }

  .live-card.expanded > .thumb-link.large,
  .live-card.expanded > .thumb-placeholder.large {
    display: none;
  }

  .live-card.expanded .live-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    align-content: center;
    padding: 8px 10px 10px;
  }

  .live-card.expanded .live-title-link {
    display: -webkit-box;
    font-size: 13px;
    line-height: 1.28;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .live-card.expanded .viewer-score {
    display: grid;
    grid-template-columns: auto auto;
    align-self: center;
    align-content: center;
    align-items: baseline;
    justify-content: end;
    min-width: 72px;
    border-top: 0;
    border-left: 1px solid #eadbd1;
    padding: 2px 0 2px 8px;
    text-align: right;
  }

  .live-card.expanded .viewer-score span {
    display: block;
    grid-column: 1 / -1;
    margin-right: 0;
    color: #8a766b;
    font-size: 10px;
    font-weight: 800;
  }

  .live-card.expanded .viewer-score strong {
    font-size: 24px;
  }

  .live-card.expanded .viewer-score small {
    margin-left: 2px;
    font-size: 11px;
    font-weight: 900;
  }

  .live-detail {
    grid-column: 1 / -1;
    grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
    gap: 6px;
    padding-top: 6px;
  }

  .live-detail .session-detail-thumb {
    display: block;
    grid-column: 1;
    overflow: hidden;
    border-radius: 5px;
  }

  .live-detail .session-detail-thumb .thumb-link.large,
  .live-detail .session-detail-thumb .thumb-placeholder.large {
    display: block;
    width: 100%;
    border-radius: 5px;
  }

  .live-detail .session-detail-stats {
    display: grid;
    grid-column: 2;
    gap: 4px;
  }

  .live-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    min-width: 0;
  }

  .live-stats div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .live-stats div {
    padding: 6px 7px;
  }

  .live-stats dt {
    font-size: 10px;
  }

  .live-stats dd {
    margin-top: 2px;
    font-size: 16px;
  }

  .mini-chart {
    grid-column: 1 / -1;
    min-height: 0;
    overflow: hidden;
  }

  .mini-chart svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 310px;
  }

  .mini-chart text {
    font-size: 18px;
  }

  .mini-chart .compact-chart .chart-heading {
    font-size: 17px;
  }

  .mini-chart .compact-chart .chart-y-label {
    font-size: 16px;
    paint-order: stroke;
    stroke: #fffdfb;
    stroke-width: 3px;
  }

  .mini-chart .compact-chart .chart-x-label,
  .mini-chart .compact-chart .chart-current {
    font-size: 16px;
  }

  .mini-chart .compact-chart .chart-category-label {
    font-size: 15px;
  }

  .mini-chart .compact-chart .chart-line {
    stroke-width: 4;
  }
}
