:root {
  --ink: #174f52;
  --jade: #197b78;
  --jade-dark: #11605f;
  --paper: #fff9e9;
  --gold: #e9aa3e;
  --orange: #df642a;
  --red: #b8412e;
  --muted: #688181;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  background: #dff3ee url("/assets/xiamen-campus-background.png") center top / cover fixed no-repeat;
}

.hero {
  padding: 34px 18px 20px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  padding: 7px 20px;
  color: #fff8d8;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  border: 2px solid #e9b65a;
  border-radius: 2px 16px;
  background: var(--jade);
  box-shadow: 0 4px 0 rgba(119, 72, 28, .12);
}

h1 {
  margin: 10px 0 2px;
  color: var(--red);
  font-size: clamp(35px, 6vw, 56px);
  letter-spacing: 6px;
  line-height: 1.15;
  text-shadow: 0 3px 0 #ffe59f, 2px 5px 0 rgba(124, 75, 23, .16);
}

h1 span { color: var(--jade-dark); }
.hero p { margin: 8px 0 0; color: #497574; font-size: 17px; font-weight: 700; letter-spacing: 2px; }

.upload-card {
  width: min(880px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px;
  border: 3px solid #d79a43;
  border-radius: 24px 6px 24px 6px;
  background: rgba(255, 251, 235, .96);
  box-shadow: 0 18px 45px rgba(41, 101, 100, .22), inset 0 0 0 5px rgba(241, 201, 111, .25);
}

.step-strip { display: flex; align-items: center; justify-content: center; margin: 2px 4px 18px; }
.step { display: flex; align-items: center; gap: 7px; color: #789391; font-weight: 700; white-space: nowrap; }
.step b { display: grid; width: 25px; height: 25px; place-items: center; color: #fff; border-radius: 50%; background: #abc2bd; }
.step.active { color: var(--jade-dark); }
.step.active b { background: var(--orange); box-shadow: 0 0 0 4px #ffe4a4; }
.step-strip i { width: min(70px, 7vw); height: 2px; margin: 0 10px; background: repeating-linear-gradient(90deg, #c5ae79 0 6px, transparent 6px 11px); }

.photo-zone {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 3px dashed #5fa3a0;
  border-radius: 14px;
  background: #cdeceb;
}

#preview { display: none; width: 100%; height: 420px; object-fit: contain; background: #eef7ef; }
.photo-zone.has-photo { border-style: solid; background: #eef7ef; }
.photo-zone.has-photo #preview { display: block; }
.photo-zone.has-photo #placeholder { display: none; }

.photo-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 15px 3px 15px 3px;
  background: rgba(22, 108, 106, .85);
}

.island-scene { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(#bde8e7 0 55%, #74c7ca 56%); }
.sun { position: absolute; width: 90px; height: 90px; top: 35px; right: 12%; border-radius: 50%; background: rgba(255, 238, 153, .82); box-shadow: 0 0 40px #fff1a9; }
.far-hill { position: absolute; inset: 42% -8% auto; height: 100px; background: #79aaa1; clip-path: polygon(0 70%, 12% 22%, 22% 66%, 39% 12%, 52% 65%, 67% 27%, 80% 68%, 92% 17%, 100% 59%, 100% 100%, 0 100%); opacity: .75; }
.island { position: absolute; width: 52%; height: 100px; left: 24%; bottom: 58px; border-radius: 50% 50% 35% 35%; background: #4c9278; box-shadow: 0 9px 0 #e7bd73, 0 15px 0 #397f71; }
.tower { position: absolute; width: 24px; height: 60px; left: 47%; top: -48px; border: 4px solid #8b512c; background: #f2c86e; }
.tower::before { content: ""; position: absolute; left: -11px; top: -18px; border-left: 13px solid transparent; border-right: 13px solid transparent; border-bottom: 18px solid #a2472d; }
.house { position: absolute; width: 55px; height: 35px; bottom: 15px; border: 3px solid #8a5737; background: #f4d390; }
.house::before { content: ""; position: absolute; left: -5px; top: -16px; border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 16px solid #be5a34; }
.house-one { left: 13%; }.house-two { left: 39%; bottom: 4px; }.house-three { right: 9%; }
.water-lines { position: absolute; inset: 57% 0 0; background: repeating-linear-gradient(175deg, transparent 0 18px, rgba(255,255,255,.45) 19px 22px, transparent 23px 36px); opacity: .7; }
.egret { position: absolute; top: 45px; left: 15%; color: white; font-family: sans-serif; font-size: 70px; font-weight: 300; transform: rotate(-12deg); }
.photo-tip { position: absolute; inset: auto 0 17px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: white; text-shadow: 0 2px 4px #256c70; }
.photo-tip strong { font-size: 20px; }.photo-tip span { font-size: 14px; }

.actions { display: grid; grid-template-columns: 1.25fr 1fr 1.25fr; gap: 12px; margin-top: 18px; }
.button { min-height: 58px; border: 0; border-radius: 14px 4px 14px 4px; font-family: inherit; font-size: 17px; font-weight: 800; cursor: pointer; transition: transform .18s, filter .18s, opacity .18s; }
.button:not(:disabled):active { transform: scale(.98); }
.button:disabled { cursor: not-allowed; filter: grayscale(.65); opacity: .48; }
.button-primary { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; background: linear-gradient(135deg, #e77b31, #bd432d); box-shadow: 0 5px 0 #8e3b2c; }
.button-secondary { color: var(--jade-dark); border: 2px solid #559b94; background: #e9f4e9; }
.button-submit { color: #fff7da; background: linear-gradient(135deg, #278b82, #125c5c); box-shadow: 0 5px 0 #0d4547; }
.button-submit span { margin-left: 7px; font-size: 25px; }
#cameraInput { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.camera-icon { width: 25px; height: 18px; position: relative; border: 3px solid currentColor; border-radius: 4px; }
.camera-icon::before { content: ""; position: absolute; width: 8px; height: 8px; left: 6px; top: 2px; border: 2px solid currentColor; border-radius: 50%; }
.camera-icon::after { content: ""; position: absolute; width: 8px; height: 4px; left: 6px; top: -7px; border-radius: 3px 3px 0 0; background: currentColor; }
.redo-icon { display: inline-block; margin-right: 5px; font-family: sans-serif; font-size: 25px; vertical-align: -2px; }
footer { padding: 22px 12px 30px; color: #276f70; font-weight: 800; letter-spacing: 2px; text-align: center; }
.wave { color: #e09b3b; margin: 0 10px; }

dialog { padding: 0; border: 0; border-radius: 22px 5px 22px 5px; background: transparent; box-shadow: 0 25px 90px rgba(19, 65, 66, .35); }
dialog::backdrop { background: rgba(13, 65, 66, .55); backdrop-filter: blur(5px); }
.login-panel { position: relative; width: min(430px, calc(100vw - 28px)); padding: 35px 32px 30px; border: 3px solid #dba54d; border-radius: 22px 5px 22px 5px; background: var(--paper); text-align: center; box-shadow: inset 0 0 0 5px #f6dfaa; }
.login-panel::before, .login-panel::after { content: "❧"; position: absolute; color: #d5a145; font-size: 25px; }.login-panel::before { top: 12px; left: 14px; }.login-panel::after { right: 14px; bottom: 12px; transform: rotate(180deg); }
.close-button { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; color: #718a86; border: 0; background: transparent; font-size: 27px; cursor: pointer; }
.seal { display: grid; width: 48px; height: 48px; margin: 0 auto 9px; place-items: center; color: #fff4cc; border: 3px double #ffe4a8; background: var(--red); font-size: 24px; font-weight: 900; transform: rotate(-4deg); }
.login-panel h2 { margin: 5px 0; color: var(--ink); font-size: 26px; }.login-panel p { margin: 0 0 20px; color: var(--muted); font-family: sans-serif; font-size: 14px; }
.login-panel label { display: block; margin: 12px 0; text-align: left; }.login-panel label span { display: block; margin-bottom: 6px; color: #416d69; font-size: 14px; font-weight: 800; }
.login-panel input { width: 100%; height: 49px; padding: 0 14px; color: var(--ink); border: 2px solid #b7cdc3; border-radius: 9px; outline: none; background: #fffef8; font-size: 18px; }.login-panel input:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(39,139,130,.15); }
.form-error { min-height: 20px; margin: 3px 0 5px; color: #bd3e30; font-family: sans-serif; font-size: 13px; text-align: left; }
.confirm-button { width: 100%; min-height: 52px; color: #fff9df; border: 0; border-radius: 12px 3px 12px 3px; background: linear-gradient(135deg, #278b82, #125c5c); font-family: inherit; font-size: 17px; font-weight: 900; cursor: pointer; }.confirm-button:disabled { opacity: .6; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 10; display: flex; align-items: center; gap: 12px; min-width: 290px; padding: 14px 20px; color: #fff; border: 2px solid #7ec9b9; border-radius: 15px 4px 15px 4px; background: #176b68; box-shadow: 0 10px 30px rgba(21, 83, 82, .3); opacity: 0; pointer-events: none; transform: translate(-50%, 30px); transition: .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast-icon { display: grid; width: 36px; height: 36px; place-items: center; color: #176b68; border-radius: 50%; background: #ffdc87; font-weight: 900; }.toast strong, .toast span { display: block; }.toast span { margin-top: 2px; color: #cce7dc; font-family: sans-serif; font-size: 12px; }

@media (max-width: 640px) {
  .hero { padding-top: 22px; }
  .hero p { font-size: 14px; }
  .upload-card { padding: 13px; }
  .step span { display: none; }
  .step-strip i { width: 55px; }
  .photo-zone { min-height: 310px; }
  #preview { height: 360px; }
  .actions { grid-template-columns: 1fr 1fr; }
  .button-submit { grid-column: 1 / -1; }
  .wave { display: none; }
}
