@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  --bg: #f7f8fc;
  --card: #fff;
  --ink: #25243d;
  --muted: #9392a5;
  --line: #eeedf4;
  --purple: #7761da;
  --soft: #f4f1fd;
  --input: #fafafd;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  transition:
    background 0.2s,
    transform 0.2s;
}
button:hover {
  background: var(--soft);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #baa9ff;
  outline-offset: 3px;
}
input,
select,
textarea {
  color: var(--ink);
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--purple);
}
header {
  height: 86px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 5%;
  gap: 65px;
}
.brand {
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -1.5px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-icon {
  color: var(--purple);
  font-size: 39px;
  vertical-align: middle;
  margin-right: 6px;
}
.brand-dot {
  color: var(--purple);
}
nav {
  display: flex;
  height: 100%;
  gap: 28px;
  align-items: center;
}
nav button {
  font-size: 13px;
  height: 100%;
  padding: 0 5px;
  color: #858395;
}
.nav-active {
  border-bottom: 2px solid var(--purple);
  color: var(--purple);
  font-weight: 700;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.header-actions button {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.primary {
  background: var(--purple);
  color: #fff;
  border-radius: 8px;
}
.primary:hover {
  background: #6750cc;
}
main {
  max-width: 1360px;
  margin: auto;
  padding: 42px 48px 0;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a49ab9;
  font-weight: 700;
}
.eyebrow span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a995e6;
  margin-right: 7px;
}
h1 {
  font-family: Manrope, sans-serif;
  font-size: 34px;
  letter-spacing: -1.5px;
  line-height: 1.35;
  margin: 10px 0;
}
h1 span {
  color: var(--purple);
}
.intro p {
  color: #8d8b9d;
  font-size: 13px;
  margin: 8px 0;
}
.intro-note {
  transform: rotate(-6deg);
  color: #aaa2bd;
  font-size: 13px;
  line-height: 1.9;
  padding-right: 20px;
}
.intro-note strong {
  font-weight: 500;
  color: #82749f;
}
.mobile {
  display: none;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
  gap: 24px;
}
.wheel-card,
.entry-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
}
.wheel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
}
.wheel-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.small-icon {
  color: var(--purple);
  font-size: 22px;
}
.wheel-name button {
  font-weight: 600;
  font-size: 13px;
  padding: 5px;
}
.wheel-name button span {
  margin-left: 9px;
  color: var(--muted);
}
.wheel-toolbar > div:last-child {
  display: flex;
  gap: 9px;
}
.wheel-toolbar > div:last-child button {
  font-size: 19px;
  color: #9b97ac;
  width: 30px;
  height: 30px;
  border-radius: 6px;
}
.wheel-stage {
  height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.wheel-wrap {
  position: relative;
  width: 345px;
  height: 345px;
  z-index: 2;
  filter: drop-shadow(0 8px 10px #3c29651c);
}
#wheel {
  width: 100%;
  height: 100%;
  border: 9px solid white;
  border-radius: 50%;
  outline: 1px solid #efebf4;
  background: white;
}
.pointer {
  position: absolute;
  right: -13px;
  top: calc(50% - 16px);
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-right: 29px solid var(--ink);
  z-index: 4;
  filter: drop-shadow(2px 2px 1px #0002);
}
#center-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  height: 78px;
  width: 78px;
  background: white;
  border: 7px solid #ffffff99;
  background-clip: padding-box;
  box-shadow: 0 3px 10px #0002;
  font-family: Manrope;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
#center-spin span {
  font-size: 17px;
  color: var(--purple);
}
.orbit {
  position: absolute;
  border: 1px dashed #ece9f4;
  border-radius: 50%;
  width: 400px;
  height: 400px;
}
.orbit-two {
  width: 470px;
  height: 470px;
  border-style: solid;
  border-color: #f5f2fa;
}
.spark {
  position: absolute;
  color: #c2b3e8;
}
.spark-one {
  top: 45px;
  right: 15%;
  font-size: 38px;
}
.spark-two {
  bottom: 40px;
  left: 14%;
  font-size: 23px;
  color: #e2b879;
}
.spin-controls {
  text-align: center;
  margin: 8px 0 25px;
}
.spin-button {
  padding: 15px 35px;
  border-radius: 11px;
  background: var(--purple);
  color: #fff;
  min-width: 224px;
  font-weight: 700;
  box-shadow: 0 5px 12px #7761da25;
}
.spin-button:hover {
  background: #6650c9;
  transform: translateY(-1px);
}
.spin-button span {
  margin-left: 25px;
  font-size: 19px;
}
.spin-controls p {
  color: #aaa6b9;
  font-size: 10px;
  margin-top: 12px;
}
kbd {
  font-family: inherit;
  font-size: 9px;
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--input);
}
.wheel-footer {
  border-top: 1px solid var(--line);
  padding: 17px 22px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #a49eb4;
}
.wheel-footer i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #91bfa9;
  margin-right: 5px;
}
.wheel-footer button {
  font-size: 10px;
  color: #9281b9;
}
.tabs {
  display: flex;
  gap: 25px;
  padding: 0 23px;
  border-bottom: 1px solid var(--line);
  height: 65px;
  align-items: stretch;
}
.tabs button {
  font-weight: 500;
  color: #9690a8;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
}
.tabs button.active {
  color: var(--purple);
  border-bottom: 2px solid var(--purple);
}
.tabs b {
  font-size: 10px;
  font-weight: 500;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 5px;
}
.tabs .settings-tab {
  margin-left: auto;
  font-size: 18px;
}
.panel {
  padding: 23px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
h2 {
  font-family: Manrope, sans-serif;
  font-size: 16px;
  letter-spacing: -0.4px;
  margin: 0;
}
.panel-heading button {
  font-size: 10px;
  color: #a297b2;
  padding: 5px;
}
.list-tools {
  display: flex;
  gap: 7px;
  margin-bottom: 13px;
}
.list-tools input {
  width: 100%;
  padding: 9px 11px;
  font-size: 11px;
  min-width: 0;
}
.list-tools button {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 31px;
  color: #9d91b0;
  font-size: 12px;
}
#entry-list {
  height: 275px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}
