:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f5ef;
  color: #141c18;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 245, 239, 0.98) 340px),
    #f7f5ef;
}

body.results-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 16px 0 42px;
}

.topbar,
.current-panel,
.controls,
.summary-grid,
.seo-overview,
.draw-section,
.top-comments,
.watch-tabs,
.player-first,
.service-section,
.install-hint {
  margin-bottom: 18px;
}

.topbar,
.current-panel,
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(20, 28, 24, 0.14);
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  flex: 1 1 380px;
  min-width: 360px;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid #1f1b17;
  border-radius: 8px;
  background: #1f1b17;
  box-shadow: 0 6px 18px rgba(20, 28, 24, 0.18);
  object-fit: cover;
}

.top-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.top-nav a,
.curated-pill,
.install-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  color: #26332d;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a:hover {
  background: #ffffff;
}

.header-tools {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.curated-pill {
  border: 1px solid #c8ded7;
  background: #e4f1ed;
  color: #245346;
}

.install-button {
  border: 1px solid #0f6653;
  background: #0f6653;
  color: #fffdf8;
  cursor: pointer;
}

.auth-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px;
  border: 1px solid #c8ded7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.auth-panel > span {
  max-width: 180px;
  overflow: hidden;
  color: #245346;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-form input {
  width: 160px;
  padding: 9px 10px;
  font-size: 13px;
}

.auth-form button,
.sign-out-button {
  padding: 9px 11px;
  border: 1px solid #0f6653;
  border-radius: 8px;
  background: #0f6653;
  color: #fffdf8;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.sign-out-button {
  border-color: #c8ded7;
  background: #fffdf8;
  color: #245346;
}

.notification-settings {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  padding-left: 2px;
}

.notification-master label,
.notification-type-list label {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #c8ded7;
  border-radius: 8px;
  background: #f7fbf8;
  color: #245346;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.notification-master label {
  min-height: 42px;
  align-items: center;
  background: #fffaf0;
}

.notification-master span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.notification-master strong {
  color: #1b3028;
  font-size: 12px;
  line-height: 1.1;
}

.notification-master small {
  max-width: 210px;
  overflow: hidden;
  color: #64756f;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

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

.notification-settings[data-ready="false"] label {
  opacity: 0.72;
}

.notification-settings[data-email-enabled="false"] .notification-type-list label {
  opacity: 0.52;
}

.notification-settings input {
  width: 14px;
  height: 14px;
  accent-color: #0f6653;
}

.install-button[hidden],
.install-hint[hidden],
.auth-form[hidden],
.sign-out-button[hidden],
.notification-settings[hidden] {
  display: none;
}

.install-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #c8ded7;
  border-radius: 8px;
  background: #edf7f3;
  color: #245346;
  font-size: 13px;
}

.install-hint strong {
  color: #123b33;
  white-space: nowrap;
}

.inumo-role-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.inumo-role-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d4ddd7;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 10px 24px rgba(20, 28, 24, 0.08);
}

.inumo-role-card img {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
}

.inumo-role-card span {
  color: #2458a6;
  font-size: 12px;
  font-weight: 900;
}

.inumo-role-card strong {
  min-width: 0;
  color: #14211d;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0 0 6px;
  color: #6c3f0f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.08;
  white-space: nowrap;
}

