/* ===== Style section 1 ===== */
:root{--ink:#19313e;--muted:#667986;--teal:#087f78;--mint:#20b99f;--line:#e1e9ed;--soft:#f5faf9;--shadow:0 12px 34px #1837470c}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#fff;color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;line-height:1.6}button,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}
.header{height:68px;position:sticky;top:0;z-index:20;background:#ffffffed;backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}.header-inner{height:100%;max-width:1500px;margin:auto;padding:0 22px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.brand span{display:flex;align-items:center;gap:10px;font-weight:800;font-size:20px;letter-spacing: 1.3px;white-space:nowrap}.brand-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;color:#fff;background:linear-gradient(140deg,#087f78,#25c6a9);font-size:26px}.header-links{display:none!important;align-items:center;gap:20px}
.header-links a{font-size:16px;color:#536875;font-weight:500}.btn{border:1px solid #dce6e9;border-radius:10px;background:#fff;color:var(--ink);padding:9px 12px;font-size:12px;font-weight:800;transition:.15s}.btn:hover{background:#f1faf8;border-color:#b5ddd5}.btn.primary{background:var(--teal);color:white;border-color:var(--teal)}.btn.primary:hover{background:#066a65}.btn.danger{color:#bd4d5c}.shell{max-width:1500px;margin:auto;display:block}.sidebar{position:fixed;z-index:45;top:0;right:0;left:auto;width:min(320px,88vw);height:100dvh;overflow-y:auto;border-left:1px solid var(--line);padding:18px 14px 25px;background:#fff;box-shadow:-12px 0 35px #18374720;transform:translateX(110%);visibility:hidden;transition:transform .25s ease,visibility .25s ease}.sidebar.open{transform:translateX(0);visibility:visible}.drawer-overlay{position:fixed;inset:0;z-index:44;background:#102d3b77;opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s ease}.drawer-overlay.open{opacity:1;visibility:visible}.hamburger{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-size:23px;line-height:1}.header-inner{justify-content:space-between}.brand{margin-right:auto}.hamburger{order:5}.side-heading{padding:0 11px;margin:0 0 10px;color:#87949c;font-size:12px;letter-spacing:1.2px;font-weight:900;text-transform:uppercase}
  .site-switch-link{margin:0 0 10px;border-color:var(--line);background:var(--soft);text-decoration:none}
  .site-switch-link:hover{background:#eaf8f4}
  body.dark-mode .site-switch-link{background:var(--theme-soft)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
  .cat-list{display:grid;gap:5px}.cat{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:1px solid transparent;border-radius:11px;background:transparent;color:#405765;text-align:left;font-size:16px;font-weight:750} .cat .emoji{display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#f1f6f7;font-size:16px;flex-shrink:0}.cat:hover{background:#f7fbfa}.cat.active{background:#eaf8f4;font-size:14px;border-color:#c9eee3;color:#08766d}.cat.active .emoji{font-size:12px;background:#d5f2e9}
  .sidebar-note{margin:19px 5px 0;padding:13px;border:1px solid var(--line);border-radius:12px;background:#fbfdfd;color:var(--muted);font-size:12px}.sidebar-note strong{display:block;color:var(--ink);font-size:12px;margin-bottom:4px}.main{min-width:0;padding:24px clamp(15px,2.5vw,34px) 55px}.hero{margin:0 auto 22px;text-align:center;max-width:800px}.eyebrow{display:inline-block;border:1px solid #c9eee5;background:#effbf7;color:#08766d;border-radius:40px;padding:4px 11px;font-size:10px;font-weight:900;letter-spacing:1px}
  .hero h1{font-size:clamp(20px,2.5vw,27px);line-height:1.12;letter-spacing:-1.6px;margin:12px 0 8px}.hero h1 span{color:var(--teal)}.hero p{max-width:650px;margin:auto;color:var(--muted);font-size:14px}.tool-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(290px,.95fr);gap:17px;align-items:start}.card{border:1px solid var(--line);border-radius:19px;background:white;box-shadow:var(--shadow);overflow:hidden}.wheel-card{padding:clamp(13px,2vw,23px);text-align:center}.card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;text-align:left}
  .card-head h2,.title h2{font-size:clamp(18px,2.3vw,25px);margin:0;letter-spacing:-.3px}.status{border:1px solid #c9eee5;background:#effbf7;color:#08766d;padding:2px 4px;border-radius:10px;font-size:12px;font-weight:850;white-space:nowrap}.wheel-wrap{position:relative;width:min(100%,530px);aspect-ratio:1;margin:0 auto 10px}.wheel-wrap canvas{width:100%;height:100%;display:block;filter:drop-shadow(0 8px 12px #18374712)}.pointer{position:absolute;z-index:2;top:-1px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:16px solid transparent;border-right:16px solid transparent;border-top:34px solid #233c49;filter:drop-shadow(0 2px 2px #0002)}.spin-button{position:absolute;z-index:3;top:50%;left:50%;transform:translate(-50%,-50%);width:clamp(72px,17%,96px);aspect-ratio:1;border:5px solid white;border-radius:50%;background:linear-gradient(145deg,#087f78,#29c9a7);color:white;font-size:clamp(12px,1.8vw,16px);font-weight:1000;letter-spacing:1px;box-shadow:0 0 0 5px #ffffffb8,0 5px 17px #087f7830}.spin-button:disabled{opacity:.7;cursor:wait}.help{color:var(--muted);font-size:11px;margin:5px 0 0}.actions,.button-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.actions{justify-content:center}
  .side-content{max-width: 650px;}
 .side-content{display:grid;gap:15px}.inner{padding:17px}.title{display:flex;align-items:center;gap:9px;margin-bottom:5px}.title .icon{display:grid;place-items:center;width:33px;height:33px;border-radius:10px;background:#effbf7;font-size:18px}.desc{font-size:11px;color:var(--muted);margin:0 0 12px}.label-row{display:flex;justify-content:space-between;gap:8px;font-size:12px;font-weight:850;margin:11px 0 7px}.label-row small{font-size:10px;color:var(--muted);font-weight:500}textarea{width:100%;height:156px;resize:vertical;border:1px solid #dce6e9;border-radius:11px;background:#fbfdfd;color:var(--ink);padding:11px;outline:none;font:13px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace}textarea:focus{border-color:#36b7a5;box-shadow:0 0 0 3px #078a8210}.count-row{display:flex;justify-content:space-between;gap:8px;color:var(--muted);font-size:10px;margin:6px 0 10px}
  .toggles{display:flex;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:11px;margin-top:12px}.toggle{display:flex;align-items:center;gap:5px;color:#5d707d;font-size:12px}.toggle input{accent-color:var(--teal)}.winner{display:none;text-align:left;margin-top:14px;border:1px solid #bce9d8;background:#f0fcf6;border-radius:12px;padding:12px}.winner.show{display:block}.winner-label{font-size:10px;letter-spacing:1.4px;font-weight:900;color:#08766d}.winner-name{font-size:23px;font-weight:950;color:#155a4c;overflow-wrap:anywhere}.history{display:grid;gap:6px;font-size:12px;margin-top:9px}.history-item{display:flex;align-items:center;gap:8px;border:1px solid #e7eef1;border-radius:9px;padding:7px 9px;font-size:14px}.history-num{color:var(--teal);font-weight:900}.empty{font-size:13px;color:var(--muted)}
   .desc {font-size:13px}
  .help {font-size:13px}
  .content-card{padding:clamp(18px,2.5vw,27px);max-width: 650px;border-radius:6px;margin-top:19px}.content-card h2{font-size:19px;line-height:1.25;letter-spacing:-.5px;margin:0 0 5px}.content-card h3{font-size:17px;margin:23px 0 8px;letter-spacing:-.2px}.content-card p{font-size:15px;color:#111;line-height:1.85;margin:0 0 12px}.content-card .lead{font-size:14px;color:#425966}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.step{border:1px solid var(--line);border-radius:12px;padding:13px}.step b{display:block;margin:6px 0}.step p{font-size:11px;margin:0}.faq-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.faq-grid details{border:1px solid var(--line);border-radius:11px;padding:12px}.faq-grid summary{font-size:12px;font-weight:800;cursor:pointer}.faq-grid details p{font-size:11px;margin:8px 0 0}
  .footer{border-top:1px solid var(--line);padding:22px;text-align:center;color:var(--muted);font-size:14px}.footer-links{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;font-size:15px;margin-bottom:8px}.footer-links a:hover{color:var(--teal)}.modal{position:fixed;inset:0;z-index:30;display:none;place-items:center;padding:18px;background:#15334255;backdrop-filter:blur(4px)}.modal.open{display:grid}.modal-box{position:relative;width:min(420px,100%);padding:28px 22px 23px;text-align:center;background:white;border:1px solid #e0e9ec;border-radius:22px;box-shadow:0 25px 80px #193d4a25;animation:pop .3s ease-out}.close-modal{position:absolute;top:9px;right:10px;border:1px solid var(--line);border-radius:50%;width:31px;height:31px;background:#f7fafb;color:var(--ink);font-size:20px}.trophy{font-size:46px}.modal-box h2{font-size:10px;color:var(--teal);letter-spacing:1.8px;text-transform:uppercase}.modal-winner{font-size:clamp(28px,6vw,42px);font-weight:1000;letter-spacing:-1px;overflow-wrap:anywhere;margin:12px 0 20px}.modal-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}#confetti{position:fixed;inset:0;pointer-events:none;z-index:31;overflow:hidden}.piece{position:absolute;top:-15px;width:9px;height:14px;animation:fall 2.8s linear forwards}@keyframes fall{to{transform:translateY(110vh) rotate(780deg);opacity:.85}}@keyframes pop{from{transform:scale(.86);opacity:0}to{transform:scale(1);opacity:1}}.toast{position:fixed;z-index:50;bottom:18px;left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;padding:10px 15px;border-radius:10px;background:#143b3a;color:white;font-size:11px;font-weight:800;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}

 @media(max-width:1080px){.tool-grid{grid-template-columns:1fr}.side-content{grid-template-columns:1fr 1fr}.edit-card{grid-column:1/-1}}
@media(max-width:700px){.header{height:60px}.header-inner{padding:0 11px;gap:9px}.brand{font-size:16px}.brand-icon{width:34px;height:34px}.header-links{display:none}.side-heading{margin:0 0 10px}.cat-list{display:grid;gap:5px}.cat{width:100%;white-space:normal;flex:initial;padding:9px 10px;font-size:12px;border-color:transparent}.cat .emoji{width:25px;height:25px;font-size:15px}.sidebar-note{display:block}.main{padding:20px 11px 35px}.hero h1{letter-spacing:-1px}.hero p{font-size:13px}.side-content{grid-template-columns:1fr}.edit-card{grid-column:auto}.steps,.faq-grid{grid-template-columns:1fr}.content-card{padding:18px}.wheel-card{padding:12px}.button-row .btn{flex:1}}

.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 14px}
.drawer-head .side-heading{margin:0;padding-left:5px}
.drawer-close{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;border:1px solid var(--line);border-radius:11px;background:#f7fafb;color:var(--ink);font-size:29px;line-height:1;cursor:pointer}
.drawer-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 17px}
.drawer-tool{display:flex;align-items:center;justify-content:center;gap:8px;min-height:43px;padding:9px 10px;border:1px solid var(--line);border-radius:11px;background:#f7fafb;color:var(--ink);font:600 13px system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;cursor:pointer}
.drawer-tool:hover,.drawer-close:hover{background:#eaf7f4;border-color:#b9e6db}
body.dark-mode{--ink:#eef5f7;--muted:#b5c3ca;--line:#30424e;--soft:#202e39;background:#101820;color:var(--ink)}
body.dark-mode .header,body.dark-mode .sidebar,body.dark-mode .card,body.dark-mode .content-card,body.dark-mode .modal-box{background:#18232d;color:var(--ink);border-color:var(--line)}
body.dark-mode .hamburger,body.dark-mode .drawer-close,body.dark-mode .drawer-tool,body.dark-mode .cat{background:#202e39;color:var(--ink);border-color:var(--line)}
body.dark-mode .main,body.dark-mode .hero,body.dark-mode .sidebar-note{color:var(--ink)}
body.dark-mode .content-card p,body.dark-mode .header-links a{color:#c0cdd3}

.drawer-icon{width:21px;height:21px;flex:0 0 21px;display:block}

/* Full-page theme colors */
:root{--theme-page:#f4f8fa;--theme-surface:#fff;--theme-text:#18313b;--theme-muted:#637781;--theme-border:#dfe9ed;--theme-soft:#eef5f6;--theme-input:#fff;color-scheme:light}
body{background:var(--theme-page);color:var(--theme-text)}
body.dark-mode{--theme-page:#111820;--theme-surface:#1b2630;--theme-text:#edf4f7;--theme-muted:#b7c5cc;--theme-border:#354651;--theme-soft:#25343f;--theme-input:#202d37;color-scheme:dark;background:var(--theme-page)!important;color:var(--theme-text)!important}
body.dark-mode .header,body.dark-mode .sidebar,body.dark-mode .content-card,body.dark-mode .wheel-card,body.dark-mode .result-card,body.dark-mode .faq-item,body.dark-mode .card,body.dark-mode .edit-card,body.dark-mode .history-card,body.dark-mode .tool-card,body.dark-mode .article-card,body.dark-mode .modal-box,body.dark-mode .winner-box{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
body.dark-mode .main,body.dark-mode .hero,body.dark-mode .hero p,body.dark-mode .content-card p,body.dark-mode .content-card li,body.dark-mode .sidebar-note,body.dark-mode .side-heading,body.dark-mode .history-item,body.dark-mode .faq-item p,body.dark-mode label,body.dark-mode .muted,body.dark-mode .subtitle,body.dark-mode .empty{color:var(--theme-muted)!important}
body.dark-mode input,body.dark-mode textarea,body.dark-mode select{background:var(--theme-input)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
body.dark-mode .cat,body.dark-mode .hamburger,body.dark-mode .drawer-close,body.dark-mode .drawer-tool,body.dark-mode .btn-secondary,body.dark-mode .chip,body.dark-mode .history-item{background:var(--theme-soft)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
body.dark-mode a{color:#80d8c6}
body.dark-mode .drawer-overlay{background:#0009}
.drawer-icon{width:21px;height:21px;flex:0 0 21px;display:block}


/* Gentle idle motion and embed/fullscreen UI */
.embed-box textarea{font-size:11px;line-height:1.5;overflow-wrap:anywhere}
body.fullscreen-wheel .header{display:block!important;position:fixed;top:0;left:0;right:0;height:56px;background:transparent;border:0;backdrop-filter:none;z-index:43;pointer-events:none}
body.fullscreen-wheel .header-inner{height:56px;padding:7px 12px;justify-content:flex-end;pointer-events:none}
body.fullscreen-wheel .brand{display:none!important}
body.fullscreen-wheel .hamburger{pointer-events:auto;box-shadow:0 4px 18px #18374720;background:#fff}
body.fullscreen-wheel .hero,body.fullscreen-wheel .side-content,body.fullscreen-wheel #article,body.fullscreen-wheel #how,body.fullscreen-wheel #faq,body.fullscreen-wheel .footer{display:none!important}
body.fullscreen-wheel .main{padding:12px;min-height:100vh;display:flex;align-items:center;justify-content:center}
body.fullscreen-wheel .tool-grid{width:min(100%,1100px);grid-template-columns:minmax(0,1fr);justify-items:center}
body.fullscreen-wheel .wheel-card{width:min(94vw,90vh);max-width:900px}
body.fullscreen-wheel .wheel-wrap{width:min(70vh,100%,700px)}
body.fullscreen-wheel .shell{max-width:none}
@media(prefers-reduced-motion:reduce){.sidebar,.drawer-overlay{transition:none}}

/* Night-mode readability fix: stronger text contrast across all UI components */
body.dark-mode{
  --ink:#f3f7fa;
  --muted:#cbd6dc;
  --theme-text:#f3f7fa;
  --theme-muted:#cbd6dc;
  --theme-page:#10171e;
  --theme-surface:#1c2731;
  --theme-soft:#293844;
  --theme-input:#17232d;
  --theme-border:#465965;
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode strong,
body.dark-mode b,
body.dark-mode .title,
body.dark-mode .side-heading,
body.dark-mode .hero h1,
body.dark-mode .content-card h2,
body.dark-mode .content-card h3,
body.dark-mode .card h2,
body.dark-mode .card h3,
body.dark-mode .modal-box h2,
body.dark-mode .winner-box h2,
body.dark-mode .faq-item summary{
  color:#ffffff!important;
  opacity:1!important;
}
body.dark-mode p,
body.dark-mode li,
body.dark-mode small,
body.dark-mode label,
body.dark-mode .muted,
body.dark-mode .subtitle,
body.dark-mode .hero p,
body.dark-mode .content-card p,
body.dark-mode .content-card li,
body.dark-mode .sidebar-note,
body.dark-mode .history-item,
body.dark-mode .faq-item p,
body.dark-mode .empty,
body.dark-mode .result-label,
body.dark-mode .result-value,
body.dark-mode .section-description{
  color:#d6e0e6!important;
  opacity:1!important;
}
body.dark-mode .header,
body.dark-mode .sidebar,
body.dark-mode .card,
body.dark-mode .content-card,
body.dark-mode .wheel-card,
body.dark-mode .result-card,
body.dark-mode .faq-item,
body.dark-mode .edit-card,
body.dark-mode .history-card,
body.dark-mode .tool-card,
body.dark-mode .article-card,
body.dark-mode .modal-box,
body.dark-mode .winner-box,
body.dark-mode .embed-box{
  background:#1c2731!important;
  color:#f3f7fa!important;
  border-color:#465965!important;
  box-shadow:0 8px 24px #0003;
}
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select{
  background:#17232d!important;
  color:#f3f7fa!important;
  border-color:#536875!important;
  caret-color:#fff;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder{
  color:#aebdc6!important;
  opacity:1!important;
}
body.dark-mode button,
body.dark-mode .cat,
body.dark-mode .drawer-tool,
body.dark-mode .drawer-close,
body.dark-mode .btn-secondary,
body.dark-mode .chip{
  color:#f3f7fa;
}
body.dark-mode .drawer-tool,
body.dark-mode .drawer-close,
body.dark-mode .cat,
body.dark-mode .btn-secondary,
body.dark-mode .chip{
  background:#293844!important;
  border-color:#536875!important;
}
body.dark-mode a{color:#8ce6d2!important}
body.dark-mode a:hover{color:#c0fff0!important}
body.dark-mode .btn-primary,
body.dark-mode button.primary,
body.dark-mode .spin-button{
  color:#ffffff!important;
}
body.dark-mode .drawer-overlay{background:rgba(0,0,0,.72)!important}
body.dark-mode .winner-box *,
body.dark-mode .modal-box *{text-shadow:none!important}
body.dark-mode .header-links a{color:#d6e0e6!important}


/* Final night-mode legibility and disabled-button fix */
body.dark-mode .btn,
body.dark-mode button.btn,
body.dark-mode .actions .btn,
body.dark-mode .button-row .btn,
body.dark-mode .modal-actions .btn {
  background:#2b3b47 !important;
  color:#f5f9fb !important;
  border-color:#536875 !important;
  opacity:1 !important;
  text-shadow:none !important;
}
body.dark-mode .btn:disabled,
body.dark-mode button:disabled,
body.dark-mode .btn[disabled],
body.dark-mode button[aria-disabled="true"] {
  background:#26343f !important;
  color:#aebdc7 !important;
  border-color:#465965 !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}
body.dark-mode .btn.primary,
body.dark-mode .btn.primary:disabled,
body.dark-mode .btn.primary[disabled] {
  background:#087f78 !important;
  color:#ffffff !important;
  border-color:#159b91 !important;
  opacity:1 !important;
}
body.dark-mode .btn.danger { color:#ffb7c0 !important; }
body.dark-mode .winner {
  background:#173a35 !important;
  border-color:#2b776a !important;
  color:#f2fffb !important;
}
body.dark-mode .winner-label { color:#82e6d0 !important; }
body.dark-mode .winner-name { color:#ffffff !important; }
body.dark-mode .title .icon { background:#293844 !important; color:#ffffff !important; }
body.dark-mode .status,
body.dark-mode .eyebrow { background:#183b38 !important; color:#a7f3e2 !important; border-color:#356c63 !important; }
body.dark-mode .toggle,
body.dark-mode .label-row,
body.dark-mode .label-row small,
body.dark-mode .count-row,
body.dark-mode .help,
body.dark-mode .desc { color:#d4e0e6 !important; opacity:1 !important; }
body.dark-mode .history-item { background:#293844 !important; color:#f0f6f8 !important; border-color:#536875 !important; }
body.dark-mode .history-num { color:#69e0ca !important; }
body.dark-mode .content-card .lead { color:#dbe6eb !important; }
body.dark-mode .footer { color:#cbd6dc !important; }
body.dark-mode .btn:hover:not(:disabled) { filter:brightness(1.12); }


/* Readability fix: keep the page behind dialogs sharp instead of blurred */
.modal-backdrop,
.modal-overlay,
.overlay,
.dialog-backdrop,
.popup-backdrop,
#modalBackdrop,
#winnerModalBackdrop,
#embedModalBackdrop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}


/* Strong contrast for dark mode controls, dialogs, and popup close buttons */
html[data-theme="dark"], body[data-theme="dark"],
html.dark, body.dark, html.dark-mode, body.dark-mode,
html.night-mode, body.night-mode, body.dark-theme, html.dark-theme {
  color: #f8fafc !important;
}
[data-theme="dark"] .modal,
[data-theme="dark"] .popup,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .winner-modal,
[data-theme="dark"] .embed-modal,
.dark .modal, .dark .popup, .dark .modal-content,
.dark-mode .modal, .dark-mode .popup, .dark-mode .modal-content,
.night-mode .modal, .night-mode .popup, .night-mode .modal-content {
  color: #f8fafc !important;
  background: #17232d !important;
  border-color: #526575 !important;
}
.modal button, .popup button, [role="dialog"] button,
.winner-modal button, .embed-modal button {
  color: #f8fafc;
  opacity: 1 !important;
  text-shadow: none !important;
}
/* Popup-only close button styling; sidebar close keeps its original design */
.modal .close, .popup .close, .modal-close, .popup-close,
.close-modal, .popup .x-close,
.winner-modal [aria-label="Close"], .embed-modal [aria-label="Close"],
.winner-modal button[title="Close"], .embed-modal button[title="Close"],
.winner-modal button[aria-label*="close" i],
.embed-modal button[aria-label*="close" i] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  min-height: 34px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #f8fafc !important;
  color: #111827 !important;
  border: 1.2px solid #64748b !important;
  font-size: 25px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  opacity: 1 !important;
  box-shadow: 0 0px 0.5px rgba(0,0,0,.35) !important;
  text-shadow: none !important;
}
[data-theme="dark"] input, [data-theme="dark"] textarea,
.dark input, .dark textarea, .dark-mode input, .dark-mode textarea,
.night-mode input, .night-mode textarea {
  color: #f8fafc !important;
  background: #101a22 !important;
  border-color: #64748b !important;
}
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder,
.dark input::placeholder, .dark textarea::placeholder,
.dark-mode input::placeholder, .dark-mode textarea::placeholder,
.night-mode input::placeholder, .night-mode textarea::placeholder {
  color: #cbd5e1 !important;
  opacity: 1 !important;
}


/* Restore the sidebar's original × close button appearance */
.sidebar .close, .sidebar .close-btn, .sidebar .sidebar-close,
#sidebar .close, #sidebar .close-btn, #sidebarClose, #closeSidebar,
button[data-sidebar-close] {
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  font-size: 28px !important;
  font-weight: 400 !important;
  width: auto !important;
  height: auto !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 6px 10px !important;
  text-shadow: none !important;
}


/* Targeted fix only: make the Light Mode popup Done buttons readable */
body:not(.dark-mode) #done,
body:not(.dark-mode) #doneEmbed {
  background: #ffffff !important;
  color: #18313b !important;
  border: 1px solid #8a9ba4 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}
body:not(.dark-mode) #done:hover,
body:not(.dark-mode) #doneEmbed:hover {
  background: #edf5f6 !important;
  color: #102832 !important;
  border-color: #607782 !important;
}


/* Wheel of Names: numbered instruction cards only */
.content-card ol.wheel-use-steps{
  list-style:none;
  counter-reset:wheel-step;
  display:grid;
  gap:10px;
  margin:14px 0 22px;
  padding:0;
  font-size:15px;
}
.content-card ol.wheel-use-steps li{
  counter-increment:wheel-step;
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  align-items:start;
  gap:12px;
  padding:13px 15px;
  border:1px solid rgba(8,127,120,.24);
  border-radius:13px;
  background:rgba(8,127,120,.055);
  color:var(--ink);
  line-height:1.7;
  overflow-wrap:anywhere;
}
.content-card ol.wheel-use-steps li::before{
  content:counter(wheel-step);
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:#087f78;
  color:#fff;
  font-size:14px;
  font-weight:800;
  line-height:1;
  box-shadow:0 2px 5px rgba(8,127,120,.22);
}
@media(max-width:480px){
  .content-card ol.wheel-use-steps li{grid-template-columns:30px minmax(0,1fr);gap:9px;padding:11px 10px}
  .content-card ol.wheel-use-steps li::before{width:28px;height:28px;font-size:13px}
}

/* ===== Style section 2 ===== */
/* Make the cross-link at the top of the sidebar larger and easier to notice */
.sidebar a.site-switch-link{
  display:flex;align-items:center;gap:12px;
  min-height:32px;padding:13px 14px;margin:0 2px 10px;
  border:1px solid #b8e7da;border-radius:13px;
  background:#eaf8f4;color:#19313e;
  font-size:15px;font-weight:650;line-height:1.35;
  box-shadow:0 3px 10px rgba(8,127,120,.08);
}
.sidebar a.site-switch-link .emoji{
  display:grid;place-items:center;flex:0 0 24px;width:26px;height:26px;
  border-radius:10px;background:#d5f2e9;font-size:12px;
}
.sidebar a.site-switch-link:hover{background:#dcf5ed;border-color:#8fd7c4;color:#055f57}
body.dark-mode .sidebar a.site-switch-link{background:#183b38!important;color:#a7f3e2!important;border-color:#356c63!important}
body.dark-mode .sidebar a.site-switch-link .emoji{background:#24514a!important}
@media(max-width:700px){.sidebar a.site-switch-link{font-size:15px;min-height:32px;margin:0 2px 10px;padding:13px 14px}.sidebar a.site-switch-link .emoji{width:22px;height:22px;flex-basis:22px;font-size:12px}}
