#cosmos-ring,#cosmos-entry {
  transform:translate(-50%,-50%);
  border-radius:50%;
}
#cosmos-ring {
  position:fixed;
  z-index:0;
  pointer-events:none;
  background:radial-gradient(circle,rgba(244,186,84,.42) 0,rgba(244,186,84,.22) 30%,rgba(244,186,84,.08) 52%,transparent 70%);
}
#cosmos-entry {
  position:absolute;
  z-index:4;
  border:0;
  padding:0;
  background:none;
  cursor:pointer;
}
#cosmos-ring .cosmos-orbit-mask {width:100%;height:100%;mask-image:linear-gradient(to right,#000 var(--ring-fade-start),transparent var(--ring-fade-end));-webkit-mask-image:linear-gradient(to right,#000 var(--ring-fade-start),transparent var(--ring-fade-end));}
#cosmos-ring canvas {width:100%;height:100%;display:block;animation:cosmos-orbit 70s linear infinite}
body:has(#closeup:not([hidden])) :is(#cosmos-ring,#cosmos-entry) {display:none}
@keyframes cosmos-orbit {to {transform:rotate(360deg)}}
#cosmos-entry:focus-visible,#cosmos-back:focus-visible,#cosmos-targets button:focus-visible {outline:2px solid #e0a030;outline-offset:2px}
#cosmos {
  position:fixed;
  inset:0;
  z-index:50;
  overflow:hidden;
  background:radial-gradient(120% 80% at 30% 20%,#0f1830,#060912 70%);
  color:#f5ecd2;
  user-select:none;
}
#cosmos-canvas,#cosmos-targets {position:absolute;inset:0;width:100%;height:100%}
#cosmos-canvas,#cosmos-targets {touch-action:none}
#cosmos-targets button {position:absolute;transform:translate(-50%,-50%);border:0;padding:0;border-radius:50%;background:none;cursor:pointer;color:inherit}
#cosmos-back {
  position:absolute;
  left:calc(10px + env(safe-area-inset-left,0px));
  bottom:calc(12px + var(--safe-bottom,env(safe-area-inset-bottom,0px)));
  z-index:2;
  height:46px;
  padding:0 10px;
  border:0;
  background:none;
  color:inherit;
  font:500 15px var(--serif);
  letter-spacing:.1em;
  cursor:pointer;
  opacity:.78;
  text-shadow:0 1px 8px #000;
}
#cosmos-tag {
  position:absolute;
  width:max-content;
  max-width:calc(100% - 28px);
  transform:translateX(-50%);
  color:inherit;
  font:400 15px var(--serif);
  line-height:1.7;
  text-align:center;
  overflow-wrap:anywhere;
  pointer-events:none;
  text-shadow:0 1px 6px #000;
}
#cosmos-tag.above {transform:translate(-50%,-100%)}
#cosmos-rounds {
  --round-button:36px;
  --round-now:58px;
  position:absolute;
  right:calc(14px + env(safe-area-inset-right,0px));
  bottom:calc(12px + var(--safe-bottom,env(safe-area-inset-bottom,0px)));
  width:calc(var(--round-count,0)*var(--round-button) + var(--round-now));
  max-width:min(calc(100% - 84px),var(--round-available,100%));
  display:flex;
  overflow-x:auto;
  scrollbar-width:none;
  touch-action:pan-x;
  overscroll-behavior-x:contain;
  z-index:2;
}
#cosmos-rounds[hidden] {display:none}
#cosmos-rounds button {
  flex:0 0 var(--round-button);
  height:46px;
  border:0;
  background:none;
  color:inherit;
  font:500 15px var(--serif);
  opacity:.57;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  cursor:pointer;
}
#cosmos-rounds button:last-child {flex-basis:var(--round-now);font-size:13px;letter-spacing:.14em;position:relative;padding-left:8px}
#cosmos-rounds button:last-child::before {content:"";position:absolute;left:8px;top:14px;bottom:14px;width:1px;background:#f5ecd238}
#cosmos-rounds button::after {content:"";width:4px;height:4px;border-radius:4px;background:var(--round-color,#f5ecd2);box-shadow:0 0 7px 1px var(--round-color,#f5ecd2)}
#cosmos-rounds button[aria-pressed="true"] {opacity:1}
#cosmos-rounds button[aria-pressed="true"]::after {width:16px;height:2px}
@media (max-width:360px) {
  #cosmos-rounds {--round-button:29px;--round-now:48px}
  #cosmos-rounds button {font-size:13px}
}
#cosmos-tag small {display:block;font:400 12px var(--sans);opacity:.72;letter-spacing:.06em;margin-top:2px}
#cosmos-hint {
  position:absolute;
  inset:auto 0 calc(70px + var(--safe-bottom,env(safe-area-inset-bottom,0px)));
  margin:0;
  color:inherit;
  opacity:.55;
  font:400 13px var(--serif);
  text-align:center;
  letter-spacing:.2em;
  pointer-events:none;
  transition:opacity .6s;
}
@media (prefers-reduced-motion:reduce) {#cosmos-ring canvas {animation:none}}
#cosmos-perf {
  position:fixed;z-index:90;top:max(10px,env(safe-area-inset-top,0px));right:10px;
  width:min(330px,calc(100% - 20px));max-height:calc(100% - 24px - var(--safe-bottom,env(safe-area-inset-bottom,0px)));overflow:auto;
  box-sizing:border-box;color:#f5ecd2;background:#161b2d;padding:12px;border-radius:8px;font:14px/1.4 system-ui,sans-serif;
}
#cosmos-perf header {display:flex;align-items:center;justify-content:space-between;gap:8px}
#cosmos-perf h2 {margin:0;font:600 16px/1.4 system-ui,sans-serif}
#cosmos-perf button {
  appearance:none;display:block;width:100%;min-height:44px;padding:8px;margin:8px 0;
  border:1px solid #d9c9a5;border-radius:6px;background:#fbefce;color:#161b2d;font:600 16px/1.4 system-ui,sans-serif;
}
#cosmos-perf header button {width:auto;min-width:56px;margin:0}
#cosmos-perf textarea {display:block;width:100%;box-sizing:border-box;margin:4px 0 8px;font:16px/1.4 system-ui,sans-serif}
#cosmos-perf ul {padding-left:20px}
#cosmos-perf li {margin:6px 0}
#cosmos-perf-progress {
  position:fixed;z-index:90;top:max(10px,env(safe-area-inset-top,0px));right:10px;pointer-events:none;
  padding:3px 7px;border-radius:6px;background:#161b2d;color:#f5ecd2;font:13px/1.4 system-ui,sans-serif;
}