.connection-status {
  margin: 0;
  color: #4c6359;
  font-size: 13px;
  font-weight: 750;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

select,
input {
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  background: white;
  color: #17211d;
}

select {
  min-width: 230px;
  padding: 11px 12px;
}

.tour-select {
  min-width: 128px;
  border-color: #b79a52;
  background: #171512;
  color: #fff7df;
  font-weight: 850;
}

.current-panel {
  position: relative;
  min-height: 244px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(20, 28, 24, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(10, 32, 29, 0.9), rgba(12, 57, 48, 0.68) 48%, rgba(248, 179, 25, 0.12)),
    url("/assets/tournament-hero.png");
  background-position: center;
  background-size: cover;
  color: white;
  box-shadow: 0 16px 44px rgba(20, 28, 24, 0.16);
}

.current-panel::after {
  position: absolute;
  inset: auto 18px 18px auto;
  width: min(340px, 32vw);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f8b319, #0c9a7a, #ffffff);
  content: "";
  opacity: 0.9;
}

.top-comments {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #d6ddd7;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 10px 28px rgba(20, 28, 24, 0.08);
}

.top-comments[hidden] {
  display: none;
}

.top-comments-head {
  display: grid;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-right: 1px solid #e1e6e2;
}

.top-comments-head p {
  margin: 0;
  color: #6c3f0f;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-comment-toggle {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #c8ded7;
  border-radius: 8px;
  background: #edf7f3;
  color: #245346;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.top-comment-toggle[hidden] {
  display: none;
}

.top-comment-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.top-comments.expanded .top-comment-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.top-comment {
  width: 100%;
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  text-align: left;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #dce7e1;
  border-radius: 8px;
  background: #f7fbf8;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.top-comment:hover,
.top-comment:focus-visible {
  border-color: #9ac8b6;
  box-shadow: 0 8px 22px rgba(14, 88, 66, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.top-comment span {
  display: inline-flex;
  min-width: 48px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.top-comment strong {
  min-width: 0;
  color: #16231d;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.top-comment.win span {
  border: 1px solid #bde7cd;
  background: #dcf6e5;
  color: #14633b;
}

.top-comment.loss span {
  border: 1px solid #f0c6ba;
  background: #fff0ea;
  color: #7b2e1f;
}

.live-matches {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #f1d67a;
  border-radius: 8px;
  background: #fff9e8;
  box-shadow: 0 10px 28px rgba(110, 70, 15, 0.1);
}

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

.live-matches-head {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 12px;
  border-right: 1px solid #edd783;
}

.live-matches-head p {
  margin: 0;
  color: #5b3710;
  font-size: 15px;
  font-weight: 950;
}

.live-matches-head span {
  width: fit-content;
  min-width: 34px;
  padding: 5px 10px;
  border: 1px solid #dfbf49;
  border-radius: 999px;
  background: #fff3bd;
  color: #6c3f0f;
  font-size: 13px;
  font-weight: 950;
}

.live-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 8px;
}

.live-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #ead377;
  border-radius: 8px;
  background: #fffdf7;
}

.live-match-card p {
  margin: 0 0 4px;
  color: #7b5410;
  font-size: 12px;
  font-weight: 900;
}

.live-match-card button {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #14594a;
  cursor: pointer;
  font-size: 16px;
  font-weight: 950;
  text-align: left;
  text-decoration: underline;
}

.live-match-card strong {
  display: block;
  margin-top: 5px;
  color: #17211d;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.live-match-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.live-match-status small,
.live-status-text {
  color: #6c3f0f;
  font-size: 12px;
  font-weight: 850;
}

.hero-copy,
.hero-tools,
.inumo-watch-card {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.02;
}

.current-panel .eyebrow,
.current-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.hero-tools {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.inumo-watch-card {
  display: flex;
  width: min(280px, 100%);
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.12);
  backdrop-filter: blur(12px);
}

.inumo-watch-card img {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.inumo-watch-card strong,
.inumo-watch-card span {
  display: block;
}

.inumo-watch-card strong {
  color: #fffdf8;
  font-size: 14px;
}

.inumo-watch-card span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.last-updated {
  margin: -2px 0 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.action,
.event-card a,
.draw-unavailable,
.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  backdrop-filter: blur(8px);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.refresh-button {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.88);
  color: #123b33;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.controls {
  align-items: flex-end;
}

.search-box {
  display: grid;
  flex: 1;
  gap: 6px;
  color: #4b6258;
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  background: #ffffff;
}

.segmented button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #486055;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.segmented button.active {
  background: #14594a;
  color: white;
}

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

.summary-grid article {
  padding: 16px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fffdf8;
}

.summary-grid span {
  display: block;
  color: #0c6652;
  font-size: 30px;
  font-weight: 850;
}

.summary-grid p {
  margin-bottom: 0;
  color: #5c6d65;
}

.seo-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fffdf8;
  color: #20332b;
}

.seo-overview h2 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.25;
}

.seo-overview p,
.seo-overview ul {
  margin-bottom: 0;
  color: #5c6d65;
  font-size: 13px;
  line-height: 1.65;
}

.seo-overview ul {
  padding-left: 18px;
}

.seo-overview li + li {
  margin-top: 4px;
}

.section-header {
  margin-bottom: 12px;
}

.section-header p {
  margin-bottom: 0;
  color: #63736c;
}

.watch-tabs {
  display: grid;
  gap: 14px;
}

.watch-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.watch-tabs-header p {
  margin: 0;
  color: #4d6259;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.watch-tab-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 520px);
  gap: 8px;
  padding: 8px;
  border: 1px solid #bfd2ca;
  border-radius: 8px;
  background: #eef7f4;
  box-shadow: 0 10px 28px rgba(20, 28, 24, 0.1);
}

.watch-tab-list button {
  display: grid;
  min-height: 68px;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d2dfd9;
  border-radius: 8px;
  background: #ffffff;
  color: #294139;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 3px 0 rgba(15, 102, 83, 0.08);
}

.watch-tab-list button span {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
}

.watch-tab-list button small {
  color: #687970;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
}

.watch-tab-list button.active {
  border-color: #0f6653;
  background: #14594a;
  color: white;
  box-shadow: 0 8px 18px rgba(15, 102, 83, 0.24);
}

.watch-tab-list button.active small {
  color: rgba(255, 255, 255, 0.84);
}

.watch-tab-panel[hidden] {
  display: none;
}

.watch-tab-panel > section {
  margin-bottom: 0;
}

.result-summary-list {
  display: grid;
  gap: 10px;
}

.summary-category-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fffdf8;
}

.summary-category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.summary-category-head h3 {
  margin: 0 0 5px;
  color: #15201b;
  font-size: 17px;
  line-height: 1.2;
}

.summary-category-head p {
  margin: 0;
  color: #63736c;
  font-size: 13px;
  font-weight: 750;
}

.summary-category-head a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #0f6653;
  border-radius: 8px;
  background: #14594a;
  color: white;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.category-player-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 8px;
  align-items: start;
}

