* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #111;
  font-family: "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

input,
button {
  font: inherit;
}

.news-header {
  border-bottom: 1px solid #d8d8d8;
  background: #fff;
}

.top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px 10px;
  color: #777;
  font-size: 13px;
}

.logo {
  padding: 12px 16px 18px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 7vw, 54px);
  font-weight: 800;
}

.nav {
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #222;
}

.nav ul {
  display: flex;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.nav li {
  padding: 14px 18px;
  color: #333;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.nav li.active {
  color: #d71920;
}

.article-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 15px 40px;
}

.article-title {
  margin: 0;
  padding: 0;
}

.article-title img {
  width: 100%;
  height: auto;
}

.article-title-mobile {
  display: none;
}

.article-deck {
  margin: 10px 0 0;
  padding: 0 0 10px 15px;
  border-bottom: 1px solid #dedede;
  color: #141414;
  font-size: 16px;
  font-weight: 400;
  line-height: 30px;
}

.article-photo {
  margin: 0;
}

.article-photo img {
  width: 100%;
  height: auto;
}

.article-hero {
  padding-top: 30px;
  margin-bottom: 10px;
}

.article-body {
  color: #333;
  font-size: 18px;
  line-height: 32px;
  letter-spacing: -0.5px;
  text-align: justify;
  word-break: break-all;
}

.article-body p {
  margin: 0;
  padding: 10px 0;
}

.article-ticket {
  padding: 18px 0 10px;
}

.article-ticket figcaption {
  margin-top: 4px;
  color: #333;
  font-size: 13px;
  line-height: 32px;
  text-align: center;
}

.lotto-db-section {
  padding: 30px 0;
  scroll-margin-top: 12px;
}

#lotto-form {
  width: 100%;
  margin: 0 auto;
  border: 3px solid #2b2b2b;
  background: #fff;
  color: #000;
}

.lotto-db-heading {
  padding: 4% 0 22%;
  background: url("./img/lotto-db-top.gif") no-repeat;
  background-size: 100% 100%;
}

#lotto-round {
  display: block;
  padding-top: 13px;
  text-indent: 52%;
  color: #01448f;
  font-size: clamp(18px, 4.7vw, 30px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1.5px;
  white-space: nowrap;
}

.lotto-balls {
  padding: 10px 5px 0;
}

.lotto-balls-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 1%;
  font-size: 16px;
}

.lotto-balls-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) 12% minmax(0, 1fr);
  align-items: center;
  gap: 2px;
}

.lotto-balls-row img {
  width: 100%;
  height: auto;
}

.lotto-plus {
  color: #f00;
  font-size: 30px;
  text-align: center;
}

.lotto-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 90%;
  margin: 20px auto;
}

.lotto-phone strong {
  flex-shrink: 0;
  font-size: 16px;
}

.lotto-phone input {
  min-width: 0;
  width: 27%;
  height: 36px;
  border: 2px solid #7d7d7d;
  border-radius: 0;
  padding: 2px;
  background: #fff;
  color: #000;
  font-size: 14px;
}

.lotto-phone input:first-of-type {
  width: 21%;
}

#lotto-form .send_form {
  display: block;
  width: 95%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

#lotto-form .send_form img {
  width: 100%;
  height: auto;
}

#lotto-form .send_form:focus-visible {
  outline: 3px solid #01448f;
  outline-offset: 3px;
}

.lotto-db-notice {
  margin: 15px 0 5px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.lotto-db-notice span {
  color: #f00;
}

.lotto-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 5px;
  font-size: 12px;
  line-height: 1.5;
}

.lotto-consent label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #666;
}

.lotto-consent input {
  margin: 0;
  accent-color: #1677ff;
}

.lotto-consent a {
  color: #003f7c;
}

#form-status {
  margin: 0;
  padding: 0 12px 15px;
  color: #a62020;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.reference-comments {
  margin: 0 -15px 24px;
}
.comment-table {
  border-spacing: 0;
  font-size: 12px;
}
.comment-table img {
  display: inline-block;
  height: auto;
}
.comment-table td {
  line-height: normal;
}
.comment-table td > a > img[src$="event-coment_img01.jpg"] {
  margin-top: 5px;
}

