* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --brand:      #ff2442;
  --brand-soft: #ff6b81;
  --text-1:     #1a1a1a;
  --text-2:     #6b6b6b;
  --text-3:     #9a9a9a;
  --bg:         #ffffff;
  --bg-soft:    #f7f7f7;
  --line:       #eeeeee;
  --radius:     10px;
  --topbar-h:   52px;
  --status-h:   29px;
  --tabbar-h:   56px;
  --fest-red:      #c8102e;
  --fest-red-deep: #6d0716;
  --fest-gold:     #ffd76a;
  --fest-gold-lt:  #fff6d8;
}
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
body { overflow-x: hidden; }

.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h); padding: 0 14px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo {
  flex-shrink: 0;
  font-size: 18px; font-weight: 800; letter-spacing: .5px;
  color: var(--brand);
}
.topbar .search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  background: var(--bg-soft);
  border-radius: 17px;
  color: var(--text-3);
  font-size: 13px;
}
.topbar .search svg { flex-shrink: 0; }
.topbar .search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 13px; color: var(--text-1);
}
.topbar .search input::placeholder { color: var(--text-3); }

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-h) - var(--status-h) - var(--tabbar-h));
  min-height: calc(100dvh - var(--topbar-h) - var(--status-h) - var(--tabbar-h)
                    - env(safe-area-inset-bottom, 0px));
  padding: 40px 24px;
}
.home-hero .title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--brand);
}
.home-hero .subtitle {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-3);
}
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  margin-top: 34px;
  padding: 0 22px;
  background: #fff;
  color: var(--brand);
  border: 1px solid rgba(255, 36, 66, .3);
  border-radius: 21px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 36, 66, .1);
  transition: transform .12s, background .15s;
}
.feedback-btn:active { transform: scale(.96); background: #fff5f7; }
.feedback-btn svg { width: 16px; height: 16px; }

.page { display: none; }
.page.active { display: block; }
#page-cards { padding-bottom: calc(var(--tabbar-h) + 16px); }

.poster {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  color: #fff;
  padding: 36px 26px calc(36px + env(safe-area-inset-bottom, 0px));
  min-height: calc(100vh - var(--topbar-h) - var(--status-h) - var(--tabbar-h));
  min-height: calc(100dvh - var(--topbar-h) - var(--status-h) - var(--tabbar-h)
                    - env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse at 50% 28%,
        #e5384f 0%, #c8102e 34%, #960d22 64%, var(--fest-red-deep) 100%);
}
.poster-rays {
  position: absolute;
  left: 50%; top: 40%;
  width: 200vmax; height: 200vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg,
      rgba(255, 215, 106, .17) 0deg 2.2deg,
      rgba(255, 215, 106, 0)   2.2deg 9deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%,
      #000 0%, rgba(0,0,0,.55) 34%, transparent 60%);
  mask-image: radial-gradient(circle at 50% 50%,
      #000 0%, rgba(0,0,0,.55) 34%, transparent 60%);
  animation: poster-spin 90s linear infinite;
  pointer-events: none;
}
@keyframes poster-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.poster-glow {
  position: absolute;
  left: 50%; top: 34%;
  width: 150%; height: 70%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at 50% 50%,
      rgba(255, 214, 102, .34), rgba(255, 214, 102, .1) 42%, transparent 68%);
  filter: blur(24px);
  pointer-events: none;
}
.poster-stars { position: absolute; inset: 0; pointer-events: none; }
.poster-stars i {
  position: absolute;
  border-radius: 50%;
  background: #ffe9a8;
  box-shadow: 0 0 6px rgba(255, 215, 106, .9);
  animation: poster-twinkle 3.2s ease-in-out infinite;
}
@keyframes poster-twinkle {
  0%, 100% { transform: scale(.7); opacity: .25; }
  50%      { transform: scale(1.5); opacity: 1; }
}
.poster-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: poster-in .8s cubic-bezier(.2, .75, .3, 1) both;
}
@keyframes poster-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.poster-brand {
  padding: 5px 15px;
  margin-bottom: 24px;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 226, 160, .88);
  border: 1px solid rgba(255, 215, 106, .32);
  border-radius: 999px;
  white-space: nowrap;
}
.poster-flag {
  width: 92px;
  height: auto;
  display: block;
  margin-bottom: 26px;
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .38),
              0 0 0 1px rgba(255, 215, 106, .28);
  transform-origin: left center;
  animation: flag-wave 4.5s ease-in-out infinite;
}
@keyframes flag-wave {
  0%, 100% { transform: rotate(-2.2deg); }
  50%      { transform: rotate(2.2deg); }
}
.poster-title {
  font-size: clamp(54px, 19vw, 86px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: .12em;
  text-indent: .12em;
  background: linear-gradient(180deg,
      #fffaf0 0%, #ffe79c 38%, #f5b32f 72%, #dc9a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 6px 22px rgba(255, 172, 44, .48));
}
.poster-years {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 6px;
  text-indent: 6px;
  color: rgba(255, 226, 160, .78);
}
.poster-count {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 88px;
  justify-content: center;
}
.poster-count .c-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .74);
}
.poster-count .c-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.poster-count .c-num {
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
  color: var(--fest-gold-lt);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(255, 200, 90, .75);
}
.poster-count .c-unit {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 226, 160, .92);
}
.poster-today {
  padding: 12px 28px;
  font-size: clamp(18px, 5.6vw, 26px);
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--fest-gold-lt);
  background: rgba(255, 215, 106, .12);
  border: 1px solid rgba(255, 215, 106, .5);
  border-radius: 999px;
  text-shadow: 0 0 30px rgba(255, 190, 70, .85);
  white-space: nowrap;
}
.poster-date {
  margin-top: 28px;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .82);
}
.poster-line {
  position: absolute;
  left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: 46px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
      transparent, rgba(255, 215, 106, .85), transparent);
  z-index: 2;
}