.entry {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-bottom: 1px;
  border-radius: 6px;
  padding: 3px 5px;
}
.entry:hover {
  background: var(--input);
}
.entry.off {
  opacity: 0.4;
}
.entry-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.entry .entry-label {
  border: 0;
  background: none;
  font-size: 12px;
  width: 100%;
  padding: 3px;
  min-width: 0;
}
.entry .weight {
  width: 38px;
  font-size: 10px;
  padding: 3px;
  text-align: center;
}
.entry .entry-action {
  font-size: 12px;
  color: #a59bb4;
  padding: 3px;
}
.entry img {
  width: 23px;
  height: 23px;
  border-radius: 4px;
  object-fit: cover;
}
.entry-index {
  font-size: 9px;
  color: #c0bacb;
  width: 13px;
}
#add-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
#new-entry {
  padding: 11px;
  font-size: 11px;
  flex: 1;
  min-width: 0;
}
#add-form button {
  width: 36px;
  font-size: 21px;
}
.entry-actions {
  display: flex;
  gap: 8px;
  margin: 13px 0 20px;
}
.entry-actions button {
  font-size: 10px;
  padding: 5px;
  color: #9b8eb1;
}
.entry-actions button:last-child {
  margin-left: auto;
}
.mode-box {
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode-symbol {
  font-size: 23px;
  color: #b5a3d6;
}
.mode-box strong {
  font-size: 10px;
  font-weight: 600;
}
.mode-box p {
  font-size: 9px;
  color: #a49bb2;
  margin: 5px 0 0;
}
.mode-box select {
  margin-left: auto;
  font-size: 10px;
  padding: 7px;
  max-width: 100px;
  background: var(--card);
}
.autosave {
  color: #b0a8ba;
  text-align: center;
  font-size: 9px;
  margin-top: 17px;
}
.autosave span {
  color: #8bbaa5;
  margin-right: 4px;
}
.templates {
  margin: 34px 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-heading .eyebrow {
  font-size: 8px;
  letter-spacing: 1.7px;
}
.section-heading h2 {
  font-size: 20px;
  margin-top: 9px;
}
.section-heading > button {
  font-size: 11px;
  color: #9b8bb6;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.template-grid > button {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  display: flex;
  align-items: center;
  padding: 18px 14px;
  gap: 12px;
}
.template-grid > button:hover {
  transform: translateY(-3px);
  border-color: #c9bbeb;
}
.template-icon {
  width: 38px;
  height: 39px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 23px;
  flex-shrink: 0;
}
.peach {
  background: #fff0e8;
  color: #dba88b;
}
.lavender {
  background: #f1ebff;
  color: #a28bc9;
}
.mint {
  background: #eaf5f1;
  color: #8cb5a3;
}
.yellow {
  background: #fff7df;
  color: #c5b071;
}
.template-grid strong {
  font-size: 11px;
  font-weight: 600;
}
.template-grid p {
  font-size: 9px;
  color: #aaa1b5;
  margin: 6px 0 0;
}
.template-grid > button > span:last-child {
  margin-left: auto;
  color: #b6abc6;
}
footer {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  gap: 20px;
}
footer .brand {
  font-size: 18px;
  color: #aaa1bc;
}
footer p,
footer button {
  font-size: 9px;
  color: #b2a9be;
}
footer button {
  margin-left: auto;
}
dialog {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 18px;
  padding: 25px;
  width: 480px;
  max-width: calc(100% - 30px);
  max-height: 85vh;
  box-shadow: 0 20px 100px #25243d22;
}
dialog::backdrop {
  background: #211c3855;
  backdrop-filter: blur(5px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-top button {
  font-size: 25px;
  color: var(--muted);
}
.dialog-top h2 {
  font-size: 20px;
}
#dialog-body p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
#dialog-body input,
#dialog-body textarea,
#dialog-body select {
  width: 100%;
  padding: 11px;
  margin-bottom: 12px;
}
#dialog-body textarea {
  min-height: 230px;
  resize: vertical;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.dialog-actions button,
.soft-button {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.winner {
  text-align: center;
  padding: 20px;
}
.winner .winner-icon {
  font-size: 46px;
}
.winner h3 {
  font-size: 38px;
  overflow-wrap: anywhere;
  margin: 15px 0;
  color: var(--purple);
}
.winner img {
  width: 130px;
  max-height: 160px;
  object-fit: contain;
}
.field {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  margin: 18px 0;
}
.field input,
.field select {
  width: 100%;
  padding: 9px;
}
.field input[type="range"] {
  padding: 0;
  accent-color: var(--purple);
}
.field span {
  color: var(--muted);
}
.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin: 18px 0;
}
.toggle input {
  accent-color: var(--purple);
}
.settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.result-switch {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}
.result-switch button {
  font-size: 12px;
  padding: 8px;
  border-radius: 6px;
}
.result-switch .active {
  color: var(--purple);
  background: var(--soft);
}
#result-list {
  max-height: 365px;
  overflow: auto;
}
.result-row {
  padding: 13px 5px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.result-row span {
  font-size: 11px;
  color: var(--muted);
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 15px;
  line-height: 1.8;
}
.saved-row {
  display: flex;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  align-items: center;
}
.saved-row strong {
  flex: 1;
  overflow-wrap: anywhere;
}
.saved-row button {
  padding: 7px;
  border-radius: 6px;
  font-size: 12px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--card);
  padding: 13px 22px;
  border-radius: 10px;
  z-index: 100;
  font-size: 12px;
  transition: transform 0.3s;
  max-width: 90%;
  text-align: center;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
}
#celebration {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}
body.dark {
  --bg: #181722;
  --card: #22212e;
  --ink: #eeeaf8;
  --muted: #a39cb5;
  --line: #34313f;
  --soft: #343044;
  --input: #292735;
}
.dark #wheel {
  border-color: #393442;
}
.dark .orbit {
  opacity: 0.15;
}
.dark #center-spin {
  color: #25243d;
}
.dark .pointer {
  border-right-color: #d7c9ff;
}
.presentation .entry-card,
.presentation .intro,
.presentation header,
.presentation .templates,
.presentation footer {
  display: none;
}
.presentation .workspace {
  display: block;
}
.presentation main {
  max-width: 1000px;
}
.presentation .wheel-stage {
  height: 65vh;
}
.presentation .wheel-wrap {
  width: min(58vh, 600px);
  height: min(58vh, 600px);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  main {
    padding-top: 50px;
  }
  .wheel-stage {
    height: 420px;
  }
  .wheel-wrap {
    width: 375px;
    height: 375px;
  }
  #entry-list {
    height: 305px;
  }
}
@media (max-width: 1050px) {
  header {
    gap: 25px;
    padding: 0 25px;
  }
  nav {
    gap: 15px;
  }
  main {
    padding: 30px 25px 0;
  }
  .workspace {
    gap: 16px;
    grid-template-columns: minmax(0, 1.2fr) minmax(330px, 1fr);
  }
  .wheel-wrap {
    width: 300px;
    height: 300px;
  }
  .wheel-stage {
    height: 390px;
  }
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  h1 {
    font-size: 28px;
  }
  .intro-note {
    display: none;
  }
  .panel {
    padding: 18px;
  }
  .header-actions {
    gap: 5px;
  }
}
@media (max-width: 760px) {
  header {
    height: 70px;
    padding: 0 18px;
    gap: 10px;
  }
  .brand {
    font-size: 26px;
  }
  .brand-icon {
    font-size: 32px;
  }
  nav {
    display: none;
  }
  .header-actions button {
    padding: 9px;
  }
  .header-actions button span {
    display: none;
  }
  main {
    padding: 26px 16px 0;
  }
  .intro {
    margin-bottom: 23px;
  }
  h1 {
    font-size: 28px;
    letter-spacing: -1px;
  }
  .intro p {
    line-height: 1.7;
    font-size: 12px;
    max-width: 300px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .wheel-stage {
    height: 350px;
  }
  .wheel-wrap {
    width: 300px;
    height: 300px;
  }
  .wheel-toolbar {
    padding: 15px;
  }
  .spin-controls {
    margin-top: 0;
  }
  .wheel-footer {
    padding: 15px;
    font-size: 9px;
  }
  .entry-card {
    min-height: 590px;
  }
  .template-grid {
    gap: 9px;
  }
  .template-grid > button {
    padding: 15px 10px;
    gap: 8px;
  }
  .template-grid p {
    line-height: 1.7;
  }
  .template-icon {
    width: 30px;
    height: 33px;
    font-size: 20px;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .section-heading > button {
    max-width: 90px;
    line-height: 1.7;
    text-align: right;
  }
  .template-grid > button > span:last-child {
    display: none;
  }
  footer {
    gap: 15px;
  }
  footer button {
    display: none;
  }
  footer p {
    font-size: 8px;
  }
  .mobile {
    display: block;
  }
  #entry-list {
    height: 270px;
  }
}
