:root {
  color-scheme: light;
  --ink: #292637;
  --muted: #676374;
  --line: #e0dce8;
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: #f6f6fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 25%, #fff, transparent 65%);
}
button,
a {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #6655c2;
  outline-offset: 3px;
}
.sheet {
  width: min(880px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.mast,
.brand,
.help,
.customize,
.stage-head,
.sectionhead,
.plain,
.toss,
.option,
.dlghead {
  display: flex;
  align-items: center;
}
.mast {
  justify-content: space-between;
  height: 78px;
}
.brand {
  gap: 10px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand img {
  width: 35px;
}
.help,
.customize,
.plain {
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.widget {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 24px 28px 26px;
  border-radius: 32px;
  background:
    radial-gradient(
      ellipse at 46% 30%,
      #c8bdff 0%,
      #afa3f2 37%,
      transparent 72%
    ),
    linear-gradient(113deg, #a2b5f1, #a08bdd 75%, #b69ce9);
  box-shadow:
    inset 0 1px 0 #fff9,
    0 12px 36px -16px #54507c66;
  border: 1px solid #a59ac456;
  text-align: center;
}
.widget:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(#fff2 1px, transparent 1px),
    linear-gradient(90deg, #fff2 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse, #0001, #0005);
}
.stage-head,
.sectionhead,
.dlghead {
  justify-content: space-between;
}
.stage-head h1 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 0;
}
.customize {
  background: #ffffff55;
  border: 1px solid #ffffff85;
  padding: 7px 12px;
  border-radius: 99px;
  color: #49405f;
}
.customize:hover {
  background: #ffffff88;
}
.outcome {
  position: relative;
  margin: 0 0 14px;
}
.outcome p {
  margin: 0;
  font-weight: 650;
  font-size: 16px;
  color: #39344f;
  overflow-wrap: anywhere;
}
.toss {
  margin: auto;
  justify-content: center;
  gap: 9px;
  background: #302b46;
  color: white;
  border: 1px solid #302b46;
  border-radius: 99px;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  box-shadow: 0 3px 8px #50436b33;
}
.toss:hover {
  background: #423a60;
}
.options,
.log {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #ffffffeb;
  padding: 17px 22px;
}
.sectionhead h2,
.dlghead h2 {
  margin: 0;
  font-size: 17px;
}
.plain {
  color: #655591;
  padding: 5px;
}
.duel {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.option {
  min-width: 0;
  gap: 12px;
  padding: 8px 0;
}
.option + .option {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.token {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid #cdc6df;
  background: #eeeafb;
  border-radius: 50%;
  color: #716099;
  font-size: 21px;
}
.option + .option .token {
  background: #e9edf8;
  border-color: #c7d0e8;
  color: #59678d;
}
.option small,
.option strong {
  display: block;
}
.option small,
.entry small,
.entry time,
#history p {
  color: var(--muted);
  font-size: 12px;
}
.option strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.log {
  padding: 15px 22px;
}
.log summary {
  font-size: 14px;
  font-weight: 650;
}
.log summary span {
  float: right;
  border-radius: 20px;
  background: #f1eef5;
  min-width: 25px;
  text-align: center;
  color: #69647b;
}
.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.entry strong {
  overflow-wrap: anywhere;
}
.entry time {
  margin-left: auto;
}
#history {
  margin-top: 12px;
}
#panel {
  color: var(--ink);
  width: min(400px, 92vw);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 15px 70px #28203433;
}
#panel::backdrop {
  background: #201b305e;
}
.dlghead {
  margin-bottom: 15px;
}
.dlghead button {
  width: 32px;
  height: 32px;
  font-size: 21px;
  border-radius: 50%;
  background: #f2eff6;
}
.choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  background: #f5f3f9;
}
.choice:hover {
  background: #eae5f6;
}
#panel p {
  line-height: 1.7;
}
.coin-editor {
  --ced-ink: #373147;
  --ced-muted: #706879;
  --ced-paper: #f9f8fc;
  --ced-line: #d9d4e3;
  --ced-gold: #cbc3ee;
}
.coin-editor .ced-preview {
  background: #9286bf;
}
.coin-editor button.ced-save {
  background: #3e355a;
}
@media (max-width: 650px) {
  .sheet {
    width: min(100% - 24px, 500px);
  }
  .mast {
    height: 58px;
    padding: 0 4px;
  }
  .brand img {
    width: 29px;
  }
  .brand {
    font-size: 17px;
  }
  .widget {
    padding: 17px 14px 21px;
    border-radius: 26px;
  }
  .stage-head h1 {
    font-size: 17px;
  }
  .customize {
    font-size: 12px;
    padding: 6px 10px;
  }
  .options,
  .log {
    margin-top: 12px;
    padding: 14px 16px;
  }
  .outcome p {
    font-size: 14px;
  }
  .duel {
    margin-top: 9px;
  }
  .token {
    width: 31px;
    height: 31px;
  }
  .option {
    gap: 8px;
  }
  .option strong {
    font-size: 16px;
  }
  .widget .toss {
    padding: 10px 24px;
  }
}