.category-player-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e0e8e4;
  border-radius: 8px;
  background: #f8fbf9;
  color: #17211d;
}

.category-player-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
}

.category-player-main button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #14594a;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
}

.category-player-main span {
  grid-column: 1 / -1;
  color: #63736c;
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.category-player-match {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 680px;
  justify-self: start;
}

.summary-label,
.summary-match-label,
.summary-bracket,
.summary-empty {
  color: #63736c;
  font-size: 12px;
  font-weight: 800;
}

.summary-match-label {
  display: inline-flex;
  width: 50px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border: 1px solid #c9d8d1;
  border-radius: 999px;
  background: #eff6f3;
  color: #3d554c;
  line-height: 1;
  white-space: nowrap;
}

.summary-match-label.next {
  border-color: #d9c16e;
  background: #fff4c7;
  color: #6c3f0f;
}

.summary-match-label.live {
  border-color: #dfbf49;
  background: #fff3bd;
  color: #6c3f0f;
}

.summary-bracket {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-match-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px 0;
}

.category-match-body {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.category-match-body strong {
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.category-next-match {
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid #eadb9c;
  border-radius: 8px;
  background: #fffaf0;
}

.category-live-match {
  padding: 8px 10px;
  border: 1px solid #ead377;
  border-radius: 8px;
  background: #fff9e8;
}

.summary-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.new-result-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid #f1c650;
  border-radius: 999px;
  background: #fff3bd;
  color: #765515;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.event-list,
.japan-list {
  display: grid;
  gap: 10px;
}

.player-list {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.event-card,
.japan-card {
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fffdf8;
  overflow: hidden;
}

.event-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
}

.event-card h3,
.japan-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #5d7168;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf4ef;
  color: #486055;
  font-weight: 750;
}

.status-2,
.status-4 {
  background: #fff2cf;
  color: #75520a;
}

.status-3 {
  background: #dcf5e5;
  color: #14633b;
}

.event-card a {
  border-color: #14594a;
  background: #14594a;
  color: white;
  white-space: nowrap;
}

.draw-unavailable {
  border-color: #d8ded7;
  background: #f2f5f1;
  color: #65766e;
  font-weight: 850;
  white-space: nowrap;
}

.japan-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.player-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.player-card-main h3 {
  margin-bottom: 5px;
  color: #15201b;
  font-size: 18px;
  line-height: 1.2;
}

.player-card-main p,
.japan-events p {
  margin-bottom: 0;
  color: #63736c;
  font-size: 13px;
  font-weight: 750;
}

.player-source {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid #c8ded7;
  border-radius: 999px;
  background: #edf7f3;
  color: #245346;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.player-card-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 8px;
  align-items: center;
  justify-content: start;
}

.player-notification-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #d5e3de;
  border-radius: 999px;
  background: #f7faf7;
  color: #536760;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
}

.player-notification-badge.active {
  border-color: #9fd9c9;
  background: #e8fbf2;
  color: #0d614d;
}

.player-notification-badge.pending {
  border-color: #ead08a;
  background: #fff8db;
  color: #725519;
}

.player-notification-badge.muted {
  border-color: #d9e2de;
  background: #f3f5f3;
  color: #6b7b75;
}

.player-quick-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid #e1e8e4;
  border-radius: 8px;
  background: #f8fbf9;
}

