.error { color: red;}
.has-error { padding: 5px;}
.required-mark { color: red;}
.btn:focus,.btn:active {
  outline: none !important;
}
a:focus {text-decoration: none;}
/*form :not(p):not(small):not(span):not(.error):not(.panel) {
  -moz-user-select: none !important;
  -webkit-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}*/
.form-inline .checkbox { margin-right: 10px;}
textarea { resize: vertical;}
.label {
  cursor: default;
  -moz-user-select: none !important;
  -webkit-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.middle { vertical-align: middle !important;}

.th-center th { text-align: center;}
.td-center td { text-align: center;}
.th-middle th { vertical-align: middle !important;}
.td-middle td { vertical-align: middle !important;}
.tr-grey th, .tr-grey td { background-color: #AAA;}

.dl-table th { text-align: right;}
.dl-table td { padding-left: 20px;}

tr[data-href] { cursor: pointer;}

.panel>.table-responsive>.table>tbody:first-child>tr:first-child th,
.panel>.table-responsive>.table>tbody:first-child>tr:first-child td {
  border-top: 0;
}


.clearfix:after {
  content: "";
  clear: both;
  display: block;
}

.pointer { cursor: pointer;}

details summary { display: list-item; cursor: pointer;}
details {
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid #ccc;
  /*background-color: #f5f5f5;*/
  /*box-shadow: 2px 2px 3px #ddd;*/
}

.katex-mathml {
  -moz-user-select: none !important;
  -webkit-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* text */
.no-break { white-space: nowrap;}
.break-all { word-break: break-all;}
.bold { font-weight: bold;}
.gray, .grey { color: #AAA;}
.dark-grey { color: #555;}
.black { color: #000;}
.green { color: green;}
.red { color: red;}
.blue { color: #337ab7;}
.yellow { color: #f0ad4e;}
.small80 { font-size: 80% !important;}
.small50 { font-size: 50% !important;}
span.danger { color: #d9534f;}
span.success { color: #5cb85c;}
.h4-5 { font-size: 16px;}
a.no-deco { text-decoration: none;}

pre.plain {
  border: 0;
  background-color: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre-line;
  word-break: normal;
  overflow: visible;
}

.fit-font-size.no-break {
  overflow: hidden;
  text-overflow: ellipsis;
}

.spoiler:not(:hover) {
  background-color: #555;
  color: #555;
}

/* margin */
.mt-0 { margin-top: 0px;}
.mt-1 { margin-top: 10px;}
.mt-2 { margin-top: 20px;}
.mt-3 { margin-top: 30px;}
.mt-4 { margin-top: 40px;}
.mb-0 { margin-bottom: 0px;}
.mb-1 { margin-bottom: 10px;}
.mb-2 { margin-bottom: 20px;}
.mb-3 { margin-bottom: 30px;}
.mb-4 { margin-bottom: 40px;}
.mb-02 { margin-bottom: 2px;}
.mr-0 { margin-right: 0px;}
.mr-1 { margin-right: 10px;}
.mr-2 { margin-right: 20px;}
.ml-0 { margin-left: 0px;}
.ml-1 { margin-left: 10px;}
.ml-2 { margin-left: 20px;}

/* btn-text */
a.btn-text {
  font-weight:bold;
  color: navy;
  font-size: 90%;
  cursor: pointer;
  text-decoration: none;
  -moz-user-select: none !important;
  -webkit-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}
a.btn-text:before { content: "[";}
a.btn-text:after { content: "]";}
.btn-text-group span.divider:last-child {
  display: none;
}
.btn-text-group span.divider:before {
  content: '|';
  padding: 0 5px;
  color: #DDD;
}

/* collapse-panel */
.collapse-heading { cursor: pointer;}
.collapse-heading span.pull-right:before { content: "\e113";}
.collapse-heading.collapsed span.pull-right:before { content: "\e114";}


/* header */
#main-div.float-container { background: #f5f5f5;}
.float-container>#main-container {
  background: #fff;
  box-shadow: 0px 0px 10px 5px #888;
}
#main-container {
  padding: 60px 40px 20px;
}
#main-container:not(.is-new_header) {
  min-height: 80vh;
}
#main-container.is-new_header:not(.is-type_new) {
  padding-top: 20px;
}

.navbar-brand {
  background: url("//img.atcoder.jp/assets/logo.png") no-repeat center center;
  background-size: contain;
  height: 50px;
  width: 80px;
}
.nav-pills li { line-height: 80%;}

.alert {
    padding-top: 12px;
    padding-bottom: 12px;
}

/* page top */
#scroll-page-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 6px;
  color: #FFF;
  background-color: #AAA;
  opacity: 0.7;
  border-radius: 20px;
  cursor: pointer;
  z-index: 999;
}
#scroll-page-top:hover { opacity: 1;}
@media (max-width: 767px) {
  #scroll-page-top { left: -999px;}
}


/* time */
time.fixtime { display: none;}

#fixed-server-timer {
  position: fixed;
  right: 10px;
  bottom: 0;
  width: 160px;
  height: 80px;
  margin: 0;
  padding: 20px 0;
  background-image: url('//img.atcoder.jp/assets/contest/digitalclock.png');
  text-align: center;
  line-height: 20px;
  font-size: 15px;
  cursor: pointer;
  z-index: 50;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none !important;
}

/* span.lang */
span.lang>span { display: none;}


/* footer */
footer {
  margin-bottom: 20px;
  font-weight: bold;
}
footer ul {
  text-align: center;
  margin-left: 0;
  padding: 0;
}
footer ul li {
  display: inline;
  font-size: 12px;
  margin: 0 5px;
  list-style-type: none;
  white-space: nowrap;
}
footer a {
  color: black;
}
footer a:hover {
  color: black;
  text-decoration: none;
}

/* user */
.username > span {font-weight:bold;}
a:hover.username {text-decoration: none;}
.user-red {color:#FF0000;}
.user-orange {color:#FF8000;}
.user-yellow {color:#C0C000;}
.user-blue {color:#0000FF;}
.user-cyan {color:#00C0C0;}
.user-green {color:#008000;}
.user-brown {color:#804000;}
.user-gray {color:#808080;}
.user-unrated {color:#000000;}
.user-admin {color:#C000C0;}

.crown-gold {color: #fb0;}
.crown-silver {color: #aaa;}
.a-table_ranking .a-icon { font-size: 18px;}

.fav-btn { cursor: pointer;}
.ranking-affiliation, .standings-affiliation {
  float: right;
  margin-top: 3px;
  color: #AAA;
  font-size: 75%;
  cursor: pointer;
}

.avatar { display: inline;}


/* register form */
span.required:after, label.required:after { content: "*"; color: red;}

/* code highlight */
ol.linenums {
  background-color: #f8f8f8;
}
li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9 {
  list-style-type: decimal !important;
  background-color: #f5f5f5;
}

/* post-panel */
.panel { word-wrap:break-word;}
.panel-title { display:inline;}
.panel-title a { text-decoration: none;}
.panel-default .panel-title a { color: navy;}
.panel-default .post-heading { background-color: #eee;}
.post-footer { background-color: #fff;}

/* share button */
.a2a_default_style a {
  padding: 0 1px !important;
}

/* filter panel */
.panel-filter .panel-heading {
  border-bottom: solid 2px #ddd;
}
.form-inline .select2 { margin-right: 5px;}
.form-inline input { margin-right: 5px;}
.form-filter .form-group-sm { margin-bottom: 3px;}
.form-filter table { margin: 5px 0;}
.form-filter table td { padding: 2px;}
.form-filter table td input {
  width: 80px !important;
  margin-left: 5px;
}
.filter-title {
  display: block;
  cursor: pointer;
  -moz-user-select: none !important;
  -webkit-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}
.filter-title.show span.pull-right:before { content: "\e113";}
.filter-title span.pull-right:before { content: "\e114";}

.filter-body-heading {
  display: inline-block;
  width: 100%;
  font-size: 18px;
  border-bottom: 1px solid #DDD;
  margin-top: 10px;
  margin-bottom: 10px;
}
.filter-body-heading:first-child { margin-top: -5px;}
#category-checkbox .checkbox { margin: 0;}
#collapse-filter form>div:not(:first-child) { margin-top: 10px;}


/* contest filter */
#rated-radio { margin-top: -10px;}

.div1-target {
  position: relative;
  display: inline-block;
  line-height: 1;
  color: #FF8000;
}
.div1-target::before {
  content: '◉';
  position: absolute;
  inset: 0;
  color: #FF0000;
  clip-path: inset(0 0 50% 0);
  pointer-events: none;
}


/* hall of fame */
.h2-hof {
  background-color: rgba(255,255,255,0.75);
  border-radius: 3px;
  padding: 5px 10px;
}
.panel-hofs {
  background-color: rgba(255,255,255,0.75);
}
.panel-hofs>.panel-heading {
  background-color: transparent;
}
.panel-hof {
  border-color: #BBAA99;
  background-image: url(//img.atcoder.jp/assets/hof/tile.jpg);
  margin: 4px 0;
}
.h2-hof, .panel-hofs, .panel-hof { box-shadow: 2px 2px 3px 2px rgba(0,0,0,0.5);}
.panel-title-hof {
  font-family: 'YuMincho', 'Yu Mincho', 'MS Mincho', serif;
  font-size: 24px;
}
.table-hof {
  background-color: white;
  margin: 0;
}

/* personal information */
dl#personal { margin-top: 8px;}
dl#personal dt { display: block; cursor: pointer;}

/* atcoderjobs */
.jobsrank {
  font-weight: bold;
  padding: 1px 5px;
  color: white;
}
.jobsrank.jobsrank-SSS { background-color:#FF0000;}
.jobsrank.jobsrank-SS { background-color:#FF8000;}
.jobsrank.jobsrank-S { background-color:#C0C000;}
.jobsrank.jobsrank-A { background-color:#0000FF;}
.jobsrank.jobsrank-B { background-color:#00C0C0;}
.jobsrank.jobsrank-C { background-color:#008000;}
.jobsrank.jobsrank-D { background-color:#804000;}
.jobsrank.jobsrank-E { background-color:#808080;}
.jobsrank.jobsrank-F { background-color:#000000;}
.jobsrank-text { font-weight: bold;}
.jobsrank-text.jobsrank-SSS { color:#FF0000;}
.jobsrank-text.jobsrank-SS { color:#FF8000;}
.jobsrank-text.jobsrank-S { color:#C0C000;}
.jobsrank-text.jobsrank-A { color:#0000FF;}
.jobsrank-text.jobsrank-B { color:#00C0C0;}
.jobsrank-text.jobsrank-C { color:#008000;}
.jobsrank-text.jobsrank-D { color:#804000;}
.jobsrank-text.jobsrank-E { color:#808080;}
.jobsrank-text.jobsrank-F { color:#000000;}

/* rating-stage */
.user-rating-stage-s {
  width: 15px;
  height: 15px;
  vertical-align: baseline;
}
.user-rating-stage-l {
  width: 30px;
  height: 30px;
  vertical-align: baseline;
}
.user-rating-stage-m {
  width: 17px;
  height: 17px;
  vertical-align: baseline;
}

.carousel-indicators {
  bottom: 0;
  left: 0;
  margin: 0;
  width: 100%;
}

.carousel-indicators li {
  width: 30px;
  height: 3px;
  margin: 0;
  border: none;
  border-radius: 0;
  background-color: rgba(255,255,255,.5);
}

.carousel-indicators .active {
  width: 30px;
  height: 3px;
  margin: 0;
  background-color: #fff;
}

.carousel-control {
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right {
    position: static;
    display: inline-block;
    margin: 0;
}

.carousel-inner {
  width: 100%;
  aspect-ratio: 9 / 1;
}

.carousel-inner > .item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* portal で追加したアイコン。common.css の @font-face が読む /public/fonts/top/ は、本番ではデプロイで更新されない場所を指すので、
   このファイルからの相対パスで別名のフォントとして読む */
@font-face { font-family: "iconfont-base"; src: url("../fonts/top/iconfont.woff") format("woff"), url("../fonts/top/iconfont.ttf") format("truetype"); font-weight: normal; font-style: normal; }
.a-icon.a-icon-info { font-family: "iconfont-base"; }
.a-icon-info:before { content: "\EA0F"; }

/* トップ（Top.Portal）の AtCoderInfo の新着記事カード */
.info-rss_img { aspect-ratio: 16 / 9; overflow: hidden; background-color: #eee; }
.info-rss_img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.info-rss_ttl { padding: 10px 12px; background-color: #000; color: #fff; }
.info-rss_ttl .inner { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; height: 3em; font-size: 14px; font-weight: bold; line-height: 1.5; }
.info-rss_meta { padding-top: 6px; font-size: 12px; color: #bbb; }
/* トップの AtCoderJobs と AtCoderInfo のカードの角をそろえて丸める */
.m-list-job_item { border-radius: 4px; overflow: hidden; }

/* ホーム（Top.Index）のお知らせ */
.home-news [hidden] { display: none !important; }
.home-news_head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.home-news_title { display: flex; align-items: center; gap: 8px; }
.home-news_count { padding: 3px 7px; border-radius: 10px; background-color: #337ab7; font-size: 11px; }
.home-news_tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.home-news_toggle { margin: 0; font-weight: normal; cursor: pointer; }
.home-news_toggle input { margin: 0 4px 0 0; vertical-align: -2px; }
.home-news_markall { padding: 0; font-size: inherit; }
.home-news_body { padding: 7px 15px 10px; }
/* 見出しは記事のタイトルより大きくし、右に区切り線を引いて、どこから別の区分かを分かるようにする */
.home-news_sec-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 2px 0 2px 8px; border-left: 4px solid #999; font-size: 15px; font-weight: bold; color: #333; }
.home-news_sec-title::after { content: ""; flex: 1; border-top: 1px solid #ddd; }
/* 重要な告知をすべて既読にして隠したときに新着の上が空かないよう、表示中の区分の後ろにあるときだけ間を空ける */
.home-news_sec:not([hidden]) ~ .home-news_sec .home-news_sec-title { margin-top: 14px; }
/* 重要な告知の見出しは水色の線で示す（Bootstrap の panel-info と同じ色）。新着は目立たせないよう灰色にする */
.home-news_sec-important .home-news_sec-title { border-left-color: #5bc0de; }
.home-news_list { margin: 0; overflow: hidden; }
.home-news_item { display: flex; align-items: flex-start; gap: 10px; padding: 7px 4px 7px 12px; border-bottom: 1px solid #eee; }
.home-news_item:last-child { border-bottom: 0; }
.home-news_main { flex: 1; min-width: 0; }
.home-news_link { display: block; line-height: 1.45; overflow-wrap: anywhere; }
.home-news_meta { margin-top: 1px; font-size: 11px; color: #707070; }
.home-news_meta:empty { display: none; }
.home-news_mark { flex: none; align-self: center; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid #ccc; border-radius: 50%; background-color: #fff; color: #999; }
.home-news_mark svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-news_check-double { display: none; }
.home-news_mark:hover { border-color: #5cb85c; color: #5cb85c; }
.home-news_item.is-read .home-news_link { color: #56708a; }
/* 既読は、メッセージアプリの既読の二重チェックに似せる */
.home-news_item.is-read .home-news_mark { border-color: #337ab7; color: #337ab7; }
.home-news_item.is-read .home-news_check { display: none; }
.home-news_item.is-read .home-news_check-double { display: block; }
/* 右へ払うように消してから、下の行が詰まるまでを短く続ける。高さは JS で今の値を指定してから 0 にする */
.home-news_item.is-leaving { overflow: hidden; pointer-events: none; transform: translateX(100%); opacity: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0;
  transition: transform .18s cubic-bezier(.4, 0, 1, 1), opacity .18s cubic-bezier(.4, 0, 1, 1),
    height .12s ease-out .18s, padding .12s ease-out .18s, border-width .12s ease-out .18s; }
.home-news_status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 10px 0 4px; }
.home-news_undobtn { padding: 0; vertical-align: baseline; }
.home-news_foot { display: flex; flex-wrap: wrap; gap: 4px 16px; background-color: #fafafa; }
@media (prefers-reduced-motion: reduce) {
  .home-news_item.is-leaving { transition: none; }
}
