:root {
  --ink: #19202a;
  --muted: #6d7480;
  --line: #dfe4ea;
  --paper: #ffffff;
  --wash: #f4f6f8;
  --primary: #b4202a;
  --primary-dark: #8f141c;
  --gold: #d79a2b;
  --blue: #1f71d6;
  --green: #168b56;
  --danger: #b9232e;
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--wash);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(25, 32, 42, 0.05);
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 50%;
  font-weight: 900;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 14px;
}

.nav a:hover {
  color: var(--primary);
  background: #fff1f2;
}

.page {
  padding: 22px 0 44px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #f0c7cb;
  border-radius: var(--radius);
  background: #fff7f7;
  color: var(--primary-dark);
}

.notice strong {
  padding: 4px 8px;
  border-radius: 5px;
  color: #ffffff;
  background: var(--primary);
  font-size: 13px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.draw-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(25, 32, 42, 0.06);
}

.draw-card {
  padding: 18px;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.draw-head h2,
.section-title h1,
.section-title h2 {
  font-size: 20px;
  line-height: 1.25;
}

.draw-head p,
.section-title p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.mini-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary);
  font-size: 13px;
  white-space: nowrap;
}

.balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.balls.compact {
  margin: 0;
  gap: 5px;
}

.ball {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.compact .ball {
  width: 31px;
  height: 31px;
  font-size: 12px;
}

.ball-red,
.ball-front {
  background: var(--primary);
}

.ball-blue,
.ball-back {
  background: var(--blue);
}

.ball-green {
  background: var(--green);
}

.ball-special {
  outline: 3px solid rgba(215, 154, 43, 0.45);
}

.number-tile {
  width: 58px;
  min-height: 72px;
  display: inline-grid;
  grid-template-rows: 34px auto auto;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(25, 32, 42, 0.06);
}

.number-tile strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-top: 6px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.number-tile span {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
}

.number-tile em {
  width: 100%;
  margin-top: 4px;
  padding: 3px 0;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.tile-red strong,
.tile-red em {
  background: var(--primary);
}

.tile-blue strong,
.tile-blue em {
  background: var(--blue);
}

.tile-green strong,
.tile-green em {
  background: var(--green);
}

.tile-special {
  border-color: rgba(215, 154, 43, 0.8);
  box-shadow: 0 0 0 3px rgba(215, 154, 43, 0.18);
}

.special-tag {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  background: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.balls.compact .number-tile {
  width: 48px;
  min-height: 62px;
  grid-template-rows: 28px auto auto;
}

.balls.compact .number-tile strong {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.balls.compact .number-tile span {
  font-size: 12px;
}

.balls.compact .number-tile em {
  font-size: 10px;
}

.balls.compact .special-tag {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.plus {
  color: var(--gold);
  font-weight: 900;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.meta-grid div {
  padding: 10px;
  border-radius: 6px;
  background: var(--wash);
}

.meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-grid dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 18px 0 12px;
  padding-bottom: 2px;
}

.tabs a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  white-space: nowrap;
}

.tabs a.is-active {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.tool-card,
.tool-summary {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.tool-card strong,
.tool-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.tool-card span,
.tool-summary span,
.tool-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.tool-card:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.year-file-grid {
  display: grid;
  gap: 14px;
}

.year-file-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.year-file-title {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.year-file-title a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.year-file-links {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.year-file-links a,
.year-file-card {
  display: grid;
  gap: 4px;
  min-height: 58px;
  align-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.year-file-card {
  min-height: 76px;
}

.year-file-links a:hover,
.year-file-card:hover {
  border-color: var(--primary);
}

.year-file-links span,
.year-file-card span,
.year-file-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.panel {
  padding: 18px;
  margin-top: 14px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title.tight {
  margin-bottom: 10px;
}

.control-grid,
.inline-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.inline-controls {
  min-width: min(100%, 380px);
  grid-template-columns: 1fr 120px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  background: #fafbfc;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tracker-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.track-item {
  display: grid;
  grid-template-columns: 86px 1fr 54px 220px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
  font-size: 13px;
}

.track-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.track-number b {
  color: var(--muted);
}

.track-item .ball,
.trend-table .ball,
.miss-item .ball {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.miss-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.miss-item {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.miss-item strong {
  color: var(--primary);
  font-size: 18px;
}

.miss-item span,
.zodiac-mini {
  color: var(--muted);
  font-size: 12px;
}

.trend-table {
  min-width: 980px;
}

.year-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--primary-dark);
  background: #fff7f7;
}

.year-summary strong {
  font-size: 20px;
}

.record-tools {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.tool-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 8px;
}

.tool-row strong {
  padding-top: 5px;
  color: var(--primary-dark);
  font-size: 13px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-list a,
.chip-list button {
  min-width: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.chip-list a.is-active,
.chip-list button.is-active {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
}

.year-chip-list {
  max-height: 68px;
  overflow-y: auto;
}

.filter-status {
  min-height: 18px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.record-table {
  min-width: 760px;
}

.record-table .issue-cell {
  width: 210px;
}

.issue-cell strong {
  margin-right: 6px;
  color: var(--primary-dark);
  font-size: 14px;
}

.lottery-mini {
  display: inline-flex;
  margin-right: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.issue-cell span {
  color: var(--muted);
  font-size: 12px;
}

.result-cell .balls.compact {
  margin: 0;
  gap: 4px;
}

.number-tile.is-dim {
  opacity: 0.32;
}

.number-tile.is-focus {
  box-shadow: 0 0 0 2px rgba(215, 154, 43, 0.48);
}

.record-table code {
  display: block;
  max-width: 430px;
  overflow-wrap: anywhere;
  color: #303846;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.quick-home {
  padding-top: 12px;
}

.compact-topbar {
  min-height: 56px;
}

.slim-notice {
  min-height: 0;
  padding: 9px 12px;
  display: block;
  white-space: normal;
}

.slim-notice strong {
  padding: 2px 6px;
}

.slim-notice a {
  color: var(--primary);
  font-weight: 900;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.quick-links a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: #ffffff;
  background: var(--primary);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.latest-lite {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.lite-draw-card {
  padding: 12px;
}

.lite-draw-card .draw-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 26px;
  line-height: 1.1;
}

.lite-draw-card .title-link {
  min-height: 28px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 28px;
}

.lite-draw-card .draw-head p {
  font-size: 16px;
  font-weight: 400;
}

.lite-draw-card .draw-head p strong {
  font-weight: 900;
}

.lite-draw-card .draw-head p span {
  font-weight: 400;
}

.lite-draw-card .balls.compact {
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 3px;
}

.lite-draw-card .balls.compact .number-tile {
  width: 78px;
  min-height: 94px;
  grid-template-rows: 50px auto auto;
}

.lite-draw-card .balls.compact .number-tile strong {
  width: 50px;
  height: 50px;
  font-size: 24px;
}

.lite-draw-card .balls.compact .number-tile span {
  font-size: 17px;
}

.lite-draw-card .balls.compact .number-tile em {
  font-size: 13px;
}

.lite-draw-card .balls.compact .special-tag {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

.lite-panel {
  padding: 12px;
}

.lite-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  margin-bottom: 10px;
}

.stats-thanks {
  margin: 10px 0;
  text-align: center;
}

.stats-thanks span {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.slim-notice a.nav-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 900;
  white-space: nowrap;
}

.lite-controls label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.lite-controls label span {
  flex: 0 0 auto;
}

.lite-controls select,
.lite-controls input {
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
}

.lite-miss-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.lite-miss-item {
  padding: 7px 3px;
}

.lite-miss-item strong {
  font-size: 16px;
}

.lite-miss-item .ball {
  color: #ffffff;
}

.lite-stats {
  display: block;
}

.lite-stat-card {
  margin-top: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.compact-footer {
  padding: 14px 0;
}

body[data-page="year"] {
  max-width: 720px;
  margin: 0 auto;
  color: #000000;
  background: #e7e7e7;
  font-size: 12px;
}

body[data-page="year"] .wrap {
  width: 100%;
  max-width: 720px;
}

body[data-page="year"] .page {
  padding: 0;
}

body[data-page="year"] .year-top {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 720px;
  height: 44px;
  background: #0000ff;
  border: 0;
  box-shadow: none;
}

.year-head {
  position: relative;
  height: 44px;
  line-height: 44px;
  text-align: center;
  color: #ffffff;
}

.year-logo {
  width: 143px;
  height: 44px;
  display: inline-block;
  background: url("ref-logo.png") no-repeat center;
  background-size: 143px auto;
  vertical-align: top;
}

.year-back,
.year-home {
  position: absolute;
  top: 0;
  height: 40px;
  overflow: hidden;
}

.year-back {
  left: 10px;
  width: auto;
  color: #f0f8ff;
  font-size: 13px;
  line-height: 44px;
  text-indent: 0;
}

.year-home {
  width: 36px;
  right: 8px;
  background-image: url("ref-menuicon.png");
  background-repeat: no-repeat;
  background-size: 36px auto;
  background-position: 0 -56px;
  text-indent: -999px;
}

.nullbox44 {
  height: 44px;
}

body[data-page="year"] .panel {
  margin: 4px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="year"] .section-title,
body[data-page="year"] .year-summary,
body[data-page="year"] .footer {
  display: none;
}

body[data-page="year"] .record-tools {
  gap: 0;
  margin: 0;
  padding: 4px 4px 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

body[data-page="year"] .tool-row {
  display: grid;
  grid-template-columns: 10% 90%;
  gap: 0;
  align-items: start;
  min-height: 34px;
  padding-bottom: 8px;
  line-height: 26px;
  text-align: left;
  background: #ffffcc;
}

body[data-page="year"] .tool-row strong {
  padding: 0;
  color: #ff0000;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
}

body[data-page="year"] .chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: flex-start;
}

body[data-page="year"] .chip-list a,
body[data-page="year"] .chip-list button {
  width: 35px;
  min-width: 35px;
  min-height: 28px;
  height: 28px;
  margin: 2px 5px;
  padding: 0;
  border: 1px solid #cccccc;
  border-radius: 3px;
  color: #000000;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  line-height: 26px;
}

body[data-page="year"] .switch-row .chip-list a,
body[data-page="year"] .switch-row .chip-list button {
  width: 60px;
  min-width: 60px;
  margin: 2px 5px;
}

body[data-page="year"] [data-zodiac-filter] button {
  font-weight: 800;
}

body[data-page="year"] [data-position-filter] button {
  width: 32px;
  min-width: 32px;
  margin: 2px 3px;
}

body[data-page="year"] .chip-list a.is-active,
body[data-page="year"] .chip-list button.is-active {
  border-color: #ec6337;
  color: #ffffff;
  background: #ec6337;
}

body[data-page="year"] .switch-row .chip-list a.is-active,
body[data-page="year"] .switch-row .chip-list button.is-active {
  border-color: #0000ff;
  color: #ffffff;
  background: #0000ff;
}

body[data-page="year"] .chip-list button[data-position=""],
body[data-page="year"] .chip-list button[data-zodiac=""] {
  border-color: #41b45f;
  color: #ffffff;
  background: #41b45f;
}

body[data-page="year"] .year-row {
  display: block;
  min-height: 36px;
  padding: 5px 0;
  background: #e7e7e7;
}

body[data-page="year"] .year-row strong {
  display: none;
}

body[data-page="year"] .year-chip-list {
  display: flex;
  flex-wrap: wrap;
  max-height: 72px;
  overflow-y: auto;
}

body[data-page="year"] .year-chip-list a {
  width: calc(16.66% - 4px);
  min-width: 0;
  height: 30px;
  min-height: 30px;
  margin: 2px;
  padding: 0;
  border: 1px solid #ffffff;
  border-radius: 6px;
  color: #ffffff;
  background: #fe9f01;
  line-height: 28px;
}

body[data-page="year"] .year-chip-list a.is-active {
  border-color: #ffffff;
  color: #333333;
  background: #ffffff;
  font-weight: 800;
}

body[data-page="year"] .filter-status {
  min-height: 0;
  padding: 0 6px 4px;
  background: #ffffcc;
  color: #999999;
  font-size: 12px;
}

body[data-page="year"] .table-wrap {
  overflow: visible;
}

body[data-page="year"] .record-table,
body[data-page="year"] .record-table tbody,
body[data-page="year"] .record-table tr,
body[data-page="year"] .record-table td {
  display: block;
  width: 100%;
  min-width: 0;
}

body[data-page="year"] .record-table thead {
  display: none;
}

body[data-page="year"] .record-table tr {
  margin: 3px 0;
  padding: 0 0 3px;
  border: 0;
  border-radius: 0;
  background: #fafafa;
  overflow: hidden;
}

body[data-page="year"] .record-table td {
  padding: 0;
  border: 0;
}

body[data-page="year"] .record-table td::before {
  display: none;
}

body[data-page="year"] .record-table .issue-cell {
  width: auto;
  height: 22px;
  padding-left: 6px;
  color: #666666;
  font-size: 13px;
  line-height: 22px;
}

body[data-page="year"] .issue-cell strong {
  margin-right: 0;
  color: #000000;
  font-size: 14px;
}

body[data-page="year"] .issue-cell span {
  margin-left: 2px;
  color: #666666;
  font-size: 13px;
}

body[data-page="year"] .result-cell .balls.compact {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  margin: 0;
}

body[data-page="year"] .record-table .balls.compact .number-tile,
body[data-page="year"] .balls.compact .number-tile {
  width: 13%;
  min-height: 0;
  display: block;
  flex: 0 0 13%;
  padding: 0 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="year"] .record-table .balls.compact .number-tile strong,
body[data-page="year"] .balls.compact .number-tile strong {
  width: 100%;
  height: 24px;
  margin: 0;
  border-radius: 2px 2px 0 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 24px;
  box-shadow: none;
}

body[data-page="year"] .record-table .balls.compact .number-tile span,
body[data-page="year"] .balls.compact .number-tile span {
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
  border: 1px solid #e3e3e3;
  border-top: 0;
  border-radius: 0 0 2px 2px;
  color: #333333;
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
}

body[data-page="year"] .record-table .balls.compact .number-tile em,
body[data-page="year"] .balls.compact .number-tile em {
  display: none;
}

body[data-page="year"] .tile-red strong {
  background: #ff0000;
}

body[data-page="year"] .tile-blue strong {
  background: #0000ff;
}

body[data-page="year"] .tile-green strong {
  background: #008000;
}

body[data-page="year"] .record-table .balls.compact .special-tag,
body[data-page="year"] .balls.compact .special-tag {
  width: 9%;
  height: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 9%;
  border-radius: 0;
  color: #000000;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.stat-card h3 {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.scope-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.scope-switch {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
}

.scope-switch button {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.scope-switch button.is-active {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.rank-list span {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
}

.rank-list em {
  font-style: normal;
  font-size: 11px;
  opacity: 0.8;
}

.rank-list.muted span {
  background: #586274;
}

.rank-list.warn span {
  color: var(--ink);
  background: #f4d28a;
}

.footer {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
  font-size: 14px;
}

.login-card {
  max-width: 460px;
  margin: 34px auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
button,
.button {
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

input:focus,
select:focus {
  outline: 2px solid rgba(180, 32, 42, 0.18);
  border-color: var(--primary);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0 16px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
}

button.danger {
  background: var(--danger);
}

.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.actions form {
  margin: 0;
}

.alert {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  font-weight: 700;
}

.alert.ok {
  color: #0f5f3f;
  background: #e7f7ef;
}

.alert.error {
  color: #8f141c;
  background: #fff1f2;
}

.empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-grid,
  .stats-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .draw-card {
    padding: 16px;
  }

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

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

  .tracker-result {
    grid-template-columns: 1fr;
  }

  .miss-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .year-file-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 12px, 1180px);
  }

  .topbar-inner {
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
  }

  .nav {
    margin: 0 -10px;
    padding: 0 10px;
  }

  .notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .notice.slim-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 4px;
  }

  .notice.slim-notice strong {
    margin-top: 1px;
    white-space: nowrap;
  }

  .draw-head h2,
  .section-title h1,
  .section-title h2 {
    font-size: 18px;
  }

  .ball {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .section-title {
    flex-direction: column;
    gap: 4px;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: #ffffff;
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    border-bottom: 1px solid var(--line);
  }

  .record-table {
    min-width: 0;
  }

  .record-tools {
    gap: 7px;
    padding: 8px;
  }

  .tool-row {
    grid-template-columns: 36px 1fr;
    gap: 6px;
  }

  .tool-row strong {
    padding-top: 4px;
    font-size: 12px;
  }

  .chip-list {
    gap: 4px;
  }

  .chip-list a,
  .chip-list button {
    min-height: 24px;
    padding: 0 7px;
    border-radius: 4px;
    font-size: 11px;
  }

  .year-chip-list {
    max-height: 58px;
  }

  .record-table tr {
    padding: 7px 5px;
  }

  .record-table td {
    display: block;
    padding: 0;
    border-bottom: 0;
  }

  .record-table td::before {
    display: none;
  }

  .record-table .issue-cell {
    width: auto;
    padding-bottom: 5px;
    line-height: 1.25;
  }

  .issue-cell strong {
    margin-right: 3px;
    font-size: 15px;
  }

  .lottery-mini {
    margin-right: 4px;
    font-size: 12px;
  }

  .issue-cell span {
    font-size: 12px;
  }

  .result-cell .balls.compact {
    gap: 2px;
    flex-wrap: nowrap;
  }

  .record-table .balls.compact .number-tile {
    width: 38px;
    min-height: 42px;
    grid-template-rows: 24px auto;
  }

  .record-table .balls.compact .number-tile strong {
    width: 24px;
    height: 24px;
    margin-top: 3px;
    font-size: 12px;
  }

  .record-table .balls.compact .number-tile span {
    margin-top: 2px;
    line-height: 1.1;
    font-size: 11px;
  }

  .record-table .balls.compact .number-tile em {
    display: none;
  }

  .record-table .balls.compact .special-tag {
    width: 16px;
    height: 16px;
    font-size: 9px;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
  }

  td:last-child {
    border-bottom: 0;
  }

  .form-grid,
  .form-grid.single,
  .control-grid,
  .inline-controls {
    grid-template-columns: 1fr;
  }

  .track-item {
    grid-template-columns: 72px 1fr;
  }

  .actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-links {
    grid-template-columns: 1fr 1fr;
  }

  .quick-links a {
    min-height: 38px;
    font-size: 13px;
  }

  .lite-draw-card {
    padding: 10px;
  }

  .lite-draw-card .draw-head {
    gap: 6px;
  }

  .lite-draw-card .draw-head h2 {
    font-size: 24px;
    line-height: 1.08;
  }

  .lite-draw-card .draw-head p {
    font-size: 15px;
    font-weight: 400;
  }

  .lite-draw-card .balls.compact {
    overflow-x: visible;
    flex-wrap: wrap;
    padding-bottom: 2px;
  }

  .lite-draw-card .balls.compact .number-tile {
    width: 54px;
    min-height: 66px;
    grid-template-rows: 38px auto;
  }

  .lite-draw-card .balls.compact .number-tile strong {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .lite-draw-card .balls.compact .number-tile span {
    font-size: 14px;
  }

  .lite-draw-card .balls.compact .number-tile em {
    display: none;
  }

  .lite-draw-card .balls.compact .special-tag {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .lite-controls {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 6px;
  }

  .lite-controls label {
    gap: 4px;
    font-size: 12px;
  }

  .lite-controls select,
  .lite-controls input {
    min-height: 34px;
    padding: 0 5px;
    font-size: 12px;
  }

  .lite-miss-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .rank-list {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .year-file-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .draw-head {
    flex-direction: column;
  }

  .lite-draw-card .draw-head {
    flex-direction: row;
  }

  .record-table .balls.compact .number-tile {
    width: 36px;
  }

  .record-table .balls.compact .number-tile strong {
    width: 23px;
    height: 23px;
  }

  .record-table .balls.compact .number-tile span {
    font-size: 10px;
  }

  .lite-miss-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* codex lite controls nowrap 20260619 */
.lite-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 6px;
}

.lite-controls label {
  min-width: 0;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px;
  margin: 0;
  white-space: nowrap;
}

.lite-controls label span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.lite-controls select,
.lite-controls input {
  min-width: 0;
  min-height: 34px;
  padding: 0 5px;
  font-size: 12px;
}

.tool-entry,
.tool-hero,
.tool-group {
  padding: 12px;
}

.tool-entry {
  margin-top: 12px;
}

.tool-entry-links,
.tool-jump,
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tool-entry-links {
  margin-top: 10px;
}

.tool-entry-links a,
.tool-jump a,
.tool-grid a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.tool-entry-links a,
.tool-jump a {
  color: var(--primary);
  border-color: #f0c7cb;
  background: #fff7f7;
}

.tool-directory {
  display: grid;
  gap: 12px;
}

.tool-hero h1 {
  font-size: 22px;
}

.tool-hero p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.tool-jump {
  margin-top: 12px;
}

.tool-group h2 {
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 18px;
}

.tool-page,
.tool-live {
  display: grid;
  gap: 12px;
}

.tool-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-controls-single {
  grid-template-columns: minmax(0, 1fr);
}

.tool-controls label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.tool-controls label span {
  flex: 0 0 auto;
}

.tool-controls select,
.tool-controls input {
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
}

.tool-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tool-summary-grid div {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.tool-summary-grid strong {
  color: var(--primary-dark);
  font-size: 16px;
}

.tool-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.tool-stat-card {
  margin-bottom: 12px;
}

.tool-recent {
  display: grid;
  gap: 6px;
}

.tool-recent div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
}

.tool-recent span {
  color: var(--primary-dark);
  font-weight: 800;
}

.tool-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 12px;
}

.tool-split-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-split section,
.tool-recent-pattern,
.tool-feature-card,
.tool-form {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.tool-split h3,
.tool-feature-card h3,
.tool-recent-pattern h3 {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 15px;
}

.tool-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tool-feature-card .rank-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-feature-card .rank-list span {
  min-height: 32px;
  padding: 0 4px;
  font-size: 13px;
}

.tool-ball-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.tool-ball-grid div {
  position: relative;
  min-height: 42px;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
}

.tool-ball-grid strong,
.tool-ball-grid span {
  position: relative;
  z-index: 1;
}

.tool-ball-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.tool-ball-grid span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.tool-ball-grid i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background: var(--primary);
}

.tool-table-wrap {
  overflow-x: auto;
}

.tool-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #ffffff;
}

.tool-table th,
.tool-table td {
  padding: 8px;
  border: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

.tool-table th {
  color: var(--primary-dark);
  background: #fff7f7;
}

.tool-mobile-native-table {
  min-width: 0;
  table-layout: fixed;
}

.tool-mobile-native-table th:nth-child(1),
.tool-mobile-native-table td:nth-child(1) {
  width: 30%;
}

.tool-mobile-native-table th:nth-child(2),
.tool-mobile-native-table td:nth-child(2),
.tool-mobile-native-table th:nth-child(3),
.tool-mobile-native-table td:nth-child(3) {
  width: 35%;
  text-align: center;
}

.tool-recent-pattern {
  margin-top: 12px;
}

.tool-follow-latest {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border: 1px solid #ffd2d2;
  background: #fff7f7;
  color: var(--primary-dark);
  font-size: 13px;
}

.tool-follow-latest span {
  font-weight: 800;
  color: #111827;
}

.tool-recent-pattern div,
.tool-follow div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.tool-recent-pattern div:last-child,
.tool-follow div:last-child {
  border-bottom: 0;
}

.tool-matrix {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.tool-matrix span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  font-weight: 800;
}

.tool-matrix span.is-hit {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.tool-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.tool-form {
  display: grid;
  gap: 8px;
}

.tool-mini-title {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.tool-mini-title strong {
  color: var(--primary-dark);
  font-size: 15px;
}

.tool-mini-title span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tool-recent-choices {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.tool-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tool-choice-list button {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #ffd2d2;
  color: var(--ink);
  background: #fff7f7;
  text-align: left;
}

.tool-choice-list button strong {
  color: var(--primary-dark);
  font-size: 12px;
}

.tool-choice-list button span {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.tool-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-actions button {
  flex: 1 1 128px;
}

.tool-form textarea {
  min-height: 110px;
  resize: vertical;
}

.tool-form textarea,
.tool-form input,
.tool-form output {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font: inherit;
}

.tool-form output {
  min-height: 42px;
  white-space: pre-wrap;
}

.feedback-home-entry {
  margin-top: 14px;
  padding: 18px 14px;
  text-align: center;
  background: #ffe36e;
  border: 2px solid #d79a2b;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feedback-home-entry h2 {
  margin: 0 0 12px;
  color: #7a1a20;
  font-size: 30px;
  line-height: 1.2;
}

.feedback-home-entry .mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  color: #ffffff;
  background: #b4202a;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.feedback-page,
.admin-page {
  display: grid;
  gap: 14px;
}

.feedback-nav-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: #ffe36e;
  border: 2px solid #d79a2b;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feedback-nav-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 8px;
  color: #7a1a20;
  border-right: 1px solid #d79a2b;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.feedback-nav-row a:last-child {
  border-right: 0;
}

.feedback-hero {
  padding: 24px 16px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feedback-hero h1 {
  margin: 0 0 8px;
  color: #7a1a20;
  font-size: 32px;
  line-height: 1.2;
}

.feedback-hero p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
}

.feedback-compose form,
.feedback-admin-panel {
  display: grid;
  gap: 12px;
}

.feedback-content-field,
.feedback-user-row label,
.feedback-status-filter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.feedback-content-field textarea {
  width: 100%;
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
  background: #ffffff;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
}

.feedback-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: end;
}

.feedback-user-row input,
.feedback-status-filter select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font: inherit;
}

.feedback-list,
.feedback-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.feedback-item,
.feedback-admin-item {
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feedback-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.feedback-item-content {
  margin-top: 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  white-space: normal;
  overflow-wrap: anywhere;
}

.feedback-qa {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
  align-items: start;
}

.feedback-qa > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  color: #ffffff;
  background: #b4202a;
  border-radius: 6px;
  font-weight: 900;
}

.feedback-answer > span {
  background: #276a46;
}

.feedback-qa p {
  margin: 0;
  padding: 7px 10px;
  min-height: 30px;
  color: var(--text);
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.feedback-answer p {
  background: #f2fbf5;
}

.feedback-reply-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.feedback-reply-field textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
  background: #ffffff;
  font: inherit;
  line-height: 1.6;
}

.feedback-count,
.feedback-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  color: #7a1a20;
  background: #ffe36e;
  border-radius: 6px;
  font-weight: 900;
}

.feedback-pager,
.feedback-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feedback-pager {
  justify-content: center;
  margin-top: 14px;
}

.feedback-admin-actions {
  margin-top: 10px;
}

@media (max-width: 720px) {
  .tool-entry .section-title {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .tool-entry-links,
  .tool-jump,
  .tool-grid {
    gap: 6px;
  }

  .tool-entry-links a,
  .tool-jump a,
  .tool-grid a {
    min-height: 30px;
    padding: 0 8px;
    font-size: 12px;
  }

  .tool-controls {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 6px;
  }

  .tool-controls label {
    gap: 4px;
    font-size: 12px;
  }

  .tool-controls select,
  .tool-controls input {
    min-height: 34px;
    padding: 0 5px;
    font-size: 12px;
  }

  .tool-summary-grid {
    grid-template-columns: 1fr;
  }

  .tool-recent div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tool-split {
    grid-template-columns: 1fr;
  }

  .tool-split-wide,
  .tool-feature-grid {
    grid-template-columns: 1fr;
  }

  .tool-feature-card .rank-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .tool-ball-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .tool-choice-list {
    grid-template-columns: 1fr;
  }

  .tool-table th,
  .tool-table td {
    padding: 6px;
    font-size: 12px;
  }

  .tool-mobile-native-table {
    display: table;
    width: 100%;
    min-width: 0;
  }

  .tool-mobile-native-table thead {
    display: table-header-group;
  }

  .tool-mobile-native-table tbody {
    display: table-row-group;
  }

  .tool-mobile-native-table tr {
    display: table-row;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .tool-mobile-native-table th,
  .tool-mobile-native-table td {
    display: table-cell;
  }

  .tool-mobile-native-table th,
  .tool-mobile-native-table td {
    padding: 8px 4px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .tool-mobile-native-table td::before {
    display: none;
    content: none;
  }

  .tool-recent-pattern div,
  .tool-follow div {
    grid-template-columns: 56px 1fr;
    gap: 6px;
    font-size: 12px;
  }

  .tool-follow-latest {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
  }

  .tool-matrix {
    gap: 4px;
  }

  .tool-matrix span {
    min-height: 34px;
    font-size: 12px;
  }

  .feedback-home-entry h2,
  .feedback-hero h1 {
    font-size: 24px;
  }

  .feedback-user-row {
    grid-template-columns: 1fr;
  }

  .feedback-user-row button {
    width: 100%;
  }

  .feedback-item-head {
    display: grid;
    gap: 4px;
  }
}