.card-list {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px;
}
.big-card {
  padding: 44px 20px;
  background: var(--bg-soft);
  border: 1px dashed #d8d8d8;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.big-card:active { background: #f0f0f0; transform: scale(.985); }
.big-card .title {
  font-size: 15px; color: var(--text-2); font-weight: 500;
}

.statusbar {
  display: flex; align-items: center; gap: 8px;
  height: var(--status-h);
  padding: 0 14px;
  background: var(--bg-soft);
  font-size: 11px; color: var(--text-2);
  overflow: hidden; white-space: nowrap;
}
.statusbar .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ccc; flex-shrink: 0;
}
.statusbar .dot.ok   { background: #22c55e; }
.statusbar .dot.warn { background: #f59e0b; }
.statusbar .dot.err  { background: #ef4444; }
.statusbar .sep { color: var(--text-3); }
#status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: flex; align-items: center;
  height: var(--tabbar-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; color: var(--text-3);
  cursor: pointer;
  transition: color .2s;
  user-select: none;
}
.tabbar .tab.active { color: var(--text-1); font-weight: 600; }
.tabbar .tab svg { width: 22px; height: 22px; }
.tabbar .tab.publish { flex: 0 0 60px; }
.tabbar .tab.publish .btn {
  width: 44px; height: 30px; border-radius: 15px;
  background: var(--brand);
  color: #fff; font-size: 22px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background .15s;
}
.tabbar .tab.publish:active .btn { background: var(--brand-soft); }

.fb-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.fb-mask.show { opacity: 1; pointer-events: auto; }

.fb-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0; z-index: 201;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .14);
  transform: translateY(102%);
  transition: transform .3s cubic-bezier(.22, .8, .3, 1);
}
.fb-sheet.show { transform: translateY(0); }

.fb-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.fb-head .fb-title {
  font-size: 17px; font-weight: 700; color: var(--text-1);
}
.fb-head .fb-close {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  margin-right: -6px;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.fb-head .fb-close:active { background: var(--bg-soft); }

.fb-desc {
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.fb-field { margin-bottom: 14px; }
.fb-field textarea,
.fb-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  outline: none;
  transition: border-color .15s, background .15s;
}
.fb-field textarea {
  height: 132px;
  resize: none;
  line-height: 1.6;
}
.fb-field input { height: 44px; }
.fb-field textarea:focus,
.fb-field input:focus {
  background: #fff;
  border-color: var(--brand);
}
.fb-field textarea::placeholder,
.fb-field input::placeholder { color: var(--text-3); }

.fb-counter {
  margin-top: -8px;
  margin-bottom: 14px;
  text-align: right;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.fb-counter.warn { color: var(--brand); }

.fb-submit {
  width: 100%;
  height: 46px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.fb-submit:active { opacity: .85; }
.fb-submit:disabled { opacity: .5; cursor: not-allowed; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 34px);
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  background: rgba(0,0,0,.8);
  color: #fff; font-size: 13px;
  border-radius: 20px;
  opacity: 0; pointer-events: none;
  transition: all .25s;
  z-index: 999;
  white-space: nowrap;
  max-width: 80vw;
  overflow: hidden; text-overflow: ellipsis;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================== 我的 · 登录 / 注册 / 资料 ===================== */
.me-wrap { padding: 40px 24px calc(var(--tabbar-h) + 40px); }

.me-welcome { text-align: center; margin-bottom: 24px; }
.me-welcome .me-logo {
  font-size: 22px; font-weight: 800;
  color: var(--brand); letter-spacing: 1px;
}
.me-welcome .me-tip {
  margin-top: 6px; font-size: 12px; color: var(--text-3);
}

.me-tabs {
  display: flex; background: var(--bg-soft);
  border-radius: 10px; padding: 4px; margin-bottom: 22px;
}
.me-tab {
  flex: 1; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  color: var(--text-2); border-radius: 7px;
  cursor: pointer; transition: all .18s; user-select: none;
}
.me-tab.active {
  background: #fff; color: var(--text-1); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.me-field { margin-bottom: 14px; }
.me-field label {
  display: block; font-size: 12px;
  color: var(--text-2); margin-bottom: 6px;
}
.me-field input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-soft); border: 1px solid transparent;
  border-radius: 10px; font-size: 14px; color: var(--text-1);
  outline: none; transition: border-color .15s, background .15s;
  font-family: inherit;
}
.me-field input:focus { background: #fff; border-color: var(--brand); }
.me-field input::placeholder { color: var(--text-3); }
.me-field input.err { background: #fff5f7; border-color: var(--brand); }
.me-field .err-msg {
  margin-top: 4px; font-size: 11px;
  color: var(--brand); line-height: 1.4;
}
.me-field .err-msg:empty { display: none; }

.me-submit {
  width: 100%; height: 46px; margin-top: 6px;
  background: var(--brand); color: #fff;
  border: 0; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: opacity .15s;
}
.me-submit:active { opacity: .85; }
.me-submit:disabled { opacity: .5; cursor: not-allowed; }

.me-foot {
  margin-top: 16px; text-align: center;
  font-size: 12px; color: var(--text-3);
}
.me-foot .me-link {
  color: var(--brand); font-weight: 600; cursor: pointer;
}

/* 验证码输入 */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; }
.code-btn {
  flex-shrink: 0; height: 44px; padding: 0 14px;
  background: #fff; color: var(--brand);
  border: 1px solid var(--brand); border-radius: 10px;
  font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  white-space: nowrap; transition: opacity .15s;
}
.code-btn:active { opacity: .75; }
.code-btn:disabled {
  color: var(--text-3); border-color: var(--line);
  background: var(--bg-soft); cursor: not-allowed;
}

/* 隐私政策勾选框 */
.me-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 16px;
  padding: 0 2px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.me-agree input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--brand);
  cursor: pointer;
  border-radius: 4px;
}
.me-agree-text {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.65;
}
.me-agree-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.me-agree-link:hover { text-decoration: underline; }

/* 个人资料 */
.me-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 0 22px;
}
.me-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #fff; font-size: 34px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(255,36,66,.28);
  user-select: none;
}
.me-name {
  font-size: 20px; font-weight: 700; color: var(--text-1);
  margin-bottom: 4px;
}
.me-mail {
  font-size: 12px; color: var(--text-3);
  word-break: break-all; text-align: center;
}
.me-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; margin-bottom: 14px;
}
.me-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; font-size: 14px; color: var(--text-1);
  border-bottom: 1px solid var(--line);
}
.me-row:last-child { border-bottom: 0; }
.me-row .k { color: var(--text-3); font-size: 13px; }
.me-row .v {
  color: var(--text-1); font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right; max-width: 60%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-op {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; font-size: 14px; color: var(--text-1);
  background: #fff; border-bottom: 1px solid var(--line);
  cursor: pointer; user-select: none; transition: background .15s;
}
.me-op:last-child { border-bottom: 0; }
.me-op:active { background: var(--bg-soft); }
.me-op .arrow { color: var(--text-3); font-size: 14px; }
.me-badge {
  display: inline-block; padding: 1px 7px;
  font-size: 10px; font-weight: 600; color: var(--brand);
  background: #fff0f3; border-radius: 4px;
  margin-left: 6px; vertical-align: middle;
}
.me-logout-btn {
  display: block; width: 100%; height: 46px; margin-top: 8px;
  background: #fff; color: var(--brand);
  border: 1px solid rgba(255,36,66,.3); border-radius: 10px;
  font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: background .15s;
}
.me-logout-btn:active { background: #fff5f7; }

/* 编辑弹层 */
.me-sheet-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.me-sheet-mask.show { opacity: 1; pointer-events: auto; }
.me-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 201;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.14);
  transform: translateY(102%);
  transition: transform .3s cubic-bezier(.22, .8, .3, 1);
}
.me-sheet.show { transform: translateY(0); }
.me-sheet h3 {
  font-size: 17px; font-weight: 700;
  color: var(--text-1); margin-bottom: 4px;
}
.me-sheet .me-sheet-tip {
  font-size: 12px; color: var(--text-3); margin-bottom: 16px;
}
.me-sheet input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-soft); border: 1px solid transparent;
  border-radius: 10px; font-size: 14px;
  font-family: inherit; color: var(--text-1);
  outline: none; margin-bottom: 6px;
  transition: border-color .15s, background .15s;
}
.me-sheet input:focus { background: #fff; border-color: var(--brand); }
.me-sheet input.err { background: #fff5f7; border-color: var(--brand); }
.me-sheet .err-msg {
  font-size: 11px; color: var(--brand);
  margin-bottom: 10px; min-height: 14px;
}
.me-sheet .me-sheet-btns {
  display: flex; gap: 10px; margin-top: 6px;
}
.me-sheet .me-sheet-btns button {
  flex: 1; height: 44px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: opacity .15s;
}
.me-sheet .me-sheet-cancel {
  background: var(--bg-soft); color: var(--text-2); border: 0;
}
.me-sheet .me-sheet-ok {
  background: var(--brand); color: #fff; border: 0;
}
.me-sheet .me-sheet-ok:disabled { opacity: .5; cursor: not-allowed; }
.me-sheet .me-sheet-cancel:active { opacity: .75; }
.me-sheet .me-sheet-ok:active   { opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  .poster-rays,
  .poster-flag,
  .poster-stars i,
  .poster-content { animation: none !important; }
  .fb-sheet,
  .me-sheet { transition: none !important; }
}