:root {
  --ink: #18242c;
  --muted: #5c6b75;
  --line: #d8e0e6;
  --blue: #0a6ea8;
  --green: #238257;
  --panel: #ffffff;
  --soft: #f4f7f9;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #e8f3f7, #f7fafc 320px);
  font-family: Tahoma, "Noto Sans Thai", system-ui, sans-serif;
  line-height: 1.5;
}
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}
.panel {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(24, 36, 44, .09);
  overflow: hidden;
}
header {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfe;
}
h1 { margin: 0; font-size: 30px; line-height: 1.15; }
h2 { margin: 20px 0 10px; }
p { margin: 8px 0 0; color: var(--muted); }
form, .status-body {
  display: grid;
  gap: 16px;
  padding: 22px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 900;
}
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input[type="file"] {
  padding: 12px;
  min-height: 76px;
  background: #f8fbfc;
  border-style: dashed;
}
.photo-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}
.camera-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.camera-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #b9d9c9;
  border-radius: 8px;
  padding: 9px 14px;
  color: #155d3d;
  background: #eef9f3;
  font-weight: 950;
  cursor: pointer;
}
.file-status, .hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.upload-status {
  display: none;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--muted);
  font-weight: 800;
}
.upload-status.ok {
  display: block;
  color: #175d3d;
  background: #eef9f3;
  border-color: #b9d9c9;
}
.upload-status.error {
  display: block;
  color: #8a2929;
  background: #fff0f0;
  border-color: #efc7c7;
}
.upload-status.busy {
  display: block;
  color: #775200;
  background: #fff6de;
  border-color: #ecd18c;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
button, .link-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  text-decoration: none;
}
button {
  color: #fff;
  background: var(--blue);
}
.link-button {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  background: #eaf5fb;
  border-color: #bddce9;
}
.rules {
  margin: 0 22px 22px;
  padding: 14px 16px;
  border: 1px solid #dce9de;
  border-radius: 8px;
  background: #f0faf4;
  color: #245a3d;
  font-size: 13px;
}
.rules strong { display: block; margin-bottom: 6px; }
table {
  border-collapse: collapse;
  width: 100%;
}
th, td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
th { background: #eef6fb; }
.ok-text { color: #175d3d; font-weight: 900; }
.home-grid {
  display: grid;
  gap: 12px;
}
.home-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdfe;
  text-decoration: none;
}
.home-card strong { font-size: 18px; }
.home-card span { color: var(--muted); }
@media (max-width: 720px) {
  main { padding: 12px; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
