* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand-900: #063779;
  --brand-800: #06499f;
  --brand-700: #075bc7;
  --brand-600: #0872e6;
  --ink: #111d31;
  --muted: #66758b;
  --line: #dce5f0;
  --surface: #ffffff;
  --page: #eaf0f7;
  --danger: #d92d20;
}

html { background: var(--page); }

body {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.container {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 36px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 48px rgba(16, 42, 78, .12);
}

/* 顶部标题区 */
.top {
  position: relative;
  text-align: center;
  min-height: 188px;
  padding: 38px 20px 60px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--brand-600) 0%, var(--brand-700) 52%, var(--brand-900) 100%);
}

.year {
  position: relative;
  z-index: 1;
  font-size: 54px;
  font-weight: 760;
  color: #fff;
  letter-spacing: 5px;
  line-height: 1.1;
  text-shadow: 0 3px 12px rgba(0, 33, 89, .18);
}

.subtitle {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 21px;
  font-weight: 650;
  color: #fff;
  letter-spacing: 3px;
}

/* 卡片面板 */
.panel {
  position: relative;
  z-index: 2;
  margin: -38px 0 0;
  padding: 28px 28px 30px;
  background: var(--surface);
  border: 0;
  border-radius: 30px 30px 0 0;
  box-shadow: none;
}

/* 学校头部 */
.school-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.logo-wrapper {
  width: 100%;
  min-width: 0;
}

.school-logo-img {
  width: min(100%, 310px);
  height: auto;
  display: block;
}

/* 表单 */
.form-group {
  margin-bottom: 19px;
}

.form-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.form-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #ccd7e5;
  border-radius: 10px;
  color: var(--ink);
  background: #fbfdff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.form-input:focus {
  border-color: var(--brand-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 114, 230, .12);
}

.form-input::placeholder {
  color: #9ba8b8;
}

/* 查询按钮 */
.btn-query {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--brand-700), var(--brand-600));
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 7px;
  cursor: pointer;
  margin-top: 5px;
  box-shadow: 0 10px 20px rgba(7, 91, 199, .22);
  transition: transform .16s ease, box-shadow .2s ease, filter .2s ease;
}

.btn-query:hover {
  filter: brightness(.96);
  box-shadow: 0 7px 16px rgba(7, 91, 199, .24);
}

.btn-query:active {
  transform: translateY(1px) scale(.995);
}

.btn-query:disabled {
  background: #9cb8dc;
  box-shadow: none;
  cursor: not-allowed;
}

/* 消息提示 */
.msg {
  text-align: center;
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 14px;
  line-height: 20px;
}

/* 学校场景图 */
.door-scene {
  position: relative;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}

.door-img {
  width: 100%;
  height: clamp(290px, 75vw, 420px);
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 底部蓝色装饰 */
.bottom-blue {
  position: relative;
  height: 54px;
  padding: 0;
  text-align: center;
  margin: 0;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-800));
  border-radius: 0;
}

.seal-wrapper {
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 76px;
  height: 76px;
  padding: 4px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 24px rgba(1, 25, 62, .25);
  display: grid;
  place-items: center;
}

/* 结果面板 */
.result-panel {
  margin-top: -38px;
}

/* 网格布局 */
.grid {
  margin: 2px 0 8px;
  border-top: 1px solid var(--line);
}

.cell {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.cell:last-child {
  border-bottom: none;
}

.cell-k {
  flex-shrink: 0;
  width: 88px;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0;
}

.cell-v {
  flex: 1;
  font-size: 15px;
  color: var(--ink);
  padding-left: 16px;
  font-weight: 500;
}

/* 录取通知书 */
.notice-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.notice-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-800);
  text-align: center;
  margin-bottom: 16px;
}

.notice-tip {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.notice-preview {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
}

.notice-preview:focus-visible {
  outline: 3px solid rgba(8, 114, 230, .35);
  outline-offset: 4px;
}

.notice-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 29, 49, .12);
}

.notice-empty {
  margin: 22px 0 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #f8fbff;
  font-size: 14px;
  text-align: center;
}

.viewer-open { overflow: hidden; }

.image-viewer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  flex-direction: column;
  background: rgba(3, 12, 27, .94);
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 18px;
  color: #fff;
  background: rgba(0, 0, 0, .22);
}

.viewer-toolbar strong { font-size: 16px; }

.viewer-gesture-tip {
  margin: 8px 18px 0;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  text-align: center;
}

.viewer-close {
  min-width: 64px;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}

.viewer-canvas {
  display: grid;
  flex: 1;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  place-items: center;
  touch-action: none;
  overscroll-behavior: contain;
}

.viewer-stage {
  display: grid;
  transform-origin: center center;
  transition: transform .08s linear;
  place-items: center;
  will-change: transform;
}

.viewer-canvas img {
  display: block;
  max-width: min(100%, 1000px);
  max-height: calc(100vh - 170px);
  object-fit: contain;
  box-shadow: 0 18px 48px rgba(0,0,0,.38);
  -webkit-touch-callout: default;
  user-select: auto;
  -webkit-user-drag: none;
}

.viewer-save-status {
  min-height: 20px;
  margin: 0 18px 8px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.viewer-download {
  display: block;
  min-height: 50px;
  margin: 0 18px 18px;
  padding: 14px 18px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-600);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

/* 返回按钮 */
.btn-back {
  display: block;
  width: 100%;
  padding: 14px;
  min-height: 50px;
  background: #f5f9ff;
  color: var(--brand-700);
  border: 1px solid #a9c8ed;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s;
}

.btn-back:hover {
  background: var(--brand-700);
  color: #fff;
}

.btn-back:active {
  transform: scale(0.98);
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel {
  animation: fadeIn .36s ease both;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* 响应式 */
@media (max-width: 480px) {
  .container { max-width: 100%; box-shadow: none; }
}

@media (min-width: 481px) {
  body { padding: 24px 0; }
  .container { min-height: calc(100vh - 48px); border-radius: 24px; }
}

@media (max-width: 360px) {
  .top { min-height: 174px; padding-top: 32px; }
  .year { font-size: 48px; }
  .subtitle { font-size: 19px; }
  .panel { padding-left: 20px; padding-right: 20px; }
}
