/* The postcard palette belongs to the guest portal, not the signed-in forum. */
.portal, .portal-dialog {
  --portal-ink: #183667;
  --portal-blue: #285ede;
  --portal-muted: #536b8b;
  --portal-line: #cbdaf1;
  color: var(--portal-ink);
  font-family: Inter, 'Microsoft YaHei UI', 'PingFang SC', system-ui, sans-serif;
}
.portal {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(24px, 4.5vh, 62px) clamp(16px, 5vw, 72px) 24px;
  display: grid;
  align-content: center;
  background-color: #f6f9ff;
  background-image: radial-gradient(#83a4d329 .8px, transparent .9px),
    radial-gradient(ellipse at 4% 0, #dceaff 0%, transparent 50%),
    radial-gradient(ellipse at 99% 96%, #eee9ff 0%, transparent 42%),
    linear-gradient(125deg, #f2f8ff, #fafcff 58%, #f6f7ff);
  background-size: 10px 10px, auto, auto, auto;
}
.portal-shell { width: min(100%, 980px); margin: 0 auto; }
.portal-mast, .portal-date, .portal-footer { display: flex; align-items: center; }
.portal-mast { justify-content: space-between; gap: 14px; margin: 0 3px 20px; }
.portal-date { gap: 7px; color: var(--portal-muted); font-size: .81rem; font-variant-numeric: tabular-nums; }
.portal-date .icon { width: 16px; height: 16px; }
.campus-cover {
  min-width: 0; min-height: clamp(265px, 25vw, 308px);
  display: grid; align-items: center; position: relative; isolation: isolate; overflow: hidden;
  border-radius: 27px; border: 1px solid #bdcff0;
  background: radial-gradient(ellipse at 13% 8%, #ffffffdb, transparent 50%),
    linear-gradient(115deg, #e9f4ff 5%, #e2efff 50%, #cadfff 76%, #dcdffb);
  box-shadow: 0 10px 32px #3363ab13, inset 0 0 0 4px #ffffff50;
}
.campus-cover::before, .campus-cover::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.campus-cover::before {
  width: 71%; height: 172%; top: -40%; right: -14%; transform: rotate(-12deg);
  background: radial-gradient(#5286cb45 .9px, transparent 1.2px) 0 0 / 6px 6px;
  mask-image: linear-gradient(115deg, transparent 12%, #000 65%);
}
.campus-cover::after {
  inset: 0;
  background: radial-gradient(ellipse 24% 21% at 16% 107%, #ffffffc9 95%, transparent 97%),
    radial-gradient(ellipse 17% 12% at 33% 103%, #ffffffbf 95%, transparent 97%),
    radial-gradient(ellipse 16% 14% at 99% 3%, #ffffffab 95%, transparent 97%),
    radial-gradient(ellipse 10% 11% at 87% -2%, #ffffffab 95%, transparent 97%);
}
.cover-copy { position: relative; z-index: 2; margin: 36px 0 38px clamp(32px,5.5vw,66px); max-width: 53%; }
.cover-copy h1 { font-size: clamp(3.4rem, 4.8vw, 4.38rem); font-weight: 900; line-height: 1.13; letter-spacing: -.045em; color: #183970; margin: 0; }
.cover-school, .cover-name { display: block; width: max-content; max-width: 100%; }
.cover-tilde { display: inline-block; vertical-align: .1em; color: #6696ec; font-weight: 700; font-size: .62em; margin-left: .09em; transform: rotate(-8deg); }
.cover-name { position: relative; isolation: isolate; color: #2b61dc; }
.cover-name::after { content: ''; position: absolute; left: -.01em; right: -.05em; bottom: .01em; height: .12em; z-index: -1; border-radius: 60% 35% 45% 35%; background: #ffe4a0; transform: rotate(-2deg); }
.cover-copy p { margin: 16px 0 0; color: #3d567c; font-size: clamp(.82rem, 1.35vw, .96rem); font-weight: 520; line-height: 1.65; }
.cover-copy p span { color: #517de0; display: inline-block; padding: 0 3px; }
.cover-photo {
  position: absolute; right: 9%; top: 50%; width: clamp(198px,24.5vw,272px); padding: 9px 9px 0; z-index: 1;
  transform: translateY(-49%) rotate(6deg); background: #fffefc; border: 1px solid #adc2df;
  border-radius: 4px; box-shadow: 3px 7px 0 -2px #7594c020, 0 10px 21px #315e9d30;
}
.cover-photo::before { content: ''; position: absolute; z-index: -1; inset: 8px -8px -6px 7px; transform: rotate(-11deg); background: repeating-linear-gradient(#f6f9ff 0 11px, #d7e4f5 12px); border: 1px solid #becee6; box-shadow: 0 3px 8px #3060a012; }
.cover-photo::after { content: ''; position: absolute; inset: 0; z-index: -1; background: #fffefc; border-radius: inherit; }
.cover-photo img { width: 100%; height: clamp(151px,17vw,190px); object-fit: cover; object-position: 50% 53%; display: block; border-radius: 2px; filter: saturate(.85) contrast(.97); }
.photo-tape { position: absolute; height: 23px; width: 83px; left: 34%; top: -11px; background: repeating-linear-gradient(106deg,#ffedafc9 0 4px, #f8d876c9 4px 6px); transform: rotate(-12deg); clip-path: polygon(2% 0, 99% 2%, 97% 22%, 100% 47%, 97% 70%, 100% 97%, 0 100%, 2% 78%, 0 55%, 3% 30%); }
.photo-caption { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; font-size: .72rem; font-weight: 600; letter-spacing: .1em; color: #506789; }
.photo-caption .icon { height: 13px; width: 13px; }
.cover-flight { position: absolute; z-index: 1; right: 37%; top: 17%; color: #3870ce; transform: rotate(4deg); pointer-events: none; }
.cover-flight > .icon { height: 28px; width: 28px; transform: rotate(9deg); }
.cover-flight > .icon svg { fill: #f5faff; stroke-width: 1.4; }
.cover-flight i { position: absolute; top: 80%; right: 85%; width: 75px; height: 28px; border: 1.5px dashed #6688c5; border-left-color: transparent; border-top: 0; border-radius: 0 0 85% 80%; transform: rotate(-13deg); }
.glint { position: absolute; z-index: 1; width: 25px; aspect-ratio: 1; pointer-events: none; clip-path: polygon(50% 0,63% 36%,100% 50%,63% 63%,50% 100%,37% 63%,0 50%,37% 37%); }
.glint-sun { left: 47.5%; bottom: 27%; background: #efae45; transform: rotate(9deg); }
.glint-pink { top: 20%; right: 4.5%; width: 21px; background: #e794b8; transform: rotate(-7deg); }
.glint-little { left: 45.8%; bottom: 36%; width: 11px; background: #6d9ce9; }
.portal-entries { display: grid; grid-template-columns: 1.14fr 1fr; gap: clamp(16px, 2.5vw, 28px); margin-top: clamp(18px, 2.5vw, 28px); }
.contact-card {
  background: #fffffff5; position: relative; min-width: 0; border: 1px solid var(--portal-line); border-radius: 21px;
  padding: 24px clamp(20px, 2.5vw, 29px); box-shadow: 0 6px 22px #436baa09;
}
.contact-card::after { content: ''; position: absolute; inset: 6px; border: 1px dashed #c8d9f0; border-radius: 16px; pointer-events: none; }
.contact-heading { display: flex; gap: 9px; align-items: center; }
.contact-heading h2 { color: #234479; font-size: 1.1rem; font-weight: 750; line-height: 1.45; margin: 0; }
.contact-heading-icon { display: grid; place-items: center; color: var(--portal-blue); }
.contact-heading-icon .icon { width: 22px; height: 22px; }
.contact-channels { margin: 14px 0 0; }
.contact-row { display: grid; align-items: center; grid-template-columns: minmax(max-content, 36%) minmax(0, 1fr); gap: 10px; min-height: 37px; font-size: .9rem; }
.contact-row + .contact-row { border-top: 1px solid #e7eef9; }
.contact-row dt, .contact-row dd { min-width: 0; display: flex; align-items: center; margin: 0; gap: 8px; }
.contact-row dt { color: #425c82; font-weight: 650; }
.contact-row dd { justify-content: flex-end; flex-wrap: wrap; padding: 4px 0; }
.contact-icon { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; color: #4770b4; background: #edf4ff; }
.contact-icon.wechat { color: #388370; background: #e8f5f0; }
.contact-icon .icon { width: 15px; height: 15px; }
.contact-value { min-width: 0; overflow-wrap: anywhere; color: var(--portal-ink); font-weight: 600; }
.contact-empty { font-size: .78rem; color: #586f90; border-radius: 6px; background: #f1f5fb; padding: 2px 8px; line-height: 1.6; }
.contact-help { margin: 12px 0 0; font-size: .81rem; line-height: 1.65; color: var(--portal-muted); }
.entry-actions { min-width: 0; display: grid; grid-template-rows: 1.18fr 1fr 1fr; gap: 10px; }
.entry-button {
  display: grid; grid-template-columns: 31px minmax(0,1fr) 20px; align-items: center; gap: 12px; min-height: 50px;
  border: 1px solid #c7d8f2; border-radius: 14px; padding: 9px clamp(15px,2.2vw,24px); text-align: left;
  background: #fffffff5; color: #24477f; font-size: .96rem; font-weight: 700;
  box-shadow: 0 3px 9px #305eab06; transition: background-color .16s, box-shadow .16s, transform .16s;
}
.entry-button > .icon:last-child { justify-self: end; width: 16px; height: 16px; color: #5376a7; }
.entry-icon { display: grid; place-items: center; border-radius: 8px; width: 31px; height: 31px; background: #eff5ff; color: var(--portal-blue); }
.entry-button:nth-child(3) .entry-icon { background: #f1efff; color: #7764bd; }
.entry-primary { background: linear-gradient(114deg, #255bd9, #4176ed); color: #fff; border-color: #2c63d8; box-shadow: 0 6px 16px #265ed52b; font-size: 1.04rem; }
.entry-primary .entry-icon { background: #ffffff28; color: white; }
.entry-primary > .icon:last-child { color: white; width: 20px; height: 20px; }
.portal-footer { flex-direction:column; justify-content:center; gap:3px; margin-top:22px; color:var(--portal-muted); font-size:.77rem; line-height:1.5; }
.footer-owner { display: inline-flex; align-items: baseline; gap: 5px; }
.footer-owner b { font-weight:700; font-style:italic; color:#2e62be; border-bottom:1px solid #b8cffb; }
.portal button:focus-visible, .portal-dialog :is(button,input):focus-visible { outline: 3px solid #3268ce; outline-offset: 3px; }

/* Shared by the guest login form and the account switcher in the forum. */
.demo-account-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-account { min-height: 58px; min-width: 0; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px; }
.demo-account:hover { background: var(--green-soft); border-color: #8db39a; }
.demo-account strong, .demo-account span { display: block; overflow-wrap: anywhere; }
.demo-account strong { font-size: .86rem; color: var(--ink); }
.demo-account span { font-size: .75rem; color: var(--muted); margin-top: 3px; }

.portal-dialog.modal {
  --green: #285ed9; --green-dark: #2049a6; --green-soft: #ebf2ff;
  --ink: var(--portal-ink); --muted: var(--portal-muted); --line: var(--portal-line);
  width: min(415px, calc(100% - 28px)); max-height: calc(100dvh - 24px); border-radius: 20px; border-color: #bfd2f1;
  box-shadow: 0 28px 84px #19376740;
}
.portal-dialog::backdrop { background: #233b6382; backdrop-filter: blur(3px); }
.portal-dialog .modal-head { padding: 15px 20px 11px; background: linear-gradient(110deg,#eff6ff,#fafbff); border-color: #dfebfa; }
.portal-dialog .modal-head h2 { color: #234578; font-size: 1.24rem; }
.portal-dialog .modal-close { border-radius: 50%; color: #48658e; }
.portal-dialog .modal-body { padding: 17px 22px 22px; }
.portal-dialog-intro { color: var(--portal-muted); margin: 0 0 16px; line-height: 1.65; font-size: .875rem; }
.portal-dialog .modal-form { gap: 12px; }
.portal-dialog .field { border-radius: 9px; }
.portal-dialog .portal-submit { margin-top: 3px; min-height: 43px; border-radius: 10px; }
.portal-switch { text-align: center; color: var(--portal-muted); margin: 12px 0 0; font-size: .84rem; }
.portal-switch button, .contact-copy { border: 0; background: transparent; color: var(--portal-blue); font-weight: 650; padding: 5px; }
.portal-switch button:hover, .contact-copy:hover { text-decoration: underline; }
.portal-demos { border-top: 1px dashed var(--portal-line); margin-top: 14px; padding-top: 13px; }
.portal-demos p { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; color: var(--portal-muted); margin: 0 0 9px; font-size: .77rem; }
.portal-demos p strong { color: var(--portal-ink); font-size: .88rem; }
.portal-dialog .demo-account { border-color: var(--portal-line); }
.portal-dialog .demo-account:hover { border-color: #82a5dc; }
.contact-dialog .contact-row { grid-template-columns: 62px minmax(0,1fr); min-height: 49px; }
.contact-copy { font-size: .78rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.contact-copy .icon { width: 14px; height: 14px; }
@media (hover:hover) {
  .entry-button:hover { transform: translateY(-2px); border-color: #8caee9; background-color: #f5f9ff; box-shadow: 0 5px 14px #325c9a17; }
  .entry-primary:hover { background: linear-gradient(114deg,#204fc0,#3568db); }
}
@media (max-width: 650px) {
  .portal { align-content: start; padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
  .portal-shell { max-width: 445px; }
  .portal-mast { margin: 0 2px 12px; }
  .portal-date { font-size: .72rem; gap: 4px; }
  .portal-date .icon { width: 14px; height: 14px; }
  .campus-cover { min-height: 191px; border-radius: 19px; align-items: end; }
  .cover-photo { inset: 0; width: 100%; border: 0; border-radius: 0; padding: 0; box-shadow: none; transform: none; background: #afcbea; z-index: -1; }
  .cover-photo img { width: 100%; height: 100%; object-position: 50% 48%; filter: saturate(.8); }
  .cover-photo::after { z-index: 0; background: linear-gradient(180deg,#e5f2ff29 5%,#d7ebff22 34%,#e0efffea 68%,#f1f7ff 100%); }
  .photo-caption, .photo-tape, .cover-photo::before, .campus-cover::after { display: none; }
  .cover-copy { margin: 0; max-width: none; padding: 0 7px 15px; text-align: center; }
  .cover-copy h1 { display: flex; align-items: baseline; justify-content: center; gap: 1px; font-size: clamp(1.56rem,6.6vw,2.06rem); line-height: 1.3; letter-spacing: -.055em; }
  .cover-school, .cover-name { display: inline; }
  .cover-tilde { font-size: .73em; margin: 0 1px; }
  .cover-copy p { margin-top: 5px; font-size: clamp(.69rem,2.9vw,.79rem); }
  .cover-copy p span { padding: 0 1px; }
  .glint-sun { left: 9%; bottom: auto; top: 16%; width: 17px; background: #fff2bb; }
  .glint-pink { top: 32%; right: 9%; width: 14px; background: #ffb5d3; }
  .glint-little { left: 12.4%; bottom: auto; top: 30%; width: 7px; background: #eef7ff; }
  .cover-flight { display: none; }
  .portal-entries { grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 16px; }
  .contact-card { padding: 18px 19px 16px; border-radius: 16px; }
  .contact-card::after { inset: 4px; border-radius: 12px; }
  .contact-heading { gap: 7px; }
  .contact-heading h2 { font-size: .96rem; }
  .contact-heading-icon .icon { width: 18px; height: 18px; }
  .contact-channels { margin-top: 9px; }
  .contact-row { min-height: 31px; font-size: .84rem; }
  .contact-help { margin-top: 8px; font-size: .76rem; }
  .entry-actions { gap: 8px; grid-template-rows: auto; }
  .entry-button { min-height: 46px; padding: 7px 15px; gap: 8px; border-radius: 12px; grid-template-columns: 24px auto; justify-content: center; position: relative; font-size: .89rem; }
  .entry-primary { min-height: 49px; font-size: .94rem; }
  .entry-icon { width: 24px; height: 24px; border-radius: 6px; }
  .entry-icon .icon { width: 16px; height: 16px; }
  .entry-button > .icon:last-child { position: absolute; right: 16px; width: 14px; height: 14px; }
  .portal-footer { font-size:.7rem; margin-top:19px; gap:3px; }
  .portal-dialog .modal-head { padding: 10px 14px; }
  .portal-dialog .modal-body { padding: 14px 17px 18px; }
}
@media (max-width: 650px) and (min-height: 720px) {
  .portal { align-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .entry-button { transition: none; }
  .entry-button:hover { transform: none; }
}
