
/* Registration and the first shared visit */
.mail-options{margin:20px 0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--white)}
.mail-options legend{font-size:15px;padding:0 6px}.mail-options small{color:var(--muted);font-size:12px}
.common-intro{margin:16px 0;padding:14px 16px;background:#edf2e7;border-radius:12px;color:#48634c}
.common-intro b{font-size:13px}.common-intro p{font-size:14px;line-height:1.7}
#app-view .welcome-panel{background:#f3f0e5;margin:16px 0 22px}
.welcome-panel h2{font-size:24px}.name-picks,.place-options{display:flex;gap:8px;flex-wrap:wrap}
.place-options button{padding:6px 12px;border:1px solid var(--line);border-radius:16px;min-height:44px}
.photo-editor>div>.cover-btn,.photo-editor>div>.cover-label{position:absolute;top:auto;right:auto;bottom:4px;left:4px;border-radius:8px;background:#354436e6;color:white;width:auto;height:auto;padding:4px 7px;font-size:12px;line-height:1.5}
.photo-editor>div>.cover-btn{min-height:36px}.photo-editor>div>.cover-label{pointer-events:none}
#save-status{font-size:12px;padding:3px 0}.welcome-panel input{width:100%}

/* A scrolling, portrait-first site. The admin workspace keeps its wider layout. */
:root{--phone-width:520px;--nav-height:74px}
body.student-site{background:#eaece5;padding-bottom:calc(var(--nav-height) + env(safe-area-inset-bottom));}
#site,#app-view{width:100%;max-width:var(--phone-width);margin-inline:auto;background:var(--paper);min-height:100dvh;box-shadow:0 0 70px #3544360a;}
#site *,#app-view *{min-width:0;}
.brand-icon{flex-shrink:0;background:white;overflow:hidden;}
.brand-icon img{display:block;width:100%;height:100%;object-fit:contain;}
#site .header{padding:17px 20px;min-height:82px;gap:10px;}
#site .header nav{display:none;}
#site .brand,.app-top .brand{font-size:17px;letter-spacing:.3px;gap:9px;}
#site .brand small,.app-top .brand small{font-size:10px;letter-spacing:1px;}
#site .header-actions{gap:8px;}
#site .header-actions>.text-btn{display:none;}
#site .header-actions>.btn{font-size:12px;padding:9px 12px;min-height:44px;}
#site .header-actions>.text-btn:only-child{display:block;}
#site .hero{display:flex;flex-direction:column;padding:30px 24px 15px;gap:12px;min-height:0;}
#site .hero-copy{width:100%;}
#site .hero .eyebrow{font-size:10px;letter-spacing:.3px;gap:6px;line-height:1.7;}
#site .hero h1{font-size:clamp(40px,10.8vw,54px);line-height:1.42;letter-spacing:-1.5px;margin:22px 0 21px;}
#site .hero-lead{font-size:17px;margin-bottom:14px;}
#site .hero-desc{font-size:13px;line-height:1.95;}
#site .hero-buttons{display:grid;grid-template-columns:1fr;gap:10px;margin-top:24px;}
#site .hero-buttons .btn{width:100%;min-height:50px;font-size:15px;}
#site .hero-foot{font-size:12px;margin-top:15px;}
#site .hero-visual{width:100%;min-height:0;margin-top:9px;}
#site .room-container{width:100%;}
#site .note-top{top:5%;right:0;font-size:11px;}
#site .note-bottom{left:0;bottom:9%;padding:9px 13px;}
#site .pet-bubble{font-size:11px;bottom:1%;}
#site .details-strip{margin:10px 24px 0;grid-template-columns:1fr 1fr;padding:8px 0;gap:0;}
#site .details-strip>div{padding:17px 5px;font-size:12px;border:0;}
#site .details-strip>div:nth-child(odd){border-right:1px solid var(--line);}
#site .details-strip>div:nth-child(-n+2){border-bottom:1px solid var(--line);}
#site .strip-number{font-size:25px;}
#site .strip-number small{font-size:12px;}
#site .section{margin:0 24px;padding:48px 0;scroll-margin-top:15px;}
#site h2{font-size:29px;letter-spacing:-.6px;line-height:1.6;}
#site .section-head{display:block;margin-bottom:25px;}
#site .section-head h2{margin:12px 0;}
#site .section-head>p{font-size:13px;padding:0;}
#site .section-head.centered{display:flex;}
#site .eyebrow{font-size:10px;letter-spacing:1.4px;}
#site .steps{grid-template-columns:1fr;gap:12px;}
#site .steps article{padding:20px 20px 20px 65px;border-radius:16px;}
#site .step-doodle{position:absolute;left:20px;top:24px;font-size:28px;height:auto;}
#site .step-no{top:14px;right:14px;font-size:11px;}
#site .steps h3{margin:0 18px 7px 0;font-size:16px;}
#site .steps p{font-size:13px;}
#site .steps .text-btn{min-height:44px;}
#site .round-banner{padding:16px 14px;gap:9px;flex-wrap:wrap;}
#site .round-banner .round-icon{font-size:24px;}
#site .round-banner>div{flex:1;}
#site .round-banner p{font-size:12px;}
#site .round-banner button{width:100%;text-align:right;min-height:44px;}
#site .feature-grid{grid-template-columns:1fr;gap:18px;}
#site .feature{padding:20px 23px 24px;}
#site .feature h3{font-size:24px;}
#site .feature p,#site .boundary-list p,#site .boundaries-copy>p,#site details p{font-size:14px;line-height:1.9;}
#site .feature-tag{font-size:12px;}
#site .feature .text-btn{font-size:14px;min-height:44px;margin-top:12px;}
#site .mini-room,#site .clock-illustration{height:200px;}
#site .paper-illustration{max-width:300px;margin:16px auto;}
#site .paper-illustration p{font:19px/1.85 var(--serif);}
#site .boundaries{grid-template-columns:1fr;gap:28px;}
#site .boundary-list article{gap:14px;}
#site .boundary-list h3{font-size:16px;}
#site .faq-grid{grid-template-columns:1fr;}
#site summary{font-size:15px;gap:15px;min-height:28px;align-items:center;}
#site .closing{padding:40px 24px 45px;}
#site .closing h2{font-size:27px;}
#site .closing em{display:block;}
#site .closing p{font-size:14px;}
#site footer{display:flex;flex-direction:column;align-items:flex-start;padding:30px 24px;gap:18px;}
#site footer p{font-size:11px;}
#site footer>div{font-size:13px;}
#site footer a,#site footer button{min-height:44px;display:inline-flex;align-items:center;}
.mobile-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);z-index:30;width:100%;max-width:var(--phone-width);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-height:var(--nav-height);padding:6px 10px calc(6px + env(safe-area-inset-bottom));border-top:1px solid #e0e3d8;background:#fffdf8f5;backdrop-filter:blur(18px);box-shadow:0 -6px 25px #46583a08;}
.mobile-nav:empty{display:none;}
.mobile-nav button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:60px;padding:7px 2px;border:0;border-radius:14px;background:transparent;color:#777f6e;font-size:12px;}
.mobile-nav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;overflow:visible;}
.mobile-nav button.active{background:#ecf1e5;color:#506a4c;font-weight:600;}
.nav-notice{position:absolute;top:8px;left:calc(50% + 9px);width:7px;height:7px;border:1px solid white;background:var(--rose);border-radius:50%;}
.toast{bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px);width:max-content;max-width:min(90vw,470px);}
#app-view .app-shell{max-width:none;padding:0 20px 25px;}
#app-view .app-top{padding:17px 0;gap:9px;}
#app-view .app-top-actions{gap:10px;}
#app-view .app-top-actions .text-btn{font-size:12px;min-height:44px;}
#app-view .demo-bar{display:block;font-size:12px;line-height:1.8;margin-top:16px;padding:12px 14px;}
#app-view .demo-buttons{gap:4px 15px;margin-top:5px;}
#app-view .demo-buttons button{font-size:12px;min-height:36px;}
#app-view .app-heading{margin:25px 0 20px;display:block;}
#app-view .app-heading h1{font-size:30px;line-height:1.6;}
#app-view .app-heading p{font-size:13px;}
#app-view .app-heading>.status-pill{display:inline-block;margin-top:10px;}
#app-view .people-grid,#app-view .invite-layout,#app-view .room-grid,#app-view .growth-grid,#app-view .conversation-layout,#app-view .study-layout,#app-view .notes-grid{grid-template-columns:1fr;gap:17px;}
#app-view .person-card{max-width:none;width:100%;}
#app-view .card-gallery{aspect-ratio:4/4.3;}
#app-view .gallery-controls>button{width:44px;height:44px;}
#app-view .gallery-controls>span{font-size:11px;}
#app-view .person-copy{padding:21px;}
#app-view .person-copy>p{font-size:14px;min-height:0;}
#app-view .person-title{flex-wrap:wrap;}
#app-view .person-title>span{font-size:12px;}
#app-view .person-copy>.btn{font-size:14px;}
#app-view .tag{font-size:12px;}
#app-view .panel,#app-view .invite-layout>.panel{padding:20px;border-radius:17px;}
#app-view .waiting-card{padding:25px 20px;margin:25px auto;}
#app-view .waiting-card h2{font-size:27px;}
#app-view .waiting-card .btn{width:100%;}
#app-view .growth-grid .cat-home{min-height:0;padding-top:20px;}
#app-view .growth-room{margin-top:25px;}
#app-view .cat-state{top:12px;left:12px;right:12px;gap:5px;}
#app-view .cat-state>.status-pill{font-size:11px;padding:4px 8px;}
#app-view .cat-state>.text-btn{font-size:12px;min-height:40px;}
#app-view .growth-grid .cat-controls{width:100%;margin-top:-15px;padding:0 15px 10px;gap:9px;flex-wrap:nowrap;}
#app-view .growth-grid .cat-controls .btn{font-size:13px;padding:11px 10px;min-height:46px;flex:1;}
#app-view .cat-message{font-size:13px;}
#app-view .xp-total{font-size:35px;}
#app-view .xp-panel .panel-title{margin-bottom:9px;}
#app-view .daily-chips{margin:12px 0;}
#app-view .daily-chips>span{font-size:12px;}
#app-view .member small{font-size:12px;}
#app-view .member b{font-size:14px;}
#app-view .mini-text{font-size:12px;line-height:1.85;}
#app-view .room-tabs{gap:0;margin-top:23px;justify-content:space-between;overflow-x:auto;white-space:nowrap;}
#app-view .room-tabs button{padding:15px 8px;font-size:13px;flex-shrink:0;}
#app-view .tab-content{padding-top:18px;scroll-margin-top:14px;}
#app-view .chat-stream{height:clamp(260px,45dvh,400px);padding:8px 0 15px;}
#app-view .chat-bubble{font-size:15px;padding:11px 14px;}
#app-view .chat-line small{font-size:11px;}
#app-view .chat-send-row small{font-size:11px;}
#app-view .chat-send-row .btn{min-height:44px;font-size:14px;}
#app-view .prompt-list{max-height:none;}
#app-view .prompt-list button{padding:12px 14px;}
#app-view .prompt-list small{font-size:11px;}
#app-view .prompt-list span{font-size:14px;}
#app-view .quick-plans .btn,#app-view .plan-actions .btn{font-size:13px;min-height:44px;}
#app-view .study-main{padding:25px 17px;}
#app-view .plan-card p{font-size:14px;}
#app-view .wardrobe-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}
#app-view .item-card{padding:16px 6px;min-height:140px;}
#app-view .item-card b{font-size:12px;}
#app-view .item-card small{font-size:11px;}
#app-view .item-icon{width:44px;height:44px;}
#app-view .wardrobe-panel .panel-title{align-items:flex-start;flex-wrap:wrap;}
#app-view .app-bottom-actions{justify-content:flex-start;flex-wrap:wrap;gap:5px 20px;}
#app-view .app-bottom-actions button{min-height:44px;font-size:12px;}
body.student-site dialog{width:min(100%,var(--phone-width));max-height:calc(100dvh - 24px);padding:34px 24px 24px;border-radius:22px;overscroll-behavior:contain;}
body.student-site dialog .modal-close{width:44px;height:44px;top:7px;right:8px;display:grid;place-items:center;}
body.student-site .field input,body.student-site .field select,body.student-site .field textarea{font-size:16px;min-height:48px;}
body.student-site .field{font-size:14px;}
body.student-site .field small{font-size:12px;}
body.student-site .check-line{font-size:13px;line-height:1.85;}
body.student-site .check-line input{width:18px;height:18px;flex-shrink:0;}
body.student-site .modal-desc{font-size:14px;}
body.student-site dialog[data-mode="questions"]{height:100dvh;max-height:100dvh;margin:0 auto;padding:0;border:0;border-radius:0;overflow-y:auto;}
dialog[data-mode="questions"] #modal-content{min-height:100%;display:flex;flex-direction:column;padding:calc(25px + env(safe-area-inset-top)) 24px 0;}
dialog[data-mode="questions"] .modal-close{top:calc(8px + env(safe-area-inset-top))!important;}
.question-section{font-size:12px;color:var(--sage);letter-spacing:2px;margin:0 40px 7px 0;}
dialog[data-mode="questions"] .question-counter{font-size:13px;}
dialog[data-mode="questions"] .progress{height:5px;margin:15px 0 27px;flex-shrink:0;}
dialog[data-mode="questions"] .question-title{font-size:26px;line-height:1.6;letter-spacing:0;}
dialog[data-mode="questions"] .question-hint{font-size:13px;line-height:1.9;min-height:0;}
dialog[data-mode="questions"] .options{grid-template-columns:1fr;gap:12px;margin:25px 0;}
dialog[data-mode="questions"] .option{font-size:15px;min-height:64px;padding:17px 16px;gap:12px;line-height:1.65;border-radius:13px;}
dialog[data-mode="questions"] .option:before{width:17px;height:17px;}
dialog[data-mode="questions"] .form-footer{position:sticky;bottom:0;z-index:2;background:var(--paper);border-top:1px solid var(--line);margin-top:auto;padding:16px 0 calc(18px + env(safe-area-inset-bottom));}
dialog[data-mode="questions"] .form-footer .text-btn{font-size:14px;min-height:48px;}
dialog[data-mode="questions"] .form-footer .btn{min-width:140px;}
body.student-site .level-selector button{min-width:44px;min-height:44px;font-size:12px;}
body.student-site .level-road b{font-size:15px;}
body.student-site .level-road>div>span:last-child{font-size:12px;}
@media(max-width:360px){
 #site .header{padding:14px;}.brand-icon{width:37px;height:37px;}
 #site .brand,.app-top .brand{font-size:15px;}#site .brand small,.app-top .brand small{font-size:9px;}
 #site .hero{padding-inline:19px;}#site .section{margin-inline:19px;}#site .details-strip{margin-inline:19px;}
 #app-view .app-shell{padding-inline:14px;}#app-view .room-tabs button{font-size:12px;padding-inline:6px;}
 body.student-site dialog{padding-inline:19px;}dialog[data-mode="questions"] #modal-content{padding-inline:20px;}
 dialog[data-mode="questions"] .question-title{font-size:24px;}.form-row{gap:7px;}.form-row>.btn{padding-inline:12px;font-size:12px;}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto;}}

