/* ============================================================
   Smatch System Layer
   Loaded last on purpose. Keep systematic visual contracts here,
   instead of adding another one-off patch to theme-lineoa.css.
   ============================================================ */

:root {
  --sm-brand-dark: #073B31;
  --sm-brand-green: #128A3A;
  --sm-brand-mint: #BFEFD8;
  --sm-brand-mint-soft: #EAFBF1;
  --sm-brand-lime: #B9F529;
  --sm-brand-pink: #FF7FA3;
  --sm-bg-app: #F5F7F6;
  --sm-bg-card: #FFFFFF;
  --sm-text-primary: #111817;
  --sm-text-secondary: #6F7A7D;
  --sm-border-soft: #E7ECEA;
  --sm-danger: #D94335;
  --sm-danger-soft: #FFF1EF;

  --sm-page-x: 20px;
  --sm-section-gap: 24px;
  --sm-card-padding: 18px;
  --sm-card-gap: 14px;
  --sm-row-gap: 12px;
  --sm-bottom-safe: 88px;
  --sm-app-max: 1280px;
  --sm-sheet-max: 760px;
  --sm-dialog-max: 560px;
  --sm-shell-max: var(--sm-app-max);

  --sm-radius-card: 24px;
  --sm-radius-hero: 26px;
  --sm-radius-button: 18px;
  --sm-radius-input: 18px;
  --sm-radius-pill: 999px;
  --sm-radius-sheet: 28px 28px 0 0;

  --sm-shadow-card: 0 12px 32px rgba(7, 59, 49, 0.08);
  --sm-shadow-soft: 0 8px 24px rgba(7, 59, 49, 0.06);
  --sm-shadow-bottom: 0 -14px 32px rgba(7, 59, 49, 0.08);

  --sm-font: "Google Sans Thai", sans-serif;
  --sm-type-h1: clamp(28px, 5.2vw, 32px);
  --sm-type-h2: clamp(22px, 4.4vw, 24px);
  --sm-type-card-title: clamp(19px, 4vw, 22px);
  --sm-type-body: 16px;
  --sm-type-meta: 14px;
  --sm-type-button: 17px;
}

/* Reusable classes for new work. */
.sm-app-frame {
  box-sizing: border-box;
  width: min(100%, var(--sm-app-max));
  max-width: var(--sm-app-max);
  margin-inline: auto;
}

.sm-screen {
  box-sizing: border-box;
  width: 100%;
  padding-inline: var(--sm-page-x);
  padding-bottom: var(--sm-bottom-safe);
}

.sm-section {
  display: grid;
  gap: var(--sm-card-gap);
  margin-block: 0 var(--sm-section-gap);
}

.sm-card {
  border: 1px solid var(--sm-border-soft);
  border-radius: var(--sm-radius-card);
  background: var(--sm-bg-card);
  box-shadow: var(--sm-shadow-card);
}

.sm-button-primary,
.sm-button-secondary,
.sm-button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  border-radius: var(--sm-radius-button);
  font: 900 var(--sm-type-button) / 1 var(--sm-font);
}

.sm-button-primary {
  border: 0;
  background: var(--sm-brand-lime);
  color: var(--sm-brand-dark);
}

.sm-button-secondary {
  border: 1px solid var(--sm-border-soft);
  background: #fff;
  color: var(--sm-text-primary);
}

.sm-button-danger {
  border: 1px solid rgba(217, 67, 53, 0.25);
  background: var(--sm-danger-soft);
  color: var(--sm-danger);
}

.sm-bottom-action {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: grid;
  gap: 12px;
  padding: 16px var(--sm-page-x) calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sm-border-soft);
  background: #fff;
  box-shadow: var(--sm-shadow-bottom);
}

.sm-sheet {
  box-sizing: border-box;
  width: min(100%, var(--sm-sheet-max));
  max-width: var(--sm-sheet-max);
  margin-inline: auto;
  border-radius: var(--sm-radius-sheet);
  background: #fff;
}

