:root{
  --bg: #0b0b0b; 
  --card: #111111;  
  --soft: #151515;  
  --soft-2: #1a1a1a; 
  --text: #f2f2f2;
  --muted: #bdbdbd; 
  --line: #2a2a2a; 
  --accent: #e6e6e6;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  letter-spacing: .2px;
  padding: 32px 14px 56px;
}

h1{
  max-width: 980px;
  margin: 0 auto 14px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1.15;
}
#codeForm{
  max-width: 980px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

#codeForm br{ display:none; }

.notice{
  margin: 0 0 14px;
  padding: 14px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}
.notice ul{ margin: 0; padding-left: 20px; }
.notice li{ margin: 6px 0; line-height: 1.45; }

h3{
  margin: 18px 0 8px;
  padding: 8px 12px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
}
h3 + p{
  margin: 6px 0 10px;
  color: var(--muted);
}

label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 10px 4px 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #141414;
  cursor: pointer;
  user-select: none;
  transition: transform .05s ease, border-color .2s ease, background .2s ease;
  white-space: nowrap;
}
label:hover{ transform: translateY(-1px); border-color: #3a3a3a; }
input[type="radio"], input[type="checkbox"]{ accent-color: var(--accent); }

[id^="optionOneH"], [id^="optionTwoH"]{
  margin: 10px 0 14px;
  padding: 12px;
  background: #121212;
  border: 1px solid var(--line);
  border-radius: 10px;
}

[id^="optionOneH"] > strong,
[id^="optionTwoH"] > strong{ display:none; }

label[for="habit"]{
  display:block;
  margin: 8px 0 6px;
  font-weight: 700;
  color: #e3e3e3;
}

input[type="text"]{
  width: 100%;
  display: block;
  background: #0f0f0f;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  margin: 0 0 10px;
}
input[type="text"]:focus{
  border-color: #4a4a4a;
  box-shadow: 0 0 0 3px rgba(200,200,200,.12);
}

[id^="sectionOfCheckBoxes"]{
  position: relative;
  display: flex;
  flex-wrap: wrap;     /* wrap to next line as needed */
  gap: 12px 12px;      /* even spacing horizontally & vertically */
  padding-top: 26px;   /* room for heading */
  margin-top: 4px;
}
[id^="sectionOfCheckBoxes"]::before{
  content: "Select Days";
  position: absolute;
  top: 0;
  left: 0;
  font-size: 12px;
  font-weight: 700;
  color: #e3e3e3;
  opacity: .9;
}
[id^="sectionOfCheckBoxes"] label{
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #141414;
  border: 1px solid var(--line);
}
[id^="sectionOfCheckBoxes"] input[type="checkbox"]{
  transform: translateY(1px);
}

button{
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .04s ease, box-shadow .15s ease, background .2s ease;
}
button:active{ transform: translateY(1px); }
button[type="submit"]{
  background: #e6e6e6;
  color: #111;
  box-shadow: 0 6px 14px rgba(255,255,255,.1);
  margin-top: 8px;
}
.actions{
  max-width: 980px;
  margin: 10px auto 0;
  display: flex;
  gap: 10px;
}
#previewBtn, #downloadBtn{
  background: #1a1a1a;
  color: var(--text);
  border: 1px solid var(--line);
}

#previewCode{
  max-width: 980px;
  margin: 12px auto 0;
  background: #0f0f0f;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  color: #f1f1f1;
}

.hidden{ display:none !important; }

@media (max-width: 600px) {
  label{ width: auto; }
}
