:root{font-family:"Segoe UI","Microsoft YaHei",sans-serif;color:#183e37;background:#f5f5ed;font-synthesis:none}*{box-sizing:border-box}body{margin:0}header,main{max-width:1240px;margin:auto;padding:24px 32px}header{padding-bottom:0}a{color:#42685b;text-decoration:none}.heading,.toolbar,.controls,.bottom-bar{display:flex;align-items:center;justify-content:space-between;gap:18px}.heading{padding:24px 0}.eyebrow{font-size:12px;letter-spacing:.18em;font-weight:800;color:#697f66}h1{font-size:clamp(30px,4vw,48px);margin:8px 0}h2{margin:0;font-size:24px}p{line-height:1.6;margin:8px 0;color:#61746c}.gift{font-size:76px;transform:rotate(8deg)}button,input,select,textarea{font:inherit}button{border:0;border-radius:12px;padding:13px 20px;background:#205848;color:white;font-weight:700;cursor:pointer}button:hover{filter:brightness(1.08)}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #c78c27;outline-offset:4px}.secondary{background:#fff;color:#275647;border:1px solid #ccd8cf}.panel,.editor{background:#fff;border:1px solid #dfe5d9;border-radius:18px;padding:22px}.controls{justify-content:flex-start;flex-wrap:wrap}.controls label{display:flex;align-items:center;gap:8px;white-space:nowrap}input,textarea,select{border:1px solid #ccd8cf;border-radius:8px;padding:10px;background:#fff;color:#183e37;max-width:100%}input:focus,textarea:focus,select:focus{outline:2px solid #77a78c}input[type=number]{width:80px}.hint{font-size:14px;margin:16px 0}#editors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.editor h3{margin:0 0 16px;color:#36654f}.editor label{display:block;font-size:14px;font-weight:600;margin-top:12px}.editor textarea,.editor select,.editor .reward-input{display:block;width:100%;margin-top:6px}.editor textarea{min-height:90px;resize:vertical}.editor input[type=file]{width:100%;font-size:13px}.image-preview{display:block;max-width:100%;height:90px;object-fit:contain;margin-top:10px}.bottom-bar{position:sticky;bottom:0;background:#f5f5edf2;padding:18px 0;margin-top:16px}.bottom-bar p{font-size:13px}#status{min-height:24px;font-weight:600;margin-top:0}#status.error{color:#ac3627}.classroom-toolbar{margin-bottom:26px}#board{display:grid;grid-template-columns:repeat(var(--cols),minmax(96px,1fr));gap:16px;min-width:calc(var(--cols) * 110px)}.board-scroll{overflow-x:auto;padding:5px 4px 20px}.tile{min-height:clamp(120px,15vh,190px);background:#245c4c;border:1px solid #3c7662;box-shadow:0 5px 0 #173e34;font-size:clamp(28px,4vw,52px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;overflow-wrap:anywhere;min-width:0}.tile small{font-size:12px;font-weight:500;opacity:.75}.tile.revealed{background:#fff4d4;color:#614b22;border-color:#ebd390;box-shadow:0 3px 0 #dfcc96;animation:reveal .45s ease}.tile img{width:100%;height:110px;object-fit:contain}.tile.revealed:hover{filter:none}dialog{border:0;border-radius:24px;padding:36px;width:min(780px,calc(100% - 32px));color:#183e37;box-shadow:0 24px 90px #102d3540}dialog::backdrop{background:#122d27b8}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}[hidden]{display:none!important}:fullscreen{background:#f5f5ed;overflow:auto}@keyframes reveal{from{transform:rotateY(80deg);opacity:.3}to{transform:rotateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.tile.revealed{animation:none}}@media(max-width:900px){#editors{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar{align-items:flex-start;flex-direction:column}}@media(max-width:560px){header,main{padding:18px}#editors{grid-template-columns:1fr}.gift{font-size:50px}.bottom-bar{align-items:stretch;flex-direction:column;gap:6px}.dialog-actions button{width:100%}dialog{padding:24px}.controls{gap:10px}#board{gap:10px}}
/* Keep shared site navigation and footer styling separate from the tool header. */
.reward-grid-header { max-width: 1240px; margin: auto; padding: 24px 32px 0; }
body { background-color: var(--cream); color: var(--ink); font-family: 'Nunito', 'Noto Sans SC', 'Segoe UI', sans-serif; }
body > main { min-height: 55vh; }
@media (max-width: 560px) { .reward-grid-header { padding: 18px; } }
.bulk-questions { margin-bottom: 20px; }
.bulk-questions > label { display: block; margin: 12px 0 8px; color: #61746c; }
.bulk-questions > textarea { display: block; width: 100%; min-height: 180px; resize: vertical; line-height: 1.7; }
.bulk-questions > .controls { margin-top: 14px; }
.bulk-questions .controls p { font-size: 14px; }
/* Questions stay visible before and after a reward is revealed. */
.tile { align-items: stretch; text-align: center; padding: 20px 14px; }
.tile-question { font-size: clamp(18px, 2vw, 28px); line-height: 1.5; white-space: pre-wrap; }
.tile .reward-value { margin-top: 12px; padding-top: 12px; border-top: 1px solid #dfcc96; font-size: 36px; }
#reward-question { font-size: 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
#reward-content { text-align: center; margin: 28px 0; overflow-wrap: anywhere; }
#reward-content .reward-value { font-size: clamp(48px, 9vw, 88px); color: #76531c; }
#reward-content img { display: block; max-width: 100%; max-height: 40vh; object-fit: contain; margin: auto; }
#reward-dialog { max-height: 90vh; overflow: auto; }