.sm-modal {
  box-sizing: border-box;
  width: min(calc(100% - 32px), var(--sm-dialog-max));
  max-width: var(--sm-dialog-max);
  margin-inline: auto;
  border-radius: var(--sm-radius-card);
  background: #fff;
}

.sm-form-row {
  display: grid;
  gap: 8px;
  padding-block: 12px;
}

/* Global type and shell contract. */
html,
body.lineoa-theme {
  min-width: 0 !important;
  background: var(--sm-bg-app) !important;
  color: var(--sm-text-primary) !important;
  font-family: var(--sm-font) !important;
  font-size: var(--sm-type-body) !important;
  line-height: 1.5 !important;
}

body.lineoa-theme {
  --font-google-sans-thai: var(--sm-font) !important;
  --font-thai: var(--sm-font) !important;
  --font-latin-headline: var(--sm-font) !important;
  --font-latin-body: var(--sm-font) !important;
  --font-headline: var(--sm-font) !important;
  --font-body: var(--sm-font) !important;
  --smatch-shell-max-width: var(--sm-app-max) !important;
}

body.lineoa-theme *:not(.material-symbols-outlined),
body.lineoa-theme *:not(.material-symbols-outlined)::before,
body.lineoa-theme *:not(.material-symbols-outlined)::after,
body.lineoa-theme button,
body.lineoa-theme input,
body.lineoa-theme textarea,
body.lineoa-theme select,
body.lineoa-theme option {
  font-family: var(--sm-font) !important;
  letter-spacing: 0 !important;
}

body.lineoa-theme .material-symbols-outlined {
  font-family: "Material Symbols Outlined" !important;
}

body.lineoa-theme :is(.mobile-shell, .group-detail-screen) {
  box-sizing: border-box !important;
  width: min(100%, var(--sm-app-max)) !important;
  max-width: var(--sm-app-max) !important;
  margin-inline: auto !important;
}

body.lineoa-theme :is(.group-create-screen, .groups-sheet, .arena-report-sheet, .notifications-sheet, .member-profile-modal, .home-match-filter-modal-card, .smatch-sheet .sheet-card, .group-match-detail-sheet, .group-settings-sheet, .checkin-sheet) {
  box-sizing: border-box !important;
  width: min(100%, var(--sm-sheet-max)) !important;
  max-width: var(--sm-sheet-max) !important;
  margin-inline: auto !important;
}

body.lineoa-theme :is(.modal-card, .cancel-challenge-card, .match-decision-card, .report-confirm-card, .duplicate-report-card, .home-court-limit-card, .group-duplicate-player-card, .court-add-modal-card, .court-filter-modal-card) {
  box-sizing: border-box !important;
  width: min(calc(100% - 32px), var(--sm-dialog-max)) !important;
  max-width: var(--sm-dialog-max) !important;
  margin-inline: auto !important;
}

body.lineoa-theme .mobile-shell {
  min-height: 100dvh !important;
  background: var(--sm-bg-app) !important;
}

body.lineoa-theme .top-ribbon {
  box-sizing: border-box !important;
  width: min(100%, var(--sm-app-max)) !important;
  max-width: var(--sm-app-max) !important;
  margin-inline: auto !important;
  padding-inline: var(--sm-page-x) !important;
}

body.lineoa-theme .dashboard-shell,
body.lineoa-theme .tab-panel {
  width: 100% !important;
  max-width: none !important;
}

body.lineoa-theme .tab-panel {
  box-sizing: border-box !important;
  padding-inline: var(--sm-page-x) !important;
  padding-bottom: var(--sm-bottom-safe) !important;
}

