@charset UTF-8;

x-factris {
  background: #044;
  border-radius: 0 0 12px 12px;
  color: #fff;
  font-family: Comfortaa, sans-serif;
  line-height: 1.15;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  white-space: nowrap;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  transform: none;
  margin: 0;
  padding: 0
}

x-factris .factris-body {
  background: #155;
  border-radius: 8px;
  box-shadow: 0 -4px 0 #033;
  height: 500px;
  overflow: hidden;
  position: relative;
  flex: 1 1;
  width: auto;
  margin: 4px 10px 0
}

x-factris .factris-panel-left,
x-factris .factris-panel-right,
x-factris .factris-panel-top {
  background: #0000;
  position: absolute
}

x-factris .factris-panel-top {
  border-radius: 12px 12px 0 0;
  left: 50%;
  margin-left: -90px;
  padding-top: 10px;
  text-align: center;
  width: 180px;
  background: none;
  bottom: auto;
  top: 128px;
  z-index: 2
}

x-factris .factris-panel-top .corner.left {
  bottom: -1px;
  left: -12px
}

x-factris .factris-panel-top .corner.right {
  bottom: -1px;
  right: -12px
}

x-factris .factris-panel-left {
  left: -120px;
  text-align: right;
  top: 0;
  width: 110px;
  border-bottom: 2px solid hsla(0, 0%, 100%, .2);
  border-radius: 0;
  padding: 10px 0 10px 10px
}

x-factris .factris-panel-left .corner {
  bottom: -16px;
  right: -1px
}

x-factris .factris-panel-right {
  right: -100px;
  top: 0;
  width: 90px;
  border-radius: 0;
  text-align: left;
  padding: 10px 10px 10px 0
}

x-factris .factris-panel-right .corner {
  bottom: -16px;
  left: -1px
}

x-factris,
x-factris .factris-panel-left,
x-factris .factris-panel-right {
  box-shadow: 0 4px 0 #122
}

x-factris .corner {
  position: absolute
}

x-factris .corner path {
  fill: #083781
}

x-factris .corner path.dark {
  fill: #041e47
}

x-factris .play {
  border: 10px solid #fff;
  display: block;
  left: 50%;
  position: absolute;
  top: 50%;
  fill: #fff;
  border-radius: 100%;
  box-shadow: 0 4px 0 #022, inset 0 4px 0 #022;
  cursor: pointer;
  margin-left: -50px
}

x-factris .play svg {
  display: block
}