.event_roul_wrap {
  width: 95%;
  max-width: 600px;
  margin: 0 auto;
  scroll-margin-top: 12px;
}
.event_roul_wrap [hidden],
.lotto-db-section[hidden] {
  display: none !important;
}
.roulette_container {
  position: relative;
}
.event_roul_wrap img {
  display: block;
  width: 100%;
  height: auto;
}
.roulette_container .roulette {
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translate(-50%, -50%);
}
.roulette_container .roul_outer {
  width: 80%;
  pointer-events: none;
}
.roulette_container .roul_inner {
  width: 75%;
}
.roulette_container .roul_arrow {
  width: 8%;
  top: 36%;
  pointer-events: none;
}
.roulette_container .roul_btn {
  width: 25%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.roul_btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  border-radius: 50%;
}
.roul_btn:disabled {
  cursor: default;
}
.roul_rotate.rotate {
  animation: roul 2s forwards ease-out;
}
@keyframes roul {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(680deg);
  }
}
.db_container {
  animation: roulette-reveal 200ms ease-out;
  background: #151433;
}
@keyframes roulette-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.roulette-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
#lotto-form.roulette-mode {
  border: 0;
  background: #151433;
  scroll-margin-top: 12px;
}
#lotto-form.roulette-mode .lotto-db-heading,
#lotto-form.roulette-mode .lotto-balls,
#lotto-form.roulette-mode .lotto-db-notice {
  display: none;
}
#lotto-form.roulette-mode .lotto-phone {
  width: 100%;
  margin: 0;
  padding: 3% 1%;
  gap: 1%;
}
#lotto-form.roulette-mode .lotto-phone strong {
  width: 20%;
  color: #fff;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 400;
}
#lotto-form.roulette-mode .lotto-phone input {
  width: 21.75%;
  height: 40px;
  border: 1px solid #bbb;
  background: #86d0fb;
}

#lotto-form.roulette-mode .send_form {
  width: 305px;
  max-width: 90%;
  margin: 5% auto;
}
#lotto-form.roulette-mode .lotto-consent {
  padding: 0 5px 3%;
  font-size: 10px;
}
#lotto-form.roulette-mode .lotto-consent label,
#lotto-form.roulette-mode .lotto-consent a {
  color: #fff;
}
#lotto-form.roulette-mode #form-status {
  color: #ffd5d5;
}
@media (prefers-reduced-motion: reduce) {
  .roul_rotate.rotate,
  .db_container {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 400px) {
  .lotto-phone strong {
    font-size: 14px;
  }
  .lotto-balls-labels {
    font-size: 14px;
  }
  .lotto-consent {
    font-size: 11px;
  }
  .lotto-db-notice {
    font-size: 12px;
  }
}

@media (max-width: 560px) {
  .article-title-desktop {
    display: none;
  }

  .article-title-mobile {
    display: block;
    width: 100%;
  }

  /* 원본 이미지의 글자를 단어 사이에서 나누고 같은 비율로 확대한다. */
  .article-title-line {
    display: block;
    background-image: url("./img/article-title.png");
    background-repeat: no-repeat;
    background-size: var(--title-image-width) 229.411765%;
    background-position: var(--title-image-x, 0%) var(--title-image-y, 0%);
  }

  .article-title-line-1 {
    width: 79.166667%;
    aspect-ratio: 475 / 68;
    --title-image-width: 256.842105%;
  }

  .article-title-line-2 {
    width: 45%;
    aspect-ratio: 270 / 68;
    --title-image-width: 451.851852%;
    --title-image-x: 50.526316%;
  }

  .article-title-line-3 {
    width: 71.666667%;
    aspect-ratio: 430 / 68;
    --title-image-width: 283.72093%;
    --title-image-x: 95.56962%;
  }

  .article-title-line-4 {
    width: 87.666667%;
    aspect-ratio: 526 / 68;
    --title-image-width: 231.939163%;
    --title-image-y: 81.818182%;
  }

  .article-deck {
    font-size: 17px;
  }
  .top-line {
    font-size: 12px;
  }

  .nav ul {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .nav li {
    padding: 12px 13px;
    font-size: 14px;
  }
}
