:root {
  --bg: #101010;
  --bg-2: #181818;
  --panel: #1c1c1c;
  --line: #2c2c2c;
  --text: #f4f1ea;
  --muted: #b7b1a4;
  --yellow: #f5c518;
  --yellow-2: #c9a00a;
  --danger: #d4573a;
  --ok: #7cb342;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  background: radial-gradient(1200px 500px at 10% -10%, #2a240c 0%, var(--bg) 45%);
  color: var(--text);
  min-height: 100%;
}

a { color: var(--yellow); }
img { max-width: 100%; }

.wrap {
  width: min(720px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 80px;
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.mark {
  width: 42px;
  height: 42px;
  border: 2px solid var(--yellow);
  display: grid;
  place-items: center;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.04em;
}
.brand-name {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  letter-spacing: 0.12em;
  margin: 0;
}
.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

h1, h2, h3 {
  font-family: "Oswald", "Noto Sans Thai", sans-serif;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
h1 { font-size: 34px; line-height: 1.15; }

.hero, .card, .info-card {
  background: linear-gradient(180deg, #222 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 22px 20px 18px;
  margin-bottom: 16px;
  border-top: 4px solid var(--yellow);
}
.kicker {
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.lead { color: var(--muted); margin: 8px 0 0; }

.info-card {
  padding: 16px 18px;
  margin-bottom: 16px;
}
.info-grid {
  display: grid;
  gap: 12px;
}
.info-item strong {
  display: block;
  color: var(--yellow);
  font-size: 13px;
  margin-bottom: 4px;
}
.info-item p, .info-item li { margin: 0; color: var(--text); }
.info-item ul { padding-left: 18px; }

.card {
  padding: 18px;
  margin-bottom: 16px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.section-title span {
  width: 10px;
  height: 10px;
  background: var(--yellow);
}

label, .label {
  display: block;
  font-size: 14px;
  margin: 0 0 6px;
  color: var(--text);
}
.hint { color: var(--muted); font-size: 12px; margin: 0 0 10px; }

input, select, textarea {
  width: 100%;
  border: 1px solid #3a3a3a;
  background: #111;
  color: var(--text);
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 14px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--yellow);
  border-color: var(--yellow);
}

.row-2, .row-3 {
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.choice, .yesno label, .consent label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #141414;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px 10px;
  min-height: 48px;
  cursor: pointer;
}
.choice input, .yesno input, .consent input { width: auto; margin: 0; }
.choice:has(input:checked), .yesno label:has(input:checked) {
  border-color: var(--yellow);
  background: #2a240c;
}
.skill {
  padding-bottom: 4px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #2f2f2f;
}
.skill-name { font-weight: 700; margin-bottom: 8px; }
.yesno {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.consent { display: grid; gap: 10px; }
.consent label { align-items: flex-start; }
.consent-alert {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #6e5910;
  background: linear-gradient(180deg, #30270a 0%, #1e1a0b 100%);
  color: #fff4c7;
  font-size: 15px;
  line-height: 1.5;
}
.file-box {
  border: 1px dashed #5a4d12;
  background: #15150f;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #333;
}
.admin-preview {
  gap: 10px;
}
.photo-thumb {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.admin-preview img,
.photo-thumb img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #4a3d12;
}
.photo-thumb:focus-visible img,
.photo-thumb:hover img {
  outline: 2px solid var(--yellow);
  border-color: var(--yellow);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  background: rgba(0, 0, 0, 0.88);
}
.lightbox.hidden { display: none !important; }
.lightbox img {
  width: auto;
  height: auto;
  max-width: min(96vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #4a3d12;
  background: #111;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: #111;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.lightbox-hint {
  margin: 0;
  color: #cfc8b8;
  font-size: 13px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--yellow);
  color: #111;
  font-size: 18px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.secondary {
  background: transparent;
  color: var(--yellow);
  border: 1px solid var(--yellow);
}
.errors {
  background: #3a1812;
  color: #ffd7cf;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: none;
}
.errors.show { display: block; }

.success-card {
  text-align: center;
  padding: 36px 22px;
}
.success-card h1 { color: var(--yellow); }
.note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
@media (min-width: 720px) {
  .toolbar { grid-template-columns: 1fr 180px 140px; }
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #2a2a2a;
  white-space: nowrap;
}
th { color: var(--yellow); font-weight: 700; }
tr { cursor: pointer; }
tr:hover { background: #242018; }
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #2a2a2a;
}
.score { color: var(--yellow); font-weight: 800; }
.login-box { max-width: 420px; margin: 12vh auto; }
.detail-grid {
  display: grid;
  gap: 10px;
}
@media (min-width: 720px) {
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
.detail-grid .wide { grid-column: 1 / -1; }
.kv { background: #141414; border-radius: 12px; padding: 12px; }
.kv b { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.hidden { display: none !important; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions .btn, .actions a.btn { width: auto; padding: 0 16px; text-decoration: none; min-height: 44px; font-size: 15px; }
.score-note { color: var(--muted); font-size: 13px; margin-top: 6px; }
