html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--background-primary, #fafafa);
  color: var(--text-primary, #111);
  font-family: var(--font-sans, "Noto Sans TC", sans-serif);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

main.container { padding: 96px 24px 120px; }

.submit-section {
  margin: 0 0 56px;
  background: var(--surface, #fff);
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: 12px;
  padding: 20px 24px;
}
.submit-form {
  display: grid;
  grid-template-columns: 160px 1.6fr 1fr auto;
  align-items: end;
  gap: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.form-actions {
  display: flex;
  align-items: end;
}
@media (max-width: 720px) {
  .submit-form {
    grid-template-columns: 1fr;
  }
  .form-actions { justify-content: flex-start; }
}
.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #111);
}
.form-label-required {
  margin-left: 4px;
  color: #dc2626;
  font-weight: 600;
}
.form-label-hint {
  margin-left: 8px;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-secondary, #9ca3af);
}
.form-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.form-counter {
  font-size: 12px;
  color: var(--text-secondary, #9ca3af);
  font-variant-numeric: tabular-nums;
}
.form-counter.is-full {
  color: #dc2626;
}
.form-input,
.form-textarea {
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary, #111);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input {
  height: 36px;
}
.form-textarea {
  padding: 8px 12px;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue, #0184ff);
  box-shadow: 0 0 0 3px rgba(1, 132, 255, 0.15);
}
.submit-button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 18px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--primary-blue, #0184ff);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.05s;
}
.submit-button:hover { background: #016fd6; }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.toast-host {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 1000;
}
.toast {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #111827;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-success { background: #047857; }
.toast.is-error { background: #b91c1c; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-blue, #0184ff);
}

.work-card-thumb {
  aspect-ratio: 16 / 10;
  background: #f3f4f6 center / cover no-repeat;
}
.work-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.work-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.work-card-student {
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
}
.work-card-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-secondary, #6b7280);
  line-height: 1.5;
}

.gallery-empty {
  text-align: center;
  color: var(--text-secondary, #9ca3af);
  padding: 64px 0;
  font-size: 15px;
}

