*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ml-linen: #faf6f0;
  --ml-white: #ffffff;
  --ml-wine: #8c2f39;
  --ml-wine-dark: #6e222b;
  --ml-wine-tint: #f5e4e4;
  --ml-ink: #2e2526;
  --ml-grey: #75696a;
  --ml-line: #eadfd6;
  --ml-serif: Constantia, "Iowan Old Style", Georgia, serif;
  --ml-sans: "Segoe UI", Tahoma, Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ml-linen);
  color: var(--ml-ink);
  font-family: var(--ml-sans);
  -webkit-font-smoothing: antialiased;
}

.ml-header {
  padding: 16px;
  text-align: center;
  background: var(--ml-wine);
}
.ml-header__name {
  font-family: var(--ml-serif);
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--ml-white);
  text-decoration: none;
}

.ml-title {
  max-width: 860px;
  margin: 0 auto;
  padding: 44px 18px 30px;
  text-align: center;
  font-family: var(--ml-serif);
  font-size: clamp(25px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.25;
}
.ml-title__accent {
  display: inline-block;
  margin-top: 6px;
  padding: 0 10px;
  color: var(--ml-wine);
  border-top: 1px solid var(--ml-line);
  border-bottom: 1px solid var(--ml-line);
}

#ml-outer {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}
#ml-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 0 0 8px var(--ml-white), 0 0 0 9px var(--ml-line),
    0 20px 40px rgba(46, 37, 38, 0.12);
}
#ml-tape {
  display: block;
  width: 100%;
  height: auto;
}

#ml-begin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--ml-wine);
  border: 3px solid var(--ml-white);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease;
}
#ml-begin:hover {
  transform: translate(-50%, -50%) scale(1.06);
}
#ml-begin.ml-begin--off {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.ml-begin__mark {
  width: 30px;
  height: 30px;
  fill: var(--ml-white);
  margin-left: 3px;
}
.ml-begin__caption {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 5px 12px;
  font-family: var(--ml-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--ml-ink);
  background: var(--ml-white);
  border-radius: 4px;
}

#ml-fullview {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(46, 37, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#ml-fullview svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#ml-wrap:fullscreen,
#ml-wrap:-webkit-full-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  box-shadow: none;
}
#ml-wrap:fullscreen #ml-tape,
#ml-wrap:-webkit-full-screen #ml-tape {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ml-apply {
  padding: 54px 16px 56px;
}
.ml-apply__wrap {
  max-width: 500px;
  margin: 0 auto;
}
.ml-form {
  background: var(--ml-white);
  border: 1px solid var(--ml-line);
  padding: 30px 28px 26px;
  border-radius: 2px;
  outline: 1px solid var(--ml-line);
  outline-offset: -8px;
}
.ml-form__heading {
  text-align: center;
  font-family: var(--ml-serif);
  font-size: 24px;
  color: var(--ml-wine-dark);
  margin-bottom: 16px;
}
.ml-form__image {
  display: flex;
  justify-content: center;
}
.ml-form__image img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
}
.ml-form__status {
  text-align: center;
  margin: 12px 0 20px;
}
.ml-form__stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ml-wine);
  padding: 4px 12px;
  border: 1px solid var(--ml-wine-tint);
  border-radius: 2px;
}
.ml-form__bullet {
  width: 6px;
  height: 6px;
  background: var(--ml-wine);
  border-radius: 50%;
}
.ml-form__block {
  margin-bottom: 14px;
}
.ml-form__caption {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ml-grey);
}
.ml-form__field {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ml-ink);
  background: var(--ml-linen);
  border: 1px solid var(--ml-line);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
}
.ml-form__field--digits {
  letter-spacing: 0.04em;
}
.ml-form__field:focus {
  border-color: var(--ml-wine);
  background: var(--ml-white);
}
.ml-form__field::placeholder {
  color: #b2a5a3;
  letter-spacing: 0;
}
.ml-form__button {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  font-family: var(--ml-serif);
  font-size: 18px;
  color: var(--ml-white);
  background: var(--ml-wine);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s;
}
.ml-form__button:hover {
  background: var(--ml-wine-dark);
}
.ml-form__remark {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ml-grey);
}

.ml-footer {
  margin-top: auto;
  padding: 30px 16px;
  background: var(--ml-white);
  border-top: 1px solid var(--ml-line);
  text-align: center;
}
.ml-footer__inner {
  max-width: 800px;
  margin: 0 auto;
}
.ml-footer__menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  margin-bottom: 12px;
}
.ml-footer__menu a {
  font-family: var(--ml-serif);
  font-size: 14px;
  color: var(--ml-wine);
  text-decoration: none;
}
.ml-footer__menu a:hover {
  text-decoration: underline;
}
.ml-footer__copy {
  font-size: 12px;
  color: var(--ml-grey);
  margin-bottom: 8px;
}
.ml-footer__legal {
  font-size: 11px;
  line-height: 1.7;
  color: #9a8e8d;
}

@media (max-width: 480px) {
  #ml-begin {
    width: 64px;
    height: 64px;
  }
  .ml-begin__caption {
    font-size: 12px;
  }
  .ml-form {
    padding: 24px 18px 22px;
  }
}
