.participation-terms-dialog,
.terms-page {
  color: #e8efdf;
  background: #111b13;
  font-family: system-ui, sans-serif;
}
.participation-terms-dialog {
  box-sizing: border-box;
  width: min(800px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid #688342;
  border-radius: 20px;
}
.participation-terms-dialog[open] {
  display: flex;
  flex-direction: column;
}
.participation-terms-dialog::backdrop {
  background: #030902d9;
  backdrop-filter: blur(8px);
}
.terms-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #68834255;
}
.terms-dialog-header h1 {
  font-size: 24px;
  margin: 0;
}
.terms-dialog-header button {
  background: none;
  border: 0;
  color: inherit;
  font-size: 30px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.participation-document {
  overflow: auto;
  min-height: 0;
  padding: 8px 24px 24px;
  line-height: 1.7;
  font-size: 15px;
  overscroll-behavior: contain;
}
.participation-document h2 {
  font-size: 19px;
  line-height: 1.4;
  margin: 24px 0 12px;
}
.participation-document p {
  margin: 12px 0;
}
.participation-document li {
  margin: 10px 0;
}
.participation-document .terms-version {
  color: #b3c3a6;
  font-size: 13px;
}
.terms-key-rule {
  border-left: 3px solid #c3fa4c;
  padding-left: 18px;
}
.participation-document table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 18px 0;
}
.participation-document caption {
  text-align: left;
  margin-bottom: 8px;
  font-weight: 700;
}
.participation-document th,
.participation-document td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #68834277;
}
.participation-document th {
  color: #d4f6a0;
}
#terms-accept-form {
  padding: 16px 24px 20px;
  border-top: 1px solid #68834255;
  background: #182219;
  border-radius: 0 0 20px 20px;
}
.terms-checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.terms-checkbox input {
  flex: 0 0 auto;
  width: 20px !important;
  height: 20px;
  min-height: 20px !important;
  accent-color: #c3fa4c;
  margin: 1px 0 0;
}
.terms-checkbox a,
.terms-page a {
  color: #c3fa4c;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terms-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}
.terms-actions button,
.terms-print {
  border: 1px solid #829a5b;
  border-radius: 9px;
  padding: 12px 16px;
  min-height: 44px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#terms-accept {
  background: #c3fa4c;
  color: #17200a;
  font-weight: 700;
}
#terms-accept:disabled {
  opacity: 0.4;
  cursor: default;
}
#terms-feedback {
  font-size: 13px;
  color: #ffb7a3;
  margin: 8px 0 0;
}
.participation-terms-dialog :focus-visible,
.terms-page :focus-visible {
  outline: 2px solid #c3fa4c;
  outline-offset: 4px;
}
.terms-page {
  margin: 0;
  padding: 32px 16px;
}
.terms-page main {
  max-width: 800px;
  margin: auto;
}
.terms-page .participation-document {
  padding: 0;
  overflow: visible;
}
.terms-page h1 {
  font-size: 32px;
}
.terms-page nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
@media (max-width: 480px) {
  .terms-dialog-header {
    padding: 12px 16px;
  }
  .terms-dialog-header h1 {
    font-size: 20px;
  }
  .participation-document {
    padding: 4px 16px 16px;
    font-size: 14px;
  }
  .participation-document table {
    font-size: 12px;
  }
  .terms-key-rule {
    padding-left: 12px;
  }
  #terms-accept-form {
    padding: 12px 16px;
  }
  .terms-checkbox {
    font-size: 12px;
  }
  .terms-actions {
    gap: 8px;
  }
  .terms-actions button {
    flex: 1;
    font-size: 12px;
    padding: 10px 8px;
  }
}
@media print {
  .terms-page {
    background: white;
    color: black;
    padding: 0;
  }
  .terms-page nav {
    display: none;
  }
  .participation-document th,
  .participation-document .terms-version {
    color: #333;
  }
  .terms-key-rule {
    border-color: #333;
  }
  .participation-document section {
    break-inside: avoid;
  }
}