.player-quick-label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #c8ded7;
  border-radius: 999px;
  background: #edf7f3;
  color: #245346;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.player-quick-body {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.player-quick-body strong {
  color: #17211d;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.player-quick-result .match-result {
  min-width: 52px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 13px;
}

.player-quick-result .match-score {
  font-size: 13px;
}

.japan-events {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2ebe6;
}

.player-event-list {
  display: grid;
  gap: 7px;
}

.player-event-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  width: 100%;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dbe7e1;
  border-radius: 8px;
  background: #f7faf7;
  color: #20332b;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
  text-decoration: none;
  white-space: normal;
}

.player-event-chip span {
  min-width: 0;
  font-weight: 800;
}

.player-event-chip small {
  color: #657870;
  font-size: 12px;
  font-weight: 750;
  white-space: normal;
}

.player-event-more {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff3d4;
  color: #765515;
  font-size: 12px;
  font-weight: 850;
}

.player-result-button,
.favorite-button,
.profile-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.player-result-button {
  width: fit-content;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #0f6653;
  cursor: pointer;
  border-color: #0f6653;
  background: linear-gradient(135deg, #0f6653, #0b3f36);
  color: white;
  font-size: 13px;
}

.favorite-button {
  width: 44px;
  border: 1px solid #c8d8d1;
  background: #ffffff;
  color: #6b5a15;
  cursor: pointer;
  font-size: 17px;
}

.favorite-button.active {
  border-color: #f0c33d;
  background: #fff4c2;
  color: #6c4b00;
}

.profile-link {
  border: 1px solid #c8d8d1;
  background: #ffffff;
  color: #254238;
  white-space: nowrap;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.service-card {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid #d8ded7;
  border-left: 4px solid #f8b319;
  border-radius: 8px;
  background: #fffdf8;
  color: #17211d;
  text-decoration: none;
}

.service-card span {
  color: #123b33;
  font-size: 16px;
  font-weight: 850;
}

.service-card small {
  color: #66766f;
  font-size: 13px;
}

.player-results {
  position: fixed;
  inset: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  z-index: 100;
  display: block;
  max-width: 980px;
  height: min(760px, calc(100dvh - 36px));
  margin: auto;
  padding: 18px;
  border: 1px solid #b9cbc2;
  border-radius: 8px;
  background: #f8fbf9;
  box-shadow: 0 24px 90px rgba(16, 33, 27, 0.28);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.player-results[hidden] {
  display: none;
}

.player-results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.player-results-header p {
  margin-bottom: 0;
  color: #63736c;
}

.player-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.player-results-header button {
  min-width: 72px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #b9cbc2;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.player-result-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  overflow: visible;
  padding-right: 0;
}

.result-card {
  border: 1px solid #d7e2dd;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.result-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: #eef4f1;
}

.result-card-header h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.result-card-header a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: #14594a;
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.next-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid #d7e8df;
  background: #fff8df;
}

.next-match-card.live {
  border-top-color: #ead377;
  background: #fff9e8;
}

.next-match-card p {
  margin: 0 0 4px;
  color: #75520a;
  font-size: 12px;
  font-weight: 900;
}

.next-match-card strong {
  display: block;
  color: #17211d;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.next-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.next-match-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff2bd;
  color: #75520a;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.next-match-detail {
  color: #14594a;
  font-size: 13px;
  font-weight: 850;
}

.match-list {
  display: grid;
}

.match-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-top: 1px solid #e5eee9;
  font-size: 13px;
}

.match-number {
  color: #5d7168;
  font-weight: 850;
}

.match-body {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.match-opponent {
  min-width: 0;
  overflow-wrap: anywhere;
}

.match-outcome {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.match-result {
  display: inline-flex;
  min-width: 68px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid #c8d8d1;
  border-radius: 8px;
  background: #f4f7f5;
  color: #465c52;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.match-result.win {
  border-color: #bde7cd;
  background: #dcf6e5;
  color: #14633b;
  font-size: 18px;
  font-weight: 950;
}

.match-result.loss {
  border-color: #f0c6ba;
  background: #fff0ea;
  color: #7b2e1f;
  font-size: 18px;
  font-weight: 950;
}

.match-result.upcoming {
  min-width: 54px;
  min-height: 28px;
  border-color: #d9c16e;
  background: #fff7d9;
  color: #6c3f0f;
  font-size: 13px;
  font-weight: 900;
}

.match-result.live {
  min-width: 62px;
  min-height: 34px;
  border-color: #dfbf49;
  background: #fff3bd;
  color: #6c3f0f;
  font-size: 16px;
  font-weight: 950;
}

.match-score {
  color: #465c52;
  font-size: 15px;
  font-weight: 750;
}

.match-detail {
  color: #14594a;
  font-weight: 800;
}

.match-row-empty {
  grid-template-columns: 1fr;
  color: #5d7168;
}

.empty {
  padding: 18px;
  border: 1px dashed #bccdc4;
  border-radius: 8px;
  color: #5c6d65;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 860px) {
  .topbar {
    position: static;
    min-height: 0;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 0 12px;
  }

  .topbar,
  .current-panel,
  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  select {
    width: 100%;
  }

  .brand-lockup,
  .top-nav,
  .header-tools {
    flex: none;
    width: 100%;
  }

  .brand-lockup {
    min-width: 0;
  }

  .inumo-role-strip {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: flex-start;
    gap: 10px;
  }

  .tour-select {
    min-width: 0;
  }

  .connection-status,
  .curated-pill {
    display: none;
  }

  .auth-panel,
  .auth-form {
    width: 100%;
  }

  .auth-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-settings {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .notification-type-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notification-master small {
    max-width: none;
    white-space: normal;
  }

  .auth-panel > span {
    max-width: none;
  }

  .auth-form input {
    flex: 1 1 auto;
    width: 100%;
  }

  .install-button {
    width: fit-content;
  }

  .current-panel {
    min-height: 0;
    justify-content: flex-end;
    gap: 14px;
    padding: 18px;
    background:
      linear-gradient(180deg, rgba(10, 32, 29, 0.2), rgba(10, 32, 29, 0.92) 54%),
      url("/assets/tournament-hero.png");
    background-position: center top;
    background-size: cover;
  }

  .current-panel::after {
    right: 18px;
    bottom: 14px;
    width: 120px;
    height: 3px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-copy .eyebrow {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .hero-copy h2 {
    margin-bottom: 8px;
    font-size: 28px;
    line-height: 1.05;
  }

  .hero-copy p {
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.35;
  }

  .hero-tools {
    justify-items: stretch;
    gap: 8px;
  }

  .inumo-watch-card {
    width: 100%;
  }

  .refresh-button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 15px;
  }

  .last-updated {
    margin: 0;
    font-size: 13px;
  }

  .quick-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .quick-actions .action {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .summary-grid,
  .seo-overview,
  .draw-section {
    grid-template-columns: 1fr;
  }

  .top-comments {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .top-comments-head {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: flex-start;
    padding: 0 0 2px;
    border-right: 0;
    border-bottom: 1px solid #e1e6e2;
  }

  .top-comment-list {
    grid-template-columns: 1fr;
  }

  .live-matches {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .live-matches-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 0 0 2px;
    border-right: 0;
    border-bottom: 1px solid #edd783;
  }

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

  .live-match-status {
    justify-content: flex-start;
  }

  .watch-tab-list {
    width: 100%;
  }

  .summary-category-head,
  .category-player-result {
    grid-template-columns: 1fr;
  }

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

  .player-results {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }

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

  .result-card-header a {
    justify-self: start;
    min-height: 32px;
    padding: 6px 12px;
  }

  .next-match-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .next-match-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .app-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 8px;
  }

  h1 {
    font-size: 19px;
  }

  .current-panel {
    padding: 16px;
  }

  .hero-copy h2 {
    font-size: 24px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .quick-actions .action {
    flex: 0 0 auto;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .segmented {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

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

  .watch-tabs {
    gap: 10px;
  }

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

  .summary-category-head a {
    width: 100%;
  }

  .player-results-header {
    position: sticky;
    top: 0;
    z-index: 2;
    gap: 10px;
    padding-bottom: 10px;
    background: #f8fbf9;
  }

  .player-result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .player-results-header h2 {
    margin-bottom: 4px;
    font-size: 24px;
    line-height: 1.1;
  }

  .player-results-header .eyebrow {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .player-results-header p {
    font-size: 14px;
    line-height: 1.35;
  }

  .player-results-header button {
    min-width: 76px;
    min-height: 42px;
    padding: 6px 10px;
    font-size: 15px;
  }

  .player-result-list {
    gap: 10px;
    padding-right: 0;
  }

  .result-card-header {
    gap: 9px;
    padding: 12px;
  }

  .result-card-header h3 {
    font-size: 17px;
    line-height: 1.25;
  }

  .result-card-header .meta-row {
    gap: 5px 8px;
    font-size: 13px;
    line-height: 1.3;
  }

  .match-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .match-body {
    gap: 4px;
  }

  .match-outcome {
    gap: 6px;
  }

  .match-score {
    overflow-wrap: anywhere;
  }
}
