/* 18 Oct 2026, precise refinements of tournament section.
   Loaded AFTER previous tournament styles. All rules are restricted to the section. */
/* Text scale matches the compact desktop reference, and keeps the full prose. */
html body .wapper .content .automix .am-tournament-welcome{
  display:grid!important;grid-template-columns:fit-content(100%) minmax(0,1fr)!important;
  box-sizing:border-box!important;width:calc(100% - 30px)!important;
  margin:0 auto 16px!important;padding:0 6px 5px!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
}
html body .wapper .content .automix .am-tournament-welcome>.am-tour-intro-heading{
  grid-column:1!important;
  font-size:clamp(17px,calc(1.5vw + 1px),20px)!important;line-height:1.36!important;
  margin:0 0 10px!important;padding:0 0 8px!important;
  color:#e7c880!important;border-bottom:1px solid rgba(216,176,105,.85)!important;
}
html body .wapper .content .automix .am-tournament-welcome .am-tournament-intro.am-intro-prose{
  grid-column:1/-1!important;
  margin:0!important;padding:0!important;border:0!important;background:transparent!important;
}
html body .wapper .content .automix .am-tournament-welcome .am-tournament-intro>p{
  font-size:14px!important;line-height:1.46!important;margin:0 0 8px!important;
  padding:0!important;color:#cbd5df!important;
}
html body .wapper .content .automix .am-tournament-welcome::after{
  content:"";display:block;grid-column:1;width:100%;height:1px;
  margin-top:12px;background:rgba(216,176,105,.85);
}
/* Important: lettering has the gradient, NOT the box or the title background. */
html body .wapper .content .automix .am-current-tournament>.am-tour-heading .am-tour-heading-main>h2{
  font-size:clamp(20px,2.3vw,28px)!important;font-weight:800!important;
  background:linear-gradient(104deg,#d6ac5c 0%,#fff0bb 38%,#ebcc87 68%,#bd9148 100%)!important;
  background-clip:text!important;-webkit-background-clip:text!important;
  -webkit-text-fill-color:transparent!important;color:#ebd08f!important;
  width:max-content!important;max-width:100%!important;
  overflow:hidden!important;text-overflow:ellipsis!important;
}
/* Login / unread dialog palette: soft slate-blue gradient with restrained gold edge. */
html body .wapper .content .automix .am-current-tournament>.am-tour-nav.am-toolbar{
  box-sizing:border-box!important;display:flex!important;flex-flow:row wrap!important;
  align-items:stretch!important;justify-content:flex-start!important;gap:8px!important;
  width:100%!important;max-width:100%!important;
  margin:12px 0 15px!important;padding:0!important;
  border:0!important;background:transparent!important;
  overflow:visible!important;
}
html body .wapper .content .automix .am-current-tournament>.am-tour-nav.am-toolbar>button{
  flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;
  justify-content:center!important;box-sizing:border-box!important;
  width:auto!important;min-width:0!important;max-width:none!important;
  min-height:36px!important;height:auto!important;padding:7px 13px!important;margin:0!important;
  border:1px solid #7b715f!important;border-radius:7px!important;
  background:linear-gradient(105deg,#293847,#182633)!important;
  color:#e3e5e6!important;box-shadow:inset 0 1px rgba(255,255,255,.055)!important;
  font-size:13px!important;font-weight:700!important;line-height:1.24!important;
  white-space:normal!important;text-align:center!important;
  transition:background .16s,border-color .16s!important;
}
html body .wapper .content .automix .am-current-tournament>.am-tour-nav.am-toolbar>button:hover{
  background:linear-gradient(105deg,#344a5a,#233544)!important;
  border-color:#aa9468!important;color:#f5eacf!important;
}
html body .wapper .content .automix .am-current-tournament>.am-tour-nav.am-toolbar>button.active{
  background:linear-gradient(110deg,#32596a,#234250 65%,#1c3442)!important;
  border-color:#b5a175!important;color:#f8ecce!important;
  box-shadow:inset 0 1px rgba(228,248,255,.13)!important;
}
/* Two equal-size calls to action, kept modest on desktop. */
html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-actions{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,228px))!important;
  justify-content:start!important;align-items:stretch!important;
  gap:10px!important;padding:12px 16px!important;margin:0!important;
}
html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-actions>button{
  width:100%!important;min-width:0!important;max-width:none!important;
  min-height:40px!important;height:100%!important;margin:0!important;padding:8px 10px!important;
  border-radius:6px!important;font-size:13px!important;line-height:1.28!important;
  box-shadow:none!important;white-space:normal!important;
}
/* Challonge gets its own compact slot below the prize cards, not in the facts column. */
html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-podium>.am-tour-challonge-mobile{display:none!important}
html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-facts>.am-tour-challonge-desktop{
  align-self:start!important;width:auto!important;max-width:100%!important;
  font-size:12px!important;line-height:1.2!important;
}
@media screen and (max-width:650px){
  html body .wapper .content .automix .am-tournament-welcome{
    width:calc(100% - 22px)!important;max-width:100%!important;
    margin:6px auto 11px!important;padding:3px 4px 4px!important;
  }
  /* Match the mobile Conditions tab: identical heading/body font sizes. */
  html body .wapper .content .automix .am-tournament-welcome>.am-tour-intro-heading{
    font-size:clamp(13px,3.7vw,15px)!important;line-height:1.32!important;
    margin:0 0 8px!important;padding:0 0 7px!important;
  }
  html body .wapper .content .automix .am-tournament-welcome .am-tournament-intro>p{
    font-size:clamp(10.6px,2.9vw,12px)!important;line-height:1.46!important;
    margin:0 0 6px!important;padding:0!important;
  }
  html body .wapper .content .automix .am-current-tournament>.am-tour-heading .am-tour-heading-main>h2{
    font-size:clamp(13px,3.7vw,17px)!important;line-height:1.23!important;
    white-space:nowrap!important;
  }
  /* All six visible, aligned in three columns and two rows, no clipped off-screen tabs. */
  html body .wapper .content .automix .am-current-tournament>.am-tour-nav.am-toolbar{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-flow:row!important;gap:5px!important;
    width:100%!important;max-width:100%!important;
    overflow:visible!important;margin:9px 0 12px!important;
    padding:0!important;
  }
  html body .wapper .content .automix .am-current-tournament>.am-tour-nav.am-toolbar>button{
    display:flex!important;flex:none!important;width:100%!important;
    min-width:0!important;max-width:100%!important;height:100%!important;
    min-height:35px!important;margin:0!important;padding:6px 3px!important;
    font-size:clamp(10px,2.75vw,12px)!important;line-height:1.16!important;
    word-break:normal!important;overflow-wrap:normal!important;
    border-radius:5px!important;
  }
  html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-facts>.am-tour-challonge-desktop{
    display:none!important;
  }
  html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-podium>.am-tour-challonge-mobile{
    box-sizing:border-box!important;display:inline-flex!important;
    align-items:center!important;justify-content:center!important;
    max-width:100%!important;width:auto!important;min-width:0!important;
    justify-self:end!important;align-self:start!important;
    margin:9px 0 0 auto!important;padding:7px 9px!important;
    min-height:30px!important;border:1px solid #426479!important;
    border-radius:5px!important;background:linear-gradient(115deg,#22394a,#182736)!important;
    color:#caddea!important;font-size:10.5px!important;font-weight:700!important;
    line-height:1.2!important;text-decoration:none!important;white-space:normal!important;
  }
  html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-podium>.am-tour-challonge-mobile:hover{
    background:#2a485a!important;border-color:#6f9bb1!important;
  }
  html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;padding:7px!important;
  }
  html body .wapper .content .automix .am-current-tournament #tournament-archive-card .ta-actions>button{
    min-height:36px!important;padding:6px 5px!important;
    font-size:clamp(10px,2.7vw,12px)!important;line-height:1.17!important;
  }
  /* Keep the original “О турнире” panel, but reduce its oversized text. */
  html body .wapper .content .automix .am-current-tournament .am-tour-description>p{
    font-size:clamp(10.6px,2.9vw,12px)!important;
    line-height:1.43!important;padding:0!important;
  }
  html body .wapper .content .automix .am-current-tournament .am-tour-description>.am-tour-section-heading{
    font-size:13px!important;line-height:1.24!important;
  }
}
/* A narrow phone gives the title a complete uninterrupted first line;
   status stays below, with the owner button aligned to the right. */
@media screen and (max-width:650px){
 html body .wapper .content .automix .am-current-tournament>.am-tour-heading.am-toolbar{
   grid-template-columns:minmax(0,1fr) max-content!important;
   grid-template-rows:auto auto!important;
   row-gap:4px!important;
 }
 html body .wapper .content .automix .am-current-tournament>.am-tour-heading .am-tour-heading-main{
   display:contents!important;
 }
 html body .wapper .content .automix .am-current-tournament>.am-tour-heading .am-tour-heading-main>h2{
   grid-column:1/-1!important;grid-row:1!important;
   max-width:100%!important;width:100%!important;
   white-space:nowrap!important;text-overflow:clip!important;
   overflow:visible!important;
   font-size:clamp(14px,3.7vw,17px)!important;
 }
 html body .wapper .content .automix .am-current-tournament>.am-tour-heading .am-tour-heading-status-line{
   grid-column:1!important;grid-row:2!important;align-self:center!important;
 }
 html body .wapper .content .automix .am-current-tournament>.am-tour-heading .am-tour-heading-actions{
   grid-column:2!important;grid-row:2!important;
 }
 html body .wapper .content .automix .am-current-tournament>.am-tour-heading .am-tour-heading-extras{
   grid-column:1/-1!important;grid-row:auto!important;
 }
}

/* 18.10 desktop: eliminate the old double top gutter (body 24px + intro margin). */
@media screen and (min-width:651px){
  html body .wapper .content .automix #am-content>.am-body:has(>.am-tournament-welcome){
    padding-top:8px!important;
  }
}


