:root{font:16px/1.5 system-ui,sans-serif;color:#29233c;background:#f6f4f9}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}header,main{width:min(100% - 32px,960px);margin:auto}header,.paperhead,.tools{display:flex;align-items:center;justify-content:space-between;gap:14px}header{padding:20px 0}header img{width:150px}a{color:#583c93}main{padding-bottom:32px}.intro,.controls,#sheet{background:white;border:1px solid #dfd9e9;border-radius:20px;padding:clamp(16px,3vw,30px);margin:16px 0}.intro{background:#f1ebfa}.intro h1{font-size:clamp(1.6rem,4vw,2.6rem);line-height:1.12;margin:.35em 0}.intro p{max-width:65ch}small{font-weight:750;letter-spacing:.1em;color:#68538b}.controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}label{font-weight:650}input,select,button{font:inherit;border:1px solid #cfc6de;border-radius:10px;padding:9px;background:white}input,select{display:block;margin-top:4px;width:100%;min-width:0}button{cursor:pointer;font-weight:650}.primary{background:#604398;color:white}.tools{justify-content:flex-start;flex-wrap:wrap}.paperhead h2{margin:4px 0;overflow-wrap:anywhere}.paperhead img{width:min(30%,155px)}#board svg{display:block;margin:auto;width:100%;max-height:65vh}.preview-ink{display:none}.colored .preview-ink{display:block}.colored .numbers{display:none}#legend{display:flex;flex-wrap:wrap;gap:8px 18px}.key{display:inline-flex;align-items:center;gap:6px;font-size:14px}.key svg{width:19px;height:19px}footer{font-size:12px;color:#655d74;margin-top:18px}@media(max-width:560px){.controls{grid-template-columns:1fr}header img{width:120px}}
@page{size:A4 portrait;margin:12mm}
@media print{body{background:white;color:black}header,.intro,.controls,#status,.tools{display:none!important}main{width:100%;padding:0}#sheet{display:block;border:0;border-radius:0;margin:0;padding:0;break-inside:avoid}.paperhead img{width:39mm}.paperhead h2{font-size:18pt}#board svg{width:100%;height:174mm;max-height:none}.colored .preview-ink{display:none!important}.colored .numbers{display:block!important}#sheet h3{margin:3mm 0 1mm}#legend{gap:1mm 4mm}.key{font-size:9pt}.key svg{width:4mm;height:4mm}footer{margin-top:3mm}}

#example{display:flex;align-items:center;gap:10px;margin-top:10px;text-align:left;color:#523489;background:#f7f2fc;width:100%}#example-thumb{object-fit:contain;flex:none}

.portal-head{flex-wrap:wrap}.brand-pair{display:flex;align-items:center;max-width:100%}.brand-pair img:first-child{width:clamp(145px,23vw,205px)}.brand-pair img:last-child{width:clamp(65px,10vw,92px);margin-left:-3px}
.portal-return{display:inline-flex;align-items:center;justify-content:center;padding:12px 22px;min-height:48px;border-radius:14px;background:#62449c;color:white;text-decoration:none;font-weight:750;box-shadow:0 3px 0 #493076}.portal-return:hover{background:#52368a}
.intro-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,225px);gap:22px;align-items:start}.intro-grid p{line-height:1.65;margin:.5em 0}.grid-tip{padding:14px 18px;border-left:4px solid #9c80c4;background:#fff;border-radius:12px}.grid-tip b{display:block}.helper{text-align:center}.helper button{color:#513982}.helper>button{display:grid;justify-items:center;width:100%;border-radius:16px;padding:8px}.helper img{width:100px;height:auto}.helper button span{font-size:.85rem}.helper #owl-panel{background:white;padding:10px;border-radius:12px;margin-top:6px}
#word-form{background:white;padding:clamp(16px,3vw,30px);border:1px solid #dfd9e9;border-radius:20px;margin:16px 0}#word-form>label{font-size:1.25rem}#word-form p{margin:.4em 0 .8em}.word-row{display:flex;gap:12px;align-items:stretch}.word-row input{margin:0;flex:1}.word-row button{flex:none}#word-feedback:empty{display:none}
@media(max-width:600px){.intro-grid{grid-template-columns:minmax(0,1fr);gap:10px}.helper>button{grid-template-columns:auto 1fr;align-items:center}.helper img{grid-row:span 2;width:62px}.word-row{flex-direction:column}.portal-return{width:100%}}
@media print{#word-form{display:none!important}}

.sign-cards{background:#fff;padding:clamp(16px,3vw,30px);border:1px solid #dfd9e9;border-radius:20px;margin:16px 0}
.sign-cards h2{margin:0}.sign-cards select{max-width:20rem}#sign-list{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}
#sign-list button{min-width:44px;min-height:44px;background:#f2ebfa;color:#4e3672;font-size:18px}
@media print{.sign-cards{display:none!important}}

.palette-note{display:block;margin-top:5px;letter-spacing:normal;font-weight:400}
