/* 报名页、付款页、合作伙伴页：和网站的活动目录、活动详情页同一种样子（米色 + 金色 + 深蓝字）。
   用户的要求：每样东西都要对齐，文字不能在不该断的地方断开。
   - 一排或一叠的按钮一律同宽；左右两栏的内容各自靠齐同一条线
   - .nb 是「这一段不换行」（报名编号、金额、组别的一半）；整段文字用 text-wrap 避免最后一行只剩一两个字 */
:root {
  --navy: #0F1A30;
  --ink: #1A283B;
  --muted: #62728D;
  --soft: #53647E;
  --gold: #D6A84E;
  --gold-deep: #8C6819;
  --gold-light: #F3DCA2;
  --line: rgba(15, 26, 48, 0.14);
  --gold-line: rgba(214, 168, 78, 0.5);
  --gold-wash: rgba(214, 168, 78, 0.13);
  --paper: #FAF8F5;
  --ok: #0f7b55;
  --warn: #a16207;
  --bad: #be123c;
  --serif: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Montserrat', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background-color: #F3EDE3;
  background-image: linear-gradient(135deg, #FAF8F5 0%, #F3EDE3 50%, #E8E0D2 100%);
  background-attachment: fixed;
  padding: 50px 16px;
  line-break: strict;
}
.nb { white-space: nowrap; }
/* 换行的字前后对齐（js/square-text.js，用户 2026-11-20 定的，每一页都照这个）：排成两行以上的那一段，收成一个每行差不多等长的方块，
   每一行从同一条线开始；整句的字再两端拉齐（.sq-on），短标题只靠左（.sq-start）。
   .sq 是放在中间的；.sq-left 靠左，.sq-right 靠右 */
.sq { display: block; max-width: 100%; text-wrap: wrap !important; }
.sq:not(.sq-left):not(.sq-right) { margin-left: auto; margin-right: auto; }
.sq.sq-right:not(.sq-left) { margin-left: auto; margin-right: 0; }
.sq.sq-on { text-align: justify !important; }
.sq.sq-start { text-align: start !important; }
/* 不换行的一小段比整个框还宽时，只有这一段可以在空格换行（square-text.js 判断） */
.sq .nb-wrap { white-space: normal !important; word-break: normal !important; }
.success-row > span.sq { flex: 0 1 auto; }
.consent-label > span.sq { flex: 0 1 auto; min-width: 0; }
.portal {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(214, 168, 78, 0.4);
  border-radius: 32px;
  padding: 55px 50px;
  max-width: 850px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(15, 26, 48, 0.08);
}
.festival-header { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--navy); text-align: center; letter-spacing: 0.5px; margin: 0; line-height: 1.25; text-wrap: balance; }
.festival-header > span:not(.w) { background: linear-gradient(135deg, #D6A84E 0%, #8C6819 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.festival-sub { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; text-align: center; color: var(--muted); margin-top: 8px; }
.festival-divider { width: 80px; height: 2px; background: linear-gradient(90deg, rgba(214,168,78,0.05), #D6A84E, rgba(214,168,78,0.05)); margin: 22px auto 35px; }
.lang-switcher { margin-bottom: 40px; border-bottom: 1px solid rgba(214,168,78,0.3); padding-bottom: 30px; }
.lang-switcher select { font-size: 14px; font-weight: 700; }
.section-title { color: var(--gold-deep); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin: 40px 0 20px; padding-bottom: 10px; border-bottom: 1px solid rgba(214,168,78,0.45); text-wrap: balance; }
/* 两栏的表格：每一格都是「标题在上、输入框在下」，同一排的输入框上缘对齐 */
.form-grid-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.full-width-column { grid-column: span 2; }
.form-group { margin-bottom: 24px; min-width: 0; }
label { display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; text-wrap: balance; }
.optional { color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 14px 18px; border: 1px solid rgba(15,26,48,0.18); border-radius: 14px;
  color: var(--navy); background: #fff; font: inherit; font-size: 15px;
}
/* 下拉选单：箭头自己画，位置固定在右边 14px，文字的范围才量得准；放不下的字用「…」，完整的一句写在选单下面（.select-full） */
select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230F1A30' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px 14px;
}
input::placeholder { color: #9AA7BD; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214,168,78,0.22); }
select option { background-color: #fff; color: var(--navy); }
/* 学校：输入几个字再从符合的名单选（学校上千间，下拉选单太长） */
.school-pick { position: relative; }
.school-suggest { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; z-index: 30; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid rgba(214,168,78,0.55); border-radius: 14px; box-shadow: 0 12px 30px rgba(15,26,48,0.12); }
.school-suggest button { display: block; width: 100%; text-align: left; padding: 11px 18px; background: none; border: 0; border-bottom: 1px solid rgba(15,26,48,0.06); color: var(--navy); font: inherit; font-size: 14px; cursor: pointer; }
.school-suggest button:hover, .school-suggest button:focus { background: rgba(214,168,78,0.16); outline: none; }
.school-suggest .suggest-other { color: var(--gold-deep); font-weight: 700; }
.school-suggest .suggest-empty { padding: 11px 18px; color: var(--muted); font-size: 13px; }
/* 从活动页面点进来：比赛固定，大字显示名称 */
.event-fixed { padding: 16px 20px; border: 1px solid var(--gold-line); border-radius: 14px; background: rgba(214,168,78,0.1); }
.event-fixed-name { color: var(--navy); font-family: var(--serif); font-weight: 700; font-size: clamp(18px, 5.4vw, 22px); line-height: 1.3; text-wrap: balance; }
.event-fixed-date { color: var(--soft); font-size: 13px; margin-top: 4px; }
/* 「换到才艺场 / 音乐场」：在比赛名称那个框的最下面，和上面几行同一条左边线 */
.event-fixed .part-switch { display: block; margin-top: 10px; padding: 0; color: var(--gold-deep); font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
.event-fixed-region { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--gold-deep); border: 1px solid rgba(214,168,78,0.6); white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; box-shadow: none; padding: 0; flex: 0 0 auto; }
/* 上传按钮：和输入框同高，文件名太长就在中间省略，不换行 */
.file-box { display: block; width: 100%; min-height: 50px; padding: 14px 18px; border: 1px dashed rgba(15,26,48,0.28); border-radius: 14px; color: var(--soft); background: #fff; cursor: pointer; text-align: left; font: inherit; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-box:hover { background: rgba(214,168,78,0.1); color: var(--navy); }
.file-box.done { color: var(--ok); }
.file-box.busy { color: var(--warn); }
/* 按钮：文字一律一行、置中 */
.check-btn, .gold-btn, .submit-btn { display: inline-block; min-height: 50px; padding: 14px 20px; border-radius: 14px; font: inherit; font-weight: 700; font-size: 15px; line-height: 20px; text-align: center; white-space: nowrap; cursor: pointer; text-decoration: none; }
.check-btn { background: #fff; border: 1px solid rgba(214,168,78,0.65); color: var(--gold-deep); }
.check-btn:hover { background: rgba(214,168,78,0.12); }
.gold-btn { background: linear-gradient(135deg, #F3DCA2 0%, #D6A84E 100%); color: var(--navy); border: 1px solid transparent; }
.submit-btn { width: 100%; background: linear-gradient(135deg, #1B2B4B 0%, #0F1A30 100%); color: var(--gold-light); border: 1px solid transparent; font-size: 16px; }
.submit-btn:disabled, .gold-btn:disabled, .check-btn:disabled { opacity: 0.6; cursor: wait; }
.next-btn { width: 100%; }
.phone4-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; margin-top: 8px; }
.phone4-row input { min-width: 0; }
/* 窄的手机上「手机号码后四位」放不下：输入框和按钮上下两排，一样宽 */
@media (max-width: 480px) { .phone4-row { grid-template-columns: minmax(0, 1fr); } }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; text-wrap: pretty; }
.notice { font-size: 12px; margin-top: 6px; font-weight: 600; min-height: 1em; line-height: 1.6; text-wrap: pretty; }
.notice:empty { display: none; }
.notice.ok { color: var(--ok); } .notice.warn { color: var(--warn); } .notice.bad { color: var(--bad); }
/* 成员卡片：标题一行、名字在下一行，右边的状态标签不换行 */
.pax-card { border: 1px solid var(--line); background: #fff; border-radius: 16px; margin-bottom: 20px; }
.pax-card-header { background: var(--gold-wash); color: var(--navy); padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; border-radius: 16px; gap: 12px; }
.pax-card-header > span:first-child { min-width: 0; }
.pax-card-header .summary { display: block; font-weight: 500 !important; font-size: 13px !important; color: var(--muted) !important; margin-top: 2px; overflow-wrap: anywhere; }
.pax-card-header .summary:empty { display: none; }
.pax-card-body { border-top: 1px solid rgba(15,26,48,0.08); padding: 28px 30px; }
.status-badge { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 30px; background: rgba(15,26,48,0.08); color: var(--soft); white-space: nowrap; }
.status-badge.ready { background: rgba(15,123,85,0.14); color: var(--ok); }
.cs-alert { background: #fff1f2; border: 1px solid #fecdd3; padding: 15px; border-radius: 12px; color: #9f1239; font-size: 13px; line-height: 1.6; margin-bottom: 20px; text-wrap: pretty; }
.radio-list { display: flex; flex-direction: column; gap: 12px; }
.radio-label { display: flex; align-items: flex-start; gap: 12px; color: var(--navy); font-size: 14px; line-height: 1.5; cursor: pointer; background: #fff; padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(15,26,48,0.16); margin: 0; text-wrap: pretty; }
.radio-label:hover { background: rgba(214,168,78,0.1); }
.radio-label input { accent-color: #B8862B; margin-top: 4px; }
.consent-label { display: flex; align-items: flex-start; gap: 12px; background: var(--gold-wash); border: 1px solid var(--gold-line); padding: 16px; border-radius: 12px; margin: 10px 0 24px; color: #5b4310; font-size: 12px; line-height: 1.7; cursor: pointer; text-wrap: pretty; }
.consent-label input { margin-top: 4px; accent-color: #B8862B; }
/* 同意栏里的「隐私声明」连结（另开一页 /privacy）：金色、粗体、有底线 */
.consent-link { color: var(--gold-deep); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.consent-link:hover { color: var(--navy); }
.fee-box { background: var(--navy); font-weight: 700; color: var(--gold-light); font-size: 22px; text-align: center; border: 1px solid var(--navy); padding: 14px; border-radius: 14px; white-space: nowrap; }
.fee-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; line-height: 1.6; text-wrap: balance; }
.pay-after { text-align: center; text-wrap: balance; }
.draft-saved { text-align: center; text-wrap: balance; margin-top: 12px; }
/* 银行资料：标题在上、内容在下，每一行都从同一条线开始；户名、账号不换行 */
.bank-card { background: var(--paper); border: 1px solid var(--gold-line); padding: 20px; border-radius: 14px; margin: 20px 0; text-align: left; }
.bank-title { color: var(--gold-deep); font-weight: 800; margin-bottom: 14px; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; }
.bank-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.bank-row:last-child { margin-bottom: 0; }
.bank-row b { color: var(--navy); font-size: 14px; margin: 0; text-wrap: balance; }
.bank-val { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.bank-val b { white-space: nowrap; letter-spacing: 0.5px; }
#statusMessage { text-align: center; font-weight: 700; font-size: 15px; margin-top: 25px; line-height: 1.6; padding: 12px; border-radius: 10px; text-wrap: balance; }
#statusMessage:empty { display: none; }
#statusMessage.bad { color: var(--bad); } #statusMessage.busy { color: var(--warn); }
.success-panel { background: #fff; border: 1px solid rgba(214,168,78,0.55); border-radius: 16px; padding: 28px 24px; margin-top: 25px; text-align: center; box-shadow: 0 12px 30px rgba(15,26,48,0.06); }
.success-title { color: var(--ok); font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.success-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.success-regno { color: var(--navy); font-weight: 800; font-size: clamp(20px, 7vw, 28px); letter-spacing: 1px; margin: 4px 0 18px; white-space: nowrap; }
/* 左边是项目、右边是内容：右边靠右对齐，只在词和词之间换行 */
.success-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--soft); font-size: 14px; line-height: 1.5; padding: 9px 0; border-top: 1px solid rgba(15,26,48,0.08); text-align: left; }
.success-row > span:first-child { flex: 0 0 auto; white-space: nowrap; }
.success-row > span:last-child { color: var(--navy); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: break-word; text-wrap: balance; }
.success-note { color: var(--soft); font-size: 13px; line-height: 1.7; margin: 18px 0 0; text-wrap: pretty; }
/* 一组按钮：手机上一个一行、全部同宽；宽的画面平均分成几栏 */
.success-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
.success-actions > * { width: 100%; }
@media (min-width: 560px) { .success-actions { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.hidden { display: none !important; }
/* 外币赛区：报名费下面写明由 RM 换算 */
.fee-converted { font-size: 12px; font-weight: 500; color: #cbd5e1; margin-top: 4px; }
/* 小的「复制」按钮（银行账号旁边） */
.copy-mini { flex: 0 0 auto; background: #fff; border: 1px solid rgba(214,168,78,0.65); color: var(--gold-deep); font: inherit; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.copy-mini:active { transform: scale(0.96); }
.member-missing:empty { display: none; }
.member-missing { margin: 0 0 12px; font-size: 13px; }

/* 表格上方的提示行：还没付款的报名单、上次填到一半的资料。文字一行行排好，下面的按钮同宽 */
.cart-bar, .draft-bar { padding: 16px 18px; border-radius: 14px; margin-bottom: 20px; font-size: 13px; line-height: 1.6; color: var(--navy); text-align: center; text-wrap: balance; }
.cart-bar { background: var(--gold-wash); border: 1px solid var(--gold-line); }
.draft-bar { background: #eff6ff; border: 1px solid #bfdbfe; }
.cart-bar > span:first-child, .draft-bar > span:first-child { display: block; }
.bar-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; justify-items: center; }
.bar-actions .gold-btn { width: 100%; max-width: 320px; min-height: 44px; padding: 11px 16px; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--navy); }
/* 报名单：第一行编号和金额、第二行名字和付款状况、第三行组别；左右各自对齐 */
.cart-title { color: var(--gold-deep); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; text-align: left; margin: 6px 0 8px; }
.cart-row { padding: 12px 0; border-top: 1px solid rgba(15,26,48,0.08); text-align: left; font-size: 14px; line-height: 1.5; color: var(--navy); }
.cart-line { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.cart-line > :first-child { min-width: 0; overflow-wrap: break-word; }
.cart-line > :last-child { flex: 0 0 auto; white-space: nowrap; text-align: right; }
.cart-sub { color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 2px; text-wrap: balance; }
.cart-name { margin-top: 2px; overflow-wrap: break-word; }
/* 付款状况：小标签，自己一行，靠左 */
.st-pill { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; background: rgba(15,26,48,0.08); color: var(--soft); }
.st-pill.unpaid { background: #ffe4e6; color: #be123c; }
.st-pill.submitted { background: #fef3c7; color: #a16207; }
.st-pill.paid, .st-pill.waived { background: rgba(15,123,85,0.14); color: var(--ok); }
/* 下拉选单的字被切掉时，下面写出完整的一句 */
.select-full { margin-top: 6px; color: var(--soft); font-weight: 600; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-top: 1px solid rgba(15,26,48,0.2); padding: 12px 0 4px; color: var(--gold-deep); font-weight: 800; font-size: 16px; white-space: nowrap; }
/* 付款链接：放在一格里，整条一行，可以左右滑或全选 */
.pay-url { display: block; width: 100%; margin-top: 12px; min-height: 44px; padding: 10px 14px; font-size: 12px; color: var(--soft); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-align: left; white-space: nowrap; overflow-x: auto; }
/* 接下来会怎样 */
.tracker { text-align: left; margin: 22px 0 0; padding: 18px 18px 6px; border-radius: 14px; background: var(--paper); border: 1px solid rgba(214,168,78,0.4); }
.tracker-title { color: var(--gold-deep); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.tracker ol { list-style: none; margin: 0; padding: 0; }
.trk { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.trk > div { min-width: 0; }
.trk:not(:last-child)::before { content: ''; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: rgba(15,26,48,0.14); }
.trk.done:not(:last-child)::before { background: rgba(15,123,85,0.55); }
.trk-dot { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: rgba(15,26,48,0.08); color: var(--muted); position: relative; }
.trk.done .trk-dot { background: var(--ok); color: #fff; }
.trk.current .trk-dot { background: var(--gold); color: var(--navy); box-shadow: 0 0 0 4px rgba(214,168,78,0.25); }
.trk-name { font-weight: 700; font-size: 14px; line-height: 26px; color: var(--muted); }
.trk.done .trk-name, .trk.current .trk-name { color: var(--navy); }
.trk-desc { font-size: 12px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }
.trk.current .trk-desc { color: var(--soft); }
.trk-desc a { color: var(--gold-deep); white-space: nowrap; }
/* 付款页：一起报名的几笔，勾选要付的 */
.pay-list { text-align: left; margin-top: 20px; }
.pay-item { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; font-size: 14px; line-height: 1.5; color: var(--navy); cursor: pointer; }
.pay-item.off { grid-template-columns: minmax(0, 1fr); cursor: default; background: var(--paper); }
.pay-item input { margin-top: 4px; accent-color: #B8862B; }
.pay-item a { display: inline-block; margin-top: 4px; color: var(--gold-deep); font-size: 12px; }
.center-note { text-align: center; text-wrap: balance; }

@media (max-width: 680px) {
  body { padding: 20px 10px; }
  .portal { padding: 32px 18px; border-radius: 24px; }
  .festival-header { font-size: 26px; }
  input, textarea { padding-left: 14px; padding-right: 14px; }
  select { padding-left: 14px; font-size: 14px; }
  .form-grid-row { display: block; }
  .pax-card-body { padding: 22px 16px; }
  .success-panel { padding: 24px 16px; }
}

/* 中文的一个词、或「数字 + 单位」：不在中间换行（js/keepwords.js 包的） */
.w { word-break: keep-all; }  /* 一个中文词：词里面不断开，拉齐时字和字之间还是可以加空隙（js/keepwords.js；有空格的那种另外有 .nb） */

/* 「我们没有组合名称」：在名称那一格下面，和上下各留一点空 */
.radio-label.no-group { margin-top: 10px; }
.form-group input:disabled { background: var(--paper); color: var(--muted); }