body.lineoa-theme :is(.my-matches-screen, .groups-tab-panel, .community-tab-panel, #tab-arena, #tab-profile) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

body.lineoa-theme :is(.my-matches-screen, .groups-tab-panel, .community-tab-panel, #tab-profile) > :is(header, article, section, ul, div):not(.hidden) {
  max-width: none !important;
}

body.lineoa-theme .bottom-nav {
  right: auto !important;
  left: 50% !important;
  width: min(100%, var(--sm-app-max)) !important;
  max-width: var(--sm-app-max) !important;
  min-height: 74px !important;
  padding-inline: var(--sm-page-x) !important;
  border: 1px solid rgba(7, 59, 49, 0.08) !important;
  border-bottom: 0 !important;
  border-radius: 24px 24px 0 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: var(--sm-shadow-bottom) !important;
  transform: translateX(-50%) !important;
}

/* Type scale bridges. */
body.lineoa-theme :is(.my-matches-head h2, .groups-list-header h3, .group-open-list-head h3, .profile-ref-section-title, .community-courts-title, .court-list-title) {
  color: var(--sm-brand-dark) !important;
  font-size: var(--sm-type-h2) !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
}

body.lineoa-theme :is(.section-head h2, .group-detail-title-row h2, .sheet-title, .quick-smatch-sheet-card .sheet-title, .arena-report-sheet .sheet-title) {
  color: var(--sm-text-primary) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

body.lineoa-theme :is(label > span, .qp-setting-label, .qp-row-label, .report-ref-label, .profile-ref-label, .settings-row-label) {
  color: var(--sm-text-primary) !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}

body.lineoa-theme :is(input, textarea, select) {
  min-height: 50px !important;
  border: 1px solid var(--sm-border-soft) !important;
  border-radius: var(--sm-radius-input) !important;
  background: #fff !important;
  color: var(--sm-text-primary) !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
}

/* Canonical card surface bridge. */
body.lineoa-theme :is(.card, .groups-hub-card, .profile-ref-section, .profile-settings-card, .court-card, .court-detail-card, .report-ref-card, .qp-review-card, .match-decision-card, .report-confirm-card) {
  border: 1px solid var(--sm-border-soft) !important;
  border-radius: var(--sm-radius-card) !important;
  background: var(--sm-bg-card) !important;
  box-shadow: var(--sm-shadow-soft) !important;
}

/* Canonical match cards: one readable structure for Matches and Group detail. */
body.lineoa-theme :is(#myMatchesList, #groupOpenFeedList, .home-feed-list, .my-matches-list) {
  display: grid !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.lineoa-theme .challenge-match-card {
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(7, 59, 49, 0.05) !important;
  border-radius: var(--sm-radius-card) !important;
  background: var(--sm-bg-card) !important;
  box-shadow: var(--sm-shadow-card) !important;
  overflow: hidden !important;
}

body.lineoa-theme .challenge-match-card .challenge-match-main {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) auto !important;
  grid-template-areas:
    "date time status"
    "date title avatars"
    "date bottom bottom" !important;
  column-gap: 14px !important;
  row-gap: 8px !important;
  align-items: center !important;
  padding: var(--sm-card-padding) !important;
}

body.lineoa-theme .challenge-match-card .challenge-card-content {
  display: contents !important;
}

body.lineoa-theme .challenge-match-card :is(.challenge-card-pill-row, .challenge-detail-list.is-requirement-only, .challenge-detail-list.is-one-row, .challenge-count-pill, .challenge-detail-row) {
  display: none !important;
}

body.lineoa-theme .challenge-match-card .challenge-date-tile {
  grid-area: date !important;
  align-self: stretch !important;
  display: grid !important;
  place-items: center !important;
  gap: 3px !important;
  min-width: 78px !important;
  min-height: 112px !important;
  padding: 12px 8px !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #F0FAF4 0%, #E6F3EC 100%) !important;
  color: var(--sm-brand-green) !important;
  text-align: center !important;
}

body.lineoa-theme .challenge-match-card .challenge-date-tile strong {
  color: var(--sm-brand-green) !important;
  font-size: 40px !important;
  font-weight: 900 !important;
  line-height: 0.95 !important;
}

body.lineoa-theme .challenge-match-card :is(.challenge-date-weekday, .challenge-date-month) {
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--sm-brand-green) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.lineoa-theme .challenge-match-card .cmatch-top-row {
  grid-area: status !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-self: start !important;
  margin: 0 !important;
  min-height: 0 !important;
  pointer-events: none !important;
}

body.lineoa-theme .challenge-match-card .challenge-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  padding: 0 14px !important;
  border-radius: var(--sm-radius-pill) !important;
  background: var(--sm-brand-mint-soft) !important;
  color: var(--sm-brand-green) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.lineoa-theme .challenge-match-card .challenge-status-pill.is-pending {
  background: #FFF6DF !important;
  color: #8A6200 !important;
}

body.lineoa-theme .challenge-match-card .challenge-status-pill:is(.is-cancelled, .is-canceled) {
  background: var(--sm-danger-soft) !important;
  color: var(--sm-danger) !important;
}

body.lineoa-theme .challenge-match-card .challenge-schedule {
  grid-area: time !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  color: var(--sm-brand-green) !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

body.lineoa-theme .challenge-match-card .challenge-schedule .material-symbols-outlined {
  font-size: 22px !important;
}

body.lineoa-theme .challenge-match-card .challenge-match-title {
  grid-area: title !important;
  margin: 0 !important;
  color: var(--sm-text-primary) !important;
  font-size: var(--sm-type-card-title) !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

body.lineoa-theme .challenge-match-card .cmatch-meta-row {
  grid-area: avatars !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-self: center !important;
  min-width: 92px !important;
  margin: 0 !important;
}

body.lineoa-theme .challenge-match-card .challenge-avatar-stack {
  display: grid !important;
  justify-items: center !important;
  gap: 6px !important;
}

body.lineoa-theme .challenge-match-card .challenge-avatar-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  overflow: visible !important;
}

body.lineoa-theme .challenge-match-card .challenge-avatar-row > * + * {
  margin-left: 0 !important;
}

body.lineoa-theme .challenge-match-card :is(.challenge-party-avatar, .challenge-avatar-empty, .challenge-avatar-more) {
  flex: 0 0 46px !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: var(--sm-radius-pill) !important;
}

body.lineoa-theme .challenge-match-card .challenge-party-avatar {
  object-fit: cover !important;
  border: 2px solid #fff !important;
  box-shadow: 0 0 0 2px var(--sm-brand-lime), 0 10px 18px rgba(7, 59, 49, 0.12) !important;
}

body.lineoa-theme .challenge-match-card .challenge-party-avatar + .challenge-party-avatar {
  box-shadow: 0 0 0 2px #fff, 0 10px 18px rgba(7, 59, 49, 0.08) !important;
}

body.lineoa-theme .challenge-match-card .challenge-avatar-empty {
  display: grid !important;
  place-items: center !important;
  border: 2px dashed #CAD5D2 !important;
  background: #F8FAF9 !important;
  color: #7C878B !important;
}

body.lineoa-theme .challenge-match-card .challenge-slots-left-label.is-count {
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #657073 !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.lineoa-theme .challenge-match-card .challenge-slots-left-label.is-count .material-symbols-outlined {
  display: none !important;
}

body.lineoa-theme .challenge-match-card .challenge-card-bottom-row {
  grid-area: bottom !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 40%) !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 6px !important;
}

body.lineoa-theme .challenge-match-card .challenge-match-location {
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--sm-text-secondary) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

body.lineoa-theme .challenge-match-card .challenge-match-location .material-symbols-outlined {
  color: var(--sm-brand-green) !important;
  font-size: 24px !important;
}

body.lineoa-theme .challenge-match-card .challenge-court-name-link {
  min-width: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  font: inherit !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.lineoa-theme .challenge-match-card .challenge-join-btn {
  justify-self: end !important;
  width: 100% !important;
  min-width: 118px !important;
  max-width: 172px !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: var(--sm-radius-pill) !important;
  background: #EFFBDA !important;
  color: var(--sm-brand-dark) !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

/* Group detail should use the same gutters and match-card rhythm as Matches. */
body.lineoa-theme .group-detail-screen {
  inset: 0 auto auto 50% !important;
  min-height: 100dvh !important;
  background: var(--sm-bg-app) !important;
  transform: translateX(-50%) !important;
}

body.lineoa-theme .group-detail-shell {
  width: 100% !important;
  max-width: none !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--sm-bg-app) !important;
}

body.lineoa-theme .group-detail-tab-panel {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  padding: 22px var(--sm-page-x) var(--sm-bottom-safe) !important;
}

body.lineoa-theme :is(.group-detail-ribbon, .group-detail-tab-nav) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  padding-inline: var(--sm-page-x) !important;
}

body.lineoa-theme :is(.groups-hub-list, .groups-list, .group-list, #groupsHubList) {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

body.lineoa-theme :is(.groups-list-header, .groups-hub-card, .group-card) {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body.lineoa-theme :is(.community-courts-shell, .community-members-shell, .profile-ref-section, .profile-settings-card, .profile-ref-tab-card, .profile-view, .community-view) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body.lineoa-theme #groupDetailPanelOpen .group-open-matches-card {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.lineoa-theme .group-open-list-head {
  margin: 0 0 18px !important;
  padding: 0 !important;
}

body.lineoa-theme :is(.group-open-feed-list, #groupOpenFeedList) {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

/* Canonical sheet/modal frame: create, report, detail, notifications all share it. */
body.lineoa-theme :is(.smatch-sheet .sheet-card, .arena-report-sheet, .group-match-detail-sheet, .group-settings-sheet, .notifications-sheet, .groups-sheet) {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(100dvh, 980px) !important;
  border: 1px solid rgba(7, 59, 49, 0.08) !important;
  border-radius: var(--sm-radius-sheet) !important;
  background: #fff !important;
  box-shadow: 0 -18px 44px rgba(7, 59, 49, 0.16) !important;
  overflow: hidden !important;
}

body.lineoa-theme :is(.sheet-header, .qp-form-header, .arena-report-head, .group-match-detail-head, .notifications-header) {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 48px !important;
  align-items: center !important;
  min-height: 64px !important;
  padding: 8px 16px !important;
  border-bottom: 1px solid var(--sm-border-soft) !important;
  background: #fff !important;
}

body.lineoa-theme :is(.sheet-title, .arena-report-head h4, .group-match-detail-head h3, .notifications-header-copy h2) {
  justify-self: center !important;
  margin: 0 !important;
  color: var(--sm-text-primary) !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

body.lineoa-theme :is(.sheet-close-btn, .sheet-dismiss-btn, .arena-report-close, .group-match-detail-close, .notifications-back-btn) {
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: var(--sm-text-primary) !important;
}

body.lineoa-theme :is(.sheet-close-btn, .arena-report-back, .group-match-detail-back-btn, .notifications-back-btn) {
  justify-self: start !important;
}

body.lineoa-theme :is(.sheet-dismiss-btn, .arena-report-dismiss, .group-match-detail-menu-btn) {
  justify-self: end !important;
}

body.lineoa-theme :is(.qp-form, .report-ref-form, .group-settings-form) {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  flex-direction: column !important;
}

body.lineoa-theme :is(.qp-step-page, .report-step-page, .group-match-detail-content, .group-settings-content, .notifications-body) {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.lineoa-theme :is(.report-match-card, .quick-smatch-sheet-card .qp-section, .report-step-page, .group-settings-content, .group-match-detail-content, .notifications-body) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
}

body.lineoa-theme .report-match-card {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.lineoa-theme :is(.sm-form .qp-section, .sm-form .report-step-page, .group-settings-content, .group-match-detail-content, .notifications-body) {
  padding-inline: var(--sm-page-x) !important;
}

body.lineoa-theme :is(.sm-form .qp-section, .sm-form .report-step-page.is-active) {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--sm-card-gap) !important;
}

body.lineoa-theme :is(.qp-step-page:not(.is-active), .report-step-page:not(.is-active)) {
  display: none !important;
}

/* Quick create/report shared form rhythm. */
body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card, .arena-report-sheet) {
  color: var(--sm-text-primary) !important;
  font-size: var(--sm-type-body) !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-step-indicator, .arena-report-sheet .report-step-indicator) {
  gap: clamp(54px, 14vw, 88px) !important;
  margin: 8px 0 18px !important;
  padding: 4px 0 !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-step-indicator span, .arena-report-sheet .report-step-indicator span) {
  width: 44px !important;
  height: 44px !important;
  border-radius: var(--sm-radius-pill) !important;
  background: #EDF3F1 !important;
  color: #788386 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-step-indicator span.is-active, .smatch-sheet .quick-smatch-sheet-card .qp-step-indicator span.is-complete, .arena-report-sheet .report-step-indicator span.is-active, .arena-report-sheet .report-step-indicator span.is-complete) {
  background: var(--sm-brand-green) !important;
  color: #fff !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-settings-card, .smatch-sheet .quick-smatch-sheet-card .qp-detail-card, .arena-report-sheet .report-step-page .report-ref-card) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-setting-row, .smatch-sheet .quick-smatch-sheet-card .qp-detail-row, .arena-report-sheet .report-ref-row) {
  padding-block: 10px !important;
}

body.lineoa-theme .smatch-sheet .quick-smatch-sheet-card :is(.qp-pill-group, .qp-requirement-pill-set) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.lineoa-theme .smatch-sheet .quick-smatch-sheet-card .qp-gender-setting-row .qp-requirement-pill-set {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.lineoa-theme .smatch-sheet .quick-smatch-sheet-card :is(.qp-pill, .qp-requirement-pill) {
  min-height: 56px !important;
  border: 1px solid #DDE7E3 !important;
  border-radius: 18px !important;
  background: #fff !important;
  color: var(--sm-text-primary) !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}

body.lineoa-theme .smatch-sheet .quick-smatch-sheet-card :is(.qp-pill.is-active, .qp-requirement-pill.is-active) {
  border-color: var(--sm-brand-lime) !important;
  background: #F3FDDD !important;
  color: var(--sm-brand-green) !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-step-actions, .arena-report-sheet .report-step-actions) {
  border-top: 1px solid var(--sm-border-soft) !important;
  background: #fff !important;
  box-shadow: var(--sm-shadow-bottom) !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-step-actions button, .arena-report-sheet .report-step-actions button, .report-submit-btn, .primary-btn) {
  min-height: 56px !important;
  border-radius: var(--sm-radius-button) !important;
  font-size: var(--sm-type-button) !important;
  font-weight: 900 !important;
}

body.lineoa-theme :is(.smatch-sheet .quick-smatch-sheet-card .qp-step-next-btn, .smatch-sheet .quick-smatch-sheet-card .sheet-cta, .arena-report-sheet .report-step-next-btn, .arena-report-sheet .report-submit-btn, .primary-btn) {
  border: 0 !important;
  background: var(--sm-brand-lime) !important;
  color: var(--sm-brand-dark) !important;
}

/* Report/create details should share the same row-card language. */
body.lineoa-theme :is(.qp-ref-row, .report-ref-action-row) {
  border-bottom: 1px solid var(--sm-border-soft) !important;
}

body.lineoa-theme :is(.qp-ref-value, .report-ref-value) {
  color: var(--sm-text-secondary) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

/* Court, profile, ranking, and notifications: readable surfaces first. */
body.lineoa-theme :is(.court-card, .court-detail-card, .profile-settings-card, .profile-ref-section, .notification-card, .group-activity-result-card) {
  padding: 18px !important;
  border-radius: var(--sm-radius-card) !important;
}

body.lineoa-theme :is(.court-card h3, .court-detail-card h3, .profile-settings-card h3, .notification-card h3, .match-feed-card h4) {
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
}

body.lineoa-theme :is(.court-card p, .court-detail-card p, .profile-settings-card p, .notification-card p, .match-feed-card p) {
  color: var(--sm-text-secondary) !important;
  font-size: 16px !important;
  line-height: 1.42 !important;
}

body.lineoa-theme :is(.leaderboard-table, .profile-leaderboard-table) {
  font-size: 16px !important;
}

body.lineoa-theme :is(.leaderboard-table th, .leaderboard-table td, .profile-leaderboard-table th, .profile-leaderboard-table td) {
  padding-block: 14px !important;
}

/* Dialogs/confirmation pattern. */
body.lineoa-theme :is(.match-decision-card, .report-confirm-card) {
  padding: 22px !important;
  border-radius: var(--sm-radius-card) !important;
}

body.lineoa-theme :is(.match-decision-card h3, .report-confirm-card h3) {
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

body.lineoa-theme :is(.match-decision-card .inline-btn, .report-confirm-card .inline-btn) {
  min-height: 56px !important;
  border-radius: var(--sm-radius-button) !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}

@media (max-width: 700px) {
  body.lineoa-theme :is(.mobile-shell, .group-detail-screen, .group-create-screen, .groups-sheet, .arena-report-sheet, .notifications-sheet, .member-profile-modal, .home-match-filter-modal-card, .smatch-sheet .sheet-card, .group-match-detail-sheet, .group-settings-sheet, .checkin-sheet) {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }

  body.lineoa-theme :is(.modal-card, .cancel-challenge-card, .match-decision-card, .report-confirm-card, .duplicate-report-card, .home-court-limit-card, .group-duplicate-player-card, .court-add-modal-card, .court-filter-modal-card) {
    width: calc(100% - 32px) !important;
    max-width: none !important;
  }

  body.lineoa-theme .bottom-nav {
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
  }

  body.lineoa-theme .group-detail-screen {
    left: 0 !important;
    transform: none !important;
  }
}

@media (max-width: 520px) {
  body.lineoa-theme {
    --sm-page-x: 16px;
    --sm-card-padding: 16px;
  }

  body.lineoa-theme .challenge-match-card .challenge-match-main {
    grid-template-columns: 78px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "date time status"
      "date title title"
      "date avatars avatars"
      "bottom bottom bottom" !important;
    column-gap: 12px !important;
  }

  body.lineoa-theme .challenge-match-card .challenge-date-tile {
    min-height: 102px !important;
  }

  body.lineoa-theme .challenge-match-card .challenge-date-tile strong {
    font-size: 36px !important;
  }

  body.lineoa-theme .challenge-match-card .cmatch-meta-row {
    justify-content: flex-start !important;
  }

  body.lineoa-theme .challenge-match-card .challenge-card-bottom-row {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 38%) !important;
  }
}

@media (max-width: 390px) {
  body.lineoa-theme {
    --sm-page-x: 14px;
    --sm-card-padding: 14px;
  }

  body.lineoa-theme .challenge-match-card .challenge-match-main {
    grid-template-columns: 70px minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  body.lineoa-theme .challenge-match-card .challenge-date-tile {
    min-width: 64px !important;
    min-height: 92px !important;
    border-radius: 16px !important;
  }

  body.lineoa-theme .challenge-match-card .challenge-date-tile strong {
    font-size: 31px !important;
  }

  body.lineoa-theme .challenge-match-card .challenge-schedule {
    font-size: 16px !important;
  }

  body.lineoa-theme .challenge-match-card .challenge-match-title {
    font-size: 19px !important;
  }

  body.lineoa-theme .challenge-match-card :is(.challenge-party-avatar, .challenge-avatar-empty, .challenge-avatar-more) {
    flex-basis: 40px !important;
    width: 40px !important;
    height: 40px !important;
  }
}
