*{box-sizing:border-box}body{margin:0;font-family:Sarabun,Arial;color:#082f63;background:#f7fbff}button,input,textarea{font:inherit}.topbar{height:74px;background:#003b70;color:#fff}.top{max-width:1480px;margin:auto;height:100%;display:flex;align-items:center;padding:0 30px;gap:35px}.brand{display:flex;align-items:center;color:#fff;text-decoration:none;font-size:38px;font-weight:800;white-space:nowrap}.brand span{font:700 23px Prompt}.brand b{color:#ffc51b}.brand small,.fbrand small{display:block;font-size:11px;font-weight:500}.top nav{display:flex;gap:27px;margin-left:auto}.top nav a{color:white;text-decoration:none;font-weight:700;font-size:13px}.top nav .active{color:#ffc51b;border-bottom:3px solid #ffc51b;padding:26px 0}.social{font-size:23px;white-space:nowrap}.social span,.social i{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#1687ef;font-style:normal}.social i{background:#ff174d}.hero{height:295px;background:linear-gradient(90deg,#f7fcff 0 58%,#eaf5f5)}.crumb{max-width:1480px;margin:auto;padding:20px 30px 0;color:#3389db}.heroIn{max-width:1480px;margin:auto;height:250px;padding:15px 30px 0;display:flex;overflow:hidden}.intro{width:60%;z-index:2}.title{display:flex;align-items:center;gap:28px}.icon{width:112px;height:112px;border-radius:22px;background:linear-gradient(145deg,#ff4b89,#f70d52);display:grid;place-items:center;color:white;font-size:72px;font-weight:800}.title h1{font:800 46px Prompt;margin:0;color:#073a72}.title h2{font:700 21px Prompt;margin:3px 0}.title p{margin:3px 0;font-size:16px;line-height:1.45}.benefits{display:flex;gap:48px;margin:20px 20px}.benefits div{display:grid;grid-template-columns:34px auto;font-size:22px}.benefits b{font-size:14px}.benefits small{grid-column:2;font-size:12px}.teacher{width:40%;position:relative}.teacher img{position:absolute;height:330px;bottom:-43px;left:0}.teacher div{position:absolute;right:35px;top:15px;font:700 23px Prompt;text-align:center}.teacher u{display:block;width:140px;border-bottom:4px solid #ffc400;transform:rotate(-8deg);margin:8px auto}.wrap{max-width:1480px;margin:auto;padding:18px 30px 30px}.tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:24px}.tabs button{height:66px;border:1px solid #d4e5f5;background:#fff;color:#244d79;font-weight:700;font-size:17px;border-radius:9px}.tabs .active{background:#1488f5;color:white}.workgrid{display:grid;grid-template-columns:1.15fr .95fr .8fr;gap:14px}.card{background:white;border:1px solid #d8e8f6;border-radius:13px;padding:20px;box-shadow:0 6px 18px #124a7610}.card h3{font:800 22px Prompt;margin:0 0 3px}.card>p{margin:0 0 12px;color:#53708d}.names textarea{width:100%;height:440px;border:1px solid #c9ddf1;border-radius:8px;padding:14px;font-size:18px;line-height:1.55;resize:vertical;color:#214b76}.count{padding:14px 0}.count button,.import button{float:right;border:1px solid #cbdff3;background:white;border-radius:8px;padding:10px;color:#174a7c}.import{display:flex;gap:8px;margin-top:18px}.import button{float:none;flex:1}.winner{text-align:center;padding-top:32px}.crown{font-size:55px;color:#ffc21a}.ribbon{margin:auto;background:#ff2d6d;color:white;width:210px;border-radius:30px;padding:10px;font-size:22px;font-weight:800}.avatar{width:210px;height:210px;border:10px solid #ff72a0;border-radius:50%;display:grid;place-items:center;font-size:125px;margin:25px auto 15px;background:#fff4f8;box-shadow:0 0 0 8px #ffd1df}.picked{background:#ffd4e3;border-radius:10px;padding:13px;font:800 24px Prompt;color:#9c1648}.winner>p{font-size:17px;margin:18px}.pickrow{display:flex;gap:10px;margin-top:38px}.pickrow button{height:58px;border:0;border-radius:8px;font-size:20px;font-weight:800}.pickrow #pick{flex:1;background:#ff2163;color:white}.pickrow #reset{width:64px;background:white;border:1px solid #c8ddef;color:#205a91}.settings label{display:flex;justify-content:space-between;padding:12px 0;font-weight:700}.settings input[type=checkbox]{width:40px;height:22px;accent-color:#0bb66b}.settings input[type=range]{width:100%;accent-color:#158ef5}.settings h4{margin:18px 0 8px}.settings p{margin:9px 0}.stats{margin-top:14px}.stats>div{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stats b{font:800 28px Prompt;text-align:center;background:#eef8ff;padding:14px 4px;border-radius:9px;color:#0785f1}.stats b.green{background:#eafff3;color:#08ae65}.stats b.pink{background:#fff0f5;color:#ff2f6e}.stats small{display:block;font:600 11px Sarabun;color:#234b72}.stats button{width:100%;margin-top:10px;border:0;background:#ffe8ef;color:#f1245e;padding:12px;border-radius:8px;font-weight:800}.bottom{display:grid;grid-template-columns:1fr 1.25fr 1.1fr;gap:14px;margin-top:16px}.history h3 button{float:right;border:1px solid #cbdff3;background:white;border-radius:7px;padding:8px}.history #history{max-height:230px;overflow:auto}.history #history p{border-bottom:1px solid #e1edf7;padding:9px}.steps{display:grid;grid-template-columns:45px 1fr 45px 1fr;gap:12px;align-items:start}.steps>b{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:white;background:#3a9bf4;font-size:20px}.steps>b:nth-of-type(2){background:#a83bf2}.steps>b:nth-of-type(3){background:#16be73}.steps>b:nth-of-type(4){background:#ff4e65}.steps p{margin:0}.tips{background:linear-gradient(135deg,#fff,#eafff3)}.tips ul{list-style:'✓  ';line-height:1.8;color:#155f4b}.tips blockquote{text-align:right;color:#0786e7;font-style:italic}footer{background:#003b70;color:white;padding:28px 40px 14px}footer>div,footer>p{max-width:1420px;margin:auto;display:flex;align-items:center;justify-content:space-between}.fbrand{font:800 26px Prompt}.fbrand b{color:#ffc51b}.fbrand small{font-family:Sarabun}.fsocial a{background:#ffc928;color:#08345e;text-decoration:none;padding:12px 30px;border-radius:24px;font-weight:800}footer em{text-align:center;font:600 19px Prompt}footer>p{border-top:1px solid #24608c;margin-top:20px;padding-top:15px;font-size:12px}footer>p span{margin-left:auto}@media(max-width:900px){.top nav{display:none}.hero{height:auto}.heroIn{height:auto}.teacher{display:none}.intro{width:100%}.workgrid,.bottom{grid-template-columns:1fr}.tabs{grid-template-columns:1fr 1fr}.wrap{padding:12px}.title h1{font-size:32px}.benefits{gap:15px}.top{padding:0 15px}.brand small{display:none}}
.photoTools{margin-top:18px;padding-top:16px;border-top:1px solid #e0edf8;display:flex;align-items:center;justify-content:space-between;gap:12px}.photoTools div{display:flex;flex-direction:column}.photoTools small{color:#68839e;margin-top:3px}.photoTools button{border:1px solid #1689f4;background:#eef7ff;color:#0878dc;border-radius:8px;padding:10px 14px;font-weight:800}.photoManager{margin-top:12px;border:1px solid #d8e8f6;border-radius:10px;max-height:310px;overflow:auto;padding:8px;background:#f8fcff}.photoRow{display:grid;grid-template-columns:48px 1fr auto auto;align-items:center;gap:9px;padding:7px;border-bottom:1px solid #e4eef7}.photoRow:last-child{border-bottom:0}.photoThumb{width:46px;height:46px;border-radius:50%;object-fit:cover;background:#edf5fb;border:1px solid #cfe1f1}.photoRow strong{font-size:14px}.photoRow label,.photoRow button{border:1px solid #c8def1;background:#fff;color:#1766a6;border-radius:7px;padding:7px 9px;cursor:pointer;font-weight:700}.photoRow button{color:#e52b5e}.avatar{overflow:hidden;position:relative}.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.avatar.rolling{animation:pulsePick .16s ease-in-out infinite alternate}.winner.finalHit{animation:winnerHit .5s ease}.picked.rollingName{color:#e51f5c;transform:scale(1.03)}@keyframes pulsePick{to{transform:scale(1.035);box-shadow:0 0 0 12px #ffb4cc}}@keyframes winnerHit{50%{transform:scale(1.018)}}.settings h4 output{float:right;font:700 12px Sarabun;color:#1688ee;background:#eaf6ff;padding:4px 9px;border-radius:14px}.speedEnds{display:flex;justify-content:space-between;color:#7590aa;font-size:12px}.displayModes{display:grid;gap:3px}.displayModes label{justify-content:flex-start;gap:10px;padding:9px 7px;border-radius:8px;cursor:pointer}.displayModes label:has(input:checked){background:#eef7ff;color:#087fe7}.displayModes input{width:18px;height:18px;accent-color:#168cf4}.displayModes b{font-size:11px;background:#ffe9f0;color:#ed2a63;padding:2px 6px;border-radius:9px}.pickrow #pick.stopAuto{background:#e54747}.historyPhoto{width:28px;height:28px;border-radius:50%;object-fit:cover;vertical-align:middle;margin-right:8px}.rollingHint{font-size:12px;color:#f12b67;margin-top:5px;font-weight:700}@media(max-width:900px){.photoTools{align-items:flex-start;flex-direction:column}.photoRow{grid-template-columns:42px 1fr auto}.photoRow button{grid-column:3}.photoThumb{width:40px;height:40px}}
/* v78: radio controls + bulk photo import */
.settings .settingSwitch{display:flex;justify-content:space-between;padding:12px 0;font-weight:700}.randomPolicy,.displayModes{display:grid;gap:7px}.randomPolicy label,.displayModes label{display:flex;align-items:center;justify-content:flex-start;gap:11px;padding:11px 10px;border:1px solid #dceaf6;border-radius:10px;cursor:pointer;user-select:none;background:#fff;position:relative;z-index:2}.randomPolicy label:hover,.displayModes label:hover{border-color:#83bff0;background:#f7fbff}.randomPolicy label:has(input:checked),.displayModes label:has(input:checked){border-color:#168cf4;background:#eef7ff;color:#087fe7;box-shadow:0 0 0 1px #168cf422}.randomPolicy input,.displayModes input{width:19px;height:19px;min-width:19px;accent-color:#168cf4;cursor:pointer;pointer-events:auto}.randomPolicy span{display:flex;flex-direction:column}.randomPolicy small{font-weight:500;color:#6d87a0;margin-top:2px}.displayModes span{font-weight:700}.photoBulk{display:grid;grid-template-columns:auto auto 1fr;gap:8px;align-items:center;margin-top:10px}.photoBulk button{border:1px solid #bdd9ef;background:#fff;color:#1766a6;border-radius:8px;padding:10px 12px;font-weight:800;cursor:pointer}.photoBulk button:hover{background:#eef7ff;border-color:#168cf4}.photoBulk span{font-size:12px;color:#67849f;text-align:right}.winner:has(#picked[style*="display: none"]) .ribbon{margin-bottom:10px}@media(max-width:900px){.photoBulk{grid-template-columns:1fr 1fr}.photoBulk span{grid-column:1/-1;text-align:left}}
/* v80: working tab navigation + anchored detail sections */
#random-section,#how-section,#history-section,#about-section{scroll-margin-top:96px}
.tabs button{cursor:pointer}
.tabs button:focus-visible{outline:3px solid rgba(30,136,229,.28);outline-offset:2px}
.aboutTool{grid-column:1/-1}
.aboutTool p{margin:8px 0;color:#526987;line-height:1.8}

/* v81: make display mode chooser visually prominent */
.settings .displayModeTitle{
  margin:22px 0 10px;
  padding:12px 14px;
  border-radius:12px;
  background:linear-gradient(135deg,#e8f4ff,#f2edff 58%,#fff2f7);
  border:2px solid #8ec9ff;
  box-shadow:0 8px 20px rgba(26,126,220,.12);
  color:#063d76;
  font:800 18px Prompt,Sarabun,sans-serif;
}
.settings .displayModes{
  padding:10px;
  border-radius:14px;
  background:linear-gradient(180deg,#f8fcff,#ffffff);
  border:2px solid #cbe5fb;
  box-shadow:0 10px 24px rgba(17,101,170,.08);
  gap:9px;
}
.settings .displayModes label{
  min-height:56px;
  padding:13px 14px;
  border:2px solid #dbeaf7;
  border-radius:12px;
  background:#fff;
  transition:.16s ease;
}
.settings .displayModes label:hover{
  transform:translateY(-1px);
  border-color:#70b8f6;
  box-shadow:0 5px 14px rgba(29,133,225,.10);
}
.settings .displayModes label:has(input:checked){
  background:linear-gradient(135deg,#e7f4ff,#eef6ff);
  border-color:#168cf4;
  color:#0768bf;
  box-shadow:0 0 0 3px rgba(22,140,244,.11),0 8px 18px rgba(22,140,244,.12);
}
.settings .displayModes input{
  width:22px;height:22px;min-width:22px;
}
.settings .displayModes span{
  font-size:16px;
  font-weight:800;
}
@media(max-width:900px){
  .settings .displayModeTitle{font-size:16px}
  .settings .displayModes label{min-height:52px;padding:11px 12px}
}