.care-challenge {margin: 16px 0; background: #f7f5e9; border: 1px solid #dfddca;}
.care-challenge p {line-height: 1.7; margin: 8px 0;}
.care-challenge small {color: #635e52;}
.claim-ticket {display:grid;gap:5px;border:1px dashed #a3a881;border-radius:12px;background:#fffdf5;padding:16px;}
.claim-ticket strong {letter-spacing:.08em;}

.how-link {color:#405f4c;text-decoration:underline;text-underline-offset:4px;padding-block:8px;}
.answer-preview {margin:12px 0;border-block:1px solid #d9e1d6;color:#385641;}
.answer-preview summary {padding:12px 0;font-weight:650;cursor:pointer;}
.answer-preview dl {margin:0 0 12px;}
.answer-preview dl div {margin:8px 0;}
.answer-preview dt {font-size:12px;color:#526450;}
.answer-preview dd {margin:2px 0;font-size:14px;line-height:1.55;}
#app-view .room-guide {background:#eaf1e7;margin:14px 0;border-color:#cbdcc7;}
.room-guide h2 {margin:0 0 6px;font-size:20px;}
.room-guide p {margin:0 0 14px;line-height:1.65;}
.room-guide-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.room-guide-actions button {font:inherit;font-size:14px;color:#36513e;border:1px solid #c9d7c6;border-radius:10px;background:#fafcf8;min-height:44px;padding:6px;cursor:pointer;}
.prize-examples b {display:block;}

.meeting-notice {margin:16px 0;padding:14px 16px;background:#fff3ef;border-left:4px solid #a64f49;border-radius:8px;color:#513a37;}
.meeting-notice strong {display:block;color:#7e332f;font-size:16px;line-height:1.55;}
.meeting-notice p,.plan-card .meeting-notice p {margin:6px 0 0;font-size:14px;line-height:1.65;}
.meeting-notice small {display:block;font-size:inherit;}
.meeting-actions {display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px;}
.meeting-actions button {min-height:44px;}

#site .weekly-board {
  margin: 16px 20px 4px; padding: 18px;
  border: 1px solid #d99eac; border-radius: 18px;
  background: linear-gradient(150deg, #fae8eb, #fff8f5 72%); scroll-margin-top: 88px;
}
.weekly-board h2, .campus-partners h2 {margin: 0; font: 600 clamp(21px, 5.4vw, 27px)/1.35 "Songti SC", "STSong", SimSun, serif; color: #423833;}
.weekly-board p {margin: 6px 0 14px; color: #69595a; font-size: 14px; line-height: 1.6;}
.weekly-poster {display: block; overflow: hidden; border: 1px solid #e6dcd5; border-radius: 10px; background: #fffaf5;}
.weekly-poster img {width: 100%; height: auto; display: block;}
#site .campus-partners {margin: 0; padding: 48px 24px 44px; text-align: center; background: #fbf6ef; border-top: 1px solid #e9dfd3;}
.campus-partners p {line-height: 1.85; font-size: 15px; color: #625c53; margin: 14px auto;}
.partner-email {display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: 17px; text-decoration: none; padding: 11px 19px; color: #31573c; border: 1px solid #bdc8b6; border-radius: 10px; background: #fffefa;}
.campus-partners small {display: block; margin: 14px auto 0; font-size: 12px; line-height: 1.7; color: #6a675d;}
.weekly-poster:focus-visible, .partner-email:focus-visible {outline: 3px solid #426752; outline-offset: 3px;}

/* Keep the same form width when the software keyboard reduces the available height. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
#login-form {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
#login-form .field, #login-form p {margin:0;}
#login-form .btn {width:100%;min-height:46px;}
#login-form .field input {box-sizing:border-box;width:100%;min-width:0;font-size:16px;}
#login-form .otp-status {color:#435e48;font-size:14px;line-height:1.6;}
#login-form .otp-status:empty, #login-form .form-error:empty {display:none;}
@media (max-width:700px), (pointer:coarse) {
  .admin-shell, body.student-site dialog, body.admin-site dialog {box-sizing:border-box; width:100%;max-width:var(--phone-width);}
  .admin-shell {padding:16px;overflow-wrap:anywhere;}
  .admin-shell .app-top,.admin-shell .panel-title,.admin-shell .app-heading {flex-wrap:wrap;gap:12px;}
  .admin-shell .panel,.admin-shell .table-scroll {max-width:100%;min-width:0;}
  .admin-shell .admin-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  .admin-shell .admin-tabs {gap:8px;}
  body.student-site dialog, body.admin-site dialog,
  body.student-site dialog[data-mode="questions"] {
    position:fixed;inset:0 0 auto;margin:0 auto;
    top:var(--dialog-top, 0px);
    height:100vh;height:var(--dialog-height, 100dvh);
    max-height:100vh;max-height:var(--dialog-height, 100dvh);
    overflow-y:auto;overscroll-behavior:contain;
    border:0;border-radius:0;
  }
  body.student-site dialog:not([data-mode="questions"]),body.admin-site dialog {
    padding:calc(42px + env(safe-area-inset-top,0px)) 20px calc(22px + env(safe-area-inset-bottom,0px));
  }
  dialog *, .admin-shell * {min-width:0;box-sizing:border-box;}
  dialog .form-grid,dialog .form-row {display:grid;grid-template-columns:minmax(0,1fr);}
  dialog .form-footer {flex-wrap:wrap;}
  dialog .field, .admin-shell .field {overflow-wrap:anywhere;}
  body.student-site :is(input:not([type=checkbox]):not([type=radio]),select,textarea),
  body.admin-site :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {font-size:16px;max-width:100%;}
  #app-view .chat-bubble,.note-card,.plan-card,.contact-reveal {overflow-wrap:anywhere;}
}