x-factris .logo {
  filter: drop-shadow(0 4px 0 #022);
  height: 60px;
  left: 50%;
  position: absolute;
  top: 50%;
  width: 200px;
  margin: -100px 0 0 -100px
}

x-factris .overlay {
  font-size: 48px;
  font-weight: 700;
  left: 0;
  position: absolute;
  text-align: center;
  text-shadow: 0 2px 0 #033;
  top: 71px;
  width: 100%;
  z-index: 10
}

x-factris .logo,
x-factris .overlay,
x-factris .play {
  opacity: 0;
  pointer-events: none;
  transform: scale(.5);
  transition: opacity .2s linear, transform .4s cubic-bezier(.33, 1.9, .52, .7)
}

x-factris .logo.show,
x-factris .overlay.show,
x-factris .play.show {
  opacity: 1;
  pointer-events: all;
  transform: none
}

x-factris button {
  background: #022;
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 0 #011;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .08s
}

x-factris button x-icon {
  fill: #fff
}

x-factris button .icon {
  fill: #fff;
  margin: 0 auto
}

x-factris button:focus,
x-factris button:hover {
  background: #066
}

x-factris button.active,
x-factris button:active {
  background: #499;
  box-shadow: none;
  transform: translateY(4px)
}

x-factris .factris-keys {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 14px
}

x-factris .factris-keys>button {
  width: 50px
}

x-factris .factris-keys>button x-icon {
  margin-top: 6px
}

x-factris .keys-center {
  display: flex;
  flex-direction: column;
  width: 100px;
  margin: 0 14px
}

x-factris .keys-center button:first-child {
  height: 42px;
  margin-bottom: 14px
}

x-factris .keys-center button:first-child x-icon {
  margin-bottom: -4px
}

x-factris .keys-center button:last-child x-icon {
  margin: -5px 0 -7px
}

x-factris .keys-play {
  display: flex;
  margin-bottom: 12px
}

x-factris .keys-play x-icon {
  margin-top: 5px
}

x-factris .keys-play button {
  height: 38px;
  width: 40px
}

x-factris .keys-play button:first-child {
  margin-right: 10px
}

x-factris .discard {
  border-radius: 100%;
  height: 39px;
  width: 40px;
  margin: -1px 0 0 6px
}

x-factris .discard-count {
  display: inline-block;
  height: 40px;
  width: 40px;
  margin: -1px 0 -1px 6px
}

x-factris .discard-count circle {
  fill: none;
  stroke: #fff;
  stroke-width: 10px;
  transform: rotate(-90deg);
  stroke-dasharray: 201px;
  transition: stroke-dashoffset .2s
}

x-factris .discard-count text {
  font-family: inherit;
  fill: #fff;
  text-anchor: middle
}

x-factris .discard-count text.large {
  font-weight: 700;
  font-size: 32px;
  transform: translateY(11px)
}

x-factris .discard-count text.small {
  font-size: 9px
}

x-factris .text-small {
  white-space: nowrap;
  font-size: 12px
}

x-factris .text-large {
  font-weight: 700;
  white-space: nowrap;
  font-size: 24px
}

x-factris .discard-label {
  margin: auto
}

x-factris .text-large.margin {
  margin-top: 8px
}

x-factris .text-large.narrow {
  letter-spacing: -.07em
}

x-factris hr {
  background: hsla(0, 0%, 100%, .2);
  height: 2px;
  margin: 8px 0 10px
}

x-factris .highscore-panel {
  text-align: left
}

x-factris .highscore-title {
  font-size: 16px;
  margin-bottom: 8px
}

x-factris .highscore-panel table {
  font-size: 12px;
  line-height: 1.3;
  opacity: .8;
  width: 100%
}

x-factris .highscore-panel table a:hover {
  opacity: 1;
  text-decoration: underline
}

x-factris .highscore {
  height: 100%;
  left: 0;
  overflow: auto;
  position: absolute;
  top: 0;
  width: 100%
}

x-factris .highscore .text-large {
  text-align: center;
  margin: 40px
}

x-factris .highscore x-icon {
  fill: #fff;
  margin-bottom: -6px
}

x-factris .highscore table {
  width: calc(100%-80px);
  margin: 0 40px
}

x-factris .highscore table td {
  border-bottom: 1px solid hsla(0, 0%, 100%, .5);
  padding: 6px 0 5px
}

x-factris .highscore table tr:last-child td {
  border: none
}

x-factris .factris-board {
  overflow: scroll;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  pointer-events: none;
  transform-origin: center 60%;
}

x-factris .grid {
  opacity: .6
}

x-factris .faint-grid {
  opacity: .5
}

x-factris .factris-board line {
  stroke: #fff;
  stroke-linecap: round
}

x-factris .grid line.thick {
  stroke-width: 2
}

x-factris .tiles rect {
  fill: #f85;
  stroke: #fb8;
  stroke-width: 1;
  stroke-linejoin: round;
  transition: fill .2s
}

x-factris .tiles rect.fixed {
  fill: #3aa;
  stroke: #7ff;
  opacity: 1 !important
}

x-factris .tiles rect.removing {
  fill: #ffe7ca;
  stroke: #ffe7ca;
  opacity: 0
}

x-factris .tiles rect.error {
  fill: #7aa;
  stroke: #aff
}

x-factris .tiles.animated rect {
  transition: fill .2s, stroke .2s, transform .3s, opacity .2s;
  transition-delay: 0 0 .7s, .6s
}

x-factris .scores text {
  text-anchor: middle;
  fill: #e72;
  font-size: 20px;
  font-weight: 700;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s linear, transform .4s cubic-bezier(.33, 1.9, .52, .7);
  stroke: #fff;
  stroke-width: 3px;
  paint-order: stroke;
  stroke-linejoin: round
}

.is-safari x-factris .scores text {
  stroke: none
}

x-factris .scores .visible text {
  opacity: 1;
  transform: none
}

x-factris .highscore-btn {
  display: block;
  margin-left: 10px
}

x-factris,
x-factris .factris-panel-left,
x-factris .factris-panel-right,
x-factris .factris-panel-top {
  border-radius: 0;
  box-shadow: none
}

x-factris .corner,
x-factris .highscore-panel,
x-factris hr {
  display: none !important
}

x-factris .factris-panel-left,
x-factris .factris-panel-right {
  display: flex;
  position: static;
  width: auto;
  padding: 10px
}

x-factris .factris-panel-left>:first-child,
x-factris .factris-panel-right>:first-child {
  flex-grow: 1
}

x-factris .keys-play button x-icon,
x-factris .keys-play button x-icon svg {
  height: 32px !important;
  width: 32px !important
}

x-factris .factris-panel-right .text-large {
  display: inline-block;
  margin-right: 8px
}

x-factris .factris-panel-right .text-large:after {
  content: ","
}

x-factris .factris-panel-right .text-large:last-child:after {
  content: none
}

html.webview x-factris .factris-keys {
  margin-bottom: calc(14px+env(safe-area-inset-bottom))
}

x-factris .discard x-icon,
x-factris .discard x-icon svg {
  height: 28px !important;
  width: 28px !important
}

x-factris .keys-play,
x-factris .text-large.margin {
  margin: 0
}

.factris-container {
  background: linear-gradient(tobottomright, #c5cbd6, #79818e);
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0
}

x-factris .keys-center button,
x-factris .factris-panel-left .panel-item {
  width: 100px
}

x-factris .highscore-panel table td:nth-child(2),
x-factris .highscore table td:last-child {
  text-align: right
}

x-factris .factris-panel-top.hide,
x-factris .discard-count .small {
  display: none
}

x-factris .keys-play button x-icon,
x-factris .discard x-icon {
  margin-top: 3px
}

.factris-mod-menu {
  position: absolute;
  top: 0;
  height: 70%;
  transition: top 1s;
  display: block;
  width: 30%;
  z-index: 1000;
  background: #033;
  border-radius: 0 0 20px 0;
  padding: 2ch;
  overflow-y: scroll;
}

.factris-mod-menu fieldset {
  width: 90%;
  display: flex;
  flex-direction: column;
  overflow-x: scroll;
  border-radius: 20px;
  border: 2px solid #244;
  margin: 3ch auto;
  padding: 1.5ch;
}

.factris-mod-menu fieldset>* {
  padding: .5ch;
}

input {
  border-radius: 20px;
  border: 2px solid#244;
  padding: 1ch;
  text-align: center;
  background: #0000;
  color: white;
}

.factris-mod-menu[hidden="true"] {
  top: -100vh;
}

.factris-mod-menu .toggle-button {
  transition: opacity .2s;
}

input[type="checkbox"]:has(+label) {
  display: none;
}

input[type="checkbox"]+label {
  transition: .2s;
  margin: .5ch;
  padding: .5ch 2ch;
  border-radius: 20px;
  border: 2px solid #399;
}

input:checked+label {
  background-color: #399;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.fade {
  animation: fadeOut 1.5s 2s forwards;
}