:root {
  --teal: #108b96;
  --teal-dark: #0b6870;
  --red: #d63b3b;
  --red-pale: #fdeeee;
  --text: #333;
  --muted: #666;
  --line: #d6dfdc;
  --bg: #f4f5f7;
  --radius: 12px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a {
  color: var(--teal-dark);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.center {
  text-align: center;
}

/* ヘッダー・フッター（WordPress側のコンテストページに合わせる） */
.site-header {
  background: linear-gradient(to bottom, #45bd39 0%, #b2d7a0 68%, #c0edaa 87%, var(--bg) 100%);
  text-align: center;
}

.site-header a {
  display: block;
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 1.5em;
}

.site-footer {
  background: var(--teal);
  color: #fff;
  text-align: center;
  padding: 1.5rem 16px;
  margin-top: 3rem;
}

.site-footer ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .copy {
  margin: 0;
  font-size: 14px;
}

/* メイン（部門ごとの色は応募トップページの各部門ボタンの色に合わせる） */
.main {
  --accent: #108b96;
  --accent-dark: #0c6870;
  --accent-light: #40a2ab;
  --accent-pale: #e7f3f4;
  --accent-ring: rgba(16, 139, 150, 0.25);
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.dept-still {
  --accent: #eb6100;
  --accent-dark: #b04900;
  --accent-light: #ef8133;
  --accent-pale: #fdefe6;
  --accent-ring: rgba(235, 97, 0, 0.25);
}

.dept-movie {
  --accent: #7d4794;
  --accent-dark: #5e356f;
  --accent-light: #976ca9;
  --accent-pale: #f2edf4;
  --accent-ring: rgba(125, 71, 148, 0.25);
}

.dept-programming {
  --accent: #00a7cb;
  --accent-dark: #007d98;
  --accent-light: #33b9d5;
  --accent-pale: #e6f6fa;
  --accent-ring: rgba(0, 167, 203, 0.25);
}

.dept-music {
  --accent: #ea609e;
  --accent-dark: #b04876;
  --accent-light: #ee80b1;
  --accent-pale: #fdeff5;
  --accent-ring: rgba(234, 96, 158, 0.25);
}

.main a:not(.btn) {
  color: var(--accent-dark);
}

.page-title {
  text-align: center;
  font-size: 1.6rem;
  line-height: 1.4;
  margin: 1rem 0 1.5rem;
  color: var(--accent-dark);
}

.page-title .dept {
  display: block;
  font-size: 2rem;
  color: var(--accent);
}

/* ステップ表示 */
.steps {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0 0 1.5rem;
  padding: 0;
  counter-reset: none;
}

.steps li {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.3;
  padding: 0.6rem 0.25rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.steps li span {
  display: block;
  font-size: 1.2rem;
  font-weight: bold;
}

.steps li.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: bold;
}

.steps li.is-done {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* カード */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  padding: 0 20px 24px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card:focus {
  outline: none;
}

.card-title {
  margin: 0 -20px 1.25rem;
  padding: 0.6rem 20px;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  text-align: center;
}

.notes {
  margin: 0 0 1.25rem;
  padding-left: 1.25em;
}

.notes li {
  margin-bottom: 0.25rem;
}

.hint {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.closed {
  text-align: center;
  font-weight: bold;
  margin: 1.5rem 0;
}

/* アップロード */
.drop {
  border: 3px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  background: #fafbfa;
  transition: border-color 0.15s, background-color 0.15s;
}

.drop.is-over {
  border-color: var(--accent);
  background: var(--accent-pale);
}

.drop.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.drop-text {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.file-info {
  margin: 0.75rem 0 0;
  font-weight: bold;
  word-break: break-all;
}

.progress {
  margin-top: 1.25rem;
}

.progress-bar {
  height: 22px;
  background: #e6ecea;
  border-radius: 11px;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, var(--accent-light) 12px 24px);
  background-size: 34px 34px;
  border-radius: 11px;
  transition: width 0.2s;
  animation: stripe 1s linear infinite;
}

@keyframes stripe {
  to {
    background-position: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill {
    animation: none;
    transition: none;
  }
}

.progress-text {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0.4rem 0 0;
  font-variant-numeric: tabular-nums;
}

.progress-detail {
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--muted);
  margin-left: 0.25em;
}

.done-box {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--accent-pale);
  border-radius: var(--radius);
  text-align: center;
}

.done-box p {
  margin: 0;
}

.done-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--accent-dark);
}

.error-box {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  background: var(--red-pale);
  border-left: 5px solid var(--red);
  color: #a32222;
  font-weight: bold;
}

/* ボタン */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  min-width: 14em;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn:hover {
  background: var(--accent-dark);
}

.btn:focus-visible,
.drop input:focus-visible + .btn {
  outline: 3px solid #f2b705;
  outline-offset: 2px;
}

.btn:disabled {
  background: #b9c3c1;
  border-color: #b9c3c1;
  cursor: not-allowed;
}

.btn-sub {
  background: #fff;
  color: var(--accent-dark);
}

.btn-sub:hover {
  background: var(--accent-pale);
}

.btn-ghost {
  background: #fff;
  color: var(--muted);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: #f1f1f1;
}

.btn-large {
  font-size: 1.15rem;
  padding: 1rem 2rem;
}

/* フォーム */
.group {
  border: 0;
  margin: 0 0 1.75rem;
  padding: 0;
  min-width: 0;
}

.group legend {
  width: 100%;
  padding: 0 0 0.3rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-dark);
}

.field {
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  margin: 0 0 0.25rem;
  font-weight: bold;
}

.req,
.opt {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0 0.5em;
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1.6;
  font-weight: bold;
  vertical-align: 0.15em;
}

.req {
  background: var(--red);
  color: #fff;
}

.opt {
  background: #e6ecea;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.has-error input[type="text"],
.has-error input[type="email"],
.has-error input[type="tel"],
.has-error textarea {
  border-color: var(--red);
  background: var(--red-pale);
}

.field-error {
  margin: 0.3rem 0 0;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: bold;
}

.counter {
  margin: 0.2rem 0 0;
  text-align: right;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.counter.is-over {
  color: var(--red);
  font-weight: bold;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.choices-col {
  flex-direction: column;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.5;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-pale);
}

.has-error .choice {
  border-color: #f0b4b4;
}

.choice input {
  flex-shrink: 0;
  width: 1.2em;
  height: 1.2em;
  margin: 0.15em 0 0;
  accent-color: var(--accent);
}

.stored-file {
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: var(--accent-pale);
  border-radius: 8px;
  word-break: break-all;
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.3rem;
  }

  .page-title .dept {
    font-size: 1.6rem;
  }

  .steps li {
    font-size: 0.75rem;
  }

  .choices-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn {
    width: 100%;
    min-width: 0;
  }
}
