/* Color and reading scale follow the running KINDUP layout. */
:root {
  --ke-hero: url("./edition-hero.webp");
  --ke-rule: var(--ed-line, #dedbd2);
  --ke-panel: var(--ed-surface, #faf8f1);
  --ke-text: var(--ed-ink, #24231e);
  --ke-quiet: var(--ed-muted, #635f55);
  --ke-inquiry: #e2ff65;
}

/* The campaign manager can replace the default artwork with a paid creative. */
html[data-ku-edition] body[data-ku-home-page] .portal .campaign.campaign-hero:not([hidden]):not(.has-image) {
  background-image: var(--ke-hero);
  background-position: 50% 52%;
  background-size: cover;
}
html[data-ku-edition] body[data-ku-home-page] .portal .campaign-hero:not(.has-image)::after {
  background: linear-gradient(90deg, #141109bc 0%, #1713096e 38%, #1d140a09 81%);
}
html[data-ku-edition] body[data-ku-home-page] #video-stage {
  inline-size: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden;
  border-radius: 10px;
}
/* This provider supplies letterboxed 4:3 JPEG thumbnails for widescreen films. */
html[data-ku-edition] body[data-ku-home-page] #video-stage .video-cover[style*="hqdefault.jpg"] {
  background-size: 100% 100%, auto 134%, cover !important;
  background-position: center !important;
  background-repeat: no-repeat;
}
html[data-ku-edition] #video-stage .video-cover .play-mark {
  border-radius: 50%;
  background: #191b19bd;
  color: #fff;
}
.ke-view-label { white-space: nowrap; }
@layer edition-market-table {
  #kindup-directory .ed-ad-sections section,
  #kindup-directory .ed-ad-sections section > div {
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    box-sizing: border-box !important;
  }
  #kindup-directory .ed-ad-sections section > div { flex-wrap: wrap !important; }
  #kindup-directory .ed-ad-sections .ku-listing-offer-link {
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  #kindup-directory .ed-table .ku-summary-actions :is(.ku-summary-tools,.ku-marks) {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    gap: .2rem;
  }
  #kindup-directory .ed-table .ku-summary-actions .ku-marks { width: auto !important; }
  #kindup-directory .ed-table .ku-summary-actions .ku-cert-count { min-width: 0 !important; white-space: normal !important; overflow-wrap: anywhere; }
  html[data-ku-edition] #kindup-directory table.ed-table {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    color: var(--ke-text);
  }
  #kindup-directory .ed-table tbody { display: table-row-group !important; }
  #kindup-directory .ed-table .ke-market-cols { display: table-column-group !important; }
  #kindup-directory .ed-table .ke-market-cols col { display: table-column !important; width: 10% !important; }
  #kindup-directory .ed-table .ke-market-cols col:nth-child(3) { width: 64% !important; }
  #kindup-directory .ed-table .ke-market-cols col:nth-child(4) { width: 16% !important; }
  #kindup-directory .ed-table thead { display: table-header-group !important; }
  #kindup-directory .ed-table:has(.ke-market-columns) thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
  }
  #kindup-directory .ed-table tr { display: table-row !important; height: auto !important; }
  #kindup-directory .ed-table :is(td,th) {
    display: table-cell !important;
    min-width: 0 !important;
    height: auto !important;
    vertical-align: middle;
    overflow-wrap: anywhere;
  }
  #kindup-directory .ed-table :is(tr[data-post], .ke-market-columns, thead tr) > :is(td,th) {
    padding: .5rem .55rem !important;
    text-align: start;
  }
  #kindup-directory .ed-table :is(.ke-market-columns, thead tr, tr[data-post]) > :is(td,th):is(:first-child,:nth-child(2)) { width: 10% !important; }
  #kindup-directory .ed-table :is(.ke-market-columns, thead tr, tr[data-post]) > :is(td,th):nth-child(3) { width: 64% !important; }
  #kindup-directory .ed-table :is(.ke-market-columns, thead tr, tr[data-post]) > :is(td,th):last-child { width: 16% !important; }
  #kindup-directory .ed-table .ke-market-columns td { font-size: .75rem; color: var(--ke-quiet); background: var(--ed-active, #eae6dc); }
  #kindup-directory .ed-table tr[data-post] { border-block-end: 1px solid var(--ke-rule); }
  #kindup-directory .ed-table tr[data-post] .ku-summary-cell { white-space: normal !important; }
  @media(max-width:760px){
    #kindup-directory .ed-table .ke-market-cols col { width: 15% !important; }
    #kindup-directory .ed-table .ke-market-cols col:nth-child(3) { width: 54% !important; }
    #kindup-directory .ed-table :is(tr[data-post], .ke-market-columns, thead tr) > :is(td,th) { padding: .45rem .2rem !important; }
    #kindup-directory .ed-table :is(.ke-market-columns, thead tr, tr[data-post]) > :is(td,th):is(:first-child,:nth-child(2)) { width: 15% !important; }
    #kindup-directory .ed-table :is(.ke-market-columns, thead tr, tr[data-post]) > :is(td,th):nth-child(3) { width: 54% !important; }
  }
}
.game-main .pg-pending[data-ke-folded] > ul { display: none !important; }
.game-main .pg-pending > header:has(.ke-broadcast-toggle) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-block: 0;
}
.ke-broadcast-toggle {
  background: var(--ke-panel);
  color: var(--ke-text);
  border: 1px solid var(--ke-rule);
  border-radius: 6px;
  padding: .35rem .65rem;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
html[data-ku-edition] .game-main .pg-pending[data-ke-folded] { min-height: 0; height: auto; padding: .55rem .8rem; }
html[data-ku-edition] .pg-sport-nav .pg-sport-grid { flex-wrap: wrap; }
html[data-ku-edition] #kindup-directory .ed-board-heading .ed-board-name h1,
html[data-ku-edition] #ku-public-page-shell .ku-page-head .ku-page-title {
  color: var(--ke-text);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.045em;
  word-break: keep-all;
}
html[data-ku-edition] #kindup-directory :is(.ed-region-bar, .ku-views) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
}
html[data-ku-edition] #kindup-directory .ku-views a[data-view] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-inline-size: 0;
  width: auto !important;
  min-height: 30px;
  height: auto;
  padding: .25rem .5rem;
  border-radius: 6px;
  font-size: .75rem;
  line-height: 1.2;
}
html[data-ku-edition] #kindup-directory .ku-regular-bar {
  flex-wrap: wrap;
  column-gap: .75rem;
  row-gap: .35rem;
}
html[data-ku-edition] #kindup-directory .ku-card.ed-store-card {
  overflow: hidden;
  border: 1px solid var(--ke-rule);
  border-radius: 9px;
  box-shadow: none;
}
html[data-ku-edition] #kindup-directory .ed-store-card .ed-store-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .15rem .55rem;
}
html[data-ku-edition] #kindup-directory .ed-store-title .ku-post-title {
  flex: 1 1 7rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 720;
}
html[data-ku-edition] #kindup-directory .ed-store-title .ed-offer {
  margin-inline-start: auto;
  font-variant-numeric: tabular-nums;
}
html[data-ku-edition] #kindup-directory .ed-store-card .ku-cover {
  position: relative;
  height: auto;
  aspect-ratio: 1.65;
}
html[data-ku-edition] #kindup-directory .ed-store-card .ku-cover .ed-near {
  position: absolute;
  inset: auto auto .45rem .45rem;
  max-width: calc(100% - .9rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: .18rem .4rem;
  border-radius: 4px;
  color: white;
  background: #22241fdb;
  font-size: .7rem;
}
html[data-ku-edition] #kindup-directory .ku-cover .ed-state {
  position: absolute;
  inset: .45rem auto auto .45rem;
  max-inline-size: calc(100% - 2.9rem);
  line-height: 1.35;
}
/* One column definition aligns a pinned notice with the regular titles below it. */
@layer edition-rows {
  .ku-anon-list .ku-anon-item { padding-inline: 0 !important; }
html[data-ku-edition] .ku-anon-list .ku-anon-item .ku-anon-summary {
  display: grid !important;
  grid-template-columns: clamp(5.5rem, 8vw, 7.5rem) minmax(0, 1fr) minmax(5rem, 10%) minmax(3.8rem, auto) !important;
  gap: .35rem .65rem;
  align-items: center;
  min-inline-size: 0;
  min-height: 2.7rem;
  padding: .5rem .75rem !important;
  text-align: start;
}
html[data-ku-edition] .ku-anon-list .ku-anon-summary > :is(.ku-anon-category, .ku-anon-notice-tag) {
  grid-area: 1 / 1 !important;
  justify-self: start;
  max-inline-size: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[data-ku-edition] .ku-anon-list .ku-anon-summary > .ku-anon-title { grid-area: 1 / 2 !important; min-inline-size: 0; }
html[data-ku-edition] .ku-anon-list .ku-anon-summary > .ku-anon-author { grid-area: 1 / 3 !important; }
html[data-ku-edition] .ku-anon-list .ku-anon-summary > .ku-anon-date { grid-area: 1 / 4 !important; }
  @media (max-width: 760px) {
  html[data-ku-edition] .ku-anon-list .ku-anon-item .ku-anon-summary {
    grid-template-columns: 4.3rem minmax(0,1fr) auto !important;
    gap: .15rem .4rem;
    padding: .45rem .4rem !important;
  }
  html[data-ku-edition] .ku-anon-list .ku-anon-summary > .ku-anon-author { grid-area: 2 / 2 !important; justify-self: start; }
  html[data-ku-edition] .ku-anon-list .ku-anon-summary > .ku-anon-date { grid-area: 2 / 3 !important; justify-self: end; }
  }
}
html[data-ku-edition] :is(.ku-anon-list, .ku-video-gallery) { min-inline-size: 0; }
html[data-ku-edition] .ku-video-gallery .ku-video-frame :is(img,video) { max-inline-size: 100%; }
html[data-ku-edition] .ku-video-gallery .ku-video-frame video { object-fit: contain; }
html[data-ku-edition] .ku-video-gallery .ku-video-frame[data-ke-shape="portrait"] { aspect-ratio: 9 / 16; }
html[data-ku-edition] .ku-video-gallery .ku-video-frame[data-ke-shape="landscape"] { aspect-ratio: 16 / 9; }
html[data-ku-edition] .ku-video-gallery .ku-video-frame[data-ke-shape="square"] { aspect-ratio: 1; }

/* Use the real login and registration forms, including their validation and extensions. */
html[data-ku-edition] .ke-account-stage {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  width: min(100%, 58rem) !important;
  margin-inline: auto;
  align-items: start !important;
  gap: clamp(1rem, 3vw, 3rem);
  padding-block: 1rem !important;
}
.ke-account-art {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(19rem, 37vw, 33rem);
  margin: 0;
  padding: 1.5rem;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(0deg, #191409bf, transparent 65%), var(--ke-hero) 55% center / cover;
}
.ke-account-art strong { font-size: clamp(1.75rem, 3vw, 3rem); line-height: 1.05; letter-spacing: -.05em; }
html[data-ku-edition] .ke-account-stage > .ke-form-card {
  align-self: start;
  justify-self: stretch;
  max-width: none !important;
  width: 100% !important;
  padding: clamp(1rem, 2vw, 2rem) !important;
  border: 1px solid var(--ke-rule);
  border-radius: 12px;
  background: var(--ke-panel);
  box-shadow: none;
}
html[data-ku-edition] .ke-account-stage :is(input,select,textarea) { max-inline-size: 100%; }
html[data-ku-edition] :is(.ku-reader-content, .ku-course-sheet, .ed-business-intro) {
  overflow-wrap: anywhere;
  line-height: 1.7;
}
html[data-ku-edition] :is(.ku-reader-content, .ed-business-intro) :is(img,video) { max-width: 100%; height: auto; }
html[data-ku-edition] :where(form) :is(input,textarea,select) { box-sizing: border-box; }
html[data-ku-edition] #kindup-directory .ku-map-selection {
  border: 1px solid var(--ke-rule);
  border-radius: 12px;
  background-color: var(--ke-panel);
  color: var(--ke-text);
}
html[data-ku-edition] #kindup-directory .ku-map-selection-title {
  margin-block: .15rem;
  font-size: 1rem;
  font-weight: 740;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html[data-ku-edition] #kindup-directory .ku-map-selection-close { min-width: 36px; min-height: 36px; }
html[data-ku-edition] :is(#main_content, .ku-reader-content) :where(form:has(textarea),form:has([contenteditable="true"])) {
  width: 100%;
  max-inline-size: 68rem;
  margin-inline: auto;
}
html[data-ku-edition] :is(#main_content, .ku-reader-content) form :is(textarea,[contenteditable="true"]) {
  min-inline-size: 0;
  max-inline-size: 100%;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
html[data-ku-edition] :where(.ku-anon-list, .ku-views, .ku-video-gallery, .ke-account-stage) :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@media (max-width: 760px) {
  html[data-ku-edition] .ke-account-stage { display: flex !important; flex-direction: column; gap: .75rem; padding-block: .5rem !important; }
  .ke-account-art { width: 100%; min-height: 6rem; padding: .8rem 1rem; background-position: center, center 55%; }
  .ke-account-art strong { font-size: 1.4rem; }
  html[data-ku-edition] #home-games .home-fixture-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)) !important;
    gap: .45rem;
    overflow: visible !important;
    scroll-snap-type: none;
  }
  html[data-ku-edition] #home-games .home-fixture-list > li { width: auto !important; min-width: 0 !important; }
  html[data-ku-edition] #kindup-directory .ku-views a[data-view] { min-height: 36px; }
  html[data-ku-edition] #kindup-directory .ed-store-card .ku-cover { aspect-ratio: 1.25; }
  /* The server also serves a minimal, script-free board to certain clients. */
  html.ke-basic-board #app :is(.flex-row,.flex-nowrap):has(select) { flex-wrap: wrap; }
  html.ke-basic-board #app .flex:has(> .w-64) { flex-wrap: wrap; max-width: 100%; margin-inline-start: 0; }
  html.ke-basic-board #app .w-64 { width: min(16rem, 100%); }
  html.ke-basic-board #app .max-w-7xl { padding-inline: .75rem; }
}
